]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/hfe/AliHFEdisplacedElectrons.h
Various updates, including corrections for code rule violations
[u/mrichter/AliRoot.git] / PWG3 / hfe / AliHFEdisplacedElectrons.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 // Class for electrons from beauty study
17 // Counting electrons from beauty
18 // by DCA cuts, background subtraction 
19 //
20 // Authors:
21 //  Hongyan Yang <hongyan@physi.uni-heidelberg.de>
22 //  Carlo Bombonati <Carlo.Bombonati@cern.ch>
23 // 
24
25 #ifndef ALIHFEDISPLACEDELECTRONS_H
26 #define ALIHFEDISPLACEDELECTRONS_H
27
28 #ifndef ROOT_TObject
29 #include <TObject.h>
30 #endif
31
32 #ifndef ROOT_TPDGCode
33 #include <TPDGCode.h>
34 #endif
35
36 class TChain;
37 class TTree;
38 class TFile;
39
40 class TPDGCode;
41
42 class TString;
43 class TList;
44
45 class AliLog;
46
47 class THnSparse;
48
49 class TObjArray;
50 class AliStack;
51 class AliMCEvent;
52 class AliESDEvent;
53 class AliVEvent;
54
55 class AliESDtrack;
56 class AliESDVertex;
57
58 class AliHFEdisplacedElectrons : public TObject{
59
60  public:  
61
62   enum{
63     kPDGelectron = kElectron,
64     kPDGgamma = kGamma,
65     kPDGpi0 = kPi0,
66     kPDGpion = kPiPlus, 
67     kPDGeta = 221,
68     kPDGcharm = kCharm,
69     kPDGbeauty = kBottom
70   };  // PDG codes to be used
71
72   AliHFEdisplacedElectrons(); // default constructor
73   AliHFEdisplacedElectrons(const AliHFEdisplacedElectrons &p); // copy constructor
74   AliHFEdisplacedElectrons &operator=(const AliHFEdisplacedElectrons &ref); // assignment operator
75
76   virtual ~AliHFEdisplacedElectrons();
77
78   void InitAnalysis();  
79   void CreateOutputs(TList* const displacedList);
80
81   void FillMcOutput(AliESDEvent* fESD, AliMCEvent* fMC, AliMCParticle* mctrack);
82   void FillEsdOutput(AliESDEvent* fESDEvent, AliESDtrack *track, AliStack *stack);
83   void FillDataOutput(AliESDEvent* fESDEvent, AliESDtrack *track);
84
85   Int_t GetMCpid(AliStack* stack, Int_t label) const;
86
87   Bool_t HasMCData() const { return TestBit(kHasMCData); };
88   void SetHasMCData(Bool_t hasMCdata = kTRUE) { SetBit(kHasMCData,hasMCdata); };
89   void SetDebugLevel(Int_t debugLevel){ fDeDebugLevel = debugLevel; };
90   void SetNitsCluster(Int_t nITScls){ fNclustersITS = nITScls;};
91   void SetMinPrimVtxContrib(Int_t nContrib){fMinNprimVtxContributor = nContrib;};
92
93   void PostAnalysis() const;
94
95
96  private:
97
98   enum{
99     kHasMCData = BIT(15),             // bitset for mc data usage
100     kHasESDData = BIT(16)
101   };
102    
103
104
105   enum{
106     kElePhotonConv = 0,
107     kEleDirectPhotonConv = 1,
108     kElePi0 = 2,
109     kEleEta = 3, 
110     kEleB = 4, 
111     kEleC = 5, 
112     kEleBC = 6,
113     kEleMissID = 7,
114     kEleMissIDpion = 8,
115     kPion = 8
116   };  // electron source index
117   
118   enum{
119     kMcElectron = 0, 
120     kEsdElectron = 1, 
121     kDataElectron = 2
122   };  // MC or Data
123
124   enum{
125     kNDcaMin = 42, 
126     kNPtIntv = 14, 
127     kNKineVar = 3
128   };   // several constant to be used
129  
130
131   Int_t CheckCharm(AliStack *const stack, Int_t eleLabel);
132   Bool_t IsB(Int_t pdg) const;
133   Bool_t IsC(Int_t pdg) const;
134  
135   Int_t ElectronFromSource(AliStack *stack, Int_t eleLabel) const;
136   Int_t ElePhotonDirect(AliStack *stack, Int_t label) const;
137   Int_t ElectronFromCharm(AliStack *stack, Int_t eleLabel) const;
138   Int_t CharmFromBeauty(AliStack *stack, Int_t charmLabel) const;
139   
140   Int_t GetMotherLabel(AliStack *stack, Int_t label) const;
141   Float_t GetRapidity(TParticle *part) const;
142   Float_t GetTrackRapidity(AliESDtrack *track) const;
143
144   static const Float_t fgkDcaMinIntv[kNDcaMin];  // DCA cut min limit
145   static const Float_t fgkDcaMinPtIntv[kNPtIntv-1]; // DCA cut min limit in different pT bins
146   static const Float_t fgkPtIntv[kNPtIntv]; // all pt bins
147
148   static const Char_t *fgkKineVar[kNKineVar];  // particle names
149   static const Char_t *fgkKineVarTitle[kNKineVar];  // particle names
150   
151   UInt_t fDeDebugLevel;   // debug level
152   Int_t fNclustersITS;  // ITS clusters
153   Int_t fMinNprimVtxContributor;      // minimum number of contributors to the primary vtx
154
155   THnSparseF *fTHnSparseDcaMcEleInfo;   //! container for MC pion part
156   THnSparseF *fTHnSparseDcaEsdEleInfo;   //! container for MC electron part
157   THnSparseF *fTHnSparseDcaDataEleInfo; //! container for Data electron part
158
159   TList *fDeOutputList;  //! output container
160   ClassDef(AliHFEdisplacedElectrons, 0);
161 };
162
163 #endif