]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliHFEmcQA.h
Since it contains fixes of coding rule violations, all classes are involved. Further...
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEmcQA.h
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  **************************************************************************/
15 /**************************************************************************
16  *                                                                        *
17  * QA class of Heavy Flavor quark and fragmeted/decayed particles         *
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                         *
25  *                                                                        *
26  **************************************************************************/
27
28 #ifndef ALIHFEMCQA_H
29 #define ALIHFEMCQA_H
30
31 #ifndef ROOT_TObject
32 //#include <TObject.h>
33 #endif
34
35 class TH1F;
36 class TH2F;
37 class TParticle;
38 class TString;
39 class AliStack;
40
41 //________________________________________________________________
42 class AliHFEmcQA: public TObject {
43
44         public: 
45                 enum heavyType {kCharm=4, kBeauty=5, kElectronPDG=11};
46                 enum qType {kQuark, kantiQuark, kHadron, keHadron, kDeHadron, kElectron, kElectron2nd};
47                 AliHFEmcQA();
48                 AliHFEmcQA(const AliHFEmcQA &p); // copy constructor
49                 AliHFEmcQA &operator=(const AliHFEmcQA &); // assignment operator
50
51                 virtual ~AliHFEmcQA();
52
53                 void PostAnalyze();
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
56                 void Init();
57
58                 void GetQuarkKine(Int_t iTrack, const Int_t kquark); // get heavy quark kinematics distribution
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
61                 void EndOfEventAna(const Int_t kquark); // run analysis which should be done at the end of the event loop
62
63         protected:
64                 void IdentifyMother(Int_t motherlabel, Int_t &motherpdg, Int_t &grandmotherlabel); // 
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
66                 void ReportStrangeness(Int_t &motherID, Int_t &mothertype, Int_t &motherlabel); // report if the quark production process is unknown
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
69                 Float_t GetRapidity(TParticle *part); // return rapidity
70
71                 AliStack* fStack; // stack pointer           
72
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
77
78
79                 enum ProcessType
80                         {
81                         kPairCreationFromq,  kPairCreationFromg,  kFlavourExitation,  kGluonSplitting, kInitialPartonShower, kLightQuarkShower
82                         };
83
84                 struct AliHists{
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
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                         }
111                 };
112                 struct AliHistsComm {
113                         TH1F *fNq; // histogram to store number of quark
114                         TH1F *fProcessID; // histogram to store process id 
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
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                         }
145                 };
146
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
149
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
154
155
156         ClassDef(AliHFEmcQA,0);
157 };
158
159 #endif