]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/hfe/AliHFEmcQA.h
Changes for #82873: Module debugging broken (Christian)
[u/mrichter/AliRoot.git] / PWG3 / 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;
259c3296 43
44//________________________________________________________________
45class AliHFEmcQA: public TObject {
46
70da6c5a 47 public:
faee3b18 48 enum heavyType {kCharm=4, kBeauty=5, kOthers=6, kElectronPDG=11};
70da6c5a 49 enum qType {kQuark, kantiQuark, kHadron, keHadron, kDeHadron, kElectron, kElectron2nd};
c2690925 50 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 51 enum ProcessType {
52 kPairCreationFromq, kPairCreationFromg, kFlavourExitation, kGluonSplitting, kInitialPartonShower, kLightQuarkShower
53 };
9250ffbf 54 enum{
55 kBgPtBins = 44,
56 kElecBgSpecies = 6
57 };
58
70da6c5a 59
60 AliHFEmcQA();
61 AliHFEmcQA(const AliHFEmcQA &p); // copy constructor
62 AliHFEmcQA &operator=(const AliHFEmcQA &); // assignment operator
63
64 virtual ~AliHFEmcQA();
65
70da6c5a 66 TList *GetList() const { return fQAhistos; };
67 void PostAnalyze() const;
e3fc062d 68 void CreatDefaultHistograms(TList * const qaList); // create default histograms
70da6c5a 69 void CreateHistograms(const Int_t kquark, Int_t icut, TString hnopt=""); // create histograms for mc qa analysis
faee3b18 70 void SetMCEvent(AliMCEvent* const mcEvent){fMCEvent = mcEvent;}
70da6c5a 71 void SetGenEventHeader(AliGenEventHeader* const mcHeader){fMCHeader=mcHeader;} // set stack pointer
72 void SetMCArray(TClonesArray* const mcarry){fMCArray=mcarry;} // set mcarray pointer
73 void Init();
74
75 void GetQuarkKine(TParticle *part, Int_t iTrack, const Int_t kquark); // get heavy quark kinematics distribution
76 void GetHadronKine(TParticle *part, const Int_t kquark); // get heavy hadron kinematics distribution
77 void GetDecayedKine(TParticle *part, const Int_t kquark, const Int_t kdecayed, Int_t icut); // get decay electron kinematics distribution
9250ffbf 78 void GetDecayedKine(AliAODMCParticle *mcpart, const Int_t kquark, Int_t kdecayed, Int_t icut); // get decay electron kinematics for AOD
c2690925 79 void GetMesonKine(); // get meson and its decay electron pt spectra
70da6c5a 80 void EndOfEventAna(const Int_t kquark); // run analysis which should be done at the end of the event loop
9250ffbf 81 Int_t GetSource(const TParticle * const mcpart); // return source id
82 Int_t GetElecSource(TParticle * const mcpart); // return electron source id
83 Int_t GetSource(const AliAODMCParticle * const mcpart); // return electron source id for AOD
84 Double_t GetWeightFactor(AliMCParticle *mctrack); // return weighting factor for electron's mother meson
85
86 void SetBackgroundWeightFactor(Double_t *elecBackgroundFactor, Double_t *binLimit);
87// void SetBackgroundWeightFactor(Double_t const elecBackgroundFactor[6][44], Double_t const binLimit[45]) {fElecBackgroundFactor=elecBackgroundFactor; fBinLimit=binLimit;}
dbe3abbe 88
70da6c5a 89 protected:
90 void IdentifyMother(Int_t motherlabel, Int_t &motherpdg, Int_t &grandmotherlabel); //
91 void HardScattering(const Int_t kquark, Int_t &motherID, Int_t &mothertype, Int_t &motherlabel); // check if the quark is produced from hard scattering
92 void ReportStrangeness(Int_t &motherID, Int_t &mothertype, Int_t &motherlabel); // report if the quark production process is unknown
93 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
94 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
95
faee3b18 96 AliMCEvent* fMCEvent; // mcevent pointer
70da6c5a 97 AliGenEventHeader* fMCHeader; // mcheader pointer
98 TClonesArray *fMCArray; // mc array pointer
99
c2690925 100 static const Int_t fgkGluon=21; // gluon pdg code
101 static const Int_t fgkMaxGener=10; // ancester level wanted to be checked
102 static const Int_t fgkMaxIter=100; // number of iteration to find out matching particle
103 static const Int_t fgkqType=7; // number of particle type to be checked
70da6c5a 104
105 struct AliHists{
106 TH1F *fPdgCode; // histogram to store particle pdg code
107 TH1F *fPt; // histogram to store pt
108 TH1F *fY; // histogram to store rapidity
109 TH1F *fEta; // histogram to store eta
75d81601 110
111 AliHists()
112 : fPdgCode()
113 , fPt()
114 , fY()
115 , fEta()
70da6c5a 116 {
75d81601 117 // default constructor
118 };
119 AliHists(const AliHists & p)
120 : fPdgCode(p.fPdgCode)
121 , fPt(p.fPt)
122 , fY(p.fY)
123 , fEta(p.fEta)
70da6c5a 124 {
75d81601 125 // copy constructor
126 };
127 AliHists &operator=(const AliHists &)
128 {
129 // assignment operator, not yet implemented
130 return *this;
131 }
70da6c5a 132 void FillList(TList *l) const;
133 };
134 struct AliHistsComm {
135 TH1F *fNq; // histogram to store number of quark
136 TH1F *fProcessID; // histogram to store process id
137 TH2F *fePtRatio; // fraction of electron pT from D or B hadron
ccc37cdc 138 TH2F *fPtCorr; // pt correlation between e and direct D or B
c2690925 139 TH2F *fPtCorrDp; // pt correlation between e and direct D+
140 TH2F *fPtCorrD0; // pt correlation between e and direct D0
141 TH2F *fPtCorrDrest; // pt correlation between e and direct D rest
70da6c5a 142 TH2F *fDePtRatio; // fraction of D electron pT from B hadron
143 TH2F *feDistance; // distance between electron production point to mother particle
144 TH2F *fDeDistance; // distance between D electron production point to mother particle
75d81601 145
146 AliHistsComm()
147 : fNq()
148 , fProcessID()
149 , fePtRatio()
ccc37cdc 150 , fPtCorr()
c2690925 151 , fPtCorrDp()
152 , fPtCorrD0()
153 , fPtCorrDrest()
75d81601 154 , fDePtRatio()
155 , feDistance()
156 , fDeDistance()
70da6c5a 157 {
75d81601 158 // default constructor
159 };
160 AliHistsComm(const AliHistsComm & p)
161 : fNq(p.fNq)
162 , fProcessID(p.fProcessID)
163 , fePtRatio(p.fePtRatio)
ccc37cdc 164 , fPtCorr(p.fPtCorr)
c2690925 165 , fPtCorrDp(p.fPtCorrDp)
166 , fPtCorrD0(p.fPtCorrD0)
167 , fPtCorrDrest(p.fPtCorrDrest)
75d81601 168 , fDePtRatio(p.fDePtRatio)
169 , feDistance(p.feDistance)
170 , fDeDistance(p.fDeDistance)
70da6c5a 171 {
75d81601 172 // copy constructor
173 };
174 AliHistsComm &operator=(const AliHistsComm &)
175 {
176 // assignment operator, not yet implemented
177 return *this;
178 }
70da6c5a 179 void FillList(TList *l) const;
180 };
259c3296 181
faee3b18 182 AliHists fHist[3][7][6]; // struct of histograms to store kinematics of given particles
183 AliHistsComm fHistComm[2][6]; // struct of additional histograms of given particles
ccc37cdc 184 TH2F *fhD[9]; // D meson pt,Y spectra
185 TH1F *fhDLogbin[9]; // D meson pt w diff binning
259c3296 186
70da6c5a 187 TList *fQAhistos; // Container for QA histos
c2690925 188 AliHFEcollection *fMCQACollection; //! Tasks own QA collection
bf892a6a 189 TParticle *fHeavyQuark[50]; //! store pointer of heavy flavour quark
70da6c5a 190 Int_t fIsHeavy[2]; // count of heavy flavour
191 Int_t fNparents; // number of heavy hadrons to be considered
192 Int_t fParentSelect[2][7]; // heavy hadron species
259c3296 193
9250ffbf 194 Double_t fElecBackgroundFactor[6][44]; // Electron background factors
195 Double_t fBinLimit[45]; // Electron background bins
196
70da6c5a 197 ClassDef(AliHFEmcQA,1);
259c3296 198};
199
200#endif