CbmRoot
Loading...
Searching...
No Matches
LmvmCand.h
Go to the documentation of this file.
1/* Copyright (C) 2015-2021 Justus-Liebig-Universitaet Giessen, Giessen
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Elena Lebedeva [committer], Semen Lebedev */
4
5#ifndef LMVM_CAND_H
6#define LMVM_CAND_H
7
8#include "TVector3.h"
9
10#include "LmvmDef.h"
11
12class LmvmCand {
13public:
15
17 {
19 fMcMotherId = -1;
20 fStsMcTrackId = -1;
21 fRichMcTrackId = -1;
22 fTrdMcTrackId = -1;
23 fTofMcTrackId = -1;
24 }
25
27 {
28 if (cut == ELmvmTopologyCut::TT) { fIsTtCut = value; }
29 if (cut == ELmvmTopologyCut::ST) { fIsStCut = value; }
30 if (cut == ELmvmTopologyCut::RT) { fIsRtCut = value; }
31 }
32
33 bool IsCutTill(ELmvmAnaStep step) const
34 {
35 if (step == ELmvmAnaStep::Mc || step == ELmvmAnaStep::Acc || step == ELmvmAnaStep::Reco) return true;
36 if (step == ELmvmAnaStep::Chi2Prim && fIsChi2Prim) return true;
37 if (step == ELmvmAnaStep::ElId && IsCutTill(ELmvmAnaStep::Chi2Prim) && fIsElectron) return true;
38 if (step == ELmvmAnaStep::GammaCut && IsCutTill(ELmvmAnaStep::ElId) && fIsGammaCut) return true;
41 if (step == ELmvmAnaStep::StCut && IsCutTill(ELmvmAnaStep::Mvd2Cut) && fIsStCut) return true;
42 if (step == ELmvmAnaStep::RtCut && IsCutTill(ELmvmAnaStep::StCut) && fIsRtCut) return true;
43 if (step == ELmvmAnaStep::TtCut && IsCutTill(ELmvmAnaStep::RtCut) && fIsTtCut) return true;
44 if (step == ELmvmAnaStep::PtCut && IsCutTill(ELmvmAnaStep::TtCut) && fIsPtCut) return true;
45 return false;
46 }
47
48 // track parameters
49 TVector3 fPosition;
50 TVector3 fMomentum;
51 double fMass = 0.;
52 double fMassSig = -1.; // mass of signal mother (remains '-1' if candidate is not signal electron)
53 double fEnergy = 0.;
54 double fRapidity = 0.;
55 int fCharge = 0;
56 double fChi2Prim = 0.;
57 double fChi2Sts = 0.;
58 double fChi2Rich = 0.;
59 double fChi2Trd = 0.;
60 double fChi2Tof = 0.;
61 double fLength = 0.; // length of according global track
62 double fTime = 0.; //
63 double fTofDist = -1.; // Hit-Track-Distance in ToF
64
65 // To investigate misidentifications in single sub detectors
66 bool fIsRichElectron = false;
67 bool fIsTrdElectron = false;
68 bool fIsTofElectron = false;
69
70 int fMcMotherId = -1;
71 int fEventNumber = 0;
72 int fStsMcTrackId = -1;
74 int fTrdMcTrackId = -1;
75 int fTofMcTrackId = -1;
76 int fStsInd = -1;
77 int fRichInd = -1;
78 int fTrdInd = -1;
79 int fTofInd = -1; // TODO: change to "fTofHitInd"
80 int fTofTrackInd = -1;
81 int fMcPdg = -1;
82 int fGTrackInd = -1;
83 double fRichAnn = 0.;
84 double fTrdAnn = 0.;
85 double fMass2 = 0.;
86 double fTrdLikeEl = -1.;
87 double fTrdLikePi = -1.;
88
89 // Cuts. If true then cut is passed
90 bool fIsChi2Prim = false;
91 bool fIsElectron = false;
92 bool fIsGammaCut = true; // Will be set to 'false' as soon as a partner with minv < 25 MeV is found
93 bool fIsMvd1Cut = false;
94 bool fIsMvd2Cut = false;
95 bool fIsTtCut = false;
96 bool fIsStCut = false;
97 bool fIsRtCut = false;
98 bool fIsPtCut = false;
99
100 // MC
102 bool IsMcSignal() const { return fMcSrc == ELmvmSrc::Signal; }
103 bool IsMcPi0() const { return fMcSrc == ELmvmSrc::Pi0; }
104 bool IsMcGamma() const { return fMcSrc == ELmvmSrc::Gamma; }
105 bool IsMcEta() const { return fMcSrc == ELmvmSrc::Eta; }
106 // for candidates BG is all candidates which are not signal
107 bool fIsMcBg() const { return fMcSrc != ELmvmSrc::Signal; }
108};
109
110#endif
ELmvmSrc
Definition LmvmDef.h:23
ELmvmAnaStep
Definition LmvmDef.h:34
ELmvmTopologyCut
Definition LmvmDef.h:15
double fChi2Rich
Definition LmvmCand.h:58
double fChi2Tof
Definition LmvmCand.h:60
bool IsMcPi0() const
Definition LmvmCand.h:103
int fMcPdg
Definition LmvmCand.h:81
bool fIsTrdElectron
Definition LmvmCand.h:67
bool fIsGammaCut
Definition LmvmCand.h:92
bool fIsRtCut
Definition LmvmCand.h:97
int fRichInd
Definition LmvmCand.h:77
double fTrdLikeEl
Definition LmvmCand.h:86
double fChi2Sts
Definition LmvmCand.h:57
int fGTrackInd
Definition LmvmCand.h:82
int fStsMcTrackId
Definition LmvmCand.h:72
int fCharge
Definition LmvmCand.h:55
double fEnergy
Definition LmvmCand.h:53
int fTofMcTrackId
Definition LmvmCand.h:75
int fEventNumber
Definition LmvmCand.h:71
double fMassSig
Definition LmvmCand.h:52
bool IsMcSignal() const
Definition LmvmCand.h:102
bool fIsRichElectron
Definition LmvmCand.h:66
void SetIsTopologyCutElectron(ELmvmTopologyCut cut, bool value)
Definition LmvmCand.h:26
double fTrdLikePi
Definition LmvmCand.h:87
LmvmCand()
Definition LmvmCand.h:14
bool fIsTofElectron
Definition LmvmCand.h:68
int fTofTrackInd
Definition LmvmCand.h:80
double fRapidity
Definition LmvmCand.h:54
double fChi2Trd
Definition LmvmCand.h:59
bool fIsElectron
Definition LmvmCand.h:91
void ResetMcParams()
Definition LmvmCand.h:16
bool fIsChi2Prim
Definition LmvmCand.h:90
bool IsMcEta() const
Definition LmvmCand.h:105
double fTofDist
Definition LmvmCand.h:63
TVector3 fPosition
Definition LmvmCand.h:49
double fMass2
Definition LmvmCand.h:85
double fRichAnn
Definition LmvmCand.h:83
int fTrdMcTrackId
Definition LmvmCand.h:74
bool fIsTtCut
Definition LmvmCand.h:95
int fTofInd
Definition LmvmCand.h:79
bool fIsMvd2Cut
Definition LmvmCand.h:94
int fStsInd
Definition LmvmCand.h:76
bool fIsMcBg() const
Definition LmvmCand.h:107
int fMcMotherId
Definition LmvmCand.h:70
double fMass
Definition LmvmCand.h:51
int fRichMcTrackId
Definition LmvmCand.h:73
double fTime
Definition LmvmCand.h:62
bool IsMcGamma() const
Definition LmvmCand.h:104
ELmvmSrc fMcSrc
Definition LmvmCand.h:101
int fTrdInd
Definition LmvmCand.h:78
bool fIsMvd1Cut
Definition LmvmCand.h:93
double fChi2Prim
Definition LmvmCand.h:56
bool fIsStCut
Definition LmvmCand.h:96
TVector3 fMomentum
Definition LmvmCand.h:50
double fTrdAnn
Definition LmvmCand.h:84
bool fIsPtCut
Definition LmvmCand.h:98
double fLength
Definition LmvmCand.h:61
bool IsCutTill(ELmvmAnaStep step) const
Definition LmvmCand.h:33