]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliHFEmcQA.h
Fix coding rules violations
[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                 const 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 mother_label, Int_t &mother_pdg, Int_t &grandmother_label); // 
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                 const 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_t
80                         {
81                         kPairCreationFromq,  kPairCreationFromg,  kFlavourExitation,  kGluonSplitting, kInitialPartonShower, kLightQuarkShower
82                         };
83
84                 struct hists{
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                 struct histsComm {
91                         TH1F *fNq; // histogram to store number of quark
92                         TH1F *fProcessID; // histogram to store process id 
93                         TH2F *fePtRatio; // fraction of electron pT from D or B hadron
94                         TH2F *fDePtRatio; // fraction of D electron pT from B hadron 
95                         TH2F *feDistance; // distance between electron production point to mother particle 
96                         TH2F *fDeDistance; // distance between D electron production point to mother particle
97                 };
98
99                 hists fHist[2][7][5]; // struct of histograms to store kinematics of given particles
100                 histsComm fHistComm[2][5]; // struct of additional histograms of given particles
101
102                 TParticle *fHeavyQuark[50]; // store pointer of heavy flavour quark 
103                 Int_t fIsHeavy[2]; // count of heavy flavour
104                 Int_t fNparents; // number of heavy hadrons to be considered
105                 Int_t fParentSelect[2][7]; // heavy hadron species
106
107
108         ClassDef(AliHFEmcQA,0);
109 };
110
111 #endif