]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGHF/hfe/AliHFEmcQA.h
Removing printout (Davide)
[u/mrichter/AliRoot.git] / PWGHF / hfe / AliHFEmcQA.h
CommitLineData
259c3296 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
50685501 15//
16// QA class of Heavy Flavor quark and fragmeted/decayed particles
17// -Check kinematics of Heavy Quarks/hadrons, and decayed leptons
18// pT, rapidity
19// decay lepton kinematics w/wo acceptance
20// heavy hadron decay length, electron pT fraction carried from decay
21// -Check yield of Heavy Quarks/hadrons
22// Number of produced heavy quark
23// Number of produced hadron of given pdg code
24//
259c3296 25
c2690925 26#ifndef ALIHFEMCQA_H
27#define ALIHFEMCQA_H
28
259c3296 29#ifndef ROOT_TObject
75d81601 30//#include <TObject.h>
259c3296 31#endif
32
33class TH1F;
34class TH2F;
70da6c5a 35class TList;
259c3296 36class TParticle;
37class TString;
faee3b18 38class AliMCEvent;
9bcfd1ab 39class AliGenEventHeader;
9250ffbf 40class AliMCParticle;
0792aa82 41class AliAODMCParticle;
c2690925 42class AliHFEcollection;
a8ef1999 43class TTreeSRedirector;
259c3296 44
45//________________________________________________________________
46class AliHFEmcQA: public TObject {
47
70da6c5a 48 public:
faee3b18 49 enum heavyType {kCharm=4, kBeauty=5, kOthers=6, kElectronPDG=11};
70da6c5a 50 enum qType {kQuark, kantiQuark, kHadron, keHadron, kDeHadron, kElectron, kElectron2nd};
afb48e1d 51 enum SourceType {kDirectCharm=1, kDirectBeauty=2, kBeautyCharm=3, kGamma=4, kPi0=5, kElse=6, kMisID=7, kEta=8, kOmega=9, kPhi=10, kEtaPrime=11, kRho0=12, kGammaPi0=13, kGammaEta=14, kGammaOmega=15, kGammaPhi=16, kGammaEtaPrime=17, kGammaRho0=18, kJpsi=19, kB2Jpsi=20, kKe3=21, kGammaB2M=22, kGammaD2M=23, kGammaEta2Pi0=24, kB2M=25, kD2M=26, kEta2Pi0=27, kScdryM=28};
70da6c5a 52 enum ProcessType {
53 kPairCreationFromq, kPairCreationFromg, kFlavourExitation, kGluonSplitting, kInitialPartonShower, kLightQuarkShower
54 };
9250ffbf 55 enum{
56 kBgPtBins = 44,
8c1c76e9 57 kElecBgSpecies = 6,
58 kCentBins = 11,
59 kBgLevels = 3
9250ffbf 60 };
61
70da6c5a 62
63 AliHFEmcQA();
64 AliHFEmcQA(const AliHFEmcQA &p); // copy constructor
65 AliHFEmcQA &operator=(const AliHFEmcQA &); // assignment operator
66
67 virtual ~AliHFEmcQA();
68
70da6c5a 69 TList *GetList() const { return fQAhistos; };
70 void PostAnalyze() const;
e3fc062d 71 void CreatDefaultHistograms(TList * const qaList); // create default histograms
5a516e0a 72 void CreateHistograms(Int_t kquark); // create histograms for mc qa analysis
faee3b18 73 void SetMCEvent(AliMCEvent* const mcEvent){fMCEvent = mcEvent;}
70da6c5a 74 void SetGenEventHeader(AliGenEventHeader* const mcHeader){fMCHeader=mcHeader;} // set stack pointer
75 void SetMCArray(TClonesArray* const mcarry){fMCArray=mcarry;} // set mcarray pointer
76 void Init();
77
5a516e0a 78 void GetQuarkKine(TParticle *part, Int_t iTrack, Int_t kquark); // get heavy quark kinematics distribution
79 void GetHadronKine(TParticle *part, Int_t kquark); // get heavy hadron kinematics distribution
80 void GetDecayedKine(TParticle *part, Int_t kquark, Int_t kdecayed); // get decay electron kinematics distribution
81 void GetDecayedKine(AliAODMCParticle *mcpart, Int_t kquark, Int_t kdecayed); // get decay electron kinematics for AOD
c2690925 82 void GetMesonKine(); // get meson and its decay electron pt spectra
5a516e0a 83 void EndOfEventAna(Int_t kquark); // run analysis which should be done at the end of the event loop
afb48e1d 84 Int_t GetSource(const TParticle * const mcpart) const; // return source id
85 Int_t GetElecSource(const AliVParticle * const mctrack) const;
86 Int_t GetElecSource(TParticle * const mcpart) const; // return electron source id
87 Int_t GetElecSource(const AliAODMCParticle * const mcpart) const;
88 Int_t GetSource(const AliVParticle * const mcpart) const; // return electron source id for AOD
5a516e0a 89 Double_t GetWeightFactor(AliMCParticle *mctrack, Int_t iBgLevel); // return best/lower/upper weighting factor for electron's mother meson
90 Double_t GetWeightFactor(const AliAODMCParticle * const mcpart, Int_t iBgLevel);
91 Int_t GetWeightCentralityBin(Float_t percentile) const; //translate the centrality percentile into the centrality bin of the reference weighting histograms for electron background
a8ef1999 92 void EnableDebugStreamer() { fIsDebugStreamerON = kTRUE;};
9250ffbf 93
94 void SetBackgroundWeightFactor(Double_t *elecBackgroundFactor, Double_t *binLimit);
a8ef1999 95 void SetContainerStep(Int_t containerStep) { fContainerStep = containerStep;};
96 void SetHFEImpactParameters(Double_t hfeimpactR, Double_t hfeimpactnsigmaR) {fHfeImpactR = hfeimpactR; fHfeImpactnsigmaR = hfeimpactnsigmaR; };
97 void SetTrkKine(Double_t pt, Double_t eta, Double_t phi) {fRecPt = pt; fRecEta = eta; fRecPhi = phi;};
98 void SetITSInfo(Double_t ilyrhit, Double_t ilyrstat) { fLyrhit = ilyrhit; fLyrstat = ilyrstat;};
8c1c76e9 99
100 void SetCentrality(Int_t centrality) { fCentrality = centrality; };
11ff28c5 101 void SetPercentrality(Int_t percentrality) { fPerCentrality = percentrality; };//centrality percentile
8c1c76e9 102 void SetPbPb() { fIsPbPb = kTRUE; };
103 void SetPP() { fIsPbPb = kFALSE; };
104 void SetPPMultiBin() { fIsppMultiBin = kFALSE; };
105 Bool_t IsPbPb() const { return fIsPbPb; };
106 Bool_t IsPP() const { return !fIsPbPb; };
107 Bool_t IsPPMultiBin() const { return fIsppMultiBin; };
dbe3abbe 108
70da6c5a 109 protected:
afb48e1d 110 Int_t GetMother(const AliVParticle * const track) const;
70da6c5a 111 void IdentifyMother(Int_t motherlabel, Int_t &motherpdg, Int_t &grandmotherlabel); //
5a516e0a 112 void HardScattering(Int_t kquark, Int_t &motherID, Int_t &mothertype, Int_t &motherlabel); // check if the quark is produced from hard scattering
70da6c5a 113 void ReportStrangeness(Int_t &motherID, Int_t &mothertype, Int_t &motherlabel); // report if the quark production process is unknown
114 Bool_t IsFromInitialShower(Int_t inputmotherlabel, Int_t &motherID, Int_t &mothertype, Int_t &motherlabel); // check if the quark is produced from initial parton shower
115 Bool_t IsFromFinalParton(Int_t inputmotherlabel, Int_t &motherID, Int_t &mothertype, Int_t &motherlabel); // check if the quark is produced from final parton shower
116
faee3b18 117 AliMCEvent* fMCEvent; // mcevent pointer
70da6c5a 118 AliGenEventHeader* fMCHeader; // mcheader pointer
119 TClonesArray *fMCArray; // mc array pointer
120
c2690925 121 static const Int_t fgkGluon=21; // gluon pdg code
122 static const Int_t fgkMaxGener=10; // ancester level wanted to be checked
123 static const Int_t fgkMaxIter=100; // number of iteration to find out matching particle
124 static const Int_t fgkqType=7; // number of particle type to be checked
a8ef1999 125 static const Int_t fgkEtaRanges=3; // cuts for different eta ranges
70da6c5a 126
127 struct AliHists{
128 TH1F *fPdgCode; // histogram to store particle pdg code
129 TH1F *fPt; // histogram to store pt
130 TH1F *fY; // histogram to store rapidity
131 TH1F *fEta; // histogram to store eta
75d81601 132
133 AliHists()
134 : fPdgCode()
135 , fPt()
136 , fY()
137 , fEta()
70da6c5a 138 {
75d81601 139 // default constructor
140 };
141 AliHists(const AliHists & p)
142 : fPdgCode(p.fPdgCode)
143 , fPt(p.fPt)
144 , fY(p.fY)
145 , fEta(p.fEta)
70da6c5a 146 {
75d81601 147 // copy constructor
148 };
149 AliHists &operator=(const AliHists &)
150 {
151 // assignment operator, not yet implemented
152 return *this;
153 }
70da6c5a 154 void FillList(TList *l) const;
155 };
156 struct AliHistsComm {
157 TH1F *fNq; // histogram to store number of quark
158 TH1F *fProcessID; // histogram to store process id
159 TH2F *fePtRatio; // fraction of electron pT from D or B hadron
ccc37cdc 160 TH2F *fPtCorr; // pt correlation between e and direct D or B
c2690925 161 TH2F *fPtCorrDp; // pt correlation between e and direct D+
162 TH2F *fPtCorrD0; // pt correlation between e and direct D0
163 TH2F *fPtCorrDrest; // pt correlation between e and direct D rest
70da6c5a 164 TH2F *fDePtRatio; // fraction of D electron pT from B hadron
165 TH2F *feDistance; // distance between electron production point to mother particle
166 TH2F *fDeDistance; // distance between D electron production point to mother particle
75d81601 167
cedf0381 168 TH2F *fPtCorrDinein; // pt correlation between e and direct D or B
169 TH2F *fPtCorrDineout; // pt correlation between e and direct D or B
170 TH2F *fPtCorrDoutein; // pt correlation between e and direct D or B
171 TH2F *fPtCorrDouteout; // pt correlation between e and direct D or B
172 TH2F *fPtCorrDpDinein; // pt correlation between e and direct D+
173 TH2F *fPtCorrDpDineout; // pt correlation between e and direct D+
174 TH2F *fPtCorrDpDoutein; // pt correlation between e and direct D+
175 TH2F *fPtCorrDpDouteout; // pt correlation between e and direct D+
176 TH2F *fPtCorrD0Dinein; // pt correlation between e and direct D0
177 TH2F *fPtCorrD0Dineout; // pt correlation between e and direct D0
178 TH2F *fPtCorrD0Doutein; // pt correlation between e and direct D0
179 TH2F *fPtCorrD0Douteout; // pt correlation between e and direct D0
180 TH2F *fPtCorrDrestDinein; // pt correlation between e and direct D rest
181 TH2F *fPtCorrDrestDineout; // pt correlation between e and direct D rest
182 TH2F *fPtCorrDrestDoutein; // pt correlation between e and direct D rest
183 TH2F *fPtCorrDrestDouteout; // pt correlation between e and direct D rest
184
185 TH2F *fEtaCorrD; // eta correlation between e and direct D
186 TH2F *fEtaCorrDp; // eta correlation between e and direct D
187 TH2F *fEtaCorrD0; // eta correlation between e and direct D
188 TH2F *fEtaCorrDrest; // eta correlation between e and direct D
189 TH2F *fEtaCorrGD; // eta correlation between e and direct D
190 TH2F *fEtaCorrGDp; // eta correlation between e and direct D
191 TH2F *fEtaCorrGD0; // eta correlation between e and direct D
192 TH2F *fEtaCorrGDrest; // eta correlation between e and direct D
193
194 TH2F *fEtaCorrB; // eta correlation between e and B
195 TH2F *fEtaCorrGB; // eta correlation between e and B
196 TH2F *fPtCorrBinein; // eta correlation between e and B
197 TH2F *fPtCorrBineout; // eta correlation between e and B
198 TH2F *fPtCorrBoutein; // eta correlation between e and B
199 TH2F *fPtCorrBouteout; // eta correlation between e and B
200
75d81601 201 AliHistsComm()
202 : fNq()
203 , fProcessID()
204 , fePtRatio()
ccc37cdc 205 , fPtCorr()
c2690925 206 , fPtCorrDp()
207 , fPtCorrD0()
208 , fPtCorrDrest()
75d81601 209 , fDePtRatio()
210 , feDistance()
211 , fDeDistance()
cedf0381 212
213 , fPtCorrDinein()
214 , fPtCorrDineout()
215 , fPtCorrDoutein()
216 , fPtCorrDouteout()
217 , fPtCorrDpDinein()
218 , fPtCorrDpDineout()
219 , fPtCorrDpDoutein()
220 , fPtCorrDpDouteout()
221 , fPtCorrD0Dinein()
222 , fPtCorrD0Dineout()
223 , fPtCorrD0Doutein()
224 , fPtCorrD0Douteout()
225 , fPtCorrDrestDinein()
226 , fPtCorrDrestDineout()
227 , fPtCorrDrestDoutein()
228 , fPtCorrDrestDouteout()
229
230 , fEtaCorrD()
231 , fEtaCorrDp()
232 , fEtaCorrD0()
233 , fEtaCorrDrest()
234 , fEtaCorrGD()
235 , fEtaCorrGDp()
236 , fEtaCorrGD0()
237 , fEtaCorrGDrest()
238
239 , fEtaCorrB()
240 , fEtaCorrGB()
241 , fPtCorrBinein()
242 , fPtCorrBineout()
243 , fPtCorrBoutein()
244 , fPtCorrBouteout()
70da6c5a 245 {
75d81601 246 // default constructor
247 };
248 AliHistsComm(const AliHistsComm & p)
249 : fNq(p.fNq)
250 , fProcessID(p.fProcessID)
251 , fePtRatio(p.fePtRatio)
ccc37cdc 252 , fPtCorr(p.fPtCorr)
c2690925 253 , fPtCorrDp(p.fPtCorrDp)
254 , fPtCorrD0(p.fPtCorrD0)
255 , fPtCorrDrest(p.fPtCorrDrest)
75d81601 256 , fDePtRatio(p.fDePtRatio)
257 , feDistance(p.feDistance)
258 , fDeDistance(p.fDeDistance)
cedf0381 259
260 , fPtCorrDinein(p.fPtCorrDinein)
261 , fPtCorrDineout(p.fPtCorrDineout)
262 , fPtCorrDoutein(p.fPtCorrDoutein)
263 , fPtCorrDouteout(p.fPtCorrDouteout)
264 , fPtCorrDpDinein(p.fPtCorrDpDinein)
265 , fPtCorrDpDineout(p.fPtCorrDpDineout)
266 , fPtCorrDpDoutein(p.fPtCorrDpDoutein)
267 , fPtCorrDpDouteout(p.fPtCorrDpDouteout)
268 , fPtCorrD0Dinein(p.fPtCorrD0Dinein)
269 , fPtCorrD0Dineout(p.fPtCorrD0Dineout)
270 , fPtCorrD0Doutein(p.fPtCorrD0Doutein)
271 , fPtCorrD0Douteout(p.fPtCorrD0Douteout)
272 , fPtCorrDrestDinein(p.fPtCorrDrestDinein)
273 , fPtCorrDrestDineout(p.fPtCorrDrestDineout)
274 , fPtCorrDrestDoutein(p.fPtCorrDrestDoutein)
275 , fPtCorrDrestDouteout(p.fPtCorrDrestDouteout)
276
277 , fEtaCorrD(p.fEtaCorrD)
278 , fEtaCorrDp(p.fEtaCorrDp)
279 , fEtaCorrD0(p.fEtaCorrD0)
280 , fEtaCorrDrest(p.fEtaCorrDrest)
281 , fEtaCorrGD(p.fEtaCorrGD)
282 , fEtaCorrGDp(p.fEtaCorrGDp)
283 , fEtaCorrGD0(p.fEtaCorrGD0)
284 , fEtaCorrGDrest(p.fEtaCorrGDrest)
285
286 , fEtaCorrB(p.fEtaCorrB)
287 , fEtaCorrGB(p.fEtaCorrGB)
288 , fPtCorrBinein(p.fPtCorrBinein)
289 , fPtCorrBineout(p.fPtCorrBineout)
290 , fPtCorrBoutein(p.fPtCorrBoutein)
291 , fPtCorrBouteout(p.fPtCorrBouteout)
70da6c5a 292 {
75d81601 293 // copy constructor
294 };
295 AliHistsComm &operator=(const AliHistsComm &)
296 {
297 // assignment operator, not yet implemented
298 return *this;
299 }
70da6c5a 300 void FillList(TList *l) const;
301 };
259c3296 302
11ff28c5 303 AliHists fHist[3][7][6][11]; // struct of histograms to store kinematics of given particles
faee3b18 304 AliHistsComm fHistComm[2][6]; // struct of additional histograms of given particles
ccc37cdc 305 TH2F *fhD[9]; // D meson pt,Y spectra
259c3296 306
70da6c5a 307 TList *fQAhistos; // Container for QA histos
c2690925 308 AliHFEcollection *fMCQACollection; //! Tasks own QA collection
bf892a6a 309 TParticle *fHeavyQuark[50]; //! store pointer of heavy flavour quark
70da6c5a 310 Int_t fIsHeavy[2]; // count of heavy flavour
311 Int_t fNparents; // number of heavy hadrons to be considered
312 Int_t fParentSelect[2][7]; // heavy hadron species
259c3296 313
8c1c76e9 314 Double_t fElecBackgroundFactor[kBgLevels][kCentBins][kElecBgSpecies][kBgPtBins]; // Electron background factors
76d0b522 315 Double_t fBinLimit[kBgPtBins+1]; // Electron background bins
8c1c76e9 316
317private:
76d0b522 318 Int_t fCentrality; // Centrality
319 Int_t fPerCentrality; // Centrality percentile
320 Bool_t fIsPbPb; // Analysis Type: pp or PbPb
321 Bool_t fIsppMultiBin; // pp multiplicity bin analysis
322 Int_t fContainerStep; // step the weighting factor called
a8ef1999 323 Bool_t fIsDebugStreamerON; // check if the debugstreamer is on
324
76d0b522 325 Double_t fRecPt; //reconstructed pt
326 Double_t fRecEta; //reconstructed eta
327 Double_t fRecPhi; //reconstructed phi
328 Double_t fLyrhit; //its layer hit
329 Double_t fLyrstat; //its layer status
a8ef1999 330
76d0b522 331 Double_t fHfeImpactR; //absolute impact parameter R
332 Double_t fHfeImpactnsigmaR; //absolute impact parameter sigma R
a8ef1999 333
76d0b522 334 TTreeSRedirector *fTreeStream; //! TreeStream
9250ffbf 335
70da6c5a 336 ClassDef(AliHFEmcQA,1);
259c3296 337};
338
339#endif