BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
BesEvent Class Reference

#include <BesEvent.h>

+ Inheritance diagram for BesEvent:

Public Member Functions

 BesEvent ()
 
virtual ~BesEvent ()
 
virtual void Clear (Option_t *option="")
 
virtual void Delete (Option_t *option="")
 
virtual void Print (Option_t *option="")
 
virtual void SetEvent (TDigiEvent *digiEvent, TDisTrack *recEvent, TEvtHeader *evtHeader, TRecEvTime *recEvTime, Bool_t isRec)
 
virtual void SetHits ()
 
virtual void SetTracks (TDisTrack *recEvent)
 
virtual void SetMdcTracks (TDisTrack *recEvent)
 
virtual void SetTofTracks (TDisTrack *recEvent)
 
virtual void SetEmcShowers (TDisTrack *recEvent)
 
virtual void SetMucTracks (TDisTrack *recEvent)
 
virtual void SetExtTracks (TDisTrack *recEvent)
 
virtual void ConstructMdcTrackFromRec (BesGeoTrack *mdcTrack, const TRecMdcTrack *recTrack, TDisTrack *recEvent)
 
virtual void ConstructMucTrackFromRec (BesGeoTrack *mucTrack, const TRecMucTrack *recTrack)
 
virtual void ConstructEmcTrackFromRec (BesGeoTrack *emcTrack, const TRecEmcShower *recTrack)
 
virtual void ConstructTofTrackFromRec (BesGeoTrack *tofTrack, const TRecTofTrack *recTrack, TDisTrack *recEvent)
 
virtual void DrawHits (Option_t *option)
 
virtual void DrawTracks (Option_t *option)
 
void SetMagnetic (Double_t input)
 
const TObjArray * GetMdcDigiCol () const
 
const TObjArray * GetTofDigiCol () const
 
const TObjArray * GetEmcDigiCol () const
 
const TObjArray * GetMucDigiCol () const
 
const Int_t GetMdcDigiNum () const
 
const Int_t GetTofDigiNum () const
 
const Int_t GetEmcDigiNum () const
 
const Int_t GetMucDigiNum () const
 
const TMdcDigiGetMdcDigi (Int_t i) const
 
const TTofDigiGetTofDigi (Int_t i) const
 
const TEmcDigiGetEmcDigi (Int_t i) const
 
const TMucDigiGetMucDigi (Int_t i) const
 
const TObjArray * GetMdcTrackCol (TDisTrack *recEvent) const
 
const TObjArray * GetTofTrackCol (TDisTrack *recEvent) const
 
const TObjArray * GetEmcShowerCol (TDisTrack *recEvent) const
 
const TObjArray * GetMucTrackCol (TDisTrack *recEvent) const
 
const TObjArray * GetExtTrackCol () const
 
const TObjArray * GetDedxCol (TDisTrack *recEvent) const
 
const Int_t GetMdcTrackNum (TDisTrack *recEvent) const
 
const Int_t GetTofTrackNum (TDisTrack *recEvent) const
 
const Int_t GetEmcShowerNum (TDisTrack *recEvent) const
 
const Int_t GetMucTrackNum (TDisTrack *recEvent) const
 
const Int_t GetExtTrackNum () const
 
const Int_t GetDedxNum (TDisTrack *recEvent) const
 
const TRecMdcTrackGetMdcTrack (Int_t i, TDisTrack *recEvent) const
 
const TRecTofTrackGetTofTrack (Int_t i, TDisTrack *recEvent) const
 
const TRecEmcShowerGetEmcShower (Int_t i, TDisTrack *recEvent) const
 
const TRecMucTrackGetMucTrack (Int_t i, TDisTrack *recEvent) const
 
const TRecMdcDedxGetDedx (Int_t i) const
 
Long64_t GetRun ()
 
Long64_t GetEvent ()
 
Int_t GetYear ()
 
Int_t GetMonth ()
 
Int_t GetDay ()
 
Int_t GetHour ()
 
Int_t GetMin ()
 
Int_t GetSec ()
 
Int_t GetMC ()
 
BesEventHeader GetHeader ()
 
 BesEvent ()
 
virtual ~BesEvent ()
 
virtual void Clear (Option_t *option="")
 
virtual void Delete (Option_t *option="")
 
virtual void Print (Option_t *option="")
 
virtual void SetEvent (TDigiEvent *digiEvent, TDisTrack *recEvent, TEvtHeader *evtHeader, TRecEvTime *recEvTime, Bool_t isRec)
 
virtual void SetHits ()
 
virtual void SetTracks (TDisTrack *recEvent)
 
virtual void SetMdcTracks (TDisTrack *recEvent)
 
virtual void SetTofTracks (TDisTrack *recEvent)
 
virtual void SetEmcShowers (TDisTrack *recEvent)
 
virtual void SetMucTracks (TDisTrack *recEvent)
 
virtual void SetExtTracks (TDisTrack *recEvent)
 
virtual void ConstructMdcTrackFromRec (BesGeoTrack *mdcTrack, const TRecMdcTrack *recTrack, TDisTrack *recEvent)
 
virtual void ConstructMucTrackFromRec (BesGeoTrack *mucTrack, const TRecMucTrack *recTrack)
 
virtual void ConstructEmcTrackFromRec (BesGeoTrack *emcTrack, const TRecEmcShower *recTrack)
 
virtual void ConstructTofTrackFromRec (BesGeoTrack *tofTrack, const TRecTofTrack *recTrack, TDisTrack *recEvent)
 
virtual void DrawHits (Option_t *option)
 
virtual void DrawTracks (Option_t *option)
 
void SetMagnetic (Double_t input)
 
const TObjArray * GetMdcDigiCol () const
 
const TObjArray * GetTofDigiCol () const
 
const TObjArray * GetEmcDigiCol () const
 
const TObjArray * GetMucDigiCol () const
 
const Int_t GetMdcDigiNum () const
 
const Int_t GetTofDigiNum () const
 
const Int_t GetEmcDigiNum () const
 
const Int_t GetMucDigiNum () const
 
const TMdcDigiGetMdcDigi (Int_t i) const
 
const TTofDigiGetTofDigi (Int_t i) const
 
const TEmcDigiGetEmcDigi (Int_t i) const
 
const TMucDigiGetMucDigi (Int_t i) const
 
const TObjArray * GetMdcTrackCol (TDisTrack *recEvent) const
 
const TObjArray * GetTofTrackCol (TDisTrack *recEvent) const
 
const TObjArray * GetEmcShowerCol (TDisTrack *recEvent) const
 
const TObjArray * GetMucTrackCol (TDisTrack *recEvent) const
 
const TObjArray * GetExtTrackCol () const
 
const TObjArray * GetDedxCol (TDisTrack *recEvent) const
 
const Int_t GetMdcTrackNum (TDisTrack *recEvent) const
 
const Int_t GetTofTrackNum (TDisTrack *recEvent) const
 
const Int_t GetEmcShowerNum (TDisTrack *recEvent) const
 
const Int_t GetMucTrackNum (TDisTrack *recEvent) const
 
const Int_t GetExtTrackNum () const
 
const Int_t GetDedxNum (TDisTrack *recEvent) const
 
const TRecMdcTrackGetMdcTrack (Int_t i, TDisTrack *recEvent) const
 
const TRecTofTrackGetTofTrack (Int_t i, TDisTrack *recEvent) const
 
const TRecEmcShowerGetEmcShower (Int_t i, TDisTrack *recEvent) const
 
const TRecMucTrackGetMucTrack (Int_t i, TDisTrack *recEvent) const
 
const TRecMdcDedxGetDedx (Int_t i) const
 
Long64_t GetRun ()
 
Long64_t GetEvent ()
 
Int_t GetYear ()
 
Int_t GetMonth ()
 
Int_t GetDay ()
 
Int_t GetHour ()
 
Int_t GetMin ()
 
Int_t GetSec ()
 
Int_t GetMC ()
 
BesEventHeader GetHeader ()
 

Detailed Description

Constructor & Destructor Documentation

◆ BesEvent() [1/2]

BesEvent::BesEvent ( )

◆ ~BesEvent() [1/2]

BesEvent::~BesEvent ( )
virtual

Definition at line 48 of file BesEvent.cxx.

48 {
49 //
50 // BesEvent default destructor
51
52 // Delete all array elements
53 Delete();
54}
virtual void Delete(Option_t *option="")
Definition: BesEvent.cxx:58

◆ BesEvent() [2/2]

BesEvent::BesEvent ( )

◆ ~BesEvent() [2/2]

virtual BesEvent::~BesEvent ( )
virtual

Member Function Documentation

◆ Clear() [1/2]

void BesEvent::Clear ( Option_t *  option = "")
virtual

Definition at line 103 of file BesEvent.cxx.

103 {
104 //
105 // Clear event
106 TString opt = option;
107 opt.ToUpper();
108
109 fDigiEvent->Clear("C");
110}
void Clear(Option_t *option="")
Definition: TDigiEvent.cxx:83

◆ Clear() [2/2]

virtual void BesEvent::Clear ( Option_t *  option = "")
virtual

◆ ConstructEmcTrackFromRec() [1/2]

void BesEvent::ConstructEmcTrackFromRec ( BesGeoTrack emcTrack,
const TRecEmcShower recTrack 
)
virtual

Definition at line 817 of file BesEvent.cxx.

817 {
818
819 Double_t x=0.0, y=0.0, z=0.0;
820 x = recTrack->x() * 10.0;
821 y = recTrack->y() * 10.0;
822 z = recTrack->z() * 10.0;
823
824 emcTrack->SetMarker(x, y, z);
825 // Add associated emc hits
826 vector<Int_t> vecHits(0);
827 map<Int_t, Double_t> cellMap = recTrack->cellIdMap();
828 map<Int_t, Double_t>::iterator iCellMap;
829 for (iCellMap = cellMap.begin(); iCellMap != cellMap.end(); iCellMap++){
830 Int_t cellId = iCellMap->first;
831 vecHits.push_back(cellId);
832 }
833 for (Int_t i = 0; i < (Int_t)vecHits.size(); i++) {
834 Identifier aEmcID( vecHits[i] );
835 int part = EmcID::barrel_ec( aEmcID );
836 int theta = EmcID::theta_module( aEmcID );
837 int phi = EmcID::phi_module( aEmcID );
838 if (part == 1) theta = 43-theta; // 43 = m_kThetaBr-1
839
840 Emc2DCrystal* aHit = gBesGeometry->GetEmcROOTGeo()->Get2DCrystal(part, phi, theta);
841 emcTrack->AddHit( aHit );
842 //Long Peixun's update: for Emc 3D track display
843 TGeoPhysicalNode* pHit = gBesGeometry->GetEmcROOTGeo()->GetPhysicalCrystal(part, phi, theta);
844 emcTrack->Add3DHit(pHit);
845 }
846
847 // Add Emc track info
848 char data[100];
849 TString info;
850
851 info = TString("EmcShower ");
852 info += recTrack->trackId();
853 emcTrack->AddInfo(info);
854
855 sprintf(data, "nHits = %i, status = %i", recTrack->numHits(), recTrack->status());
856 emcTrack->AddInfo( TString(data) );
857
858 sprintf(data, "energy= (%.2f #pm %-.2f) MeV", recTrack->energy()*1000.0, recTrack->dE()*1000.0);
859 emcTrack->AddInfo( TString(data) );
860
861 Identifier aEmcID( recTrack->cellId() );
862 int part = EmcID::barrel_ec( aEmcID );
863 int theta = EmcID::theta_module( aEmcID );
864 int phi = EmcID::phi_module( aEmcID );
865
866 sprintf(data, "cell Id= (%i, #theta %i, #phi %i)", part, theta, phi);
867 emcTrack->AddInfo( TString(data) );
868
869 sprintf(data, "module = %i", recTrack->module());
870 emcTrack->AddInfo( TString(data) );
871
872 //sprintf(data, "x = (%-.3f #pm %-.3f) mm", x, recTrack->dx());
873 //emcTrack->AddInfo( TString(data) );
874
875 //sprintf(data, "y = (%-.3f #pm %-.3f) mm", y, recTrack->dy());
876 //emcTrack->AddInfo( TString(data) );
877
878 //sprintf(data, "z = (%-.3f #pm %-.3f) mm", z, recTrack->dz());
879 //emcTrack->AddInfo( TString(data) );
880
881 sprintf(data, "#theta = (%-.3f #pm %-.3f)", recTrack->theta(), recTrack->dtheta());
882 emcTrack->AddInfo( TString(data) );
883
884 sprintf(data, "#phi = (%-.3f #pm %-.3f)", recTrack->phi(), recTrack->dphi());
885 emcTrack->AddInfo( TString(data) );
886
887// sprintf(data, "cos (x=%-.3f, y=%-.3f, z=%-.3f)", recTrack->cosx(), recTrack->cosy(), recTrack->cosz()); //from boss6.1.0. no these varibles
888// emcTrack->AddInfo( TString(data) );
889
890 emcTrack->CloseInfo();
891}
TTree * data
Double_t x[10]
virtual void CloseInfo()
Definition: BesGeoTrack.cxx:54
virtual void SetMarker(Double_t x, Double_t y, Double_t z)
Definition: BesGeoTrack.cxx:68
static unsigned int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
Definition: EmcID.cxx:38
static unsigned int theta_module(const Identifier &id)
Definition: EmcID.cxx:43
static unsigned int phi_module(const Identifier &id)
Definition: EmcID.cxx:48
Emc2DCrystal * Get2DCrystal(Int_t part, Int_t phi, Int_t theta)
Get Emc2DCrystal;.
TGeoPhysicalNode * GetPhysicalCrystal(int part, int phi, int theta)
Get crystal physical node;.
double y[1000]
sprintf(cut,"kal_costheta0_em>-0.93&&kal_costheta0_em<0.93&&kal_pxy0_em>=0.05+%d*0.1&&kal_pxy0_em<0.15+%d*0.1&&NGch>=2", j, j)

Referenced by SetEmcShowers().

◆ ConstructEmcTrackFromRec() [2/2]

virtual void BesEvent::ConstructEmcTrackFromRec ( BesGeoTrack emcTrack,
const TRecEmcShower recTrack 
)
virtual

◆ ConstructMdcTrackFromRec() [1/2]

void BesEvent::ConstructMdcTrackFromRec ( BesGeoTrack mdcTrack,
const TRecMdcTrack recTrack,
TDisTrack recEvent 
)
virtual

Definition at line 362 of file BesEvent.cxx.

362 {
363
364 Double_t field = -f_Magnetic; // Tesla
365 Double_t kvC = 3.0e8; // light speed
366 Int_t charge = recTrack->charge();
367 Double_t pt = recTrack->pxy(); // GeV
368 Double_t pz = recTrack->pz(); // GeV
369 Double_t pi = TMath::Pi();
370
371 // unit is "cm"
372 Double_t orgx = recTrack->x()*10;
373 Double_t orgy = recTrack->y()*10;
374 Double_t orgz = recTrack->z()*10;
375
376 Double_t mdcR = ((TGeoTube*)gBesGeometry->GetMdcROOTGeo()->GetVolumeMdc()->GetShape())->GetRmax();
377 Double_t mdcZ = ((TGeoTube*)gBesGeometry->GetMdcROOTGeo()->GetVolumeMdc()->GetShape())->GetDz();
378
379 Double_t radius,zStep;
380 if (charge == 0) {
381 radius = 1e9 ; // cosmic ray test
382 zStep = 1e9;
383 }
384 else {
385 radius = (pt * 1.0e9 / kvC * 1e3) / fabs(charge * field) ;
386 zStep = 2*pi*radius * fabs(pz/pt);
387 }
388 Double_t curvature = 1.0/radius;
389 Double_t step = 10.0; // mm
390 Double_t delt = step*(1.0e-3)/kvC;
391
392 mdcTrack->AddPoint(orgx, orgy, orgz, 0.0);
393 const Double_t *p;
394 Int_t nStep = 0;
395
396 Double_t x,y,z,t;
397 x = orgx;
398 y = orgy;
399 z = orgz;
400
401 if (charge == 0){ //cosmic ray test
402 do {
403 x = recTrack->helix(0)* 10 *
404 cos(recTrack->helix(1))
405 - nStep * step * sin(recTrack->helix(1));
406 y = recTrack->helix(0)* 10 *
407 sin(recTrack->helix(1))
408 + nStep * step * cos(recTrack->helix(1));
409 z = recTrack->helix(3)* 10 +
410 nStep * step * recTrack->helix(4);
411
412 mdcTrack->AddPoint(x, y, z, delt*nStep);
413 Double_t mp[3];
414 mp[0] = 0;
415 mp[1] = 0;
416 mp[2] = 0;
417 mdcTrack->PaintMarker(mp);
418 mdcTrack->SetMarkerColor(kBlack);
419 mdcTrack->SetMarkerSize(10);
420 mdcTrack->SetLineColor(kBlack);
421
422 nStep++;
423 }
424 while ( (x*x + y*y) < mdcR*mdcR && fabs(z) < mdcZ );
425
426 nStep = 0;
427 do {
428 x = recTrack->helix(0)* 10 *
429 cos(recTrack->helix(1))
430 - nStep * step * sin(recTrack->helix(1));
431 y = recTrack->helix(0)* 10 *
432 sin(recTrack->helix(1))
433 + nStep * step * cos(recTrack->helix(1));
434 z = recTrack->helix(3)* 10 +
435 nStep * step * recTrack->helix(4);
436
437 mdcTrack->AddPoint(x, y, z, delt*nStep);
438 Double_t mp[3];
439 mp[0] = 0;
440 mp[1] = 0;
441 mp[2] = 0;
442 mdcTrack->PaintMarker(mp);
443 mdcTrack->SetMarkerColor(kBlack);
444 mdcTrack->SetMarkerSize(10);
445 mdcTrack->SetLineColor(kRed);
446
447 }
448 while ( (x*x + y*y) < mdcR*mdcR && fabs(z) < mdcZ );
449 }
450 else{ //normal track
451 TGeoHelix helix(curvature, zStep, charge);
452 helix.InitPoint(orgx, orgy, orgz);
453
454 helix.InitDirection(recTrack->px(), recTrack->py(), recTrack->pz(), kFALSE);
455 //helix.InitDirection(1000, 10, 10, kFALSE);
456 helix.SetField(0.0, 0.0, field, kFALSE);
457
458 do {
459 // helix Step before GetCurrentPoint, or first point will be wrong
460 helix.Step(step);
461 p = helix.GetCurrentPoint();
462
463 mdcTrack->AddPoint(p[0], p[1], p[2], delt*nStep);
464 Double_t mp[3];
465 mp[0] = p[0];
466 mp[1] = p[1];
467 mp[2] = p[2];
468 mdcTrack->PaintMarker(mp);
469 mdcTrack->SetMarkerColor(kBlack);
470 mdcTrack->SetMarkerSize(10);
471 nStep++;
472 }
473 while ( (p[0]*p[0] + p[1]*p[1]) < mdcR*mdcR && fabs(p[2]) < mdcZ );
474
475 }
476
477 // Add associated mdc hits
478 vector<UInt_t> vecHits(0);
479 const TObjArray *recMdcHitCol = fRecEvent->getRecMdcHitCol();
480 for (Int_t i = 0; i < recMdcHitCol->GetEntriesFast(); i++){
481 TRecMdcHit *recMdcHit = (TRecMdcHit*)recMdcHitCol->At(i);
482 Int_t recHitId = recMdcHit->getTrkId();
483 Int_t recTrkId = recTrack->trackId();
484 if (recHitId == recTrkId) vecHits.push_back(recMdcHit->getMdcId());
485 }
486 for (Int_t i = 0; i < (Int_t)vecHits.size(); i++) {
487 Identifier aMdcID( vecHits[i] );
488 int layer = MdcID::layer( aMdcID );
489 int wire = MdcID::wire( aMdcID );
490
491 Mdc2DWire* aHit = gBesGeometry->GetMdcROOTGeo()->Get2DWire(layer, wire);
492 mdcTrack->AddHit( aHit );
493 //Long Peixun's update: for Mdc 3D track display
494 TGeoPhysicalNode* pHit = gBesGeometry->GetMdcROOTGeo()->GetPhysicalReplica(layer, wire);
495 mdcTrack->Add3DHit(pHit);
496 }
497
498 mdcTrack->SetCharge(recTrack->charge());
499
500 // Add mdc track info
501 char data[200]; //Long Peixun's update: 100 -> 200
502 TString info;
503
504 info = TString("MdcTrack ");
505 info += recTrack->trackId();
506 mdcTrack->AddInfo( info );
507
508 sprintf(data, "charge=%i, status=%i", recTrack->charge(), recTrack->stat());
509 mdcTrack->AddInfo( TString(data) );
510
511 sprintf(data, "P=%-.3f GeV, Pt=%-.3f GeV", recTrack->p(), recTrack->pxy());
512 mdcTrack->AddInfo( TString(data) );
513
514 //sprintf(data, "Pt= %-.3f GeV", recTrack->pxy());
515 //mdcTrack->AddInfo( TString(data) );
516
517 sprintf(data, "Pxyz=(%-.3f,%-.3f,%-.3f) GeV", recTrack->px(),recTrack->py(),recTrack->pz());
518 mdcTrack->AddInfo( TString(data) );
519
520 sprintf(data, "helix(%-.3f,%-.3f,%-.3f,%-.3f,%-.3f)", recTrack->helix(0),recTrack->helix(1),recTrack->helix(2),recTrack->helix(3), recTrack->helix(4));
521 mdcTrack->AddInfo( TString(data) );
522
523 sprintf(data, "Origin (%-.3f, %-.3f, %-.3f) cm", orgx/10, orgy/10, orgz/10); //recTrack->x(), recTrack->y(), recTrack->z());
524 mdcTrack->AddInfo( TString(data) );
525
526 sprintf(data, "#phi=%-.3f #theta=%-.3f cos#theta=%-.3f", recTrack->phi(),recTrack->theta(),cos(recTrack->theta()));
527 mdcTrack->AddInfo( TString(data) );
528
529
530 sprintf(data, "nHit=%i, #chi^{2}= %-.3f",recTrack->ndof()+5, recTrack->chi2());
531 mdcTrack->AddInfo( TString(data) );
532
533 // sprintf(data, "ndof= %i, rms= %-.3f", recTrack->ndof(), recTrack->rms());
534 // mdcTrack->AddInfo( TString(data) );
535
536 // sprintf(data, "extrp= %-.3f, pathL= %-.3f", recTrack->extrp(), recTrack->pathLength());
537 // mdcTrack->AddInfo( TString(data) );
538
539 //sprintf(data, "nHits= %i, nSter= %i", recTrack->getNhits(), recTrack->nster());
540 //mdcTrack->AddInfo( TString(data) ); //Long Peixun's update: this line should be annotated
541
542 mdcTrack->CloseInfo();
543}
double sin(const BesAngle a)
double cos(const BesAngle a)
TTree * t
Definition: binning.cxx:23
virtual void AddPoint(Double_t x, Double_t y, Double_t z, Double_t t)
Definition: BesGeoTrack.cxx:63
virtual void SetCharge(Int_t charge)
static int layer(const Identifier &id)
Values of different levels (failure returns 0)
Definition: MdcID.cxx:49
static int wire(const Identifier &id)
Definition: MdcID.cxx:54
Mdc2DWire * Get2DWire(Int_t layer, Int_t replica)
Get Mdc2DWire;.
TGeoPhysicalNode * GetPhysicalReplica(int layer, int replica)
Get replica physical node;.
const Double_t x() const
const Double_t phi() const
const Double_t pz() const
const Double_t z() const
const Double_t p() const
const Double_t px() const
const Double_t y() const
const Double_t pxy() const
const Double_t theta() const
const Int_t charge() const
const Double_t py() const
const double mp
Definition: incllambda.cxx:45
float charge

Referenced by SetMdcTracks().

◆ ConstructMdcTrackFromRec() [2/2]

virtual void BesEvent::ConstructMdcTrackFromRec ( BesGeoTrack mdcTrack,
const TRecMdcTrack recTrack,
TDisTrack recEvent 
)
virtual

◆ ConstructMucTrackFromRec() [1/2]

void BesEvent::ConstructMucTrackFromRec ( BesGeoTrack mucTrack,
const TRecMucTrack recTrack 
)
virtual

Definition at line 895 of file BesEvent.cxx.

895 {
896 if (recTrack->depth() <= 0.0) return; // bad track
897
898 Double_t field = 1e-3; // Tesla
899 Double_t kvC = 3.0e8; // light speed
900 Int_t charge = 1;
901 Double_t pz = recTrack->pz(); // GeV
902 Double_t pt =
903 sqrt(recTrack->px()*recTrack->px() + recTrack->py()*recTrack->py()); // GeV
904 Double_t pi = TMath::Pi();
905
906 Double_t mucR =
907 ((TGeoBBox*)gBesGeometry->GetMucROOTGeo()->GetVolumeMuc()->GetShape())->GetDX();
908 Double_t mucZ =
909 ((TGeoBBox*)gBesGeometry->GetMucROOTGeo()->GetVolumeMuc()->GetShape())->GetDZ();
910
911 Double_t radius = 1.0e+9;
912 Double_t curvature = 1.0/radius;
913 Double_t zStep = 2*pi*radius * fabs(pz/pt);
914 Double_t step = 1.0; // mm
915 Double_t delt = step*(1.0e-3)/kvC;
916
917 TGeoHelix helix(curvature, zStep, charge);
918
919 Double_t x = recTrack->xPos() * 10.0;
920 Double_t y = recTrack->yPos() * 10.0;
921 Double_t z = recTrack->zPos() * 10.0;
922
923 helix.InitPoint(x, y, z);
924 helix.InitDirection(recTrack->px(), recTrack->py(), recTrack->pz(), kFALSE);
925 helix.SetField(0.0, 0.0, field, kFALSE);
926
927 mucTrack->AddPoint(x, y, z, 0.0);
928 const Double_t *p;
929 Int_t nStep = 0;
930 do {
931 // helix Step before GetCurrentPoint, or first point will be wrong
932 helix.Step(step);
933 p = helix.GetCurrentPoint();
934 mucTrack->AddPoint(p[0], p[1], p[2], delt*nStep);
935 Double_t mp[3];
936 mp[0] = p[0];
937 mp[1] = p[1];
938 mp[2] = p[2];
939 mucTrack->PaintMarker(mp);
940 mucTrack->SetMarkerColor(kBlack);
941 mucTrack->SetMarkerSize(10);
942 nStep++;
943 }
944 while ( (p[0]*p[0] + p[1]*p[1]) < mucR*mucR && fabs(p[2]) < mucZ );
945
946 // Add associated muc hits
947 vector<Int_t> vecHits = recTrack->vecHits();
948 for (Int_t i = 0; i < (Int_t)vecHits.size(); i++) {
949 Identifier aMucID( vecHits[i] );
950 int part = MucID::part( aMucID );
951 int seg = MucID::seg( aMucID );
952 int gap = MucID::gap( aMucID );
953 int strip = MucID::strip( aMucID );
954
955 Muc2DStrip* aHit = gBesGeometry->GetMucROOTGeo()->Get2DStrip(part, seg, gap, strip);
956 mucTrack->AddHit( aHit );
957 //Long Peixun's update: for Muc 3D track display
958 TGeoPhysicalNode* pHit = gBesGeometry->GetMucROOTGeo()->GetPhysicalStrip(part, seg, gap, strip);
959 mucTrack->Add3DHit(pHit);
960 }
961
962 mucTrack->SetCharge(charge);
963
964 // Add Muc track info
965 char data[100];
966 TString info;
967
968 info = TString("MucTrack ");
969 info += recTrack->trackId();
970 mucTrack->AddInfo(info);
971
972 sprintf(data, "nHits= %i, maxHits= %i, nLayers= %i", recTrack->numHits(), recTrack->maxHitsInLayer(), recTrack->numLayers());
973 mucTrack->AddInfo( TString(data) );
974
975 sprintf(data, "lastLayer (br= %i, ec= %i)", recTrack->brLastLayer(), recTrack->ecLastLayer());
976 mucTrack->AddInfo( TString(data) );
977
978 sprintf(data, "depth = %.3f cm", recTrack->depth());
979 mucTrack->AddInfo( TString(data) );
980
981 sprintf(data, "#chi^{2}= %-.3f, dof= %i, rms= %-.3f", recTrack->chi2(), recTrack->dof(), recTrack->rms());
982 mucTrack->AddInfo( TString(data) );
983
984 sprintf(data, "Origin (%-.2f, %-.2f, %-.2f) cm", recTrack->xPos(), recTrack->yPos(), recTrack->zPos());
985 mucTrack->AddInfo( TString(data) );
986
987 sprintf(data, "p (%-.3f, %-.3f, %-.3f) GeV", recTrack->px(), recTrack->py(), recTrack->pz());
988 mucTrack->AddInfo( TString(data) );
989
990 mucTrack->CloseInfo();
991}
static int part(const Identifier &id)
Definition: MucID.cxx:46
static int gap(const Identifier &id)
Definition: MucID.cxx:66
static int seg(const Identifier &id)
Definition: MucID.cxx:56
static int strip(const Identifier &id)
Definition: MucID.cxx:76
TGeoPhysicalNode * GetPhysicalStrip(int part, int seg, int gap, int strip)
Get strip physical node;.
Muc2DStrip * Get2DStrip(int part, int seg, int gap, int strip)
Get Muc2DStrip;.

Referenced by SetMucTracks().

◆ ConstructMucTrackFromRec() [2/2]

virtual void BesEvent::ConstructMucTrackFromRec ( BesGeoTrack mucTrack,
const TRecMucTrack recTrack 
)
virtual

◆ ConstructTofTrackFromRec() [1/2]

void BesEvent::ConstructTofTrackFromRec ( BesGeoTrack tofTrack,
const TRecTofTrack recTrack,
TDisTrack recEvent 
)
virtual

Definition at line 663 of file BesEvent.cxx.

665 {
666
667 vector<Int_t> vecBHits(0);
668 vector<Int_t> vecEHits(0);
669
670 const TObjArray *recTofTrackCol = fRecEvent->getTofTrackCol();
671 for (Int_t i = 0; i < recTofTrackCol->GetEntriesFast(); i++){
672 TRecTofTrack *recHit = (TRecTofTrack*)recTofTrackCol->At(i);
673 if ( !Is_tofCounter( recHit->status())) continue;
674
675 Int_t recHitId = recHit->trackID();
676 Int_t recTrkId = recTrack->trackID();
677 if (recHitId == recTrkId) {
678 if ( Is_tofBarrel( recHit->status() ) ) {
679 vecBHits.push_back(recHit->tofID());
680 }
681 else {
682 vecEHits.push_back(recHit->tofID());
683 }
684 }
685 }
686
687 TGeoPhysicalNode *phyNode = 0;
688 Double_t x=0.0, y=0.0, z=0.0;
689
690 Int_t nHits;
691 if (vecBHits.size()){
692 nHits = vecBHits.size();
693 for (Int_t i = 0; i < nHits; i++) {
694
695 int part = 1;
696 int layer = 0;
697 int scin = 0;
698 if ( ( vecBHits[i] >= 0 ) && ( vecBHits[i] <= 87 ) ) {
699 layer = 0;
700 scin = vecBHits[i];
701 }
702 else {
703 layer = 1;
704 scin = vecBHits[i] - 88;
705 }
706
707 Tof2DScin* aHit = gBesGeometry->GetTofROOTGeo()->Get2DScin(part, layer, scin);
708 tofTrack->AddHit( aHit );
709
710 // calculate average position
711 Double_t local[3] = {0.0, 0.0, 0.0};
712 Double_t master[3] = {0.0, 0.0, 0.0};
713 phyNode = gBesGeometry->GetTofROOTGeo()->GetPhysicalScin(part, layer, scin);
714 tofTrack->Add3DHit(phyNode); //Long Peixun's update: for Tof 3D track display
715 if (phyNode)
716 phyNode->GetMatrix(-1*phyNode->GetLevel())->LocalToMaster(local, &master[0]);
717 // transform to top
718 x += master[0];
719 y += master[1];
720 z += master[2];
721 }
722 x /= nHits;
723 y /= nHits;
724 z /= nHits;
725
726 z = recTrack->zrhit();
727
728 tofTrack->SetMarker(x, y, z);
729 }
730
731 else if (vecEHits.size()){
732 nHits = vecEHits.size();
733 for (Int_t i = 0; i < nHits; i++) {
734
735 int part = 0;
736 int layer = 0;
737 int scin = 0;
738 if ( ( vecEHits[i] >= 0 ) && ( vecEHits[i] <= 47 ) ) {
739 part = 2;
740 scin = vecEHits[i];
741 }
742 else {
743 part = 0;
744 scin = vecEHits[i] - 48;
745 }
746
747
748 Tof2DScin* aHit = gBesGeometry->GetTofROOTGeo()->Get2DScin(part, layer, scin);
749 tofTrack->AddHit( aHit );
750
751 // calculate average position
752 Double_t local[3] = {0.0, 0.0, 0.0};
753 Double_t master[3] = {0.0, 0.0, 0.0};
754 phyNode = gBesGeometry->GetTofROOTGeo()->GetPhysicalScin(part, layer, scin);
755 tofTrack->Add3DHit(phyNode); //Long Peixun's update: for Tof 3D track display
756 if (phyNode)
757 phyNode->GetMatrix(-1*phyNode->GetLevel())->LocalToMaster(local, &master[0]);
758 // transform to top
759 x += master[0];
760 y += master[1];
761 z += master[2];
762 }
763 x /= nHits;
764 y /= nHits;
765 z /= nHits;
766
767 tofTrack->SetMarker(x, y, z);
768 }
769
770 // Add tof track info
771 char data[100];
772 TString info;
773
774 info = TString("TofTrack ");
775 info += recTrack->trackID();
776 tofTrack->AddInfo(info);
777
778 //sprintf(data, "Part = %i, Qual1 = %i, Qual2 = %i", recTrack->getPart(), recTrack->getQual1(), recTrack->getQual2());
779 //tofTrack->AddInfo( TString(data) );
780
781 //sprintf(data, "Tof = (%-.3f #pm %-.3f) ns", recTrack->getTof(), recTrack->getETof());
782 //tofTrack->AddInfo( TString(data) );
783
784 //sprintf(data, "Tof1 = (%-.3f #pm %-.3f) ns", recTrack->getTof1(), recTrack->getETof1());
785 //tofTrack->AddInfo( TString(data) );
786
787 //sprintf(data, "Tof2 = (%-.3f #pm %-.3f) ns", recTrack->getTof2(), recTrack->getETof2());
788 //tofTrack->AddInfo( TString(data) );
789
790 //sprintf(data, "Path(1=%-.2f, 2=%-.2f) mm", recTrack->getPath1(), recTrack->getPath2());
791 //tofTrack->AddInfo( TString(data) );
792
793 //sprintf(data, "Pulse(1=%-.0f, 2=%-.0f)", recTrack->getPh1(), recTrack->getPh2());
794 //tofTrack->AddInfo( TString(data) );
795
796 //sprintf(data, "ZHit(1=%-.2fmm, 2=%-.2f)mm", recTrack->getZHit1(), recTrack->getZHit2());
797 //tofTrack->AddInfo( TString(data) );
798
799 ////sprintf(data, "ZTDC1=%-.2fmm, ZTDC2=%-.2fmm", recTrack->getZTDC1(), recTrack->getZTDC2());
800 ////tofTrack->AddInfo( TString(data) );
801
802 //sprintf(data, "RHit = %-.3f, Beta = %-.3f", recTrack->getRHit(), recTrack->getBeta());
803 //tofTrack->AddInfo( TString(data) );
804
805 //sprintf(data, "w_e = %-.2f%%, w_mu = %-.2f%%", recTrack->getWeightElectron()*100.0, recTrack->getWeightMuon()*100.0);
806 //tofTrack->AddInfo( TString(data) );
807
808 //sprintf(data, "w_pi = %-.2f%%, w_K = %-.2f%%", recTrack->getWeightPion()*100.0, recTrack->getWeightKaon()*100.0);
809 //tofTrack->AddInfo( TString(data) );
810
811 //sprintf(data, "w_P = %-.2f%%", recTrack->getWeightProton()*100.0);
812 //tofTrack->AddInfo( TString(data) );
813
814 tofTrack->CloseInfo();
815}
Tof2DScin * Get2DScin(Int_t part, Int_t layer, Int_t scin)
Get Tof2DScin;.
TGeoPhysicalNode * GetPhysicalScin(int part, int scin)
Get scintillator physical node;.

Referenced by SetTofTracks().

◆ ConstructTofTrackFromRec() [2/2]

virtual void BesEvent::ConstructTofTrackFromRec ( BesGeoTrack tofTrack,
const TRecTofTrack recTrack,
TDisTrack recEvent 
)
virtual

◆ Delete() [1/2]

void BesEvent::Delete ( Option_t *  option = "")
virtual

Definition at line 58 of file BesEvent.cxx.

58 {
59 //
60 // Clear event
61 TString opt = option;
62 opt.ToUpper();
63
64 if (fMdcTrackCol) {
65 for (int j = 0; j < fMdcTrackCol->GetEntries(); j++){
66 delete fMdcTrackCol->At(j);
67 }
68 fMdcTrackCol->Clear("C");
69 delete fMdcTrackCol;
70 }
71 if (fTofTrackCol) {
72 for (int j = 0; j < fTofTrackCol->GetEntries(); j++){
73 delete fTofTrackCol->At(j);
74 }
75 fTofTrackCol->Clear("C");
76 delete fTofTrackCol;
77 }
78 if (fEmcTrackCol) {
79 for (int j = 0; j < fEmcTrackCol->GetEntries(); j++){
80 delete fEmcTrackCol->At(j);
81 }
82 fEmcTrackCol->Clear("C");
83 delete fEmcTrackCol;
84 }
85 if (fMucTrackCol) {
86 for (int j = 0; j < fMucTrackCol->GetEntries(); j++){
87 delete fMucTrackCol->At(j);
88 }
89 fMucTrackCol->Clear("C");
90 delete fMucTrackCol;
91 }
92 if (fExtTrackCol) {
93 for (int j = 0; j < fExtTrackCol->GetEntries(); j++){
94 delete fExtTrackCol->At(j);
95 }
96 fExtTrackCol->Clear("C");
97 delete fExtTrackCol;
98 }
99}

Referenced by ~BesEvent().

◆ Delete() [2/2]

virtual void BesEvent::Delete ( Option_t *  option = "")
virtual

◆ DrawHits() [1/2]

void BesEvent::DrawHits ( Option_t *  option)
virtual

Definition at line 1060 of file BesEvent.cxx.

1060 {
1061 if (gBesGeometry)
1062 {
1067 }
1068}

Referenced by BesView::SetViewType().

◆ DrawHits() [2/2]

virtual void BesEvent::DrawHits ( Option_t *  option)
virtual

◆ DrawTracks() [1/2]

void BesEvent::DrawTracks ( Option_t *  option)
virtual

Definition at line 1072 of file BesEvent.cxx.

1072 {
1073
1074 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
1075
1076 //Long Peixun's update: Always construct 3D line, whether draw it or not
1077 if (view)
1078 {
1079 for (Int_t i = 0; i < fMdcTrackCol->GetEntries(); i++)
1080 {
1081 BesGeoTrack *track = (BesGeoTrack*)fMdcTrackCol->At(i);
1082 if (view->GetVisTracksGlobal() && view->GetVisTracksMdc())
1083 track->Draw();
1084 else track->Construct3DLine();
1085 }
1086
1087 for (Int_t i = 0; i < fTofTrackCol->GetEntries(); i++)
1088 {
1089 BesGeoTrack *track = (BesGeoTrack*)fTofTrackCol->At(i);
1090 if (view->GetVisTracksGlobal() && view->GetVisTracksTof())
1091 track->Draw();
1092 else track->Construct3DLine();
1093 }
1094
1095 for (Int_t i = 0; i < fEmcTrackCol->GetEntries(); i++)
1096 {
1097 BesGeoTrack *track = (BesGeoTrack*)fEmcTrackCol->At(i);
1098 if (view->GetVisTracksGlobal() && view->GetVisTracksEmc())
1099 track->Draw();
1100 else track->Construct3DLine();
1101 }
1102
1103 for (Int_t i = 0; i < fMucTrackCol->GetEntries(); i++)
1104 {
1105 BesGeoTrack *track = (BesGeoTrack*)fMucTrackCol->At(i);
1106 if (view->GetVisTracksGlobal() && view->GetVisTracksMuc())
1107 track->Draw();
1108 else track->Construct3DLine();
1109 }
1110
1111 for (Int_t i = 0; i < fExtTrackCol->GetEntries(); i++)
1112 {
1113 BesGeoTrack *track = (BesGeoTrack*)fExtTrackCol->At(i);
1114 if (view->GetVisTracksGlobal() && view->GetVisTracksExt())
1115 track->Draw();
1116 else track->Construct3DLine();
1117 }
1118 }
1119}
virtual void Draw(Option_t *option="")
virtual void Construct3DLine()

Referenced by BesView::SetViewType().

◆ DrawTracks() [2/2]

virtual void BesEvent::DrawTracks ( Option_t *  option)
virtual

◆ GetDay() [1/2]

Int_t BesEvent::GetDay ( )
inline

◆ GetDay() [2/2]

Int_t BesEvent::GetDay ( )
inline

Definition at line 257 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

257 {
258 return fEventHeader.GetEventDay();
259 }

◆ GetDedx() [1/2]

const TRecMdcDedx * BesEvent::GetDedx ( Int_t  i) const
inline

Definition at line 237 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

237 {
238 // if (fRecEvent)
239 // return fRecEvent->getRecMdcDedx(i);
240 // else
241 return 0;
242 }

◆ GetDedx() [2/2]

const TRecMdcDedx * BesEvent::GetDedx ( Int_t  i) const
inline

Definition at line 237 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

237 {
238 // if (fRecEvent)
239 // return fRecEvent->getRecMdcDedx(i);
240 // else
241 return 0;
242 }

◆ GetDedxCol() [1/2]

const TObjArray * BesEvent::GetDedxCol ( TDisTrack recEvent) const
inline

Definition at line 153 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

153 {
154 // if (recEvent)
155 // return recEvent->getRecMdcDedxCol();
156 // else
157 return 0;
158 }

◆ GetDedxCol() [2/2]

const TObjArray * BesEvent::GetDedxCol ( TDisTrack recEvent) const
inline

Definition at line 153 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

153 {
154 // if (recEvent)
155 // return recEvent->getRecMdcDedxCol();
156 // else
157 return 0;
158 }

◆ GetDedxNum() [1/2]

const Int_t BesEvent::GetDedxNum ( TDisTrack recEvent) const
inline

Definition at line 198 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

198 {
199 // if (fRecEvent)
200 // return fRecEvent->getRecMdcDedxCol()->GetEntries();
201 // else
202 return -1;
203 }

◆ GetDedxNum() [2/2]

const Int_t BesEvent::GetDedxNum ( TDisTrack recEvent) const
inline

Definition at line 198 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

198 {
199 // if (fRecEvent)
200 // return fRecEvent->getRecMdcDedxCol()->GetEntries();
201 // else
202 return -1;
203 }

◆ GetEmcDigi() [1/2]

const TEmcDigi * BesEvent::GetEmcDigi ( Int_t  i) const
inline

Definition at line 110 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

110 {
111 if (fDigiEvent) return fDigiEvent->getEmcDigi(i);
112 else return 0;
113 }
const TEmcDigi * getEmcDigi(Int_t i) const
retrieve a EmcDigi from the collection, using the index into the array
Definition: TDigiEvent.cxx:134

Referenced by Print().

◆ GetEmcDigi() [2/2]

const TEmcDigi * BesEvent::GetEmcDigi ( Int_t  i) const
inline

Definition at line 110 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

110 {
111 if (fDigiEvent) return fDigiEvent->getEmcDigi(i);
112 else return 0;
113 }

◆ GetEmcDigiCol() [1/2]

const TObjArray * BesEvent::GetEmcDigiCol ( ) const
inline

Definition at line 78 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

78 {
79 if (fDigiEvent) return fDigiEvent->getEmcDigiCol();
80 else return 0;
81 }
const TObjArray * getEmcDigiCol() const
retrieve the whole TObjArray of TkrDigi Data

Referenced by EmcROOTGeo::SetHits().

◆ GetEmcDigiCol() [2/2]

const TObjArray * BesEvent::GetEmcDigiCol ( ) const
inline

Definition at line 78 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

78 {
79 if (fDigiEvent) return fDigiEvent->getEmcDigiCol();
80 else return 0;
81 }

◆ GetEmcDigiNum() [1/2]

const Int_t BesEvent::GetEmcDigiNum ( ) const
inline

Definition at line 94 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

94 {
95 if (fDigiEvent) return fDigiEvent->getEmcDigiCol()->GetEntries();
96 else return -1;
97 }

Referenced by Print().

◆ GetEmcDigiNum() [2/2]

const Int_t BesEvent::GetEmcDigiNum ( ) const
inline

Definition at line 94 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

94 {
95 if (fDigiEvent) return fDigiEvent->getEmcDigiCol()->GetEntries();
96 else return -1;
97 }

◆ GetEmcShower() [1/2]

const TRecEmcShower * BesEvent::GetEmcShower ( Int_t  i,
TDisTrack recEvent 
) const
inline

Definition at line 220 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

220 {
221 if (recEvent)
222 return recEvent->getEmcShower(i);
223 else
224 return 0;
225 }
const TRecEmcShower * getEmcShower(Int_t i) const
retrieve a EmcShower from the collection, using the index into the array
Definition: TDisTrack.cxx:157

Referenced by SetEvent().

◆ GetEmcShower() [2/2]

const TRecEmcShower * BesEvent::GetEmcShower ( Int_t  i,
TDisTrack recEvent 
) const
inline

Definition at line 220 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

220 {
221 if (recEvent)
222 return recEvent->getEmcShower(i);
223 else
224 return 0;
225 }

◆ GetEmcShowerCol() [1/2]

const TObjArray * BesEvent::GetEmcShowerCol ( TDisTrack recEvent) const
inline

Definition at line 135 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

135 {
136 // if (recEvent)
137 // return recEvent->getEmcShowerCol();
138 // else
139 return 0;
140 }

◆ GetEmcShowerCol() [2/2]

const TObjArray * BesEvent::GetEmcShowerCol ( TDisTrack recEvent) const
inline

Definition at line 135 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

135 {
136 // if (recEvent)
137 // return recEvent->getEmcShowerCol();
138 // else
139 return 0;
140 }

◆ GetEmcShowerNum() [1/2]

const Int_t BesEvent::GetEmcShowerNum ( TDisTrack recEvent) const
inline

Definition at line 178 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

178 {
179 if (recEvent)
180 // return recEvent->getEmcShowerCol()->GetEntries();
181 return recEvent->getEmcShowerNum();
182 else
183 return -1;
184 }
int getEmcShowerNum()
Definition: TDisTrack.cxx:183

Referenced by SetEvent().

◆ GetEmcShowerNum() [2/2]

const Int_t BesEvent::GetEmcShowerNum ( TDisTrack recEvent) const
inline

Definition at line 178 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

178 {
179 if (recEvent)
180 // return recEvent->getEmcShowerCol()->GetEntries();
181 return recEvent->getEmcShowerNum();
182 else
183 return -1;
184 }

◆ GetEvent() [1/2]

Long64_t BesEvent::GetEvent ( )
inline

◆ GetEvent() [2/2]

Long64_t BesEvent::GetEvent ( )
inline

Definition at line 248 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

248 {
249 return fEventHeader.GetEventNumber();
250 }

◆ GetExtTrackCol() [1/2]

const TObjArray * BesEvent::GetExtTrackCol ( ) const
inline

Definition at line 147 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

147 {
148 return 0; // for test
149 //if (fRecEvent)
150 // return fRecEvent->getExtTrackCol();
151 //else return 0;
152 }

◆ GetExtTrackCol() [2/2]

const TObjArray * BesEvent::GetExtTrackCol ( ) const
inline

Definition at line 147 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

147 {
148 return 0; // for test
149 //if (fRecEvent)
150 // return fRecEvent->getExtTrackCol();
151 //else return 0;
152 }

◆ GetExtTrackNum() [1/2]

const Int_t BesEvent::GetExtTrackNum ( ) const
inline

Definition at line 192 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

192 {
193 return -1;// for test
194 //if (fRecEvent)
195 // return fRecEvent->getExtTrackCol()->GetEntries();
196 //else return -1;
197 }

◆ GetExtTrackNum() [2/2]

const Int_t BesEvent::GetExtTrackNum ( ) const
inline

Definition at line 192 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

192 {
193 return -1;// for test
194 //if (fRecEvent)
195 // return fRecEvent->getExtTrackCol()->GetEntries();
196 //else return -1;
197 }

◆ GetHeader() [1/2]

BesEventHeader BesEvent::GetHeader ( )
inline

Definition at line 272 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

272 {
273 return fEventHeader;
274 }

Referenced by BesVisDisplay::DrawHeader(), and MdcROOTGeo::SetHits().

◆ GetHeader() [2/2]

BesEventHeader BesEvent::GetHeader ( )
inline

Definition at line 272 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

272 {
273 return fEventHeader;
274 }

◆ GetHour() [1/2]

Int_t BesEvent::GetHour ( )
inline

◆ GetHour() [2/2]

Int_t BesEvent::GetHour ( )
inline

Definition at line 260 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

260 {
261 return fEventHeader.GetEventHour();
262 }

◆ GetMC() [1/2]

Int_t BesEvent::GetMC ( )
inline

◆ GetMC() [2/2]

Int_t BesEvent::GetMC ( )
inline

Definition at line 269 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

269 {
270 return fEventHeader.GetEventMC();
271 }

◆ GetMdcDigi() [1/2]

const TMdcDigi * BesEvent::GetMdcDigi ( Int_t  i) const
inline

Definition at line 102 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

102 {
103 if (fDigiEvent) return fDigiEvent->getMdcDigi(i);
104 else return 0;
105 } //Long Peixun's update: Remove semicolon
const TMdcDigi * getMdcDigi(Int_t i) const
retrieve a TkrDigi from the collection, using the index into the array
Definition: TDigiEvent.cxx:124

Referenced by Print().

◆ GetMdcDigi() [2/2]

const TMdcDigi * BesEvent::GetMdcDigi ( Int_t  i) const
inline

Definition at line 102 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

102 {
103 if (fDigiEvent) return fDigiEvent->getMdcDigi(i);
104 else return 0;
105 } //Long Peixun's update: Remove semicolon

◆ GetMdcDigiCol() [1/2]

const TObjArray * BesEvent::GetMdcDigiCol ( ) const
inline

Definition at line 70 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

70 {
71 if (fDigiEvent) return fDigiEvent->getMdcDigiCol();
72 else return 0;
73 }
const TObjArray * getMdcDigiCol() const
retrieve the whole TObjArray of TkrDigi Data

Referenced by MdcROOTGeo::SetHits().

◆ GetMdcDigiCol() [2/2]

const TObjArray * BesEvent::GetMdcDigiCol ( ) const
inline

Definition at line 70 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

70 {
71 if (fDigiEvent) return fDigiEvent->getMdcDigiCol();
72 else return 0;
73 }

◆ GetMdcDigiNum() [1/2]

const Int_t BesEvent::GetMdcDigiNum ( ) const
inline

Definition at line 86 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

86 {
87 if (fDigiEvent) return fDigiEvent->getMdcDigiCol()->GetEntries();
88 else return -1;
89 }

Referenced by Print().

◆ GetMdcDigiNum() [2/2]

const Int_t BesEvent::GetMdcDigiNum ( ) const
inline

Definition at line 86 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

86 {
87 if (fDigiEvent) return fDigiEvent->getMdcDigiCol()->GetEntries();
88 else return -1;
89 }

◆ GetMdcTrack() [1/2]

const TRecMdcTrack * BesEvent::GetMdcTrack ( Int_t  i,
TDisTrack recEvent 
) const
inline

Definition at line 204 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

204 {
205 if (recEvent)
206 return recEvent->getRecMdcTrack(i);
207 else return 0;
208 }
const TRecMdcTrack * getRecMdcTrack(Int_t i) const
retrieve a MdcTrack from the collection, using the index into the array
Definition: TDisTrack.cxx:113

Referenced by SetEvent().

◆ GetMdcTrack() [2/2]

const TRecMdcTrack * BesEvent::GetMdcTrack ( Int_t  i,
TDisTrack recEvent 
) const
inline

Definition at line 204 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

204 {
205 if (recEvent)
206 return recEvent->getRecMdcTrack(i);
207 else return 0;
208 }

◆ GetMdcTrackCol() [1/2]

const TObjArray * BesEvent::GetMdcTrackCol ( TDisTrack recEvent) const
inline

Definition at line 119 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

119 {
120 if (recEvent)
121 return recEvent->getRecMdcTrackCol();
122 else return 0;
123 }
const TObjArray * getRecMdcTrackCol() const
retrieve the whole TObjArray of RecMdcTrack Data

◆ GetMdcTrackCol() [2/2]

const TObjArray * BesEvent::GetMdcTrackCol ( TDisTrack recEvent) const
inline

Definition at line 119 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

119 {
120 if (recEvent)
121 return recEvent->getRecMdcTrackCol();
122 else return 0;
123 }

◆ GetMdcTrackNum() [1/2]

const Int_t BesEvent::GetMdcTrackNum ( TDisTrack recEvent) const
inline

Definition at line 159 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

159 {
160 if (recEvent)
161// return recEvent->getRecMdcTrackCol()->GetEntries();
162 return recEvent->getMdcTrackNum();
163 else
164 return -1;
165 }
int getMdcTrackNum()
Definition: TDisTrack.cxx:163

Referenced by SetEvent().

◆ GetMdcTrackNum() [2/2]

const Int_t BesEvent::GetMdcTrackNum ( TDisTrack recEvent) const
inline

Definition at line 159 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

159 {
160 if (recEvent)
161// return recEvent->getRecMdcTrackCol()->GetEntries();
162 return recEvent->getMdcTrackNum();
163 else
164 return -1;
165 }

◆ GetMin() [1/2]

Int_t BesEvent::GetMin ( )
inline

◆ GetMin() [2/2]

Int_t BesEvent::GetMin ( )
inline

Definition at line 263 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

263 {
264 return fEventHeader.GetEventMin();
265 }

◆ GetMonth() [1/2]

Int_t BesEvent::GetMonth ( )
inline

◆ GetMonth() [2/2]

Int_t BesEvent::GetMonth ( )
inline

Definition at line 254 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

254 {
255 return fEventHeader.GetEventMonth();
256 }

◆ GetMucDigi() [1/2]

const TMucDigi * BesEvent::GetMucDigi ( Int_t  i) const
inline

Definition at line 114 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

114 {
115 if (fDigiEvent) return fDigiEvent->getMucDigi(i);
116 else return 0;
117 }
const TMucDigi * getMucDigi(Int_t i) const
retrieve a MucDigi From the collection, using the index into the array
Definition: TDigiEvent.cxx:158

Referenced by Print().

◆ GetMucDigi() [2/2]

const TMucDigi * BesEvent::GetMucDigi ( Int_t  i) const
inline

Definition at line 114 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

114 {
115 if (fDigiEvent) return fDigiEvent->getMucDigi(i);
116 else return 0;
117 }

◆ GetMucDigiCol() [1/2]

const TObjArray * BesEvent::GetMucDigiCol ( ) const
inline

Definition at line 82 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

82 {
83 if (fDigiEvent) return fDigiEvent->getMucDigiCol();
84 else return 0;
85 }
const TObjArray * getMucDigiCol() const
retrieve the whole TObjArray of MucDigi Data

Referenced by MucROOTGeo::SetHits().

◆ GetMucDigiCol() [2/2]

const TObjArray * BesEvent::GetMucDigiCol ( ) const
inline

Definition at line 82 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

82 {
83 if (fDigiEvent) return fDigiEvent->getMucDigiCol();
84 else return 0;
85 }

◆ GetMucDigiNum() [1/2]

const Int_t BesEvent::GetMucDigiNum ( ) const
inline

Definition at line 98 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

98 {
99 if (fDigiEvent) return fDigiEvent->getMucDigiCol()->GetEntries();
100 else return -1;
101 }

Referenced by Print().

◆ GetMucDigiNum() [2/2]

const Int_t BesEvent::GetMucDigiNum ( ) const
inline

Definition at line 98 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

98 {
99 if (fDigiEvent) return fDigiEvent->getMucDigiCol()->GetEntries();
100 else return -1;
101 }

◆ GetMucTrack() [1/2]

const TRecMucTrack * BesEvent::GetMucTrack ( Int_t  i,
TDisTrack recEvent 
) const
inline

Definition at line 226 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

226 {
227 if (recEvent)
228 return recEvent->getMucTrack(i);
229 else
230 return 0;
231 }
const TRecMucTrack * getMucTrack(Int_t i) const
retrieve a MucTrack From the collection, using the index into the array
Definition: TDisTrack.cxx:145

◆ GetMucTrack() [2/2]

const TRecMucTrack * BesEvent::GetMucTrack ( Int_t  i,
TDisTrack recEvent 
) const
inline

Definition at line 226 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

226 {
227 if (recEvent)
228 return recEvent->getMucTrack(i);
229 else
230 return 0;
231 }

◆ GetMucTrackCol() [1/2]

const TObjArray * BesEvent::GetMucTrackCol ( TDisTrack recEvent) const
inline

Definition at line 141 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

141 {
142 if (recEvent)
143 return recEvent->getMucTrackCol();
144 else
145 return 0;
146 }
const TObjArray * getMucTrackCol() const
retrieve the whole TObjArray of MucTrack Data

◆ GetMucTrackCol() [2/2]

const TObjArray * BesEvent::GetMucTrackCol ( TDisTrack recEvent) const
inline

Definition at line 141 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

141 {
142 if (recEvent)
143 return recEvent->getMucTrackCol();
144 else
145 return 0;
146 }

◆ GetMucTrackNum() [1/2]

const Int_t BesEvent::GetMucTrackNum ( TDisTrack recEvent) const
inline

Definition at line 185 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

185 {
186 if (recEvent)
187 return recEvent->getMucTrackNum();
188 // return recEvent->getMucTrackCol()->GetEntries();
189 else
190 return -1;
191 }
int getMucTrackNum()
Definition: TDisTrack.cxx:193

◆ GetMucTrackNum() [2/2]

const Int_t BesEvent::GetMucTrackNum ( TDisTrack recEvent) const
inline

Definition at line 185 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

185 {
186 if (recEvent)
187 return recEvent->getMucTrackNum();
188 // return recEvent->getMucTrackCol()->GetEntries();
189 else
190 return -1;
191 }

◆ GetRun() [1/2]

Long64_t BesEvent::GetRun ( )
inline

◆ GetRun() [2/2]

Long64_t BesEvent::GetRun ( )
inline

Definition at line 245 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

245 {
246 return fEventHeader.GetRunNumber();
247 }

◆ GetSec() [1/2]

Int_t BesEvent::GetSec ( )
inline

◆ GetSec() [2/2]

Int_t BesEvent::GetSec ( )
inline

Definition at line 266 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

266 {
267 return fEventHeader.GetEventSec();
268 }

◆ GetTofDigi() [1/2]

const TTofDigi * BesEvent::GetTofDigi ( Int_t  i) const
inline

Definition at line 106 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

106 {
107 if (fDigiEvent) return fDigiEvent->getTofDigi(i);
108 else return 0;
109 }
const TTofDigi * getTofDigi(Int_t i) const
retrieve a TofDigi From the collection, using the index into the array
Definition: TDigiEvent.cxx:146

Referenced by Print().

◆ GetTofDigi() [2/2]

const TTofDigi * BesEvent::GetTofDigi ( Int_t  i) const
inline

Definition at line 106 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

106 {
107 if (fDigiEvent) return fDigiEvent->getTofDigi(i);
108 else return 0;
109 }

◆ GetTofDigiCol() [1/2]

const TObjArray * BesEvent::GetTofDigiCol ( ) const
inline

Definition at line 74 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

74 {
75 if (fDigiEvent) return fDigiEvent->getTofDigiCol();
76 else return 0;
77 }
const TObjArray * getTofDigiCol() const
retrieve the whole TObjArray of TofDigi Data

Referenced by TofROOTGeo::SetHits().

◆ GetTofDigiCol() [2/2]

const TObjArray * BesEvent::GetTofDigiCol ( ) const
inline

Definition at line 74 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

74 {
75 if (fDigiEvent) return fDigiEvent->getTofDigiCol();
76 else return 0;
77 }

◆ GetTofDigiNum() [1/2]

const Int_t BesEvent::GetTofDigiNum ( ) const
inline

Definition at line 90 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

90 {
91 if (fDigiEvent) return fDigiEvent->getTofDigiCol()->GetEntries();
92 else return -1;
93 }

Referenced by Print().

◆ GetTofDigiNum() [2/2]

const Int_t BesEvent::GetTofDigiNum ( ) const
inline

Definition at line 90 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

90 {
91 if (fDigiEvent) return fDigiEvent->getTofDigiCol()->GetEntries();
92 else return -1;
93 }

◆ GetTofTrack() [1/2]

const TRecTofTrack * BesEvent::GetTofTrack ( Int_t  i,
TDisTrack recEvent 
) const
inline

Definition at line 214 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

214 {
215 if (recEvent)
216 return recEvent->getTofTrack(i);
217 else
218 return 0;
219 }
const TRecTofTrack * getTofTrack(Int_t i) const
retrieve a TofTrack From the collection, using the index into the array
Definition: TDisTrack.cxx:134

◆ GetTofTrack() [2/2]

const TRecTofTrack * BesEvent::GetTofTrack ( Int_t  i,
TDisTrack recEvent 
) const
inline

Definition at line 214 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

214 {
215 if (recEvent)
216 return recEvent->getTofTrack(i);
217 else
218 return 0;
219 }

◆ GetTofTrackCol() [1/2]

const TObjArray * BesEvent::GetTofTrackCol ( TDisTrack recEvent) const
inline

Definition at line 129 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

129 {
130 if (recEvent)
131 return recEvent->getTofTrackCol();
132 else
133 return 0;
134 }
const TObjArray * getTofTrackCol() const
retrieve the whole TObjArray of TofTrack Data

◆ GetTofTrackCol() [2/2]

const TObjArray * BesEvent::GetTofTrackCol ( TDisTrack recEvent) const
inline

Definition at line 129 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

129 {
130 if (recEvent)
131 return recEvent->getTofTrackCol();
132 else
133 return 0;
134 }

◆ GetTofTrackNum() [1/2]

const Int_t BesEvent::GetTofTrackNum ( TDisTrack recEvent) const
inline

Definition at line 171 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

171 {
172 if (recEvent)
173 // return recEvent->getTofTrackCol()->GetEntries();
174 return recEvent->getTofTrackNum();
175 else
176 return -1;
177 }
int getTofTrackNum()
Definition: TDisTrack.cxx:173

◆ GetTofTrackNum() [2/2]

const Int_t BesEvent::GetTofTrackNum ( TDisTrack recEvent) const
inline

Definition at line 171 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

171 {
172 if (recEvent)
173 // return recEvent->getTofTrackCol()->GetEntries();
174 return recEvent->getTofTrackNum();
175 else
176 return -1;
177 }

◆ GetYear() [1/2]

Int_t BesEvent::GetYear ( )
inline

◆ GetYear() [2/2]

Int_t BesEvent::GetYear ( )
inline

Definition at line 251 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

251 {
252 return fEventHeader.GetEventYear();
253 }

◆ Print() [1/2]

void BesEvent::Print ( Option_t *  option = "")
virtual

Definition at line 1123 of file BesEvent.cxx.

1123 {
1124 //
1125 // Print event information
1126 //
1127 // Options available:
1128 // '' - quiet, i.e. only numbers of hits and tracks etc. (default)
1129 // 'ALL' - very detailed output (might be hundreds of lines!)
1130 // 'Digi' - only Digi information
1131 // 'Dst' - only Dst information
1132 //
1133 TString opt = option;
1134 opt.ToUpper();
1135 Int_t i;
1136
1137 //cout << endl
1138 // << "==========================================================" << endl
1139 // << "Run: " << GetRun() << endl
1140 // << "Event: " << GetEvent() << endl
1141 // << "----------------------------------------------------------" << endl
1142 // << "Mdc digis: " << GetMdcDigiNum() << endl
1143 // << "Tof digis: " << GetTofDigiNum() << endl
1144 // << "Emc digis: " << GetEmcDigiNum() << endl
1145 // << "Muc digis: " << GetMucDigiNum() << endl
1146 // << "Mdc tracks: " << GetMdcTrackNum() << endl
1147 // << "Tof tracks: " << "debug++++++" /*GetTofTrackNum()*/ << endl
1148 // << "Emc tracks: " << GetEmcShowerNum() << endl
1149 // << "Muc tracks: " << GetMucTrackNum() << endl
1150 // << "Ext tracks: " << GetExtTrackNum() << endl
1151 // << "Dedx : " << GetDedxNum() << endl
1152 // << "----------------------------------------------------------" << endl;
1153
1154 if ( opt.Contains("ALL") || opt.Contains("Digi") ) {
1155 for ( i = 0; i < GetMdcDigiNum(); i++ ) GetMdcDigi(i)->Print();
1156 for ( i = 0; i < GetTofDigiNum(); i++ ) GetTofDigi(i)->Print();
1157 for ( i = 0; i < GetEmcDigiNum(); i++ ) GetEmcDigi(i)->Print();
1158 for ( i = 0; i < GetMucDigiNum(); i++ ) GetMucDigi(i)->Print();
1159 }
1160
1161 /* if ( opt.Contains("ALL") || opt.Contains("Dst") ) {
1162 for ( i = 0; i < GetMdcTrackNum(); i++ ) GetMdcTrack(i)->Print();
1163 // Tof -> BTof ETof
1164 //for ( i = 0; i < GetTofTrackNum(); i++ ) GetTofTrack(i)->Print();
1165 for ( i = 0; i < GetEmcShowerNum(); i++ ) GetEmcShower(i)->Print();
1166 for ( i = 0; i < GetMucTrackNum(); i++ ) GetMucTrack(i)->Print();
1167 cout << "wait for TRecExtEvent, BesEvent" << endl;
1168 //for ( i = 0; i < GetExtTrackNum(); i++ ) GetExtTrack(i)->Print();
1169 for ( i = 0; i < GetDedxNum(); i++ ) GetDedx(i)->Print();
1170 }
1171 */
1172 //cout << "=========================================================="
1173 //<< endl << endl;
1174}
void Print(Option_t *option="") const
Definition: TRawData.cxx:25

◆ Print() [2/2]

virtual void BesEvent::Print ( Option_t *  option = "")
virtual

◆ SetEmcShowers() [1/2]

void BesEvent::SetEmcShowers ( TDisTrack recEvent)
virtual

Definition at line 306 of file BesEvent.cxx.

306 {
307 if (fEmcTrackCol) {
308 for (int j = 0; j < fEmcTrackCol->GetEntries(); j++){
309 delete fEmcTrackCol->At(j);
310 }
311 fEmcTrackCol->Clear("C");
312 }
313 int emc_no = recEvent->getEmcShowerNum();
314
315 for (Int_t i = 0; i < emc_no; i++) {
316 const TRecEmcShower* recShower =recEvent->getEmcShower(i);
317 BesGeoTrack *emcTrack = new BesGeoTrack();
318 emcTrack->SetTrackType(2);
319
320 ConstructEmcTrackFromRec(emcTrack, recShower);
321 fEmcTrackCol->Add(emcTrack);
322 }
323}
virtual void ConstructEmcTrackFromRec(BesGeoTrack *emcTrack, const TRecEmcShower *recTrack)
Definition: BesEvent.cxx:817

Referenced by SetTracks().

◆ SetEmcShowers() [2/2]

virtual void BesEvent::SetEmcShowers ( TDisTrack recEvent)
virtual

◆ SetEvent() [1/2]

void BesEvent::SetEvent ( TDigiEvent digiEvent,
TDisTrack recEvent,
TEvtHeader evtHeader,
TRecEvTime recEvTime,
Bool_t  isRec 
)
virtual

Definition at line 114 of file BesEvent.cxx.

115{
116 //fDigiEvent = 0;
117 fDigiEvent = digiEvent;
118 fEvtHeader = evtHeader;
119 fRecEvTime = recEvTime;
120 //fTrigEvent = trigEvt;
121 fTrigEvent = 0;
122 // ========================================
123 // set trig information
124 // ========================================
125 if (fTrigEvent != 0){
126 vector<Int_t> trigConditionVector;
127 vector<Int_t> trigChannelVector;
128
129 const TTrigData* trigData = fTrigEvent->getTrigData();
130 const Int_t timeType = trigData->getTimingType();
131 //std::cout << "BesEvent::timing type: " << timeType << std::endl;
132 Int_t trigCondition;
133 Int_t trigChannel;
134 for (Int_t i = 0; i < 48; i++){
135 trigCondition = trigData->getTrigCondition(i);
136 if (trigCondition) trigConditionVector.push_back(i);
137 //std::cout << "BesEvent::trig condition: " << trigCondition << std::endl;
138 }
139 for (Int_t i = 0; i < 16; i++){
140 trigChannel = trigData->getTrigChannel(i);
141 if (trigChannel) trigChannelVector.push_back(i);
142 //std::cout << "BesEvent::trigChannel: " << trigChannel << std::endl;
143 }
144 fEventHeader.SetEventTrig(timeType, trigConditionVector, trigChannelVector);
145 }
146 else {
147 std::cout << "fTrigEvent does not exit!" << std::endl;
148 }
149 // ========================================
150 // set time information
151 // ========================================
152 if (fEvtHeader != 0){
153 time_t now;
154 //now = time(NULL);
155 now = (time_t)evtHeader->time();
156 //char str_time[256];
157 //sprintf(str_time, ctime(&now));
158 //cout << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
159 //cout << "time now: " << str_time << endl;
160 //cout << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
161
162 struct tm *local_time;
163 local_time = localtime(&now);
164 //cout << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
165 //cout << "time now sec: " << local_time->tm_sec << endl;
166 //cout << "time now min: " << local_time->tm_min << endl;
167 //cout << "time now hour: "<< local_time->tm_hour << endl;
168 //cout << "time now day: " << local_time->tm_mday << endl;
169 //cout << "time now mon: " << local_time->tm_mon << endl;
170 //cout << "time now year: "<< local_time->tm_year << endl;
171 //cout << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
172
173 Int_t time1 = (1900 + local_time->tm_year) * 10000 + (1 + local_time->tm_mon) * 100
174 + local_time->tm_mday;
175 Int_t time2 = local_time->tm_hour * 10000 + local_time->tm_min * 100
176 + local_time->tm_sec;
177
178 fEventHeader.SetEventHeaderGeneral(fEvtHeader->getRunId(),
179 fEvtHeader->getEventId(), time1, time2);
180 }
181 else {
182 cout << "fEvtHeader does not exit" << endl;
183 }
184
185 // ========================================
186 // set event start time information
187 // ========================================
188 //Long Peixun's update: if this event is not a rec event, don't show estime, status and quality
189 if (fRecEvTime != 0)
190 {
191 fEventHeader.SetEventRec(isRec);
192 if (isRec)
193 fEventHeader.SetEventEvTime(fRecEvTime->estime(),fRecEvTime->status(),fRecEvTime->quality());
194 else
195 fEventHeader.SetEventEvTime(0.0, 0, 0.0);
196 }
197 else
198 {
199 cout << "fRecEvTime does not exit" << endl;
200 fEventHeader.SetEventRec(false);
201 fEventHeader.SetEventEvTime(0.0, 0, 0.0);
202 }
203
204 // ========================================
205 // set Mdc information
206 // ========================================
207 Double_t p = 0.0, pt = 0.0, px = 0.0, py = 0.0, pz = 0.0;
208 for (Int_t i = 0; i < GetMdcTrackNum(recEvent); i++) {
209 p += GetMdcTrack(i,recEvent)->p();
210 pt += GetMdcTrack(i,recEvent)->pxy();
211 px += GetMdcTrack(i,recEvent)->px();
212 py += GetMdcTrack(i,recEvent)->py();
213 pz += GetMdcTrack(i,recEvent)->pz();
214 }
215 fEventHeader.SetEventMdc(p, pt, px, py, pz);
216
217 // ========================================
218 // set Emc information
219 // ========================================
220 Double_t t = 9999.0;
221 Double_t e = 0.0;
222 for (Int_t i = 0; i < GetEmcShowerNum(recEvent); i++) {
223 e += GetEmcShower(i,recEvent)->energy();
224 }
225 fEventHeader.SetEventEmc(e);
226 // ========================================
227 // set digi and rec
228 // ========================================
229 if (fDigiEvent != 0){
230 SetHits();
231 fEventHeader.SetEventMC(fDigiEvent->getFromMc());
232 }
233 if (recEvent != 0)
234 SetTracks(recEvent);
235}
virtual void SetEventTrig(Int_t timeType, vector< Int_t > &trigConditionVector, vector< Int_t > &trigChannelVector)
virtual void SetEventMdc(Double_t p, Double_t pt, Double_t px, Double_t py, Double_t pz)
virtual void SetEventHeaderGeneral(Long64_t run, Long64_t event, Int_t time1, Int_t time2)
virtual void SetEventRec(Bool_t rec)
virtual void SetEventEvTime(Double_t time, Int_t status, Double_t quality)
virtual void SetEventEmc(Double_t e)
virtual void SetEventMC(Bool_t mc)
virtual void SetHits()
Definition: BesEvent.cxx:239
const TRecMdcTrack * GetMdcTrack(Int_t i, TDisTrack *recEvent) const
const Int_t GetMdcTrackNum(TDisTrack *recEvent) const
const Int_t GetEmcShowerNum(TDisTrack *recEvent) const
const TRecEmcShower * GetEmcShower(Int_t i, TDisTrack *recEvent) const
virtual void SetTracks(TDisTrack *recEvent)
Definition: BesEvent.cxx:250
const TTrigData * getTrigData() const
Definition: TTrigEvent.cxx:50

Referenced by BesClient::GetEvent().

◆ SetEvent() [2/2]

virtual void BesEvent::SetEvent ( TDigiEvent digiEvent,
TDisTrack recEvent,
TEvtHeader evtHeader,
TRecEvTime recEvTime,
Bool_t  isRec 
)
virtual

◆ SetExtTracks() [1/2]

void BesEvent::SetExtTracks ( TDisTrack recEvent)
virtual

Definition at line 347 of file BesEvent.cxx.

347 {
348 //if (fExtTrackCol) fExtTrackCol->Clear("C");
349
350 //for (Int_t i = 0; i < GetExtTrackNum(); i++) {
351 // const TExtTrack* recTrack = GetExtTrack(i);
352 // BesGeoTrack *extTrack = new BesGeoTrack();
353 // extTrack->SetTrackType(4);
354
355 // ConstructExtTrackFromRec(extTrack, recTrack);
356 // fExtTrackCol->Add(extTrack);
357 //}
358}

Referenced by SetTracks().

◆ SetExtTracks() [2/2]

virtual void BesEvent::SetExtTracks ( TDisTrack recEvent)
virtual

◆ SetHits() [1/2]

void BesEvent::SetHits ( )
virtual

Definition at line 239 of file BesEvent.cxx.

239 {
240 if (gBesGeometry) {
245 }
246}
void SetHits()
Set all physicalNodes corresponding to digiCol;.
void SetHits()
Set all physicalNodes corresponding to digiCol;.
void SetHits()
Set all physicalNodes corresponding to digiCol;.
void SetHits()
Set all physicalNodes corresponding to digiCol;.

Referenced by SetEvent().

◆ SetHits() [2/2]

virtual void BesEvent::SetHits ( )
virtual

◆ SetMagnetic() [1/2]

void BesEvent::SetMagnetic ( Double_t  input)
inline

Definition at line 68 of file EventDisplay/BesVisLib/BesVisLib-00-05-04/BesVisLib/BesEvent.h.

68{f_Magnetic = input;}

Referenced by BesClient::ExecuteReturn().

◆ SetMagnetic() [2/2]

void BesEvent::SetMagnetic ( Double_t  input)
inline

Definition at line 68 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

68{f_Magnetic = input;}

◆ SetMdcTracks() [1/2]

void BesEvent::SetMdcTracks ( TDisTrack recEvent)
virtual

Definition at line 264 of file BesEvent.cxx.

264 {
265 if (fMdcTrackCol){
266 for (int j = 0; j < fMdcTrackCol->GetEntries(); j++){
267 delete fMdcTrackCol->At(j);
268 }
269 fMdcTrackCol->Clear("C");
270 }
271 int mdc_no = recEvent->getMdcTrackNum();
272 for (Int_t i = 0; i < mdc_no; i++) {
273 const TRecMdcTrack* recTrack =recEvent->getRecMdcTrack(i);
274 BesGeoTrack *mdcTrack = new BesGeoTrack();
275 mdcTrack->SetTrackType(0);
276
277 ConstructMdcTrackFromRec(mdcTrack, recTrack,recEvent);
278 fMdcTrackCol->Add(mdcTrack);
279 }
280}
virtual void ConstructMdcTrackFromRec(BesGeoTrack *mdcTrack, const TRecMdcTrack *recTrack, TDisTrack *recEvent)
Definition: BesEvent.cxx:362

Referenced by SetTracks().

◆ SetMdcTracks() [2/2]

virtual void BesEvent::SetMdcTracks ( TDisTrack recEvent)
virtual

◆ SetMucTracks() [1/2]

void BesEvent::SetMucTracks ( TDisTrack recEvent)
virtual

Definition at line 327 of file BesEvent.cxx.

327 {
328 if (fMucTrackCol) {
329 for (int j = 0; j < fMucTrackCol->GetEntries(); j++){
330 delete fMucTrackCol->At(j);
331 }
332 fMucTrackCol->Clear("C");
333 }
334 int muc_no = recEvent->getMucTrackNum();
335 for (Int_t i = 0; i < muc_no; i++) {
336 const TRecMucTrack* recTrack =recEvent->getMucTrack(i);
337 BesGeoTrack *mucTrack = new BesGeoTrack();
338 mucTrack->SetTrackType(3);
339
340 ConstructMucTrackFromRec(mucTrack, recTrack);
341 fMucTrackCol->Add(mucTrack);
342 }
343}
virtual void ConstructMucTrackFromRec(BesGeoTrack *mucTrack, const TRecMucTrack *recTrack)
Definition: BesEvent.cxx:895

Referenced by SetTracks().

◆ SetMucTracks() [2/2]

virtual void BesEvent::SetMucTracks ( TDisTrack recEvent)
virtual

◆ SetTofTracks() [1/2]

void BesEvent::SetTofTracks ( TDisTrack recEvent)
virtual

Definition at line 284 of file BesEvent.cxx.

284 {
285 if (fTofTrackCol) {
286 for (int j = 0; j < fTofTrackCol->GetEntries(); j++){
287 delete fTofTrackCol->At(j);
288 }
289 fTofTrackCol->Clear("C");
290 }
291 int tof_no = recEvent->getTofTrackNum();
292
293 for (Int_t i = 0; i < tof_no; i++) {
294 const TRecTofTrack* recTrack = recEvent->getTofTrack(i);
295 if ( !Is_tofCounter( recTrack->status())) continue;
296 BesGeoTrack *tofTrack = new BesGeoTrack();
297 tofTrack->SetTrackType(1);
298
299 ConstructTofTrackFromRec(tofTrack, recTrack,recEvent);
300 fTofTrackCol->Add(tofTrack);
301 }
302}
virtual void ConstructTofTrackFromRec(BesGeoTrack *tofTrack, const TRecTofTrack *recTrack, TDisTrack *recEvent)
Definition: BesEvent.cxx:663

Referenced by SetTracks().

◆ SetTofTracks() [2/2]

virtual void BesEvent::SetTofTracks ( TDisTrack recEvent)
virtual

◆ SetTracks() [1/2]

void BesEvent::SetTracks ( TDisTrack recEvent)
virtual

Definition at line 250 of file BesEvent.cxx.

250 {
251 if (gBesGeometry)
252 {
253 //Long Peixun's update: Add judging detector geometry code
254 SetMdcTracks(recEvent);
255 SetTofTracks(recEvent);
256 SetEmcShowers(recEvent);
257 SetMucTracks(recEvent);
258 SetExtTracks(recEvent);
259 }
260}
virtual void SetTofTracks(TDisTrack *recEvent)
Definition: BesEvent.cxx:284
virtual void SetMucTracks(TDisTrack *recEvent)
Definition: BesEvent.cxx:327
virtual void SetMdcTracks(TDisTrack *recEvent)
Definition: BesEvent.cxx:264
virtual void SetEmcShowers(TDisTrack *recEvent)
Definition: BesEvent.cxx:306
virtual void SetExtTracks(TDisTrack *recEvent)
Definition: BesEvent.cxx:347

Referenced by SetEvent().

◆ SetTracks() [2/2]

virtual void BesEvent::SetTracks ( TDisTrack recEvent)
virtual

The documentation for this class was generated from the following files: