]>
Commit | Line | Data |
---|---|---|
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 | ||
33 | class TH1F; | |
34 | class TH2F; | |
70da6c5a | 35 | class TList; |
259c3296 | 36 | class TParticle; |
37 | class TString; | |
faee3b18 | 38 | class AliMCEvent; |
9bcfd1ab | 39 | class AliGenEventHeader; |
9250ffbf | 40 | class AliMCParticle; |
0792aa82 | 41 | class AliAODMCParticle; |
c2690925 | 42 | class AliHFEcollection; |
a8ef1999 | 43 | class TTreeSRedirector; |
259c3296 | 44 | |
45 | //________________________________________________________________ | |
46 | class 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}; |
c2690925 | 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}; |
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 |
a8ef1999 | 72 | void CreateHistograms(const 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 | ||
78 | void GetQuarkKine(TParticle *part, Int_t iTrack, const Int_t kquark); // get heavy quark kinematics distribution | |
79 | void GetHadronKine(TParticle *part, const Int_t kquark); // get heavy hadron kinematics distribution | |
a8ef1999 | 80 | void GetDecayedKine(TParticle *part, const Int_t kquark, const Int_t kdecayed); // get decay electron kinematics distribution |
81 | void GetDecayedKine(AliAODMCParticle *mcpart, const Int_t kquark, Int_t kdecayed); // get decay electron kinematics for AOD | |
c2690925 | 82 | void GetMesonKine(); // get meson and its decay electron pt spectra |
70da6c5a | 83 | void EndOfEventAna(const Int_t kquark); // run analysis which should be done at the end of the event loop |
9250ffbf | 84 | Int_t GetSource(const TParticle * const mcpart); // return source id |
85 | Int_t GetElecSource(TParticle * const mcpart); // return electron source id | |
86 | Int_t GetSource(const AliAODMCParticle * const mcpart); // return electron source id for AOD | |
8c1c76e9 | 87 | Double_t GetWeightFactor(AliMCParticle *mctrack, const Int_t iBgLevel); // return best/lower/upper weighting factor for electron's mother meson |
a8ef1999 | 88 | void EnableDebugStreamer() { fIsDebugStreamerON = kTRUE;}; |
9250ffbf | 89 | |
90 | void SetBackgroundWeightFactor(Double_t *elecBackgroundFactor, Double_t *binLimit); | |
a8ef1999 | 91 | void SetContainerStep(Int_t containerStep) { fContainerStep = containerStep;}; |
92 | void SetHFEImpactParameters(Double_t hfeimpactR, Double_t hfeimpactnsigmaR) {fHfeImpactR = hfeimpactR; fHfeImpactnsigmaR = hfeimpactnsigmaR; }; | |
93 | void SetTrkKine(Double_t pt, Double_t eta, Double_t phi) {fRecPt = pt; fRecEta = eta; fRecPhi = phi;}; | |
94 | void SetITSInfo(Double_t ilyrhit, Double_t ilyrstat) { fLyrhit = ilyrhit; fLyrstat = ilyrstat;}; | |
8c1c76e9 | 95 | |
96 | void SetCentrality(Int_t centrality) { fCentrality = centrality; }; | |
97 | void SetPbPb() { fIsPbPb = kTRUE; }; | |
98 | void SetPP() { fIsPbPb = kFALSE; }; | |
99 | void SetPPMultiBin() { fIsppMultiBin = kFALSE; }; | |
100 | Bool_t IsPbPb() const { return fIsPbPb; }; | |
101 | Bool_t IsPP() const { return !fIsPbPb; }; | |
102 | Bool_t IsPPMultiBin() const { return fIsppMultiBin; }; | |
dbe3abbe | 103 | |
70da6c5a | 104 | protected: |
105 | void IdentifyMother(Int_t motherlabel, Int_t &motherpdg, Int_t &grandmotherlabel); // | |
106 | void HardScattering(const Int_t kquark, Int_t &motherID, Int_t &mothertype, Int_t &motherlabel); // check if the quark is produced from hard scattering | |
107 | void ReportStrangeness(Int_t &motherID, Int_t &mothertype, Int_t &motherlabel); // report if the quark production process is unknown | |
108 | 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 | |
109 | 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 | |
110 | ||
faee3b18 | 111 | AliMCEvent* fMCEvent; // mcevent pointer |
70da6c5a | 112 | AliGenEventHeader* fMCHeader; // mcheader pointer |
113 | TClonesArray *fMCArray; // mc array pointer | |
114 | ||
c2690925 | 115 | static const Int_t fgkGluon=21; // gluon pdg code |
116 | static const Int_t fgkMaxGener=10; // ancester level wanted to be checked | |
117 | static const Int_t fgkMaxIter=100; // number of iteration to find out matching particle | |
118 | static const Int_t fgkqType=7; // number of particle type to be checked | |
a8ef1999 | 119 | static const Int_t fgkEtaRanges=3; // cuts for different eta ranges |
70da6c5a | 120 | |
121 | struct AliHists{ | |
122 | TH1F *fPdgCode; // histogram to store particle pdg code | |
123 | TH1F *fPt; // histogram to store pt | |
124 | TH1F *fY; // histogram to store rapidity | |
125 | TH1F *fEta; // histogram to store eta | |
75d81601 | 126 | |
127 | AliHists() | |
128 | : fPdgCode() | |
129 | , fPt() | |
130 | , fY() | |
131 | , fEta() | |
70da6c5a | 132 | { |
75d81601 | 133 | // default constructor |
134 | }; | |
135 | AliHists(const AliHists & p) | |
136 | : fPdgCode(p.fPdgCode) | |
137 | , fPt(p.fPt) | |
138 | , fY(p.fY) | |
139 | , fEta(p.fEta) | |
70da6c5a | 140 | { |
75d81601 | 141 | // copy constructor |
142 | }; | |
143 | AliHists &operator=(const AliHists &) | |
144 | { | |
145 | // assignment operator, not yet implemented | |
146 | return *this; | |
147 | } | |
70da6c5a | 148 | void FillList(TList *l) const; |
149 | }; | |
150 | struct AliHistsComm { | |
151 | TH1F *fNq; // histogram to store number of quark | |
152 | TH1F *fProcessID; // histogram to store process id | |
153 | TH2F *fePtRatio; // fraction of electron pT from D or B hadron | |
ccc37cdc | 154 | TH2F *fPtCorr; // pt correlation between e and direct D or B |
c2690925 | 155 | TH2F *fPtCorrDp; // pt correlation between e and direct D+ |
156 | TH2F *fPtCorrD0; // pt correlation between e and direct D0 | |
157 | TH2F *fPtCorrDrest; // pt correlation between e and direct D rest | |
70da6c5a | 158 | TH2F *fDePtRatio; // fraction of D electron pT from B hadron |
159 | TH2F *feDistance; // distance between electron production point to mother particle | |
160 | TH2F *fDeDistance; // distance between D electron production point to mother particle | |
75d81601 | 161 | |
162 | AliHistsComm() | |
163 | : fNq() | |
164 | , fProcessID() | |
165 | , fePtRatio() | |
ccc37cdc | 166 | , fPtCorr() |
c2690925 | 167 | , fPtCorrDp() |
168 | , fPtCorrD0() | |
169 | , fPtCorrDrest() | |
75d81601 | 170 | , fDePtRatio() |
171 | , feDistance() | |
172 | , fDeDistance() | |
70da6c5a | 173 | { |
75d81601 | 174 | // default constructor |
175 | }; | |
176 | AliHistsComm(const AliHistsComm & p) | |
177 | : fNq(p.fNq) | |
178 | , fProcessID(p.fProcessID) | |
179 | , fePtRatio(p.fePtRatio) | |
ccc37cdc | 180 | , fPtCorr(p.fPtCorr) |
c2690925 | 181 | , fPtCorrDp(p.fPtCorrDp) |
182 | , fPtCorrD0(p.fPtCorrD0) | |
183 | , fPtCorrDrest(p.fPtCorrDrest) | |
75d81601 | 184 | , fDePtRatio(p.fDePtRatio) |
185 | , feDistance(p.feDistance) | |
186 | , fDeDistance(p.fDeDistance) | |
70da6c5a | 187 | { |
75d81601 | 188 | // copy constructor |
189 | }; | |
190 | AliHistsComm &operator=(const AliHistsComm &) | |
191 | { | |
192 | // assignment operator, not yet implemented | |
193 | return *this; | |
194 | } | |
70da6c5a | 195 | void FillList(TList *l) const; |
196 | }; | |
259c3296 | 197 | |
faee3b18 | 198 | AliHists fHist[3][7][6]; // struct of histograms to store kinematics of given particles |
199 | AliHistsComm fHistComm[2][6]; // struct of additional histograms of given particles | |
ccc37cdc | 200 | TH2F *fhD[9]; // D meson pt,Y spectra |
259c3296 | 201 | |
70da6c5a | 202 | TList *fQAhistos; // Container for QA histos |
c2690925 | 203 | AliHFEcollection *fMCQACollection; //! Tasks own QA collection |
bf892a6a | 204 | TParticle *fHeavyQuark[50]; //! store pointer of heavy flavour quark |
70da6c5a | 205 | Int_t fIsHeavy[2]; // count of heavy flavour |
206 | Int_t fNparents; // number of heavy hadrons to be considered | |
207 | Int_t fParentSelect[2][7]; // heavy hadron species | |
259c3296 | 208 | |
8c1c76e9 | 209 | Double_t fElecBackgroundFactor[kBgLevels][kCentBins][kElecBgSpecies][kBgPtBins]; // Electron background factors |
210 | Double_t fBinLimit[kBgPtBins+1]; // Electron background bins | |
211 | ||
212 | private: | |
213 | Int_t fCentrality; // Centrality | |
214 | Bool_t fIsPbPb; // Analysis Type: pp or PbPb | |
215 | Bool_t fIsppMultiBin; // pp multiplicity bin analysis | |
a8ef1999 | 216 | Int_t fContainerStep; // step the weighting factor called |
217 | Bool_t fIsDebugStreamerON; // check if the debugstreamer is on | |
218 | ||
219 | Double_t fRecPt; //reconstructed pt | |
220 | Double_t fRecEta; //reconstructed eta | |
221 | Double_t fRecPhi; //reconstructed phi | |
222 | Double_t fLyrhit; //its layer hit | |
223 | Double_t fLyrstat; // its layer status | |
224 | ||
225 | Double_t fHfeImpactR; // absolute impact parameter R | |
226 | Double_t fHfeImpactnsigmaR; // absolute impact parameter sigma R | |
227 | ||
228 | TTreeSRedirector *fTreeStream; //! TreeStream | |
9250ffbf | 229 | |
70da6c5a | 230 | ClassDef(AliHFEmcQA,1); |
259c3296 | 231 | }; |
232 | ||
233 | #endif |