20#include "FairRootManager.h"
21#include "TClonesArray.h"
57 FairRootManager* ioman = FairRootManager::Instance();
58 if (ioman !=
nullptr) {
59 fGlobalTracks = (TClonesArray*) ioman->GetObject(
"GlobalTrack");
60 fStsTracks = (TClonesArray*) ioman->GetObject(
"StsTrack");
61 fRichRings = (TClonesArray*) ioman->GetObject(
"RichRing");
62 fTrdTracks = (TClonesArray*) ioman->GetObject(
"TrdTrack");
63 fTofHits = (TClonesArray*) ioman->GetObject(
"TofHit");
64 fTofTracks = (TClonesArray*) ioman->GetObject(
"TofTrack");
74 if (stsInd < 0)
return false;
76 if (NULL == stsTrack)
return false;
88 if (richId < 0)
return false;
90 if (NULL == ring)
return false;
114 if (trdId < 0)
return false;
116 if (NULL == trdTrack)
return false;
127 if (NULL == tofTrack)
return false;
129 Double_t mass2 =
GetTofM2(globalTrackIndex, momentum, eventTime);
130 if (mass2 == -1.)
return false;
145 if (trdId < 0)
return -1.;
147 if (NULL == trdTrack)
return -1.;
156 Double_t trackLength = globalTrack->
GetLength() / 100.;
158 if (tofId < 0)
return -1.;
160 if (NULL == tofHit)
return -1.;
162 Double_t noOffsetTime = tofHit->
GetTime() - eventTime;
163 Double_t time = 0.2998 * noOffsetTime;
164 Double_t mass2 = momentum * momentum * (TMath::Power(time / trackLength, 2) - 1);
ClassImp(CbmLitGlobalElectronId)
Implementation of the electron identification algorithm in the RICH detector using Artificial Neural ...
Data class for STS tracks.
int32_t GetStsTrackIndex() const
int32_t GetRichRingIndex() const
int32_t GetTofTrackIndex() const
int32_t GetTofHitIndex() const
int32_t GetTrdTrackIndex() const
Bool_t IsTrdElectron(Int_t globalTrackindex, Double_t momentum)
Identify electron in RICH detector.
std::unique_ptr< TCutG > fRichAnnCut2D
Double_t GetTrdAnn(Int_t globalTrackindex, Double_t momentum)
Return ANN value for electron Identification in the TRD detector.
std::unique_ptr< TCutG > fTrdElLikeCut2D
TClonesArray * fTofTracks
Bool_t IsStsElectron(Int_t globalTrackIndex, Double_t momentum)
Identify electron in STS detector.
std::unique_ptr< TCutG > fTofM2Cut2D
Double_t GetTofM2(Int_t globalTrackIndex, Double_t momentum, Double_t eventTime=1000.)
Return TOF m2 value.
Double_t GetRichAnn(Int_t globalTrackIndex, Double_t momentum)
Identify electron in RICH detector.
Bool_t IsTofElectron(Int_t globalTrackIndex, Double_t momentum, Double_t eventTime=1000.)
Identify electron in RICH detector.
Bool_t IsRichElectron(Int_t globalTrackIndex, Double_t momentum)
Identify electron in RICH detector.
TClonesArray * fTrdTracks
CbmLitGlobalElectronId()
Constructor.
TClonesArray * fStsTracks
TClonesArray * fGlobalTracks
std::unique_ptr< TCutG > fTofDistCut2D
void Init()
Initialize TClonesArrays.
std::unique_ptr< TCutG > fStsELossCut2D
virtual ~CbmLitGlobalElectronId()
Destructor.
TClonesArray * fRichRings
std::unique_ptr< TCutG > fTrdChi2Cut2D
double CalculateAnnValue(int globalTrackIndex, double momentum)
Calculate output value of the ANN.
static CbmRichElectronIdAnn & GetInstance()
static double GetRingTrackDistance(int globalTrackId)
double GetDistance() const
double GetPidLikeEL() const