Since it contains fixes of coding rule violations, all classes are involved. Further...
[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 **************************************************************************/
259c3296 15/**************************************************************************
16 * *
17 * QA class of Heavy Flavor quark and fragmeted/decayed particles *
dbe3abbe 18 * -Check kinematics of Heavy Quarks/hadrons, and decayed leptons *
19 * pT, rapidity *
20 * decay lepton kinematics w/wo acceptance *
21 * heavy hadron decay length, electron pT fraction carried from decay *
22 * -Check yield of Heavy Quarks/hadrons *
23 * Number of produced heavy quark *
24 * Number of produced hadron of given pdg code *
259c3296 25 * *
26 **************************************************************************/
27
dbe3abbe 28#ifndef ALIHFEMCQA_H
29#define ALIHFEMCQA_H
259c3296 30
31#ifndef ROOT_TObject
75d81601 32//#include <TObject.h>
259c3296 33#endif
34
35class TH1F;
36class TH2F;
37class TParticle;
38class TString;
39class AliStack;
40
41//________________________________________________________________
42class AliHFEmcQA: public TObject {
43
44 public:
dbe3abbe 45 enum heavyType {kCharm=4, kBeauty=5, kElectronPDG=11};
46 enum qType {kQuark, kantiQuark, kHadron, keHadron, kDeHadron, kElectron, kElectron2nd};
259c3296 47 AliHFEmcQA();
48 AliHFEmcQA(const AliHFEmcQA &p); // copy constructor
49 AliHFEmcQA &operator=(const AliHFEmcQA &); // assignment operator
50
51 virtual ~AliHFEmcQA();
52
dc306130 53 void PostAnalyze();
dbe3abbe 54 void CreateHistograms(const Int_t kquark, Int_t icut, TString hnopt=""); // create histograms for mc qa analysis
55 void SetStack(AliStack* const stack){fStack=stack;} // set stack pointer
259c3296 56 void Init();
dbe3abbe 57
259c3296 58 void GetQuarkKine(Int_t iTrack, const Int_t kquark); // get heavy quark kinematics distribution
dbe3abbe 59 void GetHadronKine(Int_t iTrack, const Int_t kquark); // get heavy hadron kinematics distribution
60 void GetDecayedKine(Int_t iTrack, const Int_t kquark, const Int_t kdecayed, Int_t icut, Bool_t isbarrel=kFALSE); // get decay electron kinematics distribution
259c3296 61 void EndOfEventAna(const Int_t kquark); // run analysis which should be done at the end of the event loop
dbe3abbe 62
63 protected:
75d81601 64 void IdentifyMother(Int_t motherlabel, Int_t &motherpdg, Int_t &grandmotherlabel); //
259c3296 65 void HardScattering(const Int_t kquark, Int_t &motherID, Int_t &mothertype, Int_t &motherlabel); // check if the quark is produced from hard scattering
dbe3abbe 66 void ReportStrangeness(Int_t &motherID, Int_t &mothertype, Int_t &motherlabel); // report if the quark production process is unknown
259c3296 67 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
68 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
dc306130 69 Float_t GetRapidity(TParticle *part); // return rapidity
259c3296 70
dbe3abbe 71 AliStack* fStack; // stack pointer
259c3296 72
dbe3abbe 73 static const Int_t fgkGluon; // gluon pdg code
74 static const Int_t fgkMaxGener; // ancester level wanted to be checked
75 static const Int_t fgkMaxIter; // number of iteration to find out matching particle
76 static const Int_t fgkqType; // number of particle type to be checked
259c3296 77
78
75d81601 79 enum ProcessType
259c3296 80 {
dbe3abbe 81 kPairCreationFromq, kPairCreationFromg, kFlavourExitation, kGluonSplitting, kInitialPartonShower, kLightQuarkShower
259c3296 82 };
83
75d81601 84 struct AliHists{
259c3296 85 TH1F *fPdgCode; // histogram to store particle pdg code
86 TH1F *fPt; // histogram to store pt
87 TH1F *fY; // histogram to store rapidity
88 TH1F *fEta; // histogram to store eta
75d81601 89
90 AliHists()
91 : fPdgCode()
92 , fPt()
93 , fY()
94 , fEta()
95 {
96 // default constructor
97 };
98 AliHists(const AliHists & p)
99 : fPdgCode(p.fPdgCode)
100 , fPt(p.fPt)
101 , fY(p.fY)
102 , fEta(p.fEta)
103 {
104 // copy constructor
105 };
106 AliHists &operator=(const AliHists &)
107 {
108 // assignment operator, not yet implemented
109 return *this;
110 }
259c3296 111 };
75d81601 112 struct AliHistsComm {
259c3296 113 TH1F *fNq; // histogram to store number of quark
114 TH1F *fProcessID; // histogram to store process id
dbe3abbe 115 TH2F *fePtRatio; // fraction of electron pT from D or B hadron
116 TH2F *fDePtRatio; // fraction of D electron pT from B hadron
117 TH2F *feDistance; // distance between electron production point to mother particle
118 TH2F *fDeDistance; // distance between D electron production point to mother particle
75d81601 119
120 AliHistsComm()
121 : fNq()
122 , fProcessID()
123 , fePtRatio()
124 , fDePtRatio()
125 , feDistance()
126 , fDeDistance()
127 {
128 // default constructor
129 };
130 AliHistsComm(const AliHistsComm & p)
131 : fNq(p.fNq)
132 , fProcessID(p.fProcessID)
133 , fePtRatio(p.fePtRatio)
134 , fDePtRatio(p.fDePtRatio)
135 , feDistance(p.feDistance)
136 , fDeDistance(p.fDeDistance)
137 {
138 // copy constructor
139 };
140 AliHistsComm &operator=(const AliHistsComm &)
141 {
142 // assignment operator, not yet implemented
143 return *this;
144 }
259c3296 145 };
146
75d81601 147 AliHists fHist[2][7][5]; // struct of histograms to store kinematics of given particles
148 AliHistsComm fHistComm[2][5]; // struct of additional histograms of given particles
259c3296 149
dbe3abbe 150 TParticle *fHeavyQuark[50]; // store pointer of heavy flavour quark
151 Int_t fIsHeavy[2]; // count of heavy flavour
152 Int_t fNparents; // number of heavy hadrons to be considered
153 Int_t fParentSelect[2][7]; // heavy hadron species
259c3296 154
155
75d81601 156 ClassDef(AliHFEmcQA,0);
259c3296 157};
158
159#endif