]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/hfe/AliHFEmcQA.h
Further Coverity fixes, and V0 developments.
[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
dbe3abbe 26#ifndef ALIHFEMCQA_H
27#define ALIHFEMCQA_H
259c3296 28
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;
0792aa82 40class AliAODMCParticle;
259c3296 41
42//________________________________________________________________
43class AliHFEmcQA: public TObject {
44
70da6c5a 45 public:
faee3b18 46 enum heavyType {kCharm=4, kBeauty=5, kOthers=6, kElectronPDG=11};
70da6c5a 47 enum qType {kQuark, kantiQuark, kHadron, keHadron, kDeHadron, kElectron, kElectron2nd};
e3fc062d 48 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};
70da6c5a 49 enum ProcessType {
50 kPairCreationFromq, kPairCreationFromg, kFlavourExitation, kGluonSplitting, kInitialPartonShower, kLightQuarkShower
51 };
52
53 AliHFEmcQA();
54 AliHFEmcQA(const AliHFEmcQA &p); // copy constructor
55 AliHFEmcQA &operator=(const AliHFEmcQA &); // assignment operator
56
57 virtual ~AliHFEmcQA();
58
70da6c5a 59 TList *GetList() const { return fQAhistos; };
60 void PostAnalyze() const;
e3fc062d 61 void CreatDefaultHistograms(TList * const qaList); // create default histograms
70da6c5a 62 void CreateHistograms(const Int_t kquark, Int_t icut, TString hnopt=""); // create histograms for mc qa analysis
faee3b18 63 void SetMCEvent(AliMCEvent* const mcEvent){fMCEvent = mcEvent;}
70da6c5a 64 void SetGenEventHeader(AliGenEventHeader* const mcHeader){fMCHeader=mcHeader;} // set stack pointer
65 void SetMCArray(TClonesArray* const mcarry){fMCArray=mcarry;} // set mcarray pointer
66 void Init();
67
68 void GetQuarkKine(TParticle *part, Int_t iTrack, const Int_t kquark); // get heavy quark kinematics distribution
69 void GetHadronKine(TParticle *part, const Int_t kquark); // get heavy hadron kinematics distribution
70 void GetDecayedKine(TParticle *part, const Int_t kquark, const Int_t kdecayed, Int_t icut); // get decay electron kinematics distribution
0792aa82 71 void GetDecayedKine(AliAODMCParticle *mcpart, const Int_t kquark, Int_t kdecayed, Int_t icut); // get decay electron kinematics for AOD
70da6c5a 72 void EndOfEventAna(const Int_t kquark); // run analysis which should be done at the end of the event loop
e3fc062d 73 Int_t GetSource(TParticle * const mcpart); // return source id
74 Int_t GetElecSource(TParticle * const mcpart); // return electron source id
9bcfd1ab 75 Int_t GetSource(AliAODMCParticle * const mcpart); // return electron source id for AOD
dbe3abbe 76
70da6c5a 77 protected:
78 void IdentifyMother(Int_t motherlabel, Int_t &motherpdg, Int_t &grandmotherlabel); //
79 void HardScattering(const Int_t kquark, Int_t &motherID, Int_t &mothertype, Int_t &motherlabel); // check if the quark is produced from hard scattering
80 void ReportStrangeness(Int_t &motherID, Int_t &mothertype, Int_t &motherlabel); // report if the quark production process is unknown
81 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
82 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
83
faee3b18 84 AliMCEvent* fMCEvent; // mcevent pointer
70da6c5a 85 AliGenEventHeader* fMCHeader; // mcheader pointer
86 TClonesArray *fMCArray; // mc array pointer
87
88 static const Int_t fgkGluon; // gluon pdg code
89 static const Int_t fgkMaxGener; // ancester level wanted to be checked
90 static const Int_t fgkMaxIter; // number of iteration to find out matching particle
91 static const Int_t fgkqType; // number of particle type to be checked
92
93 struct AliHists{
94 TH1F *fPdgCode; // histogram to store particle pdg code
95 TH1F *fPt; // histogram to store pt
96 TH1F *fY; // histogram to store rapidity
97 TH1F *fEta; // histogram to store eta
75d81601 98
99 AliHists()
100 : fPdgCode()
101 , fPt()
102 , fY()
103 , fEta()
70da6c5a 104 {
75d81601 105 // default constructor
106 };
107 AliHists(const AliHists & p)
108 : fPdgCode(p.fPdgCode)
109 , fPt(p.fPt)
110 , fY(p.fY)
111 , fEta(p.fEta)
70da6c5a 112 {
75d81601 113 // copy constructor
114 };
115 AliHists &operator=(const AliHists &)
116 {
117 // assignment operator, not yet implemented
118 return *this;
119 }
70da6c5a 120 void FillList(TList *l) const;
121 };
122 struct AliHistsComm {
123 TH1F *fNq; // histogram to store number of quark
124 TH1F *fProcessID; // histogram to store process id
125 TH2F *fePtRatio; // fraction of electron pT from D or B hadron
126 TH2F *fDePtRatio; // fraction of D electron pT from B hadron
127 TH2F *feDistance; // distance between electron production point to mother particle
128 TH2F *fDeDistance; // distance between D electron production point to mother particle
75d81601 129
130 AliHistsComm()
131 : fNq()
132 , fProcessID()
133 , fePtRatio()
134 , fDePtRatio()
135 , feDistance()
136 , fDeDistance()
70da6c5a 137 {
75d81601 138 // default constructor
139 };
140 AliHistsComm(const AliHistsComm & p)
141 : fNq(p.fNq)
142 , fProcessID(p.fProcessID)
143 , fePtRatio(p.fePtRatio)
144 , fDePtRatio(p.fDePtRatio)
145 , feDistance(p.feDistance)
146 , fDeDistance(p.fDeDistance)
70da6c5a 147 {
75d81601 148 // copy constructor
149 };
150 AliHistsComm &operator=(const AliHistsComm &)
151 {
152 // assignment operator, not yet implemented
153 return *this;
154 }
70da6c5a 155 void FillList(TList *l) const;
156 };
259c3296 157
faee3b18 158 AliHists fHist[3][7][6]; // struct of histograms to store kinematics of given particles
159 AliHistsComm fHistComm[2][6]; // struct of additional histograms of given particles
e97c2edf 160 TH2F *fhD[7]; // D meson pt,Y spectra
259c3296 161
70da6c5a 162 TList *fQAhistos; // Container for QA histos
bf892a6a 163 TParticle *fHeavyQuark[50]; //! store pointer of heavy flavour quark
70da6c5a 164 Int_t fIsHeavy[2]; // count of heavy flavour
165 Int_t fNparents; // number of heavy hadrons to be considered
166 Int_t fParentSelect[2][7]; // heavy hadron species
259c3296 167
168
70da6c5a 169 ClassDef(AliHFEmcQA,1);
259c3296 170};
171
172#endif