BOSS 7.0.3
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)
 
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)
 
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 47 of file BesEvent.cxx.

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

◆ 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 102 of file BesEvent.cxx.

102 {
103 //
104 // Clear event
105 TString opt = option;
106 opt.ToUpper();
107
108 fDigiEvent->Clear("C");
109}
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 797 of file BesEvent.cxx.

797 {
798
799 Double_t x=0.0, y=0.0, z=0.0;
800 x = recTrack->x() * 10.0;
801 y = recTrack->y() * 10.0;
802 z = recTrack->z() * 10.0;
803
804 emcTrack->SetMarker(x, y, z);
805 // Add associated emc hits
806 vector<Int_t> vecHits(0);
807 map<Int_t, Double_t> cellMap = recTrack->cellIdMap();
808 map<Int_t, Double_t>::iterator iCellMap;
809 for (iCellMap = cellMap.begin(); iCellMap != cellMap.end(); iCellMap++){
810 Int_t cellId = iCellMap->first;
811 vecHits.push_back(cellId);
812 }
813 for (Int_t i = 0; i < (Int_t)vecHits.size(); i++) {
814 Identifier aEmcID( vecHits[i] );
815 int part = EmcID::barrel_ec( aEmcID );
816 int theta = EmcID::theta_module( aEmcID );
817 int phi = EmcID::phi_module( aEmcID );
818 if (part == 1) theta = 43-theta; // 43 = m_kThetaBr-1
819
820 Emc2DCrystal* aHit = gBesGeometry->GetEmcROOTGeo()->Get2DCrystal(part, phi, theta);
821 emcTrack->AddHit( aHit );
822 }
823
824 // Add Emc track info
825 char data[100];
826 TString info;
827
828 info = TString("EmcShower ");
829 info += recTrack->trackId();
830 emcTrack->AddInfo(info);
831
832 sprintf(data, "nHits = %i, status = %i", recTrack->numHits(), recTrack->status());
833 emcTrack->AddInfo( TString(data) );
834
835 sprintf(data, "energy= (%.2f #pm %-.2f) MeV", recTrack->energy()*1000.0, recTrack->dE()*1000.0);
836 emcTrack->AddInfo( TString(data) );
837
838 Identifier aEmcID( recTrack->cellId() );
839 int part = EmcID::barrel_ec( aEmcID );
840 int theta = EmcID::theta_module( aEmcID );
841 int phi = EmcID::phi_module( aEmcID );
842
843 sprintf(data, "cell Id= (%i, #theta %i, #phi %i)", part, theta, phi);
844 emcTrack->AddInfo( TString(data) );
845
846 sprintf(data, "module = %i", recTrack->module());
847 emcTrack->AddInfo( TString(data) );
848
849 //sprintf(data, "x = (%-.3f #pm %-.3f) mm", x, recTrack->dx());
850 //emcTrack->AddInfo( TString(data) );
851
852 //sprintf(data, "y = (%-.3f #pm %-.3f) mm", y, recTrack->dy());
853 //emcTrack->AddInfo( TString(data) );
854
855 //sprintf(data, "z = (%-.3f #pm %-.3f) mm", z, recTrack->dz());
856 //emcTrack->AddInfo( TString(data) );
857
858 sprintf(data, "#theta = (%-.3f #pm %-.3f)", recTrack->theta(), recTrack->dtheta());
859 emcTrack->AddInfo( TString(data) );
860
861 sprintf(data, "#phi = (%-.3f #pm %-.3f)", recTrack->phi(), recTrack->dphi());
862 emcTrack->AddInfo( TString(data) );
863
864// sprintf(data, "cos (x=%-.3f, y=%-.3f, z=%-.3f)", recTrack->cosx(), recTrack->cosy(), recTrack->cosz()); //from boss6.1.0. no these varibles
865// emcTrack->AddInfo( TString(data) );
866
867 emcTrack->CloseInfo();
868}
TTree * data
Double_t x[10]
virtual void CloseInfo()
Definition: BesGeoTrack.cxx:53
virtual void SetMarker(Double_t x, Double_t y, Double_t z)
Definition: BesGeoTrack.cxx:67
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;.

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 346 of file BesEvent.cxx.

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

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 872 of file BesEvent.cxx.

872 {
873 if (recTrack->depth() <= 0.0) return; // bad track
874
875 Double_t field = 1e-3; // Tesla
876 Double_t kvC = 3.0e8; // light speed
877 Int_t charge = 1;
878 Double_t pz = recTrack->pz(); // GeV
879 Double_t pt =
880 sqrt(recTrack->px()*recTrack->px() + recTrack->py()*recTrack->py()); // GeV
881 Double_t pi = TMath::Pi();
882
883 Double_t mucR =
884 ((TGeoBBox*)gBesGeometry->GetMucROOTGeo()->GetVolumeMuc()->GetShape())->GetDX();
885 Double_t mucZ =
886 ((TGeoBBox*)gBesGeometry->GetMucROOTGeo()->GetVolumeMuc()->GetShape())->GetDZ();
887
888 Double_t radius = 1.0e+9;
889 Double_t curvature = 1.0/radius;
890 Double_t zStep = 2*pi*radius * fabs(pz/pt);
891 Double_t step = 1.0; // mm
892 Double_t delt = step*(1.0e-3)/kvC;
893
894 TGeoHelix helix(curvature, zStep, charge);
895
896 Double_t x = recTrack->xPos() * 10.0;
897 Double_t y = recTrack->yPos() * 10.0;
898 Double_t z = recTrack->zPos() * 10.0;
899
900 helix.InitPoint(x, y, z);
901 helix.InitDirection(recTrack->px(), recTrack->py(), recTrack->pz(), kFALSE);
902 helix.SetField(0.0, 0.0, field, kFALSE);
903
904 mucTrack->AddPoint(x, y, z, 0.0);
905 const Double_t *p;
906 Int_t nStep = 0;
907 do {
908 // helix Step before GetCurrentPoint, or first point will be wrong
909 helix.Step(step);
910 p = helix.GetCurrentPoint();
911 mucTrack->AddPoint(p[0], p[1], p[2], delt*nStep);
912 Double_t mp[3];
913 mp[0] = p[0];
914 mp[1] = p[1];
915 mp[2] = p[2];
916 mucTrack->PaintMarker(mp);
917 mucTrack->SetMarkerColor(kBlack);
918 mucTrack->SetMarkerSize(10);
919 nStep++;
920 }
921 while ( (p[0]*p[0] + p[1]*p[1]) < mucR*mucR && fabs(p[2]) < mucZ );
922
923 // Add associated muc hits
924 vector<Int_t> vecHits = recTrack->vecHits();
925 for (Int_t i = 0; i < (Int_t)vecHits.size(); i++) {
926 Identifier aMucID( vecHits[i] );
927 int part = MucID::part( aMucID );
928 int seg = MucID::seg( aMucID );
929 int gap = MucID::gap( aMucID );
930 int strip = MucID::strip( aMucID );
931
932 Muc2DStrip* aHit = gBesGeometry->GetMucROOTGeo()->Get2DStrip(part, seg, gap, strip);
933 mucTrack->AddHit( aHit );
934 }
935
936 mucTrack->SetCharge(charge);
937
938 // Add Muc track info
939 char data[100];
940 TString info;
941
942 info = TString("MucTrack ");
943 info += recTrack->trackId();
944 mucTrack->AddInfo(info);
945
946 sprintf(data, "nHits= %i, maxHits= %i, nLayers= %i", recTrack->numHits(), recTrack->maxHitsInLayer(), recTrack->numLayers());
947 mucTrack->AddInfo( TString(data) );
948
949 sprintf(data, "lastLayer (br= %i, ec= %i)", recTrack->brLastLayer(), recTrack->ecLastLayer());
950 mucTrack->AddInfo( TString(data) );
951
952 sprintf(data, "depth = %.3f cm", recTrack->depth());
953 mucTrack->AddInfo( TString(data) );
954
955 sprintf(data, "#chi^{2}= %-.3f, dof= %i, rms= %-.3f", recTrack->chi2(), recTrack->dof(), recTrack->rms());
956 mucTrack->AddInfo( TString(data) );
957
958 sprintf(data, "Origin (%-.2f, %-.2f, %-.2f) cm", recTrack->xPos(), recTrack->yPos(), recTrack->zPos());
959 mucTrack->AddInfo( TString(data) );
960
961 sprintf(data, "p (%-.3f, %-.3f, %-.3f) GeV", recTrack->px(), recTrack->py(), recTrack->pz());
962 mucTrack->AddInfo( TString(data) );
963
964 mucTrack->CloseInfo();
965}
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
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 645 of file BesEvent.cxx.

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

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

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 1034 of file BesEvent.cxx.

1034 {
1035 if (gBesGeometry) {
1040 }
1041}
void DrawHits(Option_t *option)
Draw 2D hits.

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 1045 of file BesEvent.cxx.

1045 {
1046
1047 BesView *view = (BesView*)gPad->GetView();
1048
1049 if (view && view->GetVisTracksGlobal()) {
1050
1051 if (view->GetVisTracksMdc()) {
1052 for (Int_t i = 0; i < fMdcTrackCol->GetEntries(); i++) {
1053 BesGeoTrack *track = (BesGeoTrack*)fMdcTrackCol->At(i);
1054 track->Draw();
1055 }
1056 }
1057
1058 if (view->GetVisTracksTof()) {
1059 for (Int_t i = 0; i < fTofTrackCol->GetEntries(); i++) {
1060 BesGeoTrack *track = (BesGeoTrack*)fTofTrackCol->At(i);
1061 track->Draw();
1062 }
1063 }
1064
1065 if (view->GetVisTracksEmc()) {
1066 for (Int_t i = 0; i < fEmcTrackCol->GetEntries(); i++) {
1067 BesGeoTrack *track = (BesGeoTrack*)fEmcTrackCol->At(i);
1068 track->Draw();
1069 }
1070 }
1071
1072 if (view->GetVisTracksMuc()) {
1073 for (Int_t i = 0; i < fMucTrackCol->GetEntries(); i++) {
1074 BesGeoTrack *track = (BesGeoTrack*)fMucTrackCol->At(i);
1075 track->Draw();
1076 }
1077 }
1078
1079 if (view->GetVisTracksExt()) {
1080 for (Int_t i = 0; i < fExtTrackCol->GetEntries(); i++) {
1081 BesGeoTrack *track = (BesGeoTrack*)fExtTrackCol->At(i);
1082 track->Draw();
1083 }
1084 }
1085 }
1086}
virtual void Draw(Option_t *option="")

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 256 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

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

◆ GetDedx() [1/2]

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

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

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

◆ GetDedx() [2/2]

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

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

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

◆ GetDedxCol() [1/2]

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

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

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

◆ GetDedxCol() [2/2]

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

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

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

◆ GetDedxNum() [1/2]

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

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

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

◆ GetDedxNum() [2/2]

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

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

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

◆ GetEmcDigi() [1/2]

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

Definition at line 110 of file EventDisplay/BesVisLib/BesVisLib-00-04-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-04-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-04-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 219 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesEvent.h.

219 {
220 if (recEvent)
221 return recEvent->getEmcShower(i);
222 else
223 return 0;
224 };
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 219 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

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

◆ GetEmcShowerCol() [1/2]

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

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

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

◆ GetEmcShowerCol() [2/2]

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

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

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

◆ GetEmcShowerNum() [1/2]

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

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

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

Referenced by SetEvent().

◆ GetEmcShowerNum() [2/2]

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

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

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

◆ GetEvent() [1/2]

Long64_t BesEvent::GetEvent ( )
inline

◆ GetEvent() [2/2]

Long64_t BesEvent::GetEvent ( )
inline

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

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

◆ GetExtTrackCol() [1/2]

const TObjArray * BesEvent::GetExtTrackCol ( ) const
inline

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

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

◆ GetExtTrackCol() [2/2]

const TObjArray * BesEvent::GetExtTrackCol ( ) const
inline

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

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

◆ GetExtTrackNum() [1/2]

const Int_t BesEvent::GetExtTrackNum ( ) const
inline

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

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

◆ GetExtTrackNum() [2/2]

const Int_t BesEvent::GetExtTrackNum ( ) const
inline

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

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

◆ GetHeader() [1/2]

BesEventHeader BesEvent::GetHeader ( )
inline

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

271 {
272 return fEventHeader;
273 }

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

◆ GetHeader() [2/2]

BesEventHeader BesEvent::GetHeader ( )
inline

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

271 {
272 return fEventHeader;
273 }

◆ GetHour() [1/2]

Int_t BesEvent::GetHour ( )
inline

◆ GetHour() [2/2]

Int_t BesEvent::GetHour ( )
inline

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

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

◆ GetMC() [1/2]

Int_t BesEvent::GetMC ( )
inline

◆ GetMC() [2/2]

Int_t BesEvent::GetMC ( )
inline

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

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

◆ GetMdcDigi() [1/2]

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

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

102 {
103 if (fDigiEvent) return fDigiEvent->getMdcDigi(i);
104 else return 0;
105 };
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 };

◆ GetMdcDigiCol() [1/2]

const TObjArray * BesEvent::GetMdcDigiCol ( ) const
inline

Definition at line 70 of file EventDisplay/BesVisLib/BesVisLib-00-04-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-04-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 203 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesEvent.h.

203 {
204 if (recEvent)
205 return recEvent->getRecMdcTrack(i);
206 else return 0;
207 };
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 203 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

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

◆ GetMdcTrackCol() [1/2]

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

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

118 {
119 if (recEvent)
120 return recEvent->getRecMdcTrackCol();
121 else return 0;
122 };
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 118 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

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

◆ GetMdcTrackNum() [1/2]

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

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

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

Referenced by SetEvent().

◆ GetMdcTrackNum() [2/2]

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

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

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

◆ GetMin() [1/2]

Int_t BesEvent::GetMin ( )
inline

◆ GetMin() [2/2]

Int_t BesEvent::GetMin ( )
inline

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

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

◆ GetMonth() [1/2]

Int_t BesEvent::GetMonth ( )
inline

◆ GetMonth() [2/2]

Int_t BesEvent::GetMonth ( )
inline

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

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

◆ GetMucDigi() [1/2]

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

Definition at line 114 of file EventDisplay/BesVisLib/BesVisLib-00-04-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-04-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-04-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 225 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesEvent.h.

225 {
226 if (recEvent)
227 return recEvent->getMucTrack(i);
228 else
229 return 0;
230 };
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 225 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

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

◆ GetMucTrackCol() [1/2]

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

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

140 {
141 if (recEvent)
142 return recEvent->getMucTrackCol();
143 else
144 return 0;
145 };
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 140 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

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

◆ GetMucTrackNum() [1/2]

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

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

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

◆ GetMucTrackNum() [2/2]

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

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

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

◆ GetRun() [1/2]

Long64_t BesEvent::GetRun ( )
inline

◆ GetRun() [2/2]

Long64_t BesEvent::GetRun ( )
inline

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

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

◆ GetSec() [1/2]

Int_t BesEvent::GetSec ( )
inline

◆ GetSec() [2/2]

Int_t BesEvent::GetSec ( )
inline

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

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

◆ GetTofDigi() [1/2]

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

Definition at line 106 of file EventDisplay/BesVisLib/BesVisLib-00-04-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-04-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-04-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 213 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesEvent.h.

213 {
214 if (recEvent)
215 return recEvent->getTofTrack(i);
216 else
217 return 0;
218 };
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 213 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

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

◆ GetTofTrackCol() [1/2]

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

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

128 {
129 if (recEvent)
130 return recEvent->getTofTrackCol();
131 else
132 return 0;
133 };
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 128 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

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

◆ GetTofTrackNum() [1/2]

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

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

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

◆ GetTofTrackNum() [2/2]

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

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

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

◆ GetYear() [1/2]

Int_t BesEvent::GetYear ( )
inline

◆ GetYear() [2/2]

Int_t BesEvent::GetYear ( )
inline

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

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

◆ Print() [1/2]

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

Definition at line 1090 of file BesEvent.cxx.

1090 {
1091 //
1092 // Print event information
1093 //
1094 // Options available:
1095 // '' - quiet, i.e. only numbers of hits and tracks etc. (default)
1096 // 'ALL' - very detailed output (might be hundreds of lines!)
1097 // 'Digi' - only Digi information
1098 // 'Dst' - only Dst information
1099 //
1100 TString opt = option;
1101 opt.ToUpper();
1102 Int_t i;
1103
1104 //cout << endl
1105 // << "==========================================================" << endl
1106 // << "Run: " << GetRun() << endl
1107 // << "Event: " << GetEvent() << endl
1108 // << "----------------------------------------------------------" << endl
1109 // << "Mdc digis: " << GetMdcDigiNum() << endl
1110 // << "Tof digis: " << GetTofDigiNum() << endl
1111 // << "Emc digis: " << GetEmcDigiNum() << endl
1112 // << "Muc digis: " << GetMucDigiNum() << endl
1113 // << "Mdc tracks: " << GetMdcTrackNum() << endl
1114 // << "Tof tracks: " << "debug++++++" /*GetTofTrackNum()*/ << endl
1115 // << "Emc tracks: " << GetEmcShowerNum() << endl
1116 // << "Muc tracks: " << GetMucTrackNum() << endl
1117 // << "Ext tracks: " << GetExtTrackNum() << endl
1118 // << "Dedx : " << GetDedxNum() << endl
1119 // << "----------------------------------------------------------" << endl;
1120
1121 if ( opt.Contains("ALL") || opt.Contains("Digi") ) {
1122 for ( i = 0; i < GetMdcDigiNum(); i++ ) GetMdcDigi(i)->Print();
1123 for ( i = 0; i < GetTofDigiNum(); i++ ) GetTofDigi(i)->Print();
1124 for ( i = 0; i < GetEmcDigiNum(); i++ ) GetEmcDigi(i)->Print();
1125 for ( i = 0; i < GetMucDigiNum(); i++ ) GetMucDigi(i)->Print();
1126 }
1127
1128 /* if ( opt.Contains("ALL") || opt.Contains("Dst") ) {
1129 for ( i = 0; i < GetMdcTrackNum(); i++ ) GetMdcTrack(i)->Print();
1130 // Tof -> BTof ETof
1131 //for ( i = 0; i < GetTofTrackNum(); i++ ) GetTofTrack(i)->Print();
1132 for ( i = 0; i < GetEmcShowerNum(); i++ ) GetEmcShower(i)->Print();
1133 for ( i = 0; i < GetMucTrackNum(); i++ ) GetMucTrack(i)->Print();
1134 cout << "wait for TRecExtEvent, BesEvent" << endl;
1135 //for ( i = 0; i < GetExtTrackNum(); i++ ) GetExtTrack(i)->Print();
1136 for ( i = 0; i < GetDedxNum(); i++ ) GetDedx(i)->Print();
1137 }
1138 */
1139 //cout << "=========================================================="
1140 //<< endl << endl;
1141}
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 290 of file BesEvent.cxx.

290 {
291 if (fEmcTrackCol) {
292 for (int j = 0; j < fEmcTrackCol->GetEntries(); j++){
293 delete fEmcTrackCol->At(j);
294 }
295 fEmcTrackCol->Clear("C");
296 }
297 int emc_no = recEvent->getEmcShowerNum();
298
299 for (Int_t i = 0; i < emc_no; i++) {
300 const TRecEmcShower* recShower =recEvent->getEmcShower(i);
301 BesGeoTrack *emcTrack = new BesGeoTrack();
302 emcTrack->SetTrackType(2);
303
304 ConstructEmcTrackFromRec(emcTrack, recShower);
305 fEmcTrackCol->Add(emcTrack);
306 }
307}
virtual void ConstructEmcTrackFromRec(BesGeoTrack *emcTrack, const TRecEmcShower *recTrack)
Definition: BesEvent.cxx:797

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 
)
virtual

Definition at line 113 of file BesEvent.cxx.

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

◆ SetExtTracks() [1/2]

void BesEvent::SetExtTracks ( TDisTrack recEvent)
virtual

Definition at line 331 of file BesEvent.cxx.

331 {
332 //if (fExtTrackCol) fExtTrackCol->Clear("C");
333
334 //for (Int_t i = 0; i < GetExtTrackNum(); i++) {
335 // const TExtTrack* recTrack = GetExtTrack(i);
336 // BesGeoTrack *extTrack = new BesGeoTrack();
337 // extTrack->SetTrackType(4);
338
339 // ConstructExtTrackFromRec(extTrack, recTrack);
340 // fExtTrackCol->Add(extTrack);
341 //}
342}

Referenced by SetTracks().

◆ SetExtTracks() [2/2]

virtual void BesEvent::SetExtTracks ( TDisTrack recEvent)
virtual

◆ SetHits() [1/2]

void BesEvent::SetHits ( )
virtual

Definition at line 227 of file BesEvent.cxx.

227 {
228 if (gBesGeometry) {
233 }
234}
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 69 of file EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/BesEvent.h.

69{f_Magnetic = input;};

Referenced by BesClient::ExecuteReturn().

◆ SetMagnetic() [2/2]

void BesEvent::SetMagnetic ( Double_t  input)
inline

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

69{f_Magnetic = input;};

◆ SetMdcTracks() [1/2]

void BesEvent::SetMdcTracks ( TDisTrack recEvent)
virtual

Definition at line 248 of file BesEvent.cxx.

248 {
249 if (fMdcTrackCol){
250 for (int j = 0; j < fMdcTrackCol->GetEntries(); j++){
251 delete fMdcTrackCol->At(j);
252 }
253 fMdcTrackCol->Clear("C");
254 }
255 int mdc_no = recEvent->getMdcTrackNum();
256 for (Int_t i = 0; i < mdc_no; i++) {
257 const TRecMdcTrack* recTrack =recEvent->getRecMdcTrack(i);
258 BesGeoTrack *mdcTrack = new BesGeoTrack();
259 mdcTrack->SetTrackType(0);
260
261 ConstructMdcTrackFromRec(mdcTrack, recTrack,recEvent);
262 fMdcTrackCol->Add(mdcTrack);
263 }
264}
virtual void ConstructMdcTrackFromRec(BesGeoTrack *mdcTrack, const TRecMdcTrack *recTrack, TDisTrack *recEvent)
Definition: BesEvent.cxx:346

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 311 of file BesEvent.cxx.

311 {
312 if (fMucTrackCol) {
313 for (int j = 0; j < fMucTrackCol->GetEntries(); j++){
314 delete fMucTrackCol->At(j);
315 }
316 fMucTrackCol->Clear("C");
317 }
318 int muc_no = recEvent->getMucTrackNum();
319 for (Int_t i = 0; i < muc_no; i++) {
320 const TRecMucTrack* recTrack =recEvent->getMucTrack(i);
321 BesGeoTrack *mucTrack = new BesGeoTrack();
322 mucTrack->SetTrackType(3);
323
324 ConstructMucTrackFromRec(mucTrack, recTrack);
325 fMucTrackCol->Add(mucTrack);
326 }
327}
virtual void ConstructMucTrackFromRec(BesGeoTrack *mucTrack, const TRecMucTrack *recTrack)
Definition: BesEvent.cxx:872

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 268 of file BesEvent.cxx.

268 {
269 if (fTofTrackCol) {
270 for (int j = 0; j < fTofTrackCol->GetEntries(); j++){
271 delete fTofTrackCol->At(j);
272 }
273 fTofTrackCol->Clear("C");
274 }
275 int tof_no = recEvent->getTofTrackNum();
276
277 for (Int_t i = 0; i < tof_no; i++) {
278 const TRecTofTrack* recTrack = recEvent->getTofTrack(i);
279 if ( !Is_tofCounter( recTrack->status())) continue;
280 BesGeoTrack *tofTrack = new BesGeoTrack();
281 tofTrack->SetTrackType(1);
282
283 ConstructTofTrackFromRec(tofTrack, recTrack,recEvent);
284 fTofTrackCol->Add(tofTrack);
285 }
286}
virtual void ConstructTofTrackFromRec(BesGeoTrack *tofTrack, const TRecTofTrack *recTrack, TDisTrack *recEvent)
Definition: BesEvent.cxx:645

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 238 of file BesEvent.cxx.

238 {
239 SetMdcTracks(recEvent);
240 SetTofTracks(recEvent);
241 SetEmcShowers(recEvent);
242 SetMucTracks(recEvent);
243 SetExtTracks(recEvent);
244}
virtual void SetTofTracks(TDisTrack *recEvent)
Definition: BesEvent.cxx:268
virtual void SetMucTracks(TDisTrack *recEvent)
Definition: BesEvent.cxx:311
virtual void SetMdcTracks(TDisTrack *recEvent)
Definition: BesEvent.cxx:248
virtual void SetEmcShowers(TDisTrack *recEvent)
Definition: BesEvent.cxx:290
virtual void SetExtTracks(TDisTrack *recEvent)
Definition: BesEvent.cxx:331

Referenced by SetEvent().

◆ SetTracks() [2/2]

virtual void BesEvent::SetTracks ( TDisTrack recEvent)
virtual

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