18#include "FairRootManager.h"
19#include "TClonesArray.h"
53 FairRootManager* ioman = FairRootManager::Instance();
54 if (ioman !=
nullptr) {
55 fGlobalTracks = (TClonesArray*) ioman->GetObject(
"GlobalTrack");
56 fRichRings = (TClonesArray*) ioman->GetObject(
"RichRing");
57 fTrdTracks = (TClonesArray*) ioman->GetObject(
"TrdTrack");
58 fTofHits = (TClonesArray*) ioman->GetObject(
"TofHit");
70 if (richId < 0)
return false;
72 if (NULL == ring)
return false;
98 if (trdId < 0)
return false;
100 if (NULL == trdTrack)
return false;
105 if (momentum < 1.)
return true;
115 Double_t mass2 =
GetTofM2(globalTrackIndex, momentum, eventTime);
116 if (mass2 == -1.)
return false;
119 if (momentum >= 1.3) {
120 if (mass2 < (0.010 * momentum - 0.003)) {
154 if (trdId < 0)
return -1.;
156 if (NULL == trdTrack)
return -1.;
165 Double_t trackLength = globalTrack->
GetLength() / 100.;
167 if (tofId < 0)
return -1.;
169 if (NULL == tofHit)
return -1.;
171 Double_t noOffsetTime = tofHit->
GetTime() - eventTime;
172 Double_t time = 0.2998 * noOffsetTime;
173 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 ...
int32_t GetRichRingIndex() const
int32_t GetTofHitIndex() const
int32_t GetTrdTrackIndex() const
Bool_t IsTrdElectron(Int_t globalTrackindex, Double_t momentum)
Identify electron in RICH detector.
Double_t GetTrdAnn(Int_t globalTrackindex, Double_t momentum)
Return ANN value for electron Identification in the TRD detector.
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 * fGlobalTracks
void Init()
Initialize TClonesArrays.
virtual ~CbmLitGlobalElectronId()
Destructor.
TClonesArray * fRichRings
double CalculateAnnValue(int globalTrackIndex, double momentum)
Calculate output value of the ANN.
static CbmRichElectronIdAnn & GetInstance()
static double GetRingTrackDistance(int globalTrackId)
double GetPidLikeEL() const