12#include "TClonesArray.h"
13#include "TDatabasePDG.h"
14#include "TMCProcess.h"
33 stsTracks[0] = *stsTrack;
36 fPFFitter.
GetChiToVertex(stsTracks, vField, chiPrim, kfVertex, 3e6);
37 cand->
fChi2Sts = stsTracks[0].GetChiSq() / stsTracks[0].GetNDF();
39 const FairTrackParam* vtxTrack = stsTracks[0].GetParamFirst();
44 cand->
fMass = TDatabasePDG::Instance()->GetParticle(11)->Mass();
45 cand->
fCharge = (vtxTrack->GetQp() > 0) ? 1 : -1;
56 double sp =
sqrt(spx * spx + spy * spy + spz * spz);
58 if (sp == 0.0)
return;
72 if (pn == 0.0)
return;
73 double ptm = (1. - ((pln / pn) * (pln / pn)));
74 ptt = (ptm >= 0.) ? pn *
sqrt(ptm) : 0;
75 alpha = (plp - pln) / (plp + pln);
97 if (mct1 !=
nullptr && mct1->
GetPdgCode() == 22)
return true;
105 if (mct1 !=
nullptr && mct1->
GetPdgCode() == 111)
return true;
113 if (mct1 != NULL && mct1->
GetPdgCode() == 221)
return true;
193 LOG(warning) <<
"LmvmUtils::GetMcPairSrc: Pair source is 'Undefined'! Check!";
237 return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
252 bool isMomCut = (momentumCut > 0.) ? (momentum < momentumCut) :
true;
253 cand->
fIsElectron = (stsEl && richEl && trdEl && tofEl && isMomCut);
283 cand->
fIsElectron = (gRandom->Rndm() < pionMisidLevel);
290 if (cand->
fCharge == 0)
return "0";
291 return (cand->
fCharge > 0) ?
"+" :
"-";
297 return (mct->
GetCharge() > 0) ?
"+" :
"-";
314 if (particle ==
"inmed")
316 else if (particle ==
"qgp")
330 double slope = dy / dx;
336 for (
int i = 1; i < nArray; i++) {
340 double slope = dy / dx;
358 double slope = dy / dx;
364 for (
int i = 1; i < nArray; i++) {
368 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.
Bool_t IsStsElectron(Int_t globalTrackIndex, Double_t momentum)
Identify electron in STS 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 GetWeightPair(const LmvmCand &cand1, const LmvmCand &cand2)
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 double MinvScale(double minv, const std::string &particle)
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)