StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEmbeddingQATrack.h
1 //----------------------------------------------------------------------------------------------------
2 // Class StEmbeddingQATrack
3 // Store relevant track informations for the embedding/real data QA
4 //----------------------------------------------------------------------------------------------------
5 /****************************************************************************************************
6  * $Id: StEmbeddingQATrack.h,v 1.13 2019/07/10 05:46:22 zhux Exp $
7  * $Log: StEmbeddingQATrack.h,v $
8  * Revision 1.13 2019/07/10 05:46:22 zhux
9  * added option for btof pid for primary real tracks
10  *
11  * Revision 1.12 2011/04/01 05:00:18 hmasui
12  * Move track cuts into StEmbeddingQAUtilities, added global momentum for embedding
13  *
14  * Revision 1.11 2011/02/11 23:21:28 hmasui
15  * Added missing functions getNSigma...()
16  *
17  * Revision 1.10 2011/02/11 03:55:48 hmasui
18  * Change geantid type to integer
19  *
20  * Revision 1.9 2011/01/12 21:36:17 hmasui
21  * Add nHitsFit/nHitsPoss cut
22  *
23  * Revision 1.8 2010/05/14 19:49:07 hmasui
24  * Add rapidity cut
25  *
26  * Revision 1.7 2010/04/24 20:20:11 hmasui
27  * Add geant process, and modift the type of parent, parent-parent geantid to match the data members in minimc tree
28  *
29  * Revision 1.6 2010/02/16 02:11:49 hmasui
30  * Add parent-parent geantid
31  *
32  * Revision 1.5 2009/12/22 21:39:31 hmasui
33  * Add comments for functions and members
34  *
35  ****************************************************************************************************/
36 
37 #ifndef _StEmbeddingQATrack_h__
38 #define _StEmbeddingQATrack_h__
39 
40 #include "TString.h"
41 #include "StLorentzVectorD.hh"
42 
43 class StTinyMcTrack ;
44 class StMiniMcPair ;
45 class StContamPair ;
46 class StMuTrack ;
47 
49  public:
52 
54  StEmbeddingQATrack(const TString name, const StTinyMcTrack& track) ;
55 
57  StEmbeddingQATrack(const TString name, StMiniMcPair* track) ;
58 
60  StEmbeddingQATrack(const TString name, StContamPair* track) ;
61 
63  // Need to put the geantid by hand
64  // in order to calculate rapidity (and maybe invariant mass if you like)
65  // since the real tracks don't have geantid
66  StEmbeddingQATrack(const TString name, const StMuTrack& track, const Int_t geantid, const Bool_t btof);
67 
69  virtual ~StEmbeddingQATrack();
70 
71  Bool_t isPtAndEtaOk() const ;
72  Bool_t isRapidityOk(const Double_t ycut) const ;
73 
74  Bool_t isNHitOk() const ;
75  Bool_t isNHitToNPossOk() const ;
76  Bool_t isDcaOk() const ;
77  Bool_t isCommonHitOk() const ;
78 
80  // if ( real tracks ) return |nSigma| < 2
81  // else return true (i.e. no nSigma cut)
82  Bool_t isNSigmaOk(const Int_t geantid) const ;
83 
84  StLorentzVectorD getVectorMc() const ;
85  StLorentzVectorD getVectorRc() const ;
86  StLorentzVectorD getVectorPr() const ;
87  StLorentzVectorD getVectorGl() const ;
88 
89  Short_t getNCommonHit() const ;
90  Int_t getParentParentGeantId() const ;
91  Int_t getParentGeantId() const ;
92  Int_t getGeantId() const ;
93  Int_t getGeantProcess() const ;
94  Short_t getNHit() const ;
95  Short_t getNHitPoss() const ;
96  Short_t getCharge() const ;
97 
98  Double_t getMassMc() const ;
99  Float_t getPtMc() const ;
100  Float_t getPxMc() const ;
101  Float_t getPyMc() const ;
102  Float_t getPzMc() const ;
103  Float_t getPMc() const ;
104  Float_t getEtaMc() const ;
105  Float_t getRapidityMc() const ;
106  Double_t getMassRc() const ;
107  Float_t getPtRc() const ;
108  Float_t getPxRc() const ;
109  Float_t getPyRc() const ;
110  Float_t getPzRc() const ;
111  Float_t getPRc() const ;
112  Float_t getEtaRc() const ;
113  Float_t getRapidityRc() const ;
114 
115  Float_t getPhi() const ;
116  Float_t getdEdx() const ;
117  Float_t getdEdxkeV() const ;
118  Float_t getDcaGl() const ;
119 
120  // nSigma (e, pi, K, p) for real data
121  Double_t getNSigmaElectron() const ;
122  Double_t getNSigmaPion() const ;
123  Double_t getNSigmaKaon() const ;
124  Double_t getNSigmaProton() const ;
125 
127  void print() const ;
128 
130  const TString getName() const ;
131 
132  private:
133  const Short_t mNCommonHit ;
134  const Int_t mParentParentGeantId ;
135  const Int_t mParentGeantId ;
136  const Int_t mGeantId ;
137  const Int_t mGeantProcess ;
138  const Short_t mNHit ;
139  const Short_t mNHitPoss ;
140  const Short_t mCharge ;
141  const StLorentzVectorD mVectorMc ;
142  const StLorentzVectorD mVectorRc ;
143  const StLorentzVectorD mVectorGl ;
144  const Float_t mPhi ;
145  const Float_t mdEdx ;
146  const Float_t mDcaGl ;
147  const Double_t mNSigmaElectron ;
148  const Double_t mNSigmaPion ;
149  const Double_t mNSigmaKaon ;
150  const Double_t mNSigmaProton ;
151 
152  TString mName ;
153 
154  ClassDef(StEmbeddingQATrack, 2)
155 };
156 
157 inline Short_t StEmbeddingQATrack::getNCommonHit() const { return mNCommonHit ; }
158 inline Int_t StEmbeddingQATrack::getParentParentGeantId() const { return mParentParentGeantId ; }
159 inline Int_t StEmbeddingQATrack::getParentGeantId() const { return mParentGeantId ; }
160 inline Int_t StEmbeddingQATrack::getGeantId() const { return mGeantId ; }
161 inline Int_t StEmbeddingQATrack::getGeantProcess() const { return mGeantProcess ; }
162 inline Short_t StEmbeddingQATrack::getNHit() const { return mNHit ; }
163 inline Short_t StEmbeddingQATrack::getNHitPoss() const { return mNHitPoss ; }
164 inline Short_t StEmbeddingQATrack::getCharge() const { return mCharge ; }
165 
166 inline Double_t StEmbeddingQATrack::getMassMc() const { return mVectorMc.m() ; }
167 inline Float_t StEmbeddingQATrack::getPMc() const { return mVectorMc.vect().mag() ; }
168 inline Float_t StEmbeddingQATrack::getPtMc() const { return mVectorMc.perp() ; }
169 inline Float_t StEmbeddingQATrack::getPxMc() const { return mVectorMc.x() ; }
170 inline Float_t StEmbeddingQATrack::getPyMc() const { return mVectorMc.y() ; }
171 inline Float_t StEmbeddingQATrack::getPzMc() const { return mVectorMc.z() ; }
172 inline Float_t StEmbeddingQATrack::getEtaMc() const { return mVectorMc.pseudoRapidity() ; }
173 inline Float_t StEmbeddingQATrack::getRapidityMc() const { return mVectorMc.rapidity() ; }
174 inline Double_t StEmbeddingQATrack::getMassRc() const { return mVectorRc.m() ; }
175 inline Float_t StEmbeddingQATrack::getPRc() const { return mVectorRc.vect().mag() ; }
176 inline Float_t StEmbeddingQATrack::getPtRc() const { return mVectorRc.perp() ; }
177 inline Float_t StEmbeddingQATrack::getPxRc() const { return mVectorRc.x() ; }
178 inline Float_t StEmbeddingQATrack::getPyRc() const { return mVectorRc.y() ; }
179 inline Float_t StEmbeddingQATrack::getPzRc() const { return mVectorRc.z() ; }
180 inline Float_t StEmbeddingQATrack::getEtaRc() const { return mVectorRc.pseudoRapidity() ; }
181 inline Float_t StEmbeddingQATrack::getRapidityRc() const { return mVectorRc.rapidity() ; }
182 
183 inline Float_t StEmbeddingQATrack::getPhi() const { return mPhi ; }
184 inline Float_t StEmbeddingQATrack::getdEdx() const { return mdEdx ; }
185 inline Float_t StEmbeddingQATrack::getdEdxkeV() const { return mdEdx * 1.0e+06 ; }
186 inline Float_t StEmbeddingQATrack::getDcaGl() const { return mDcaGl ; }
187 
188 inline Double_t StEmbeddingQATrack::getNSigmaElectron() const { return mNSigmaElectron ; }
189 inline Double_t StEmbeddingQATrack::getNSigmaPion() const { return mNSigmaPion ; }
190 inline Double_t StEmbeddingQATrack::getNSigmaKaon() const { return mNSigmaKaon ; }
191 inline Double_t StEmbeddingQATrack::getNSigmaProton() const { return mNSigmaProton ; }
192 
193 inline const TString StEmbeddingQATrack::getName() const { return mName ; }
194 
195 #endif
196 
197 
void print() const
Get nsigma for protons/anti-protons.
Float_t getPtMc() const
Get MC particle mass.
Float_t getPxRc() const
Get reconstructed transverse momentum (primary)
Short_t getNCommonHit() const
Get reconstructed 4-momentum (global)
Double_t getNSigmaKaon() const
Get nsigma for pions.
Float_t getRapidityRc() const
Get reconstructed pseudorapidity (primary)
Float_t getPtRc() const
Get reconstructed particle mass (primary)
Double_t getNSigmaProton() const
Get nsigma for kaons.
Int_t getParentParentGeantId() const
Get number of common hits.
Float_t getPRc() const
Get reconstructed pz (primary)
Int_t getParentGeantId() const
Get parent geant id.
Float_t getPyMc() const
Get MC px.
Float_t getPzRc() const
Get reconstructed py (primary)
Bool_t isDcaOk() const
Nhits/NhitsPoss cut.
Float_t getPhi() const
Get reconstructed rapidity (primary)
Float_t getPxMc() const
Get MC transverse momentum.
Short_t getNHit() const
Get geant process.
Double_t getNSigmaPion() const
Get nsigma for electrons/positrons.
Short_t getCharge() const
Get maximum number of fit points.
Float_t getdEdx() const
Get azimuthal angle.
Int_t getGeantId() const
Get parent geant id.
Double_t getNSigmaElectron() const
Get global dca.
Double_t getMassRc() const
Get MC rapidity.
StEmbeddingQATrack()
Default constructor.
StLorentzVectorD getVectorMc() const
Float_t getPyRc() const
Get reconstructed px (primary)
const TString getName() const
Get track node name.
StLorentzVectorD getVectorRc() const
Get MC 4-momentum.
Short_t getNHitPoss() const
Get number of fit points.
Bool_t isNHitOk() const
Rapidity cut.
Float_t getdEdxkeV() const
Get dE/dx.
Bool_t isNHitToNPossOk() const
Nhits cut.
virtual ~StEmbeddingQATrack()
Destructor.
Float_t getEtaMc() const
Get MC momentum.
Float_t getPMc() const
Get MC pz.
Bool_t isCommonHitOk() const
Dca cut.
Bool_t isNSigmaOk(const Int_t geantid) const
Common hit cut.
StLorentzVectorD getVectorGl() const
Get reconstructed 4-momentum (primary &lt;- return getVectorRc())
Int_t getGeantProcess() const
Get geant id.
Bool_t isRapidityOk(const Double_t ycut) const
Pt and eta cuts.
Float_t getEtaRc() const
Get reconstructed momentum (primary)
Float_t getDcaGl() const
Get dE/dx in keV unit.
Bool_t isPtAndEtaOk() const
Float_t getRapidityMc() const
Get MC pseudorapidity.
StLorentzVectorD getVectorPr() const
Get reconstructed 4-momentum (primary)
Float_t getPzMc() const
Get MC py.
Double_t getMassMc() const
Get charge.