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