CGEM BOSS 6.6.5.f
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, TMcEvent *mcEvt=0)
 
virtual void SetHits ()
 
virtual void ClearHits ()
 
virtual void SetCgemClusters (const TRecCgemCluster *recCluster, int ncluster)
 
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 SetMcEvent (TMcEvent *mcEvt)
 
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 ConstructMcTrack (BesMcTrack *mcTrack, const TMcParticle *mcPart)
 
virtual void DrawHits (Option_t *option)
 
virtual void DrawTracks (Option_t *option)
 
virtual void DrawMcParticles (Option_t *option)
 
void SetMagnetic (Double_t input)
 
virtual void DrawCgem3DHits (Option_t *option)
 
virtual void DrawCgemUFHits (Option_t *option)
 
virtual void DrawCgemClusters (Option_t *option)
 
virtual void DrawCgemUFClusters (int layer, Option_t *option)
 
const TObjArray * GetCgemDigiCol () const
 
const Int_t GetCgemDigiNum () const
 
const TCgemDigiGetCgemDigi (Int_t i) const
 
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, TMcEvent *mcEvt=0)
 
virtual void SetHits ()
 
virtual void ClearHits ()
 
virtual void SetCgemClusters (const TRecCgemCluster *recCluster, int ncluster)
 
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 SetMcEvent (TMcEvent *mcEvt)
 
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 ConstructMcTrack (BesMcTrack *mcTrack, const TMcParticle *mcPart)
 
virtual void DrawHits (Option_t *option)
 
virtual void DrawTracks (Option_t *option)
 
virtual void DrawMcParticles (Option_t *option)
 
void SetMagnetic (Double_t input)
 
virtual void DrawCgem3DHits (Option_t *option)
 
virtual void DrawCgemUFHits (Option_t *option)
 
virtual void DrawCgemClusters (Option_t *option)
 
virtual void DrawCgemUFClusters (int layer, Option_t *option)
 
const TObjArray * GetCgemDigiCol () const
 
const Int_t GetCgemDigiNum () const
 
const TCgemDigiGetCgemDigi (Int_t i) const
 
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 ()
 

Public Attributes

TDatabasePDG * pdgTable
 

Detailed Description

Constructor & Destructor Documentation

◆ BesEvent() [1/2]

BesEvent::BesEvent ( )

◆ ~BesEvent() [1/2]

BesEvent::~BesEvent ( )
virtual

Definition at line 58 of file BesEvent.cxx.

58 {
59 //
60 // BesEvent default destructor
61
62 // Delete all array elements
63 Delete();
64}
virtual void Delete(Option_t *option="")
Definition: BesEvent.cxx:68

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

139 {
140 //
141 // Clear event
142 TString opt = option;
143 opt.ToUpper();
144
145 fDigiEvent->Clear("C");
146}

◆ Clear() [2/2]

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

◆ ClearHits() [1/2]

void BesEvent::ClearHits ( )
virtual

Definition at line 294 of file BesEvent.cxx.

294 {
295 if (!gBesGeometry) return;
296
303}
void ClearHits()
void ClearHits()
Set all physicalNodes corresponding to digiCol;.

Referenced by SetEvent().

◆ ClearHits() [2/2]

virtual void BesEvent::ClearHits ( )
virtual

◆ ConstructEmcTrackFromRec() [1/2]

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

Definition at line 1174 of file BesEvent.cxx.

1174 {
1175
1176 Double_t x=0.0, y=0.0, z=0.0;
1177 x = recTrack->x() * 10.0;
1178 y = recTrack->y() * 10.0;
1179 z = recTrack->z() * 10.0;
1180
1181 emcTrack->SetMarker(x, y, z);
1182 // Add associated emc hits
1183 vector<Int_t> vecHits(0);
1184 map<Int_t, Double_t> cellMap = recTrack->cellIdMap();
1185 map<Int_t, Double_t>::iterator iCellMap;
1186 for (iCellMap = cellMap.begin(); iCellMap != cellMap.end(); iCellMap++){
1187 Int_t cellId = iCellMap->first;
1188 vecHits.push_back(cellId);
1189 }
1190 for (Int_t i = 0; i < (Int_t)vecHits.size(); i++) {
1191 Identifier aEmcID( vecHits[i] );
1192 int part = EmcID::barrel_ec( aEmcID );
1193 int theta = EmcID::theta_module( aEmcID );
1194 int phi = EmcID::phi_module( aEmcID );
1195 if (part == 1) theta = 43-theta; // 43 = m_kThetaBr-1
1196
1197 Emc2DCrystal* aHit = gBesGeometry->GetEmcROOTGeo()->Get2DCrystal(part, phi, theta);
1198 emcTrack->AddHit( aHit );
1199 //Long Peixun's update: for Emc 3D track display
1200 TGeoPhysicalNode* pHit = gBesGeometry->GetEmcROOTGeo()->GetPhysicalCrystal(part, phi, theta);
1201 emcTrack->Add3DHit(pHit);
1202 }
1203
1204 // Add Emc track info
1205 char data[100];
1206 TString info;
1207
1208 info = TString("EmcShower ");
1209 info += recTrack->trackId();
1210 emcTrack->AddInfo(info);
1211
1212 sprintf(data, "nHits = %i, status = %i", recTrack->numHits(), recTrack->status());
1213 emcTrack->AddInfo( TString(data) );
1214
1215 sprintf(data, "energy= (%.2f #pm %-.2f) MeV", recTrack->energy()*1000.0, recTrack->dE()*1000.0);
1216 emcTrack->AddInfo( TString(data) );
1217
1218 Identifier aEmcID( recTrack->cellId() );
1219 int part = EmcID::barrel_ec( aEmcID );
1220 int theta = EmcID::theta_module( aEmcID );
1221 int phi = EmcID::phi_module( aEmcID );
1222
1223 sprintf(data, "cell Id= (%i, #theta %i, #phi %i)", part, theta, phi);
1224 emcTrack->AddInfo( TString(data) );
1225
1226 sprintf(data, "module = %i", recTrack->module());
1227 emcTrack->AddInfo( TString(data) );
1228
1229 //sprintf(data, "x = (%-.3f #pm %-.3f) mm", x, recTrack->dx());
1230 //emcTrack->AddInfo( TString(data) );
1231
1232 //sprintf(data, "y = (%-.3f #pm %-.3f) mm", y, recTrack->dy());
1233 //emcTrack->AddInfo( TString(data) );
1234
1235 //sprintf(data, "z = (%-.3f #pm %-.3f) mm", z, recTrack->dz());
1236 //emcTrack->AddInfo( TString(data) );
1237
1238 sprintf(data, "#theta = (%-.3f #pm %-.3f)", recTrack->theta(), recTrack->dtheta());
1239 emcTrack->AddInfo( TString(data) );
1240
1241 sprintf(data, "#phi = (%-.3f #pm %-.3f)", recTrack->phi(), recTrack->dphi());
1242 emcTrack->AddInfo( TString(data) );
1243
1244 // sprintf(data, "cos (x=%-.3f, y=%-.3f, z=%-.3f)", recTrack->cosx(), recTrack->cosy(), recTrack->cosz()); //from boss6.1.0. no these varibles
1245 // emcTrack->AddInfo( TString(data) );
1246
1247 emcTrack->CloseInfo();
1248}
TTree * data
Double_t x[10]
virtual void CloseInfo()
Definition: BesGeoTrack.cxx:56
virtual void SetMarker(Double_t x, Double_t y, Double_t z)
Definition: BesGeoTrack.cxx:70
static unsigned int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0)
static unsigned int theta_module(const Identifier &id)
static unsigned int phi_module(const Identifier &id)
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;.

Referenced by SetEmcShowers().

◆ ConstructEmcTrackFromRec() [2/2]

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

◆ ConstructMcTrack() [1/2]

void BesEvent::ConstructMcTrack ( BesMcTrack mcTrack,
const TMcParticle mcPart 
)
virtual

Definition at line 554 of file BesEvent.cxx.

554 {
555
556 Int_t pdgID = mcPart->getParticleID();
557
558 TParticlePDG* partPDG = pdgTable->GetParticle(pdgID);
559 Int_t charge = 0;
560 if ( partPDG ) // Set charge of unknown particles to zero
561 charge = partPDG->Charge()/3; // Charge() gives e*3
562
563 Double_t pi = TMath::Pi();
564
565 Double_t px = mcPart->getInitialMomentumX(); // GeV
566 Double_t py = mcPart->getInitialMomentumY(); // GeV
567 Double_t pz = mcPart->getInitialMomentumZ(); // GeV
568 Double_t pt = std::sqrt(px*px+py*py);
569 Double_t ptot = std::sqrt(px*px+py*py+pz*pz);
570 Double_t cosTheta = (ptot == 0.0 ? 1.0 : pz/ptot);
571 Double_t phi = atan2(py, px);
572
573 Double_t field = -f_Magnetic; // Tesla
574 Double_t kvC = 3.0e8; // light speed
575
576 // unit is "cm"
577 Double_t orgx = mcPart->getInitialPositionX()*10;
578 Double_t orgy = mcPart->getInitialPositionY()*10;
579 Double_t orgz = mcPart->getInitialPositionZ()*10;
580
581
582 Double_t mdcR = ((TGeoTube*)gBesGeometry->GetMdcROOTGeo()->GetVolumeMdc()->GetShape())->GetRmax();
583 Double_t mdcZ = ((TGeoTube*)gBesGeometry->GetMdcROOTGeo()->GetVolumeMdc()->GetShape())->GetDz();
584
585 Double_t radius,zStep;
586 if (charge == 0) {
587 radius = 1e9 ; // cosmic ray test
588 zStep = 1e9;
589 }
590 else {
591 radius = (pt * 1.0e9 / kvC * 1e3) / fabs(charge * field) ;
592 zStep = 2*pi*radius * fabs(pz/pt);
593 }
594 Double_t curvature = 1.0/radius;
595 Double_t step = 10.0; // mm
596 Double_t delt = step*(1.0e-3)/kvC;
597
598 mcTrack->AddPoint(orgx, orgy, orgz, 0.0);
599 const Double_t *p;
600 Int_t nStep = 0;
601
602 Double_t x,y,z,t;
603 x = orgx;
604 y = orgy;
605 z = orgz;
606
607 if (charge == 0){ //cosmic ray test
608 //FIXME: What shall we do with neutral tracks?
609 // do {
610 // x = recTrack->helix(0)* 10 *
611 // cos(recTrack->helix(1))
612 // - nStep * step * sin(recTrack->helix(1));
613 // y = recTrack->helix(0)* 10 *
614 // sin(recTrack->helix(1))
615 // + nStep * step * cos(recTrack->helix(1));
616 // z = recTrack->helix(3)* 10 +
617 // nStep * step * recTrack->helix(4);
618 //
619 // mdcTrack->AddPoint(x, y, z, delt*nStep);
620 // Double_t mp[3];
621 // mp[0] = 0;
622 // mp[1] = 0;
623 // mp[2] = 0;
624 // mdcTrack->PaintMarker(mp);
625 // mdcTrack->SetMarkerColor(kBlack);
626 // mdcTrack->SetMarkerSize(10);
627 // mdcTrack->SetLineColor(kBlack);
628 //
629 // nStep++;
630 // }
631 // while ( (x*x + y*y) < mdcR*mdcR && fabs(z) < mdcZ );
632 //
633 // nStep = 0;
634 // do {
635 // x = recTrack->helix(0)* 10 *
636 // cos(recTrack->helix(1))
637 // - nStep * step * sin(recTrack->helix(1));
638 // y = recTrack->helix(0)* 10 *
639 // sin(recTrack->helix(1))
640 // + nStep * step * cos(recTrack->helix(1));
641 // z = recTrack->helix(3)* 10 +
642 // nStep * step * recTrack->helix(4);
643 //
644 // mdcTrack->AddPoint(x, y, z, delt*nStep);
645 // Double_t mp[3];
646 // mp[0] = 0;
647 // mp[1] = 0;
648 // mp[2] = 0;
649 // mdcTrack->PaintMarker(mp);
650 // mdcTrack->SetMarkerColor(kBlack);
651 // mdcTrack->SetMarkerSize(10);
652 // mdcTrack->SetLineColor(kRed);
653 //
654 // }
655 // while ( (x*x + y*y) < mdcR*mdcR && fabs(z) < mdcZ );
656 }
657 else{ //normal track
658 TGeoHelix helix(curvature, zStep, charge);
659 helix.InitPoint(orgx, orgy, orgz);
660
661 helix.InitDirection(px, py, pz, kFALSE);
662 //helix.InitDirection(1000, 10, 10, kFALSE);
663 helix.SetField(0.0, 0.0, field, kFALSE);
664
665 do {
666 // helix Step before GetCurrentPoint, or first point will be wrong
667 helix.Step(step);
668 p = helix.GetCurrentPoint();
669
670 mcTrack->AddPoint(p[0], p[1], p[2], delt*nStep);
671 Double_t mp[3];
672 mp[0] = p[0];
673 mp[1] = p[1];
674 mp[2] = p[2];
675 mcTrack->PaintMarker(mp);
676 mcTrack->SetMarkerColor(kBlue);
677 mcTrack->SetLineColor(kBlue);
678 // mcTrack->SetLineStyle(10); // dashed-dotted line
679 // mcTrack->SetMarkerSize(10);
680 nStep++;
681 }
682 while ( (p[0]*p[0] + p[1]*p[1]) < mdcR*mdcR && fabs(p[2]) < mdcZ );
683
684 }
685 char data[200];
686 sprintf(data, "McTrack pdg=%i, charge=%i", mcPart->getParticleID(), charge);
687 mcTrack->AddInfo( TString(data) );
688
689 sprintf(data, "P=%-.3f GeV, Pt=%-.3f GeV", ptot, pt);
690 mcTrack->AddInfo( TString(data) );
691
692 sprintf(data, "Pxyz=(%-.3f,%-.3f,%-.3f) GeV", px, py, pz);
693 mcTrack->AddInfo( TString(data) );
694
695 sprintf(data, "#phi=%-.3f, #theta=%-.3f, cos#Theta=%-.3f", phi, acos(cosTheta), cosTheta);
696 mcTrack->AddInfo( TString(data) );
697
698 sprintf(data, "Origin (%-.3f, %-.3f, %-.3f) cm", orgx/10, orgy/10, orgz/10);
699 mcTrack->AddInfo( TString(data) );
700
701 // sprintf(data, "#phi=%-.3f #theta=%-.3f cos#theta=%-.3f", recTrack->phi(),recTrack->theta(),cos(recTrack->theta()));
702 // mcTrack->AddInfo( TString(data) );
703
704 mcTrack->CloseInfo();
705}
virtual void AddPoint(Double_t x, Double_t y, Double_t z, Double_t t)
Definition: BesGeoTrack.cxx:65
const double mp
Definition: incllambda.cxx:45
int t()
Definition: t.c:1

Referenced by SetMcEvent().

◆ ConstructMcTrack() [2/2]

virtual void BesEvent::ConstructMcTrack ( BesMcTrack mcTrack,
const TMcParticle mcPart 
)
virtual

◆ ConstructMdcTrackFromRec() [1/2]

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

Definition at line 709 of file BesEvent.cxx.

709 {
710
711 Double_t field = -f_Magnetic; // Tesla
712 Double_t kvC = 3.0e8; // light speed
713 Int_t charge = recTrack->charge();
714 Double_t pt = recTrack->pxy(); // GeV
715 Double_t pz = recTrack->pz(); // GeV
716 Double_t pi = TMath::Pi();
717
718 // unit is "cm"
719 Double_t orgx = recTrack->x()*10;
720 Double_t orgy = recTrack->y()*10;
721 Double_t orgz = recTrack->z()*10;
722
723
724 Double_t mdcR = ((TGeoTube*)gBesGeometry->GetMdcROOTGeo()->GetVolumeMdc()->GetShape())->GetRmax();
725 Double_t mdcZ = ((TGeoTube*)gBesGeometry->GetMdcROOTGeo()->GetVolumeMdc()->GetShape())->GetDz();
726
727 Double_t radius,zStep;
728 if (charge == 0) {
729 radius = 1e9 ; // cosmic ray test
730 zStep = 1e9;
731 }
732 else {
733 radius = (pt * 1.0e9 / kvC * 1e3) / fabs(charge * field) ;
734 zStep = 2*pi*radius * fabs(pz/pt);
735 }
736 Double_t curvature = 1.0/radius;
737 Double_t step = 10.0; // mm
738 Double_t delt = step*(1.0e-3)/kvC;
739
740 mdcTrack->AddPoint(orgx, orgy, orgz, 0.0);
741 const Double_t *p;
742 Int_t nStep = 0;
743
744 Double_t x,y,z,t;
745 x = orgx;
746 y = orgy;
747 z = orgz;
748
749 if (charge == 0){ //cosmic ray test
750 do {
751 x = recTrack->helix(0)* 10 *
752 cos(recTrack->helix(1))
753 - nStep * step * sin(recTrack->helix(1));
754 y = recTrack->helix(0)* 10 *
755 sin(recTrack->helix(1))
756 + nStep * step * cos(recTrack->helix(1));
757 z = recTrack->helix(3)* 10 +
758 nStep * step * recTrack->helix(4);
759
760 mdcTrack->AddPoint(x, y, z, delt*nStep);
761 Double_t mp[3];
762 mp[0] = 0;
763 mp[1] = 0;
764 mp[2] = 0;
765 mdcTrack->PaintMarker(mp);
766 mdcTrack->SetMarkerColor(kBlack);
767 mdcTrack->SetMarkerSize(10);
768 mdcTrack->SetLineColor(kBlack);
769
770 nStep++;
771 }
772 while ( (x*x + y*y) < mdcR*mdcR && fabs(z) < mdcZ );
773
774 nStep = 0;
775 do {
776 x = recTrack->helix(0)* 10 *
777 cos(recTrack->helix(1))
778 - nStep * step * sin(recTrack->helix(1));
779 y = recTrack->helix(0)* 10 *
780 sin(recTrack->helix(1))
781 + nStep * step * cos(recTrack->helix(1));
782 z = recTrack->helix(3)* 10 +
783 nStep * step * recTrack->helix(4);
784
785 mdcTrack->AddPoint(x, y, z, delt*nStep);
786 Double_t mp[3];
787 mp[0] = 0;
788 mp[1] = 0;
789 mp[2] = 0;
790 mdcTrack->PaintMarker(mp);
791 mdcTrack->SetMarkerColor(kBlack);
792 mdcTrack->SetMarkerSize(10);
793 mdcTrack->SetLineColor(kRed);
794
795 }
796 while ( (x*x + y*y) < mdcR*mdcR && fabs(z) < mdcZ );
797 }
798 else{ //normal track
799 TGeoHelix helix(curvature, zStep, charge);
800 helix.InitPoint(orgx, orgy, orgz);
801
802 helix.InitDirection(recTrack->px(), recTrack->py(), recTrack->pz(), kFALSE);
803 //helix.InitDirection(1000, 10, 10, kFALSE);
804 helix.SetField(0.0, 0.0, field, kFALSE);
805
806 do {
807 // helix Step before GetCurrentPoint, or first point will be wrong
808 helix.Step(step);
809 p = helix.GetCurrentPoint();
810
811 mdcTrack->AddPoint(p[0], p[1], p[2], delt*nStep);
812 Double_t mp[3];
813 mp[0] = p[0];
814 mp[1] = p[1];
815 mp[2] = p[2];
816 mdcTrack->PaintMarker(mp);
817 mdcTrack->SetMarkerColor(kBlack);
818 mdcTrack->SetMarkerSize(10);
819 nStep++;
820 }
821 while ( (p[0]*p[0] + p[1]*p[1]) < mdcR*mdcR && fabs(p[2]) < mdcZ );
822
823 }
824
825 // Add associated mdc hits
826 vector<UInt_t> vecHits(0);
827 const TObjArray *recMdcHitCol = fRecEvent->getRecMdcHitCol();
828 for (Int_t i = 0; i < recMdcHitCol->GetEntriesFast(); i++){
829 TRecMdcHit *recMdcHit = (TRecMdcHit*)recMdcHitCol->At(i);
830 Int_t recHitId = recMdcHit->getTrkId();
831 Int_t recTrkId = recTrack->trackId();
832 if (recHitId == recTrkId) vecHits.push_back(recMdcHit->getMdcId());
833 }
834 for (Int_t i = 0; i < (Int_t)vecHits.size(); i++) {
835 Identifier aMdcID( vecHits[i] );
836 int layer = MdcID::layer( aMdcID );
837 int wire = MdcID::wire( aMdcID );
838
839 Mdc2DWire* aHit = gBesGeometry->GetMdcROOTGeo()->Get2DWire(layer, wire);
840 mdcTrack->AddHit( aHit );
841 //Long Peixun's update: for Mdc 3D track display
842 TGeoPhysicalNode* pHit = gBesGeometry->GetMdcROOTGeo()->GetPhysicalReplica(layer, wire);
843 mdcTrack->Add3DHit(pHit);
844 }
845
846 //Long Peixun's update: Add associated cgem clusters
847 for (Int_t j = 0; j < fCgemClusterCol->GetEntries(); ++j)
848 {
849 BesGeoTrack *cluster = (BesGeoTrack*)fCgemClusterCol->At(j);
850 Int_t asstrk = cluster->GetTrackID();
851 Int_t recTrkId = recTrack->trackId();
852 if (recTrkId == asstrk)
853 mdcTrack->AddCluster(cluster);
854 }
855
856 mdcTrack->SetCharge(recTrack->charge());
857
858 // Add mdc track info
859 char data[200]; //Long Peixun's update: 100 -> 200
860 TString info;
861
862 info = TString("MdcTrack ");
863 info += recTrack->trackId();
864 mdcTrack->AddInfo( info );
865
866 sprintf(data, "charge=%i, status=%i", recTrack->charge(), recTrack->stat());
867 mdcTrack->AddInfo( TString(data) );
868
869 sprintf(data, "P=%-.3f GeV, Pt=%-.3f GeV", recTrack->p(), recTrack->pxy());
870 mdcTrack->AddInfo( TString(data) );
871
872 //sprintf(data, "Pt= %-.3f GeV", recTrack->pxy());
873 //mdcTrack->AddInfo( TString(data) );
874
875 sprintf(data, "Pxyz=(%-.3f,%-.3f,%-.3f) GeV", recTrack->px(),recTrack->py(),recTrack->pz());
876 mdcTrack->AddInfo( TString(data) );
877
878 sprintf(data, "#phi=%-.3f #theta=%-.3f cos#theta=%-.3f", recTrack->phi(),recTrack->theta(),cos(recTrack->theta()));
879 mdcTrack->AddInfo( TString(data) );
880
881 sprintf(data, "Origin (%-.3f, %-.3f, %-.3f) cm", orgx/10, orgy/10, orgz/10); //recTrack->x(), recTrack->y(), recTrack->z());
882 mdcTrack->AddInfo( TString(data) );
883
884 sprintf(data, "helix(%-.3f,%-.3f,%-.3f,%-.3f,%-.3f)", recTrack->helix(0),recTrack->helix(1),recTrack->helix(2),recTrack->helix(3), recTrack->helix(4));
885 mdcTrack->AddInfo( TString(data) );
886
887 sprintf(data, "nHit=%i, #chi^{2}= %-.3f",recTrack->ndof()+5, recTrack->chi2());
888 mdcTrack->AddInfo( TString(data) );
889
890 // sprintf(data, "ndof= %i, rms= %-.3f", recTrack->ndof(), recTrack->rms());
891 // mdcTrack->AddInfo( TString(data) );
892
893 // sprintf(data, "extrp= %-.3f, pathL= %-.3f", recTrack->extrp(), recTrack->pathLength());
894 // mdcTrack->AddInfo( TString(data) );
895
896 //sprintf(data, "nHits= %i, nSter= %i", recTrack->getNhits(), recTrack->nster());
897 //mdcTrack->AddInfo( TString(data) ); //Long Peixun's update: this line should be annotated
898
899 mdcTrack->CloseInfo();
900}
double sin(const BesAngle a)
double cos(const BesAngle a)
virtual void SetCharge(Int_t charge)
static int layer(const Identifier &id)
Values of different levels (failure returns 0)
static int wire(const Identifier &id)
Mdc2DWire * Get2DWire(Int_t layer, Int_t replica)
Get Mdc2DWire;.
TGeoPhysicalNode * GetPhysicalReplica(int layer, int replica)
Get replica physical node;.

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

1252 {
1253 if (recTrack->depth() <= 0.0) return; // bad track
1254
1255 Double_t field = 1e-3; // Tesla
1256 Double_t kvC = 3.0e8; // light speed
1257 Int_t charge = 1;
1258 Double_t pz = recTrack->pz(); // GeV
1259 Double_t pt =
1260 sqrt(recTrack->px()*recTrack->px() + recTrack->py()*recTrack->py()); // GeV
1261 Double_t pi = TMath::Pi();
1262
1263 Double_t mucR =
1264 ((TGeoBBox*)gBesGeometry->GetMucROOTGeo()->GetVolumeMuc()->GetShape())->GetDX();
1265 Double_t mucZ =
1266 ((TGeoBBox*)gBesGeometry->GetMucROOTGeo()->GetVolumeMuc()->GetShape())->GetDZ();
1267
1268 Double_t radius = 1.0e+9;
1269 Double_t curvature = 1.0/radius;
1270 Double_t zStep = 2*pi*radius * fabs(pz/pt);
1271 Double_t step = 1.0; // mm
1272 Double_t delt = step*(1.0e-3)/kvC;
1273
1274 TGeoHelix helix(curvature, zStep, charge);
1275
1276 Double_t x = recTrack->xPos() * 10.0;
1277 Double_t y = recTrack->yPos() * 10.0;
1278 Double_t z = recTrack->zPos() * 10.0;
1279
1280 helix.InitPoint(x, y, z);
1281 helix.InitDirection(recTrack->px(), recTrack->py(), recTrack->pz(), kFALSE);
1282 helix.SetField(0.0, 0.0, field, kFALSE);
1283
1284 mucTrack->AddPoint(x, y, z, 0.0);
1285 const Double_t *p;
1286 Int_t nStep = 0;
1287 do {
1288 // helix Step before GetCurrentPoint, or first point will be wrong
1289 helix.Step(step);
1290 p = helix.GetCurrentPoint();
1291 mucTrack->AddPoint(p[0], p[1], p[2], delt*nStep);
1292 Double_t mp[3];
1293 mp[0] = p[0];
1294 mp[1] = p[1];
1295 mp[2] = p[2];
1296 mucTrack->PaintMarker(mp);
1297 mucTrack->SetMarkerColor(kBlack);
1298 mucTrack->SetMarkerSize(10);
1299 nStep++;
1300 }
1301 while ( (p[0]*p[0] + p[1]*p[1]) < mucR*mucR && fabs(p[2]) < mucZ );
1302
1303 // Add associated muc hits
1304 vector<Int_t> vecHits = recTrack->vecHits();
1305 for (Int_t i = 0; i < (Int_t)vecHits.size(); i++) {
1306 Identifier aMucID( vecHits[i] );
1307 int part = MucID::part( aMucID );
1308 int seg = MucID::seg( aMucID );
1309 int gap = MucID::gap( aMucID );
1310 int strip = MucID::strip( aMucID );
1311
1312 Muc2DStrip* aHit = gBesGeometry->GetMucROOTGeo()->Get2DStrip(part, seg, gap, strip);
1313 mucTrack->AddHit( aHit );
1314 //Long Peixun's update: for Muc 3D track display
1315 TGeoPhysicalNode* pHit = gBesGeometry->GetMucROOTGeo()->GetPhysicalStrip(part, seg, gap, strip);
1316 mucTrack->Add3DHit(pHit);
1317 }
1318
1319 mucTrack->SetCharge(charge);
1320
1321 // Add Muc track info
1322 char data[100];
1323 TString info;
1324
1325 info = TString("MucTrack ");
1326 info += recTrack->trackId();
1327 mucTrack->AddInfo(info);
1328
1329 sprintf(data, "nHits= %i, maxHits= %i, nLayers= %i", recTrack->numHits(), recTrack->maxHitsInLayer(), recTrack->numLayers());
1330 mucTrack->AddInfo( TString(data) );
1331
1332 sprintf(data, "lastLayer (br= %i, ec= %i)", recTrack->brLastLayer(), recTrack->ecLastLayer());
1333 mucTrack->AddInfo( TString(data) );
1334
1335 sprintf(data, "depth = %.3f cm", recTrack->depth());
1336 mucTrack->AddInfo( TString(data) );
1337
1338 sprintf(data, "#chi^{2}= %-.3f, dof= %i, rms= %-.3f", recTrack->chi2(), recTrack->dof(), recTrack->rms());
1339 mucTrack->AddInfo( TString(data) );
1340
1341 sprintf(data, "Origin (%-.2f, %-.2f, %-.2f) cm", recTrack->xPos(), recTrack->yPos(), recTrack->zPos());
1342 mucTrack->AddInfo( TString(data) );
1343
1344 sprintf(data, "p (%-.3f, %-.3f, %-.3f) GeV", recTrack->px(), recTrack->py(), recTrack->pz());
1345 mucTrack->AddInfo( TString(data) );
1346
1347 mucTrack->CloseInfo();
1348}
static int part(const Identifier &id)
static int gap(const Identifier &id)
static int seg(const Identifier &id)
static int strip(const Identifier &id)
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 1020 of file BesEvent.cxx.

1022 {
1023
1024 vector<Int_t> vecBHits(0);
1025 vector<Int_t> vecEHits(0);
1026
1027 const TObjArray *recTofTrackCol = fRecEvent->getTofTrackCol();
1028 for (Int_t i = 0; i < recTofTrackCol->GetEntriesFast(); i++){
1029 TRecTofTrack *recHit = (TRecTofTrack*)recTofTrackCol->At(i);
1030 if ( !Is_tofCounter( recHit->status())) continue;
1031
1032 Int_t recHitId = recHit->trackID();
1033 Int_t recTrkId = recTrack->trackID();
1034 if (recHitId == recTrkId) {
1035 if ( Is_tofBarrel( recHit->status() ) ) {
1036 vecBHits.push_back(recHit->tofID());
1037 }
1038 else {
1039 vecEHits.push_back(recHit->tofID());
1040 }
1041 }
1042 }
1043
1044 TGeoPhysicalNode *phyNode = 0;
1045 Double_t x=0.0, y=0.0, z=0.0;
1046
1047 Int_t nHits;
1048 if (vecBHits.size()){
1049 nHits = vecBHits.size();
1050 for (Int_t i = 0; i < nHits; i++) {
1051
1052 int part = 1;
1053 int layer = 0;
1054 int scin = 0;
1055 if ( ( vecBHits[i] >= 0 ) && ( vecBHits[i] <= 87 ) ) {
1056 layer = 0;
1057 scin = vecBHits[i];
1058 }
1059 else {
1060 layer = 1;
1061 scin = vecBHits[i] - 88;
1062 }
1063
1064 Tof2DScin* aHit = gBesGeometry->GetTofROOTGeo()->Get2DScin(part, layer, scin);
1065 tofTrack->AddHit( aHit );
1066
1067 // calculate average position
1068 Double_t local[3] = {0.0, 0.0, 0.0};
1069 Double_t master[3] = {0.0, 0.0, 0.0};
1070 phyNode = gBesGeometry->GetTofROOTGeo()->GetPhysicalScin(part, layer, scin);
1071 tofTrack->Add3DHit(phyNode); //Long Peixun's update: for Tof 3D track display
1072 if (phyNode)
1073 phyNode->GetMatrix(-1*phyNode->GetLevel())->LocalToMaster(local, &master[0]);
1074 // transform to top
1075 x += master[0];
1076 y += master[1];
1077 z += master[2];
1078 }
1079 x /= nHits;
1080 y /= nHits;
1081 z /= nHits;
1082
1083 z = recTrack->zrhit();
1084
1085 tofTrack->SetMarker(x, y, z);
1086 }
1087
1088 else if (vecEHits.size()){
1089 nHits = vecEHits.size();
1090 for (Int_t i = 0; i < nHits; i++) {
1091
1092 int part = 0;
1093 int layer = 0;
1094 int scin = 0;
1095 if ( ( vecEHits[i] >= 0 ) && ( vecEHits[i] <= 47 ) ) {
1096 part = 2;
1097 scin = vecEHits[i];
1098 }
1099 else {
1100 part = 0;
1101 scin = vecEHits[i] - 48;
1102 }
1103
1104
1105 Tof2DScin* aHit = gBesGeometry->GetTofROOTGeo()->Get2DScin(part, layer, scin);
1106 tofTrack->AddHit( aHit );
1107
1108 // calculate average position
1109 Double_t local[3] = {0.0, 0.0, 0.0};
1110 Double_t master[3] = {0.0, 0.0, 0.0};
1111 phyNode = gBesGeometry->GetTofROOTGeo()->GetPhysicalScin(part, layer, scin);
1112 tofTrack->Add3DHit(phyNode); //Long Peixun's update: for Tof 3D track display
1113 if (phyNode)
1114 phyNode->GetMatrix(-1*phyNode->GetLevel())->LocalToMaster(local, &master[0]);
1115 // transform to top
1116 x += master[0];
1117 y += master[1];
1118 z += master[2];
1119 }
1120 x /= nHits;
1121 y /= nHits;
1122 z /= nHits;
1123
1124 tofTrack->SetMarker(x, y, z);
1125 }
1126
1127 // Add tof track info
1128 char data[100];
1129 TString info;
1130
1131 info = TString("TofTrack ");
1132 info += recTrack->trackID();
1133 tofTrack->AddInfo(info);
1134
1135 //sprintf(data, "Part = %i, Qual1 = %i, Qual2 = %i", recTrack->getPart(), recTrack->getQual1(), recTrack->getQual2());
1136 //tofTrack->AddInfo( TString(data) );
1137
1138 //sprintf(data, "Tof = (%-.3f #pm %-.3f) ns", recTrack->getTof(), recTrack->getETof());
1139 //tofTrack->AddInfo( TString(data) );
1140
1141 //sprintf(data, "Tof1 = (%-.3f #pm %-.3f) ns", recTrack->getTof1(), recTrack->getETof1());
1142 //tofTrack->AddInfo( TString(data) );
1143
1144 //sprintf(data, "Tof2 = (%-.3f #pm %-.3f) ns", recTrack->getTof2(), recTrack->getETof2());
1145 //tofTrack->AddInfo( TString(data) );
1146
1147 //sprintf(data, "Path(1=%-.2f, 2=%-.2f) mm", recTrack->getPath1(), recTrack->getPath2());
1148 //tofTrack->AddInfo( TString(data) );
1149
1150 //sprintf(data, "Pulse(1=%-.0f, 2=%-.0f)", recTrack->getPh1(), recTrack->getPh2());
1151 //tofTrack->AddInfo( TString(data) );
1152
1153 //sprintf(data, "ZHit(1=%-.2fmm, 2=%-.2f)mm", recTrack->getZHit1(), recTrack->getZHit2());
1154 //tofTrack->AddInfo( TString(data) );
1155
1156 ////sprintf(data, "ZTDC1=%-.2fmm, ZTDC2=%-.2fmm", recTrack->getZTDC1(), recTrack->getZTDC2());
1157 ////tofTrack->AddInfo( TString(data) );
1158
1159 //sprintf(data, "RHit = %-.3f, Beta = %-.3f", recTrack->getRHit(), recTrack->getBeta());
1160 //tofTrack->AddInfo( TString(data) );
1161
1162 //sprintf(data, "w_e = %-.2f%%, w_mu = %-.2f%%", recTrack->getWeightElectron()*100.0, recTrack->getWeightMuon()*100.0);
1163 //tofTrack->AddInfo( TString(data) );
1164
1165 //sprintf(data, "w_pi = %-.2f%%, w_K = %-.2f%%", recTrack->getWeightPion()*100.0, recTrack->getWeightKaon()*100.0);
1166 //tofTrack->AddInfo( TString(data) );
1167
1168 //sprintf(data, "w_P = %-.2f%%", recTrack->getWeightProton()*100.0);
1169 //tofTrack->AddInfo( TString(data) );
1170
1171 tofTrack->CloseInfo();
1172}
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 68 of file BesEvent.cxx.

68 {
69 //
70 // Clear event
71 TString opt = option;
72 opt.ToUpper();
73
74 //Long Peixun's update: delete CGEM clusters
75 if (fCgemClusterCol)
76 {
77 for (int j = 0; j < fCgemClusterCol->GetEntries(); ++j)
78 delete fCgemClusterCol->At(j);
79 fCgemClusterCol->Clear("C");
80 delete fCgemClusterCol;
81 }
82 for (int i = 0; i < 3; ++i)
83 {
84 if (fCgemClusterUFCol[i])
85 {
86 for (int j = 0; j < fCgemClusterUFCol[i]->GetEntries(); ++j)
87 delete fCgemClusterUFCol[i]->At(j);
88 fCgemClusterUFCol[i]->Clear("C");
89 delete fCgemClusterUFCol[i];
90 }
91 }
92
93 if (fMdcTrackCol) {
94 for (int j = 0; j < fMdcTrackCol->GetEntries(); j++){
95 delete fMdcTrackCol->At(j);
96 }
97 fMdcTrackCol->Clear("C");
98 delete fMdcTrackCol;
99 }
100 if (fTofTrackCol) {
101 for (int j = 0; j < fTofTrackCol->GetEntries(); j++){
102 delete fTofTrackCol->At(j);
103 }
104 fTofTrackCol->Clear("C");
105 delete fTofTrackCol;
106 }
107 if (fEmcTrackCol) {
108 for (int j = 0; j < fEmcTrackCol->GetEntries(); j++){
109 delete fEmcTrackCol->At(j);
110 }
111 fEmcTrackCol->Clear("C");
112 delete fEmcTrackCol;
113 }
114 if (fMucTrackCol) {
115 for (int j = 0; j < fMucTrackCol->GetEntries(); j++){
116 delete fMucTrackCol->At(j);
117 }
118 fMucTrackCol->Clear("C");
119 delete fMucTrackCol;
120 }
121 if (fExtTrackCol) {
122 for (int j = 0; j < fExtTrackCol->GetEntries(); j++){
123 delete fExtTrackCol->At(j);
124 }
125 fExtTrackCol->Clear("C");
126 delete fExtTrackCol;
127 }
128 if (fMcParticleCol) {
129 for (int j = 0; j < fMcParticleCol->GetEntries(); j++){
130 delete fMcParticleCol->At(j);
131 }
132 fMcParticleCol->Clear("C");
133 delete fMcParticleCol;
134 }
135}

Referenced by ~BesEvent().

◆ Delete() [2/2]

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

◆ DrawCgem3DHits() [1/2]

void BesEvent::DrawCgem3DHits ( Option_t *  option)
virtual

Definition at line 1490 of file BesEvent.cxx.

1491{
1494}
void Draw3DHits(Option_t *option)

Referenced by BesView::SetViewType().

◆ DrawCgem3DHits() [2/2]

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

◆ DrawCgemClusters() [1/2]

void BesEvent::DrawCgemClusters ( Option_t *  option)
virtual

Definition at line 1504 of file BesEvent.cxx.

1505{
1506 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
1507 if (view)
1508 {
1509 for (Int_t i = 0; i < fCgemClusterCol->GetEntries(); ++i)
1510 {
1511 BesGeoTrack* cluster = (BesGeoTrack*)fCgemClusterCol->At(i);
1512 if (view->GetVisCgemHitsGlobal() && view->GetVisCgemHitsClusters())
1513 cluster->Draw(option);
1514 }
1515 }
1516}
virtual void Draw(Option_t *option="")

Referenced by BesView::SetViewType().

◆ DrawCgemClusters() [2/2]

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

◆ DrawCgemUFClusters() [1/2]

void BesEvent::DrawCgemUFClusters ( int  layer,
Option_t *  option 
)
virtual

Definition at line 1519 of file BesEvent.cxx.

1520{
1521 if (layer < 0 || layer >= 3) return;
1522 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
1523 if (view)
1524 {
1525 for (Int_t i = 0; i < fCgemClusterUFCol[layer]->GetEntries(); ++i)
1526 {
1527 BesGeoTrack* cluster = (BesGeoTrack*)fCgemClusterUFCol[layer]->At(i);
1528 if (view->GetVisCgemHitsGlobal() && view->GetVisCgemHitsClusters())
1529 cluster->Draw(option);
1530 }
1531 }
1532}

Referenced by BesView::SetViewType().

◆ DrawCgemUFClusters() [2/2]

virtual void BesEvent::DrawCgemUFClusters ( int  layer,
Option_t *  option 
)
virtual

◆ DrawCgemUFHits() [1/2]

void BesEvent::DrawCgemUFHits ( Option_t *  option)
virtual

Definition at line 1497 of file BesEvent.cxx.

1498{
1501}
void DrawHits(Option_t *option)

Referenced by BesView::SetViewType().

◆ DrawCgemUFHits() [2/2]

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

◆ DrawHits() [1/2]

void BesEvent::DrawHits ( Option_t *  option)
virtual

Definition at line 1417 of file BesEvent.cxx.

1417 {
1418 if (gBesGeometry)
1419 {
1420 if (gBesGeometry->GetCgemROOTGeo()) //Long Peixun's update: for CGEM hits
1426 }
1427}

Referenced by BesView::SetViewType().

◆ DrawHits() [2/2]

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

◆ DrawMcParticles() [1/2]

void BesEvent::DrawMcParticles ( Option_t *  option)
virtual

Definition at line 1536 of file BesEvent.cxx.

1536 {
1537 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
1538
1539 if (view)
1540 {
1541 for (Int_t i = 0; i < fMcParticleCol->GetEntries(); i++)
1542 {
1543 BesMcTrack *track = (BesMcTrack*)fMcParticleCol->At(i);
1544 if (view->GetVisMCTruthTrack())
1545 {
1546 track->Draw();
1547 }
1548 else track->Construct3DLine();
1549 }
1550 }
1551}
virtual void Construct3DLine()

Referenced by BesView::SetViewType().

◆ DrawMcParticles() [2/2]

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

◆ DrawTracks() [1/2]

void BesEvent::DrawTracks ( Option_t *  option)
virtual

Definition at line 1431 of file BesEvent.cxx.

1431 {
1432
1433 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
1434
1435 //Long Peixun's update: Always construct 3D line, whether draw it or not
1436 if (view)
1437 {
1438 // for (Int_t i = 0; i < fCgemTrackCol->GetEntries(); i++)
1439 // {
1440 // BesGeoTrack *track = (BesGeoTrack*)fCgemTrackCol->At(i);
1441 // if (view->GetVisTracksGlobal() && view->GetVisTracksCgem())
1442 // track->Draw();
1443 // else track->Construct3DLine();
1444 // }
1445
1446 for (Int_t i = 0; i < fMdcTrackCol->GetEntries(); i++)
1447 {
1448 BesGeoTrack *track = (BesGeoTrack*)fMdcTrackCol->At(i);
1449 if (view->GetVisTracksGlobal() && view->GetVisTracksMdc())
1450 track->Draw();
1451 else track->Construct3DLine();
1452 }
1453
1454 for (Int_t i = 0; i < fTofTrackCol->GetEntries(); i++)
1455 {
1456 BesGeoTrack *track = (BesGeoTrack*)fTofTrackCol->At(i);
1457 if (view->GetVisTracksGlobal() && view->GetVisTracksTof())
1458 track->Draw();
1459 else track->Construct3DLine();
1460 }
1461
1462 for (Int_t i = 0; i < fEmcTrackCol->GetEntries(); i++)
1463 {
1464 BesGeoTrack *track = (BesGeoTrack*)fEmcTrackCol->At(i);
1465 if (view->GetVisTracksGlobal() && view->GetVisTracksEmc())
1466 track->Draw();
1467 else track->Construct3DLine();
1468 }
1469
1470 for (Int_t i = 0; i < fMucTrackCol->GetEntries(); i++)
1471 {
1472 BesGeoTrack *track = (BesGeoTrack*)fMucTrackCol->At(i);
1473 if (view->GetVisTracksGlobal() && view->GetVisTracksMuc())
1474 track->Draw();
1475 else track->Construct3DLine();
1476 }
1477
1478 for (Int_t i = 0; i < fExtTrackCol->GetEntries(); i++)
1479 {
1480 BesGeoTrack *track = (BesGeoTrack*)fExtTrackCol->At(i);
1481 if (view->GetVisTracksGlobal() && view->GetVisTracksExt())
1482 track->Draw();
1483 else track->Construct3DLine();
1484 }
1485 }
1486}

Referenced by BesView::SetViewType().

◆ DrawTracks() [2/2]

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

◆ GetCgemDigi() [1/2]

const TCgemDigi * BesEvent::GetCgemDigi ( Int_t  i) const
inline

Definition at line 100 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

100 {
101 if (fDigiEvent) return fDigiEvent->getCgemDigi(i);
102 else return 0;
103 }
const TCgemDigi * getCgemDigi(Int_t i) const
retrieve a TkrDigi from the collection, using the index into the array

◆ GetCgemDigi() [2/2]

const TCgemDigi * BesEvent::GetCgemDigi ( Int_t  i) const
inline

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

100 {
101 if (fDigiEvent) return fDigiEvent->getCgemDigi(i);
102 else return 0;
103 }

◆ GetCgemDigiCol() [1/2]

const TObjArray * BesEvent::GetCgemDigiCol ( ) const
inline

Definition at line 91 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

92 {
93 if (fDigiEvent) return fDigiEvent->getCgemDigiCol();
94 else return 0;
95 }
const TObjArray * getCgemDigiCol() const
retrieve the whole TObjArray of TkrDigi Data

Referenced by CgemROOTGeo::Draw3DHits(), and CgemROOTGeo::SetHits().

◆ GetCgemDigiCol() [2/2]

const TObjArray * BesEvent::GetCgemDigiCol ( ) const
inline

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

92 {
93 if (fDigiEvent) return fDigiEvent->getCgemDigiCol();
94 else return 0;
95 }

◆ GetCgemDigiNum() [1/2]

const Int_t BesEvent::GetCgemDigiNum ( ) const
inline

Definition at line 96 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

96 {
97 if (fDigiEvent) return fDigiEvent->getCgemDigiCol()->GetEntries();
98 else return -1;
99 }

◆ GetCgemDigiNum() [2/2]

const Int_t BesEvent::GetCgemDigiNum ( ) const
inline

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

96 {
97 if (fDigiEvent) return fDigiEvent->getCgemDigiCol()->GetEntries();
98 else return -1;
99 }

◆ GetDay() [1/2]

Int_t BesEvent::GetDay ( )
inline

◆ GetDay() [2/2]

Int_t BesEvent::GetDay ( )
inline

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

294 {
295 return fEventHeader.GetEventDay();
296 }

◆ GetDedx() [1/2]

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

Definition at line 274 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

274 {
275 // if (fRecEvent)
276 // return fRecEvent->getRecMdcDedx(i);
277 // else
278 return 0;
279 }

◆ GetDedx() [2/2]

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

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

274 {
275 // if (fRecEvent)
276 // return fRecEvent->getRecMdcDedx(i);
277 // else
278 return 0;
279 }

◆ GetDedxCol() [1/2]

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

Definition at line 190 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

190 {
191 // if (recEvent)
192 // return recEvent->getRecMdcDedxCol();
193 // else
194 return 0;
195 }

◆ GetDedxCol() [2/2]

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

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

190 {
191 // if (recEvent)
192 // return recEvent->getRecMdcDedxCol();
193 // else
194 return 0;
195 }

◆ GetDedxNum() [1/2]

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

Definition at line 235 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

235 {
236 // if (fRecEvent)
237 // return fRecEvent->getRecMdcDedxCol()->GetEntries();
238 // else
239 return -1;
240 }

◆ GetDedxNum() [2/2]

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

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

235 {
236 // if (fRecEvent)
237 // return fRecEvent->getRecMdcDedxCol()->GetEntries();
238 // else
239 return -1;
240 }

◆ GetEmcDigi() [1/2]

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

Definition at line 145 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

145 {
146 if (fDigiEvent) return fDigiEvent->getEmcDigi(i);
147 else return 0;
148 }
const TEmcDigi * getEmcDigi(Int_t i) const
retrieve a EmcDigi from the collection, using the index into the array

Referenced by Print().

◆ GetEmcDigi() [2/2]

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

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

145 {
146 if (fDigiEvent) return fDigiEvent->getEmcDigi(i);
147 else return 0;
148 }

◆ GetEmcDigiCol() [1/2]

const TObjArray * BesEvent::GetEmcDigiCol ( ) const
inline

Definition at line 113 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

113 {
114 if (fDigiEvent) return fDigiEvent->getEmcDigiCol();
115 else return 0;
116 }
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 113 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

113 {
114 if (fDigiEvent) return fDigiEvent->getEmcDigiCol();
115 else return 0;
116 }

◆ GetEmcDigiNum() [1/2]

const Int_t BesEvent::GetEmcDigiNum ( ) const
inline

Definition at line 129 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

129 {
130 if (fDigiEvent) return fDigiEvent->getEmcDigiCol()->GetEntries();
131 else return -1;
132 }

Referenced by Print().

◆ GetEmcDigiNum() [2/2]

const Int_t BesEvent::GetEmcDigiNum ( ) const
inline

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

129 {
130 if (fDigiEvent) return fDigiEvent->getEmcDigiCol()->GetEntries();
131 else return -1;
132 }

◆ GetEmcShower() [1/2]

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

Definition at line 257 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

257 {
258 if (recEvent)
259 return recEvent->getEmcShower(i);
260 else
261 return 0;
262 }
const TRecEmcShower * getEmcShower(Int_t i) const
retrieve a EmcShower from the collection, using the index into the array

Referenced by SetEvent().

◆ GetEmcShower() [2/2]

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

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

257 {
258 if (recEvent)
259 return recEvent->getEmcShower(i);
260 else
261 return 0;
262 }

◆ GetEmcShowerCol() [1/2]

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

Definition at line 172 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

172 {
173 // if (recEvent)
174 // return recEvent->getEmcShowerCol();
175 // else
176 return 0;
177 }

◆ GetEmcShowerCol() [2/2]

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

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

172 {
173 // if (recEvent)
174 // return recEvent->getEmcShowerCol();
175 // else
176 return 0;
177 }

◆ GetEmcShowerNum() [1/2]

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

Definition at line 215 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

215 {
216 if (recEvent)
217 // return recEvent->getEmcShowerCol()->GetEntries();
218 return recEvent->getEmcShowerNum();
219 else
220 return -1;
221 }

Referenced by SetEvent().

◆ GetEmcShowerNum() [2/2]

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

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

215 {
216 if (recEvent)
217 // return recEvent->getEmcShowerCol()->GetEntries();
218 return recEvent->getEmcShowerNum();
219 else
220 return -1;
221 }

◆ GetEvent() [1/2]

Long64_t BesEvent::GetEvent ( )
inline

◆ GetEvent() [2/2]

Long64_t BesEvent::GetEvent ( )
inline

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

285 {
286 return fEventHeader.GetEventNumber();
287 }

◆ GetExtTrackCol() [1/2]

const TObjArray * BesEvent::GetExtTrackCol ( ) const
inline

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

184 {
185 return 0; // for test
186 //if (fRecEvent)
187 // return fRecEvent->getExtTrackCol();
188 //else return 0;
189 }

◆ GetExtTrackCol() [2/2]

const TObjArray * BesEvent::GetExtTrackCol ( ) const
inline

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

184 {
185 return 0; // for test
186 //if (fRecEvent)
187 // return fRecEvent->getExtTrackCol();
188 //else return 0;
189 }

◆ GetExtTrackNum() [1/2]

const Int_t BesEvent::GetExtTrackNum ( ) const
inline

Definition at line 229 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

229 {
230 return -1;// for test
231 //if (fRecEvent)
232 // return fRecEvent->getExtTrackCol()->GetEntries();
233 //else return -1;
234 }

◆ GetExtTrackNum() [2/2]

const Int_t BesEvent::GetExtTrackNum ( ) const
inline

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

229 {
230 return -1;// for test
231 //if (fRecEvent)
232 // return fRecEvent->getExtTrackCol()->GetEntries();
233 //else return -1;
234 }

◆ GetHeader() [1/2]

BesEventHeader BesEvent::GetHeader ( )
inline

Definition at line 309 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

309 {
310 return fEventHeader;
311 }

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

◆ GetHeader() [2/2]

BesEventHeader BesEvent::GetHeader ( )
inline

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

309 {
310 return fEventHeader;
311 }

◆ GetHour() [1/2]

Int_t BesEvent::GetHour ( )
inline

◆ GetHour() [2/2]

Int_t BesEvent::GetHour ( )
inline

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

297 {
298 return fEventHeader.GetEventHour();
299 }

◆ GetMC() [1/2]

Int_t BesEvent::GetMC ( )
inline

◆ GetMC() [2/2]

Int_t BesEvent::GetMC ( )
inline

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

306 {
307 return fEventHeader.GetEventMC();
308 }

◆ GetMdcDigi() [1/2]

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

Definition at line 137 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

137 {
138 if (fDigiEvent) return fDigiEvent->getMdcDigi(i);
139 else return 0;
140 } //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

Referenced by Print().

◆ GetMdcDigi() [2/2]

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

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

137 {
138 if (fDigiEvent) return fDigiEvent->getMdcDigi(i);
139 else return 0;
140 } //Long Peixun's update: Remove semicolon

◆ GetMdcDigiCol() [1/2]

const TObjArray * BesEvent::GetMdcDigiCol ( ) const
inline

Definition at line 105 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

105 {
106 if (fDigiEvent) return fDigiEvent->getMdcDigiCol();
107 else return 0;
108 }
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 105 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

105 {
106 if (fDigiEvent) return fDigiEvent->getMdcDigiCol();
107 else return 0;
108 }

◆ GetMdcDigiNum() [1/2]

const Int_t BesEvent::GetMdcDigiNum ( ) const
inline

Definition at line 121 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

121 {
122 if (fDigiEvent) return fDigiEvent->getMdcDigiCol()->GetEntries();
123 else return -1;
124 }

Referenced by Print().

◆ GetMdcDigiNum() [2/2]

const Int_t BesEvent::GetMdcDigiNum ( ) const
inline

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

121 {
122 if (fDigiEvent) return fDigiEvent->getMdcDigiCol()->GetEntries();
123 else return -1;
124 }

◆ GetMdcTrack() [1/2]

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

Definition at line 241 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

241 {
242 if (recEvent)
243 return recEvent->getRecMdcTrack(i);
244 else return 0;
245 }
const TRecMdcTrack * getRecMdcTrack(Int_t i) const
retrieve a MdcTrack from the collection, using the index into the array

Referenced by SetEvent().

◆ GetMdcTrack() [2/2]

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

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

241 {
242 if (recEvent)
243 return recEvent->getRecMdcTrack(i);
244 else return 0;
245 }

◆ GetMdcTrackCol() [1/2]

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

Definition at line 156 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

156 {
157 if (recEvent)
158 return recEvent->getRecMdcTrackCol();
159 else return 0;
160 }
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 156 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

156 {
157 if (recEvent)
158 return recEvent->getRecMdcTrackCol();
159 else return 0;
160 }

◆ GetMdcTrackNum() [1/2]

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

Definition at line 196 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

196 {
197 if (recEvent)
198// return recEvent->getRecMdcTrackCol()->GetEntries();
199 return recEvent->getMdcTrackNum();
200 else
201 return -1;
202 }

Referenced by SetEvent().

◆ GetMdcTrackNum() [2/2]

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

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

196 {
197 if (recEvent)
198// return recEvent->getRecMdcTrackCol()->GetEntries();
199 return recEvent->getMdcTrackNum();
200 else
201 return -1;
202 }

◆ GetMin() [1/2]

Int_t BesEvent::GetMin ( )
inline

◆ GetMin() [2/2]

Int_t BesEvent::GetMin ( )
inline

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

300 {
301 return fEventHeader.GetEventMin();
302 }

◆ GetMonth() [1/2]

Int_t BesEvent::GetMonth ( )
inline

◆ GetMonth() [2/2]

Int_t BesEvent::GetMonth ( )
inline

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

291 {
292 return fEventHeader.GetEventMonth();
293 }

◆ GetMucDigi() [1/2]

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

Definition at line 149 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

149 {
150 if (fDigiEvent) return fDigiEvent->getMucDigi(i);
151 else return 0;
152 }
const TMucDigi * getMucDigi(Int_t i) const
retrieve a MucDigi From the collection, using the index into the array

Referenced by Print().

◆ GetMucDigi() [2/2]

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

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

149 {
150 if (fDigiEvent) return fDigiEvent->getMucDigi(i);
151 else return 0;
152 }

◆ GetMucDigiCol() [1/2]

const TObjArray * BesEvent::GetMucDigiCol ( ) const
inline

Definition at line 117 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

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

117 {
118 if (fDigiEvent) return fDigiEvent->getMucDigiCol();
119 else return 0;
120 }

◆ GetMucDigiNum() [1/2]

const Int_t BesEvent::GetMucDigiNum ( ) const
inline

Definition at line 133 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

133 {
134 if (fDigiEvent) return fDigiEvent->getMucDigiCol()->GetEntries();
135 else return -1;
136 }

Referenced by Print().

◆ GetMucDigiNum() [2/2]

const Int_t BesEvent::GetMucDigiNum ( ) const
inline

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

133 {
134 if (fDigiEvent) return fDigiEvent->getMucDigiCol()->GetEntries();
135 else return -1;
136 }

◆ GetMucTrack() [1/2]

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

Definition at line 263 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

263 {
264 if (recEvent)
265 return recEvent->getMucTrack(i);
266 else
267 return 0;
268 }
const TRecMucTrack * getMucTrack(Int_t i) const
retrieve a MucTrack From the collection, using the index into the array

◆ GetMucTrack() [2/2]

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

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

263 {
264 if (recEvent)
265 return recEvent->getMucTrack(i);
266 else
267 return 0;
268 }

◆ GetMucTrackCol() [1/2]

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

Definition at line 178 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

178 {
179 if (recEvent)
180 return recEvent->getMucTrackCol();
181 else
182 return 0;
183 }
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 178 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

178 {
179 if (recEvent)
180 return recEvent->getMucTrackCol();
181 else
182 return 0;
183 }

◆ GetMucTrackNum() [1/2]

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

Definition at line 222 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

222 {
223 if (recEvent)
224 return recEvent->getMucTrackNum();
225 // return recEvent->getMucTrackCol()->GetEntries();
226 else
227 return -1;
228 }

◆ GetMucTrackNum() [2/2]

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

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

222 {
223 if (recEvent)
224 return recEvent->getMucTrackNum();
225 // return recEvent->getMucTrackCol()->GetEntries();
226 else
227 return -1;
228 }

◆ GetRun() [1/2]

Long64_t BesEvent::GetRun ( )
inline

◆ GetRun() [2/2]

Long64_t BesEvent::GetRun ( )
inline

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

282 {
283 return fEventHeader.GetRunNumber();
284 }

◆ GetSec() [1/2]

Int_t BesEvent::GetSec ( )
inline

◆ GetSec() [2/2]

Int_t BesEvent::GetSec ( )
inline

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

303 {
304 return fEventHeader.GetEventSec();
305 }

◆ GetTofDigi() [1/2]

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

Definition at line 141 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

141 {
142 if (fDigiEvent) return fDigiEvent->getTofDigi(i);
143 else return 0;
144 }
const TTofDigi * getTofDigi(Int_t i) const
retrieve a TofDigi From the collection, using the index into the array

Referenced by Print().

◆ GetTofDigi() [2/2]

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

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

141 {
142 if (fDigiEvent) return fDigiEvent->getTofDigi(i);
143 else return 0;
144 }

◆ GetTofDigiCol() [1/2]

const TObjArray * BesEvent::GetTofDigiCol ( ) const
inline

Definition at line 109 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

109 {
110 if (fDigiEvent) return fDigiEvent->getTofDigiCol();
111 else return 0;
112 }
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 109 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

109 {
110 if (fDigiEvent) return fDigiEvent->getTofDigiCol();
111 else return 0;
112 }

◆ GetTofDigiNum() [1/2]

const Int_t BesEvent::GetTofDigiNum ( ) const
inline

Definition at line 125 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

125 {
126 if (fDigiEvent) return fDigiEvent->getTofDigiCol()->GetEntries();
127 else return -1;
128 }

Referenced by Print().

◆ GetTofDigiNum() [2/2]

const Int_t BesEvent::GetTofDigiNum ( ) const
inline

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

125 {
126 if (fDigiEvent) return fDigiEvent->getTofDigiCol()->GetEntries();
127 else return -1;
128 }

◆ GetTofTrack() [1/2]

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

Definition at line 251 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

251 {
252 if (recEvent)
253 return recEvent->getTofTrack(i);
254 else
255 return 0;
256 }
const TRecTofTrack * getTofTrack(Int_t i) const
retrieve a TofTrack From the collection, using the index into the array

◆ GetTofTrack() [2/2]

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

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

251 {
252 if (recEvent)
253 return recEvent->getTofTrack(i);
254 else
255 return 0;
256 }

◆ GetTofTrackCol() [1/2]

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

Definition at line 166 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

166 {
167 if (recEvent)
168 return recEvent->getTofTrackCol();
169 else
170 return 0;
171 }
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 166 of file InstallArea/include/BesVisLib/BesVisLib/BesEvent.h.

166 {
167 if (recEvent)
168 return recEvent->getTofTrackCol();
169 else
170 return 0;
171 }

◆ GetTofTrackNum() [1/2]

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

Definition at line 208 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

208 {
209 if (recEvent)
210 // return recEvent->getTofTrackCol()->GetEntries();
211 return recEvent->getTofTrackNum();
212 else
213 return -1;
214 }

◆ GetTofTrackNum() [2/2]

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

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

208 {
209 if (recEvent)
210 // return recEvent->getTofTrackCol()->GetEntries();
211 return recEvent->getTofTrackNum();
212 else
213 return -1;
214 }

◆ GetYear() [1/2]

Int_t BesEvent::GetYear ( )
inline

◆ GetYear() [2/2]

Int_t BesEvent::GetYear ( )
inline

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

288 {
289 return fEventHeader.GetEventYear();
290 }

◆ Print() [1/2]

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

Definition at line 1555 of file BesEvent.cxx.

1555 {
1556 //
1557 // Print event information
1558 //
1559 // Options available:
1560 // '' - quiet, i.e. only numbers of hits and tracks etc. (default)
1561 // 'ALL' - very detailed output (might be hundreds of lines!)
1562 // 'Digi' - only Digi information
1563 // 'Dst' - only Dst information
1564 //
1565 TString opt = option;
1566 opt.ToUpper();
1567 Int_t i;
1568
1569 //cout << endl
1570 // << "==========================================================" << endl
1571 // << "Run: " << GetRun() << endl
1572 // << "Event: " << GetEvent() << endl
1573 // << "----------------------------------------------------------" << endl
1574 // << "Mdc digis: " << GetMdcDigiNum() << endl
1575 // << "Tof digis: " << GetTofDigiNum() << endl
1576 // << "Emc digis: " << GetEmcDigiNum() << endl
1577 // << "Muc digis: " << GetMucDigiNum() << endl
1578 // << "Mdc tracks: " << GetMdcTrackNum() << endl
1579 // << "Tof tracks: " << "debug++++++" /*GetTofTrackNum()*/ << endl
1580 // << "Emc tracks: " << GetEmcShowerNum() << endl
1581 // << "Muc tracks: " << GetMucTrackNum() << endl
1582 // << "Ext tracks: " << GetExtTrackNum() << endl
1583 // << "Dedx : " << GetDedxNum() << endl
1584 // << "----------------------------------------------------------" << endl;
1585
1586 if ( opt.Contains("ALL") || opt.Contains("Digi") ) {
1587 for ( i = 0; i < GetMdcDigiNum(); i++ ) GetMdcDigi(i)->Print();
1588 for ( i = 0; i < GetTofDigiNum(); i++ ) GetTofDigi(i)->Print();
1589 for ( i = 0; i < GetEmcDigiNum(); i++ ) GetEmcDigi(i)->Print();
1590 for ( i = 0; i < GetMucDigiNum(); i++ ) GetMucDigi(i)->Print();
1591 }
1592
1593 /* if ( opt.Contains("ALL") || opt.Contains("Dst") ) {
1594 for ( i = 0; i < GetMdcTrackNum(); i++ ) GetMdcTrack(i)->Print();
1595 // Tof -> BTof ETof
1596 //for ( i = 0; i < GetTofTrackNum(); i++ ) GetTofTrack(i)->Print();
1597 for ( i = 0; i < GetEmcShowerNum(); i++ ) GetEmcShower(i)->Print();
1598 for ( i = 0; i < GetMucTrackNum(); i++ ) GetMucTrack(i)->Print();
1599 cout << "wait for TRecExtEvent, BesEvent" << endl;
1600 //for ( i = 0; i < GetExtTrackNum(); i++ ) GetExtTrack(i)->Print();
1601 for ( i = 0; i < GetDedxNum(); i++ ) GetDedx(i)->Print();
1602 }
1603 */
1604 //cout << "=========================================================="
1605 //<< endl << endl;
1606}
void Print(Option_t *option="") const

◆ Print() [2/2]

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

◆ SetCgemClusters() [1/2]

void BesEvent::SetCgemClusters ( const TRecCgemCluster recCluster,
int  ncluster 
)
virtual

Definition at line 321 of file BesEvent.cxx.

322{
323 if (!gBesGeometry || !gBesGeometry->GetCgemROOTGeo()) return;
325 if (fCgemClusterCol)
326 {
327 for (int j = 0; j < fCgemClusterCol->GetEntries(); ++j)
328 delete fCgemClusterCol->At(j);
329 fCgemClusterCol->Clear("C");
330 }
331 for (int i = 0; i < 3; ++i)
332 {
333 if (fCgemClusterUFCol[i])
334 {
335 for (int j = 0; j < fCgemClusterUFCol[i]->GetEntries(); ++j)
336 delete fCgemClusterUFCol[i]->At(j);
337 fCgemClusterUFCol[i]->Clear("C");
338 }
339 }
340
341 for (Int_t i = 0; i < ncluster; ++i)
342 {
343 if (recCluster[i].getflag() != 2) continue; //Only XY-clusters need to be displayed
344 double phi = recCluster[i].getrecphi();
345 double v = recCluster[i].getrecv();
346 double z = recCluster[i].getRecZ();
347 int layer = recCluster[i].getlayerid();
348 int sheet = recCluster[i].getsheetid();
349 int asstrk = recCluster[i].getTrkId();
350 int startx = recCluster[i].getstripid(0, 0);
351 int endx = recCluster[i].getstripid(0, 1);
352 int startv = recCluster[i].getstripid(1, 0);
353 int endv = recCluster[i].getstripid(1, 1);
354
355 double wid = cgem->getSheetWidth(layer, sheet);
356 double r = cgem->getRFromLayerSheet(layer, sheet);
357 if (layer < 0 || layer >= 3) continue;
358
359 //Construct CGEM clusters in unfolded view
360 double cx = phi * r;
361 if (layer == 0) cx -= 0.5 * wid;
362 else cx -= wid;
363 double cy = z; //cgem->calcZFromLayerSheetVIDPhi(layer, sheet, v, phi);
364 double cz = 0;
365 char data[100];
366 TString info;
367
368 BesGeoTrack* cgemClusterUF = 0;
369 //if (cgem->isPointInSheet(layer, sheet, phi, cy))
370 //{
371 cgemClusterUF = new BesGeoTrack();
372 cgemClusterUF->SetTrackType(7);
373 cgemClusterUF->SetMarker(cx, cy, cz);
374 cgemClusterUF->SetTrackID(asstrk);
375
376 info = "CgemCluster ";
377 info += recCluster[i].getclusterid();
378 cgemClusterUF->AddInfo(info);
379 sprintf(data, "layer=%i, sheet=%i", layer, sheet);
380 cgemClusterUF->AddInfo(TString(data));
381 sprintf(data, "#phi=%-.3f, V=%-.3f mm", phi, v);
382 cgemClusterUF->AddInfo(TString(data));
383 sprintf(data, "X-strips: %i to %i", startx, endx);
384 cgemClusterUF->AddInfo(TString(data));
385 sprintf(data, "V-strips: %i to %i", startv, endv);
386 cgemClusterUF->AddInfo(TString(data));
387 cgemClusterUF->CloseInfo();
388
389 fCgemClusterUFCol[layer]->Add(cgemClusterUF);
390 //}
391
392 //Construct CGEM clusters in normal view
393 cz = cy;
394 cx = r * TMath::Cos(phi);
395 cy = r * TMath::Sin(phi);
396
397 BesGeoTrack* cgemCluster = 0;
398 //if (cgem->isPointInSheet(layer, sheet, phi, cz))
399 //{
400 cgemCluster = new BesGeoTrack();
401 cgemCluster->SetTrackType(6);
402 cgemCluster->SetMarker(cx, cy, cz);
403 cgemCluster->SetTrackID(asstrk);
404
405 info = "CgemCluster ";
406 info += recCluster[i].getclusterid();
407 cgemCluster->AddInfo(info);
408 sprintf(data, "layer=%i, sheet=%i", layer, sheet);
409 cgemCluster->AddInfo(TString(data));
410 sprintf(data, "#phi=%-.3f, V=%-.3f mm", phi, v);
411 cgemCluster->AddInfo(TString(data));
412 sprintf(data, "X-strips: %i to %i", startx, endx);
413 cgemCluster->AddInfo(TString(data));
414 sprintf(data, "V-strips: %i to %i", startv, endv);
415 cgemCluster->AddInfo(TString(data));
416 cgemCluster->CloseInfo();
417 //}
418 fCgemClusterCol->Add(cgemCluster);
419 }
420}
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition: KarLud.h:35
double getRFromLayerSheet(int layer, int sheet) const
double getSheetWidth(int layer, int sheet) const

Referenced by BesClient::GetEvent().

◆ SetCgemClusters() [2/2]

virtual void BesEvent::SetCgemClusters ( const TRecCgemCluster recCluster,
int  ncluster 
)
virtual

◆ SetEmcShowers() [1/2]

void BesEvent::SetEmcShowers ( TDisTrack recEvent)
virtual

Definition at line 468 of file BesEvent.cxx.

468 {
469 if (fEmcTrackCol) {
470 for (int j = 0; j < fEmcTrackCol->GetEntries(); j++){
471 delete fEmcTrackCol->At(j);
472 }
473 fEmcTrackCol->Clear("C");
474 }
475 int emc_no = recEvent->getEmcShowerNum();
476
477 for (Int_t i = 0; i < emc_no; i++) {
478 const TRecEmcShower* recShower =recEvent->getEmcShower(i);
479 BesGeoTrack *emcTrack = new BesGeoTrack();
480 emcTrack->SetTrackType(2);
481 emcTrack->SetTrackID(recShower->trackId()); //Long Peixun's update: Set trackID in BesGeoTrack
482
483 ConstructEmcTrackFromRec(emcTrack, recShower);
484 fEmcTrackCol->Add(emcTrack);
485 }
486}
virtual void ConstructEmcTrackFromRec(BesGeoTrack *emcTrack, const TRecEmcShower *recTrack)
Definition: BesEvent.cxx:1174

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,
TMcEvent mcEvt = 0 
)
virtual

Definition at line 150 of file BesEvent.cxx.

151{
152 //fDigiEvent = 0;
153 fMcEvent = mcEvt;
154 fDigiEvent = digiEvent;
155 fEvtHeader = evtHeader;
156 fRecEvTime = recEvTime;
157 //fTrigEvent = trigEvt;
158 fTrigEvent = 0;
159 // ========================================
160 // set trig information
161 // ========================================
162 if (fTrigEvent != 0){
163 vector<Int_t> trigConditionVector;
164 vector<Int_t> trigChannelVector;
165
166 const TTrigData* trigData = fTrigEvent->getTrigData();
167 const Int_t timeType = trigData->getTimingType();
168 //std::cout << "BesEvent::timing type: " << timeType << std::endl;
169 Int_t trigCondition;
170 Int_t trigChannel;
171 for (Int_t i = 0; i < 48; i++){
172 trigCondition = trigData->getTrigCondition(i);
173 if (trigCondition) trigConditionVector.push_back(i);
174 //std::cout << "BesEvent::trig condition: " << trigCondition << std::endl;
175 }
176 for (Int_t i = 0; i < 16; i++){
177 trigChannel = trigData->getTrigChannel(i);
178 if (trigChannel) trigChannelVector.push_back(i);
179 //std::cout << "BesEvent::trigChannel: " << trigChannel << std::endl;
180 }
181 fEventHeader.SetEventTrig(timeType, trigConditionVector, trigChannelVector);
182 }
183 else {
184 std::cout << "fTrigEvent does not exit!" << std::endl;
185 }
186 // ========================================
187 // set time information
188 // ========================================
189 if (fEvtHeader != 0){
190 time_t now;
191 //now = time(NULL);
192 now = (time_t)evtHeader->time();
193 //char str_time[256];
194 //sprintf(str_time, ctime(&now));
195 //cout << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
196 //cout << "time now: " << str_time << endl;
197 //cout << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
198
199 struct tm *local_time;
200 local_time = localtime(&now);
201 //cout << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
202 //cout << "time now sec: " << local_time->tm_sec << endl;
203 //cout << "time now min: " << local_time->tm_min << endl;
204 //cout << "time now hour: "<< local_time->tm_hour << endl;
205 //cout << "time now day: " << local_time->tm_mday << endl;
206 //cout << "time now mon: " << local_time->tm_mon << endl;
207 //cout << "time now year: "<< local_time->tm_year << endl;
208 //cout << "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
209
210 Int_t time1 = (1900 + local_time->tm_year) * 10000 + (1 + local_time->tm_mon) * 100
211 + local_time->tm_mday;
212 Int_t time2 = local_time->tm_hour * 10000 + local_time->tm_min * 100
213 + local_time->tm_sec;
214
215 fEventHeader.SetEventHeaderGeneral(fEvtHeader->getRunId(),
216 fEvtHeader->getEventId(), time1, time2);
217 }
218 else {
219 cout << "fEvtHeader does not exit" << endl;
220 }
221
222 // ========================================
223 // set event start time information
224 // ========================================
225 //Long Peixun's update: if this event is not a rec event, don't show estime, status and quality
226 if (fRecEvTime != 0)
227 {
228 fEventHeader.SetEventRec(isRec);
229 if (isRec)
230 fEventHeader.SetEventEvTime(fRecEvTime->estime(),fRecEvTime->status(),fRecEvTime->quality());
231 else
232 fEventHeader.SetEventEvTime(0.0, 0, 0.0);
233 }
234 else
235 {
236 cout << "fRecEvTime does not exit" << endl;
237 fEventHeader.SetEventRec(false);
238 fEventHeader.SetEventEvTime(0.0, 0, 0.0);
239 }
240
241 // ========================================
242 // set Mdc information
243 // ========================================
244 Double_t p = 0.0, pt = 0.0, px = 0.0, py = 0.0, pz = 0.0;
245 for (Int_t i = 0; i < GetMdcTrackNum(recEvent); i++) {
246 p += GetMdcTrack(i,recEvent)->p();
247 pt += GetMdcTrack(i,recEvent)->pxy();
248 px += GetMdcTrack(i,recEvent)->px();
249 py += GetMdcTrack(i,recEvent)->py();
250 pz += GetMdcTrack(i,recEvent)->pz();
251 }
252 fEventHeader.SetEventMdc(p, pt, px, py, pz);
253
254 // ========================================
255 // set Emc information
256 // ========================================
257 Double_t t = 9999.0;
258 Double_t e = 0.0;
259 for (Int_t i = 0; i < GetEmcShowerNum(recEvent); i++) {
260 e += GetEmcShower(i,recEvent)->energy();
261 }
262 fEventHeader.SetEventEmc(e);
263 // ========================================
264 // set digi and rec
265 // ========================================
266 if (fDigiEvent)
267 {
268 SetHits();
269 fEventHeader.SetEventMC(fDigiEvent->getFromMc());
270 }
271 else ClearHits(); //Long Peixun's update: If there is no hit in the event, clear previous hits
272 if (recEvent)
273 SetTracks(recEvent);
274 if (fMcEvent)
275 SetMcEvent(fMcEvent);
276}
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:280
virtual void ClearHits()
Definition: BesEvent.cxx:294
const TRecMdcTrack * GetMdcTrack(Int_t i, TDisTrack *recEvent) const
const Int_t GetMdcTrackNum(TDisTrack *recEvent) const
virtual void SetMcEvent(TMcEvent *mcEvt)
Definition: BesEvent.cxx:526
const Int_t GetEmcShowerNum(TDisTrack *recEvent) const
const TRecEmcShower * GetEmcShower(Int_t i, TDisTrack *recEvent) const
virtual void SetTracks(TDisTrack *recEvent)
Definition: BesEvent.cxx:307
const TTrigData * getTrigData() const

Referenced by BesClient::GetEvent().

◆ SetEvent() [2/2]

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

◆ SetExtTracks() [1/2]

void BesEvent::SetExtTracks ( TDisTrack recEvent)
virtual

Definition at line 511 of file BesEvent.cxx.

511 {
512 //if (fExtTrackCol) fExtTrackCol->Clear("C");
513
514 //for (Int_t i = 0; i < GetExtTrackNum(); i++) {
515 // const TExtTrack* recTrack = GetExtTrack(i);
516 // BesGeoTrack *extTrack = new BesGeoTrack();
517 // extTrack->SetTrackType(4);
518
519 // ConstructExtTrackFromRec(extTrack, recTrack);
520 // fExtTrackCol->Add(extTrack);
521 //}
522}

Referenced by SetTracks().

◆ SetExtTracks() [2/2]

virtual void BesEvent::SetExtTracks ( TDisTrack recEvent)
virtual

◆ SetHits() [1/2]

void BesEvent::SetHits ( )
virtual

Definition at line 280 of file BesEvent.cxx.

281{
282 if (!gBesGeometry) return;
283 //Long Peixun's update: for CGEM hits
290}
void SetHits()
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 82 of file EventDisplay/BesVisLib/BesVisLib-00-06-08/BesVisLib/BesEvent.h.

82{f_Magnetic = input;}

Referenced by BesClient::ExecuteReturn().

◆ SetMagnetic() [2/2]

void BesEvent::SetMagnetic ( Double_t  input)
inline

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

82{f_Magnetic = input;}

◆ SetMcEvent() [1/2]

void BesEvent::SetMcEvent ( TMcEvent mcEvt)
virtual

Definition at line 526 of file BesEvent.cxx.

526 {
527 if (fMcParticleCol){
528 for (int j = 0; j < fMcParticleCol->GetEntries(); j++){
529 delete fMcParticleCol->At(j);
530 }
531 fMcParticleCol->Clear("C");
532 }
533 int no = mcEvt->getMcParticleCol()->GetEntries();
534 for (Int_t i = 0; i < no; i++) {
535 const TMcParticle* mcPart = mcEvt->getMcParticle(i);
536 Int_t pdgID = mcPart->getParticleID();
537
538 // Skip the particle if not stable
539 // if( !mcPart->leafParticle() || mcPart->getDaughters().size() )
540 // continue;
541 // Skip beam electrons and intermediate quarks
542 if( mcPart->primaryParticle() || abs(pdgID) < 11)
543 continue;
544
545 BesMcTrack *mcTrack = new BesMcTrack();
546 mcTrack->SetTrackType(8);
547 // mcTrack->SetTrackID(mcPart->...); //Long Peixun's update: Set trackID in BesGeoTrack
548
549 ConstructMcTrack(mcTrack, mcPart);
550 fMcParticleCol->Add(mcTrack);
551 }
552}
double abs(const EvtComplex &c)
Definition: EvtComplex.hh:212
virtual void ConstructMcTrack(BesMcTrack *mcTrack, const TMcParticle *mcPart)
Definition: BesEvent.cxx:554
const TMcParticle * getMcParticle(Int_t i) const

Referenced by SetEvent().

◆ SetMcEvent() [2/2]

virtual void BesEvent::SetMcEvent ( TMcEvent mcEvt)
virtual

◆ SetMdcTracks() [1/2]

void BesEvent::SetMdcTracks ( TDisTrack recEvent)
virtual

Definition at line 424 of file BesEvent.cxx.

424 {
425 if (fMdcTrackCol){
426 for (int j = 0; j < fMdcTrackCol->GetEntries(); j++){
427 delete fMdcTrackCol->At(j);
428 }
429 fMdcTrackCol->Clear("C");
430 }
431 int mdc_no = recEvent->getMdcTrackNum();
432 for (Int_t i = 0; i < mdc_no; i++) {
433 const TRecMdcTrack* recTrack =recEvent->getRecMdcTrack(i);
434 BesGeoTrack *mdcTrack = new BesGeoTrack();
435 mdcTrack->SetTrackType(0);
436 mdcTrack->SetTrackID(recTrack->trackId()); //Long Peixun's update: Set trackID in BesGeoTrack
437
438 ConstructMdcTrackFromRec(mdcTrack, recTrack,recEvent);
439 fMdcTrackCol->Add(mdcTrack);
440 }
441}
virtual void ConstructMdcTrackFromRec(BesGeoTrack *mdcTrack, const TRecMdcTrack *recTrack, TDisTrack *recEvent)
Definition: BesEvent.cxx:709

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

490 {
491 if (fMucTrackCol) {
492 for (int j = 0; j < fMucTrackCol->GetEntries(); j++){
493 delete fMucTrackCol->At(j);
494 }
495 fMucTrackCol->Clear("C");
496 }
497 int muc_no = recEvent->getMucTrackNum();
498 for (Int_t i = 0; i < muc_no; i++) {
499 const TRecMucTrack* recTrack =recEvent->getMucTrack(i);
500 BesGeoTrack *mucTrack = new BesGeoTrack();
501 mucTrack->SetTrackType(3);
502 mucTrack->SetTrackID(recTrack->trackId()); //Long Peixun's update: Set trackID in BesGeoTrack
503
504 ConstructMucTrackFromRec(mucTrack, recTrack);
505 fMucTrackCol->Add(mucTrack);
506 }
507}
virtual void ConstructMucTrackFromRec(BesGeoTrack *mucTrack, const TRecMucTrack *recTrack)
Definition: BesEvent.cxx:1252

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

445 {
446 if (fTofTrackCol) {
447 for (int j = 0; j < fTofTrackCol->GetEntries(); j++){
448 delete fTofTrackCol->At(j);
449 }
450 fTofTrackCol->Clear("C");
451 }
452 int tof_no = recEvent->getTofTrackNum();
453
454 for (Int_t i = 0; i < tof_no; i++) {
455 const TRecTofTrack* recTrack = recEvent->getTofTrack(i);
456 if ( !Is_tofCounter( recTrack->status())) continue;
457 BesGeoTrack *tofTrack = new BesGeoTrack();
458 tofTrack->SetTrackType(1);
459 tofTrack->SetTrackID(recTrack->trackID()); //Long Peixun's update: Set trackID in BesGeoTrack
460
461 ConstructTofTrackFromRec(tofTrack, recTrack,recEvent);
462 fTofTrackCol->Add(tofTrack);
463 }
464}
virtual void ConstructTofTrackFromRec(BesGeoTrack *tofTrack, const TRecTofTrack *recTrack, TDisTrack *recEvent)
Definition: BesEvent.cxx:1020

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

307 {
308 if (gBesGeometry)
309 {
310 //Long Peixun's update: Add judging detector geometry code
311 SetMdcTracks(recEvent);
312 SetTofTracks(recEvent);
313 SetEmcShowers(recEvent);
314 SetMucTracks(recEvent);
315 SetExtTracks(recEvent);
316 }
317}
virtual void SetTofTracks(TDisTrack *recEvent)
Definition: BesEvent.cxx:445
virtual void SetMucTracks(TDisTrack *recEvent)
Definition: BesEvent.cxx:490
virtual void SetMdcTracks(TDisTrack *recEvent)
Definition: BesEvent.cxx:424
virtual void SetEmcShowers(TDisTrack *recEvent)
Definition: BesEvent.cxx:468
virtual void SetExtTracks(TDisTrack *recEvent)
Definition: BesEvent.cxx:511

Referenced by SetEvent().

◆ SetTracks() [2/2]

virtual void BesEvent::SetTracks ( TDisTrack recEvent)
virtual

Member Data Documentation

◆ pdgTable

TDatabasePDG * BesEvent::pdgTable

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