37 #ifndef __StEmbeddingQAUtilities_h__
38 #define __StEmbeddingQAUtilities_h__
48 namespace StEmbeddingQAConst
65 mNCategory = mNEmbedding + mNReal
86 Bool_t
isMc(
const TString name)
const ;
87 Bool_t
isMatched(
const TString name)
const ;
88 Bool_t
isGhost(
const TString name)
const ;
91 Bool_t
isPrimary(
const TString name)
const ;
92 Bool_t
isGlobal(
const TString name)
const ;
94 Bool_t
isReal(
const TString name)
const ;
99 Bool_t
isPiPlus(
const Int_t geantid)
const ;
100 Bool_t
isPiMinus(
const Int_t geantid)
const ;
101 Bool_t
isKPlus(
const Int_t geantid)
const ;
102 Bool_t
isKMinus(
const Int_t geantid)
const ;
103 Bool_t
isProton(
const Int_t geantid)
const ;
104 Bool_t
isPBar(
const Int_t geantid)
const ;
106 Bool_t
isPions(
const Int_t geantid)
const ;
107 Bool_t
isKaons(
const Int_t geantid)
const ;
108 Bool_t
isProtons(
const Int_t geantid)
const ;
109 Bool_t
isEPiKP(
const Int_t geantid)
const ;
110 Bool_t
isGamma(
const Int_t geantid)
const ;
117 Int_t
getRunId(
const Int_t runnumber,
const Int_t year)
const ;
118 Int_t
getRunNumber(
const Int_t runid,
const Int_t year)
const ;
127 Int_t
getGeantId(
const UInt_t geantid)
const ;
131 Float_t getPtMaxCut()
const ;
132 Float_t getEtaCut()
const ;
133 Short_t getNHitCut()
const ;
134 Float_t getNHitToNPossCut()
const ;
135 Float_t getDcaCut()
const ;
136 Double_t getNSigmaCut()
const ;
137 Bool_t getBTofPid()
const ;
138 Float_t getRapidityCut()
const ;
139 Float_t getZVertexCut()
const ;
140 Int_t getRefMultMinCut()
const ;
141 Int_t getRefMultMaxCut()
const ;
142 std::vector<UInt_t> getTriggerIdCut()
const ;
146 Float_t setPtMaxCut(
const Float_t val) ;
147 Float_t setEtaCut(
const Float_t val) ;
148 Short_t setNHitCut(
const Short_t val) ;
149 Float_t setNHitToNPossCut(
const Float_t val) ;
150 Float_t setDcaCut(
const Float_t val) ;
151 Double_t setNSigmaCut(
const Double_t val) ;
152 Bool_t setBTofPid(
const Bool_t val) ;
153 Float_t setRapidityCut(
const Float_t val) ;
154 Float_t setZVertexCut(
const Float_t val) ;
155 Int_t setRefMultMinCut(
const Int_t val) ;
156 Int_t setRefMultMaxCut(
const Int_t val) ;
157 void addTriggerIdCut(
const UInt_t val) ;
160 Bool_t
isPtOk(
const Float_t pt)
const ;
161 Bool_t isEtaOk(
const Float_t eta)
const ;
162 Bool_t isNHitsFitOk(
const Float_t nHitsFit)
const ;
163 Bool_t isNHitToNPossOk(
const Float_t ratio)
const ;
164 Bool_t isDcaOk(
const Float_t dca)
const ;
165 Bool_t isNSigmaOk(
const Float_t nsigma)
const ;
166 Bool_t isRapidityOk(
const Float_t y)
const ;
167 Bool_t isZVertexOk(
const Float_t vz)
const ;
168 Bool_t isRefMultOk(
const Int_t refMult)
const ;
169 Bool_t isTriggerOk(
const UInt_t trigger)
const ;
182 Bool_t CompareString(
const TString s0,
const TString s1,
const Bool_t isExact=kFALSE)
const ;
185 Category mCategory[StEmbeddingQAConst::mNEmbedding] ;
186 TString mCategoryName[StEmbeddingQAConst::mNCategory] ;
187 TString mCategoryTitle[StEmbeddingQAConst::mNCategory] ;
188 std::map<const TString, const UInt_t> mCategoryId ;
198 Float_t mNHitToNPossCut ;
200 Double_t mNSigmaCut ;
202 Float_t mRapidityCut ;
203 Float_t mZVertexCut ;
204 Int_t mRefMultMinCut ;
205 Int_t mRefMultMaxCut ;
206 std::vector<UInt_t> mTriggerIdCut ;
210 Int_t getYearNumber(
const Int_t year)
const ;
214 UInt_t convertGeantId(
const UInt_t geantid)
const ;
220 inline Int_t StEmbeddingQAUtilities::getYearNumber(
const Int_t year)
const {
return (year - 1999) * 1000000 ; }
225 return runnumber + getYearNumber(year) ;
231 return runid - getYearNumber(year) ;
Bool_t isMatchedGlobal(const TString name) const
Check whether the track is Contaminated pair or not.
Bool_t isElectrons(const Int_t geantid) const
Check the input geantid is pbar.
void PrintCuts() const
Print all track selections.
Bool_t isKPlus(const Int_t geantid) const
Check the input geantid is pi-.
Bool_t isGlobal(const TString name) const
Check whether the track is primary track or not.
Bool_t isEPiKP(const Int_t geantid) const
Check the input geantid is protons.
Bool_t isGhost(const TString name) const
Check whether the track is Matched pair or not.
Bool_t isReal(const TString name) const
Check whether the track is embedding pair or not.
Bool_t isPrimary(const TString name) const
Check whether the track is Contaminated pair or not.
Bool_t isEmbedding(const TString name) const
Check whether the track is global track or not.
Float_t setPtMinCut(const Float_t val)
Set track and event selections, return new value.
Category getCategory(const UInt_t id) const
Bool_t isElectron(const Int_t geantid) const
Check whether the track is real track or not.
Bool_t isGamma(const Int_t geantid) const
Check the input geantid is e/pi/K/p.
Bool_t isPBar(const Int_t geantid) const
Check the input geantid is p.
Top level class for the MiniMcTree, containing event-wise information and the McTrack, and all TrackPair collections.
TString getCategoryName(const UInt_t id) const
Category from category id.
void setStyle() const
Check the input geantid is gamma.
Bool_t isContaminated(const TString name) const
Check whether the track is Ghost pair or not.
StParticleDefinition * getParticleDefinition(const UInt_t geantid) const
runnumber = runid - (year - 2000 + 1) * 10^6
Bool_t isPiMinus(const Int_t geantid) const
Check the input geantid is pi+.
Bool_t isProton(const Int_t geantid) const
Check the input geantid is K-.
Int_t getGeantId(const UInt_t geantid) const
Return geant id.
Bool_t isPositron(const Int_t geantid) const
Check the input geantid is e-.
Int_t getRunNumber(const Int_t runid, const Int_t year) const
get runid from runnumber
Bool_t isProtons(const Int_t geantid) const
Check the input geantid is kaons.
Float_t getPtMinCut() const
Get track and event selections.
Int_t getRunId(const Int_t runnumber, const Int_t year) const
Set font, title and label styles.
Bool_t isGeantIdOk(const UInt_t geantid) const
Check geant id is defined in StParticleTable or not.
static StEmbeddingQAUtilities * instance()
Get instance.
Bool_t isPions(const Int_t geantid) const
Check the input geantid is electrons.
Bool_t isKMinus(const Int_t geantid) const
Check the input geantid is K+.
virtual ~StEmbeddingQAUtilities()
Destructor.
TString getCategoryTitle(const UInt_t id) const
Category name from category id.
Bool_t isKaons(const Int_t geantid) const
Check the input geantid is pions.
Bool_t isMatched(const TString name) const
Check whether the track is MC track or not.
Int_t getCategoryId(const TString name) const
Category title from category id.
Bool_t isPtOk(const Float_t pt) const
Track and event cuts.
Bool_t isMc(const TString name) const
Category id from category name.
Bool_t isPiPlus(const Int_t geantid) const
Check the input geantid is e+.