15#include "TClonesArray.h"
16#include "TDatabasePDG.h"
17#include "TMCProcess.h"
34 vector<CbmStsTrack> stsTracks;
36 stsTracks[0] = *stsTrack;
38 vector<CbmL1PFFitter::PFFieldRegion> vField;
39 vector<float> chiPrim;
40 fPFFitter.
GetChiToVertex(stsTracks, vField, chiPrim, kfVertex, 3e6);
41 cand->
fChi2Sts = stsTracks[0].GetChiSq() / stsTracks[0].GetNDF();
43 const FairTrackParam* vtxTrack = stsTracks[0].GetParamFirst();
48 cand->
fMass = TDatabasePDG::Instance()->GetParticle(11)->Mass();
49 cand->
fCharge = (vtxTrack->GetQp() > 0) ? 1 : -1;
60 double sp =
sqrt(spx * spx + spy * spy + spz * spz);
62 if (sp == 0.0)
return;
76 if (pn == 0.0)
return;
77 double ptm = (1. - ((pln / pn) * (pln / pn)));
78 ptt = (ptm >= 0.) ? pn *
sqrt(ptm) : 0;
79 alpha = (plp - pln) / (plp + pln);
101 if (mct1 !=
nullptr && mct1->
GetPdgCode() == 22)
return true;
109 if (mct1 !=
nullptr && mct1->
GetPdgCode() == 111)
return true;
117 if (mct1 != NULL && mct1->
GetPdgCode() == 221)
return true;
242 return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
263 bool isMomCut = (momentumCut > 0.) ? (momentum < momentumCut) :
true;
264 cand->
fIsElectron = (richEl && trdEl && tofEl && isMomCut);
291 cand->
fIsElectron = (gRandom->Rndm() < pionMisidLevel);
298 if (cand->
fCharge == 0)
return "0";
299 return (cand->
fCharge > 0) ?
"+" :
"-";
305 return (mct->
GetCharge() > 0) ?
"+" :
"-";
315 for (
int i = 1; i < nArray; i++) {
319 double slope = dy / dx;
336 for (
int i = 1; i < nArray; i++) {
340 double slope = dy / dx;
Data class for STS tracks.
static vector< vector< QAMCTrack > > mcTracks
friend fvec sqrt(const fvec &a)
void GetChiToVertex(std::vector< CbmStsTrack > &Tracks, std::vector< PFFieldRegion > &field, std::vector< float > &chiToVtx, CbmKFVertex &primVtx, float chiPrim=-1)
Bool_t IsTrdElectron(Int_t globalTrackindex, Double_t momentum)
Identify electron in RICH 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.
static CbmLitGlobalElectronId & GetInstance()
double GetCharge() const
Charge of the associated particle.
uint32_t GetGeantProcessId() const
int32_t GetMotherId() const
int32_t GetPdgCode() const
static void IsTofElectron(int globalTrackIndex, double momentum, LmvmCand *cand)
static bool IsMcGammaEl(const CbmMCTrack *mct, TClonesArray *mcTracks)
static double Distance(double x1, double y1, double x2, double y2)
static ELmvmSrc GetMcPairSrc(const CbmMCTrack *mctP, const CbmMCTrack *mctM, TClonesArray *mcTracks)
static void CalculateArmPodParams(LmvmCand *cand1, LmvmCand *cand2, double &alpha, double &ptt)
static void IsElectronMc(LmvmCand *cand, TClonesArray *mcTracks, double pionMisidLevel)
static constexpr double fScaleArrayInmed[170]
static double GetMassScaleQgp(double minv)
static void IsElectron(int globalTrackIndex, double momentum, double momentumCut, LmvmCand *cand)
static bool IsMcPairSignal(const CbmMCTrack *mctP, const CbmMCTrack *mctM)
static ELmvmSrc GetMcSrc(CbmMCTrack *mctrack, TClonesArray *mcTracks)
static void IsTrdElectron(int globalTrackIndex, double momentum, LmvmCand *cand)
static bool IsMcPairEta(const CbmMCTrack *mctP, const CbmMCTrack *mctM, TClonesArray *mcTracks)
static void IsRichElectron(int globalTrackIndex, double momentum, LmvmCand *cand)
static bool IsMismatch(const LmvmCand &cand)
static constexpr double fScaleArrayQgp[170]
static bool IsMcPairGamma(const CbmMCTrack *mctP, const CbmMCTrack *mctM, TClonesArray *mcTracks)
static bool IsMcPairPi0(const CbmMCTrack *mctP, const CbmMCTrack *mctM, TClonesArray *mcTracks)
static constexpr double fMinvArray[170]
static bool IsGhost(const LmvmCand &cand)
static bool IsMcPairBg(const CbmMCTrack *mctP, const CbmMCTrack *mctM, TClonesArray *mcTracks)
static std::string GetChargeStr(const LmvmCand *cand)
static bool IsMcPi0El(const CbmMCTrack *mct, TClonesArray *mcTracks)
static ELmvmBgPairSrc GetBgPairSrc(const LmvmCand &candP, const LmvmCand &candM)
static double GetMassScaleInmed(double minv)
static bool IsMcSignalEl(const CbmMCTrack *mct)
static void CalculateAndSetTrackParams(LmvmCand *cand, CbmStsTrack *stsTrack, CbmKFVertex &kfVertex)
static bool IsMcEtaEl(const CbmMCTrack *mct, TClonesArray *mcTracks)
static double Distance2(double x1, double y1, double x2, double y2)