]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGGA/CaloTrackCorrelations/AliAnaElectron.h
D_s systematic uncertainties in 0-10% and 20-50% (Anastasia)
[u/mrichter/AliRoot.git] / PWGGA / CaloTrackCorrelations / AliAnaElectron.h
1 #ifndef ALIANAELECTRON_H
2 #define ALIANAELECTRON_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice     */
5
6 //_________________________________________________________________________
7 //
8 // Class for the electron identification, 
9 // Clusters from calorimeters are identified as electrons
10 // and kept in the AOD. Few histograms produced.
11 // Copy of AliAnaPhoton just add electron id.
12 //
13
14 //-- Author: Gustavo Conesa (LPSC-IN2P3-CNRS)
15
16 // --- ROOT system ---
17 class TH2F ;
18 class TH1F;
19 class TH3D;
20 class TObjString;
21
22 // --- ANALYSIS system ---
23 #include "AliAnaCaloTrackCorrBaseClass.h"
24 class AliStack;
25 class TParticle;
26
27 class TList ;
28
29 class AliAnaElectron : public AliAnaCaloTrackCorrBaseClass {
30
31  public: 
32   
33   AliAnaElectron() ;                                       // default ctor
34   
35   virtual ~AliAnaElectron() { ; }                          // virtual dtor
36         
37   //---------------------------------------
38   // General analysis frame methods
39   //---------------------------------------
40   
41   TObjString * GetAnalysisCuts();
42   
43   TList      * GetCreateOutputObjects();
44   
45   void         Init();
46
47   void         InitParameters();
48
49   void         MakeAnalysisFillAOD()  ;
50
51   void         MakeAnalysisFillHistograms() ; 
52   
53   void         Print(const Option_t * opt)const;
54     
55   
56   // Analysis methods
57   
58   Bool_t       ClusterSelected(AliVCluster* cl, Int_t nMaxima) ;
59   
60   void         FillShowerShapeHistograms( AliVCluster* cluster, Int_t mcTag , Int_t pidTag) ;
61   
62   void         SwitchOnFillShowerShapeHistograms()    { fFillSSHistograms = kTRUE  ; }
63   void         SwitchOffFillShowerShapeHistograms()   { fFillSSHistograms = kFALSE ; }  
64     
65   void         WeightHistograms(AliVCluster *clus);
66   
67   void         SwitchOnFillWeightHistograms()         { fFillWeightHistograms = kTRUE  ; }
68   void         SwitchOffFillWeightHistograms()        { fFillWeightHistograms = kFALSE ; }  
69   
70   //---------------------------------------
71   // Analysis parameters setters getters
72   //---------------------------------------
73   
74   // ** Cluster selection methods **
75   
76   void         SetdEdxCut(Double_t min, Double_t max) { fdEdxMin    = min ; 
77                                                         fdEdxMax    = max          ; }
78   
79   void         SetEOverP(Double_t min, Double_t max)  { fEOverPMin  = min ; 
80                                                         fEOverPMax  = max          ; }
81
82   
83   void         SetMinDistanceToBadChannel(Float_t m1, Float_t m2, Float_t m3) {
84                 fMinDist = m1; fMinDist2 = m2; fMinDist3 = m3; }
85
86   void         SetTimeCut(Double_t min, Double_t max) { fTimeCutMin = min; 
87                                                         fTimeCutMax = max          ; }
88   Double_t     GetTimeCutMin()                  const { return fTimeCutMin         ; }
89   Double_t     GetTimeCutMax()                  const { return fTimeCutMax         ; }  
90         
91   void         SetNCellCut(Int_t n)                   { fNCellsCut = n             ; }
92   Double_t     GetNCellCut()                    const { return fNCellsCut          ; }
93   
94   void         SetNLMCut(Int_t min, Int_t max)        { fNLMCutMin = min;
95                                                         fNLMCutMax = max                ; }
96   Int_t        GetNLMCutMin()                   const { return fNLMCutMin               ; }
97   Int_t        GetNLMCutMax()                   const { return fNLMCutMax               ; }
98   
99   void         FillNOriginHistograms(Int_t n)         { fNOriginHistograms = n ; 
100                                                         if(n > 10) fNOriginHistograms = 10; }
101
102   
103   void         FillAODWithElectrons()                 { fAODParticle = AliCaloPID::kElectron      ; }
104   void         FillAODWithHadrons()                   { fAODParticle = AliCaloPID::kChargedHadron ; }
105   void         FillAODWithAny()                       { fAODParticle = 0 ; }
106
107   void         SwitchOnOnlySimpleSSHistoFill()        { fFillOnlySimpleSSHisto = kTRUE  ; }
108   void         SwitchOffOnlySimpleHistoFill()         { fFillOnlySimpleSSHisto = kFALSE ; }
109   
110   // For histograms in arrays, index in the array, corresponding to a particle
111   enum mcTypes    { kmcPhoton = 0,        kmcPi0Decay = 1,       kmcOtherDecay = 2,  
112                     kmcPi0 = 3,           kmcEta = 4,            kmcElectron = 5,       
113                     kmcConversion = 6,    kmcOther = 7,          kmcAntiNeutron = 8,    
114                     kmcAntiProton = 9                                                 };    
115   
116   enum mcssTypes  { kmcssPhoton = 0,      kmcssOther = 1,       kmcssPi0 = 2,         
117                     kmcssEta = 3,         kmcssConversion = 4,  kmcssElectron = 5       };  
118   
119   private:
120  
121   Float_t  fMinDist ;                          // Minimal distance to bad channel to accept cluster
122   Float_t  fMinDist2;                          // Cuts on Minimal distance to study acceptance evaluation
123   Float_t  fMinDist3;                          // One more cut on distance used for acceptance-efficiency study
124   Double_t fTimeCutMin  ;                      // Remove clusters/cells with time smaller than this value, in ns
125   Double_t fTimeCutMax  ;                      // Remove clusters/cells with time larger than this value, in ns
126   Int_t    fNCellsCut ;                        // Accept for the analysis clusters with more than fNCellsCut cells
127   Int_t    fNLMCutMin  ;                       // Remove clusters/cells with number of local maxima smaller than this value
128   Int_t    fNLMCutMax  ;                       // Remove clusters/cells with number of local maxima larger than this value
129   Bool_t   fFillSSHistograms ;                 // Fill shower shape histograms
130   Bool_t   fFillOnlySimpleSSHisto;             // Fill selected cluster histograms, selected SS histograms
131   Bool_t   fFillWeightHistograms ;             // Fill weigth histograms
132   Int_t    fNOriginHistograms;                 // Fill only NOriginHistograms of the 14 defined types
133
134   Float_t  fdEdxMin;                           // Max dEdx for electrons
135   Float_t  fdEdxMax;                           // Min dEdx for electrons
136   Float_t  fEOverPMin;                         // Max E/p for electrons, after dEdx cut
137   Float_t  fEOverPMax;                         // Min E/p for electrons, after dEdx cut
138
139   Int_t    fAODParticle;                       // Select the type of particle to put in AODs for other analysis
140   
141   TLorentzVector fMomentum;                    //! cluster momentum
142   TLorentzVector fMomentumMC;                  //! mc particle momentum
143   TVector3       fProdVertex;                  //! mc particle production vertex
144
145   //Histograms
146   TH2F * fhdEdxvsE;                            //! matched track dEdx vs cluster E 
147   TH2F * fhdEdxvsP;                            //! matched track dEdx vs track P
148   TH2F * fhEOverPvsE;                          //! matched track E cluster over P track vs cluster E, after dEdx cut 
149   TH2F * fhEOverPvsP;                          //! matched track E cluster over P track vs track P, after dEdx cut 
150
151   TH2F * fhdEdxvsECutM02;                      //! matched track dEdx vs cluster E, mild M02 cut
152   TH2F * fhdEdxvsPCutM02;                      //! matched track dEdx vs track P, mild M02 cut
153   TH2F * fhEOverPvsECutM02;                    //! matched track E cluster over P track vs cluster E, after dEdx cut, mild M02 cut
154   TH2F * fhEOverPvsPCutM02;                    //! matched track E cluster over P track vs track P, after dEdx cut, mild M02 cut
155   
156   TH2F * fhdEdxvsECutEOverP;                   //! matched track dEdx vs cluster E , cut on EOverP
157   TH2F * fhdEdxvsPCutEOverP;                   //! matched track dEdx vs track P, cut on EOverP
158   TH2F * fhEOverPvsECutM02CutdEdx;             //! matched track E cluster over P track vs cluster E, after dEdx cut and mild M02 cut
159   TH2F * fhEOverPvsPCutM02CutdEdx;             //! matched track E cluster over P track vs track P, after dEdx cut and mild M02 cut
160
161   TH2F * fhMCdEdxvsE[10];                       //! matched track dEdx vs cluster E, coming from MC particle
162   TH2F * fhMCdEdxvsP[10];                       //! matched track dEdx vs track P, coming from MC particle
163   TH2F * fhMCEOverPvsE[10];                     //! matched track E cluster over P track vs cluster E, after dEdx cut, coming from MC particle
164   TH2F * fhMCEOverPvsP[10];                     //! matched track E cluster over P track vs track P, after dEdx cut, coming from MC particle
165   
166   TH2F * fhNCellsE[2];                         //! number of cells in cluster vs E
167   TH2F * fhNLME[2];                            //! number of local maxima in cluster vs E
168   TH2F * fhMaxCellDiffClusterE[2];             //! Fraction of energy carried by cell with maximum energy
169   TH2F * fhTimeE[2];                           //! E vs Time of selected cluster 
170
171   TH1F * fhE[2]    ;                           //! Number of identified electron vs energy
172   TH1F * fhPt[2]   ;                           //! Number of identified electron vs transerse momentum 
173   TH2F * fhPhi[2]  ;                           //! Azimuthal angle of identified  electron vs transerse momentum 
174   TH2F * fhEta[2]  ;                           //! Pseudorapidity of identified  electron vs transerse momentum 
175   TH2F * fhEtaPhi[2]  ;                        //! Pseudorapidity vs Phi of identified  electron for transerse momentum > 0.5
176   TH2F * fhEtaPhi05[2]  ;                      //! Pseudorapidity vs Phi of identified  electron for transerse momentum < 0.5
177   
178   //Shower shape
179   
180   TH2F * fhDispE[2];                           //! cluster dispersion vs E
181   TH2F * fhLam0E[2];                           //! cluster lambda0 vs  E
182   TH2F * fhLam1E[2];                           //! cluster lambda1 vs  E  
183
184   TH2F * fhDispETRD[2];                        //! cluster dispersion vs E, SM covered by TRD
185   TH2F * fhLam0ETRD[2];                        //! cluster lambda0 vs  E, SM covered by TRD
186   TH2F * fhLam1ETRD[2];                        //! cluster lambda1 vs  E, SM covered by TRD 
187   
188   TH2F * fhNCellsLam0LowE[2];                  //! cluster N cells vs lambda0, E<2
189   TH2F * fhNCellsLam0HighE[2];                 //! cluster N Cells vs lambda0, E>2
190
191   TH2F * fhEtaLam0LowE[2];                     //! cluster eta vs lambda0, E<2
192   TH2F * fhPhiLam0LowE[2];                     //! cluster phi vs lambda0, E<2
193   TH2F * fhEtaLam0HighE[2];                    //! cluster eta vs lambda0, E>2
194   TH2F * fhPhiLam0HighE[2];                    //! cluster phi vs lambda0, E>2
195     
196   TH2F * fhDispEtaE[2] ;                       //! shower dispersion in eta direction
197   TH2F * fhDispPhiE[2] ;                       //! shower dispersion in phi direction
198   TH2F * fhSumEtaE[2] ;                        //! shower dispersion in eta direction
199   TH2F * fhSumPhiE[2] ;                        //! shower dispersion in phi direction
200   TH2F * fhSumEtaPhiE[2] ;                     //! shower dispersion in eta and phi direction
201   TH2F * fhDispEtaPhiDiffE[2] ;                //! shower dispersion eta - phi
202   TH2F * fhSphericityE[2] ;                    //! shower sphericity in eta vs phi
203   TH2F * fhDispEtaDispPhiEBin[2][5] ;          //! shower dispersion in eta direction vs phi direction for 5 E bins [0-2],[2-4],[4-6],[6-10],[> 10]
204
205   // Weight studies
206   
207   TH2F * fhECellClusterRatio;                  //! e cell / e cluster vs e cluster for selected electrons
208   TH2F * fhECellClusterLogRatio;               //! log (e cell / e cluster)  vs e cluster for selected electrons
209   TH2F * fhEMaxCellClusterRatio;               //! e max cell / e cluster vs e cluster for selected electrons
210   TH2F * fhEMaxCellClusterLogRatio;            //! log (e max cell / e cluster) vs e cluster for selected electrons
211   TH2F * fhLambda0ForW0[14];                   //! L0 for 7 defined w0= 3, 3.5 ... 6 for selected electrons
212   //TH2F * fhLambda1ForW0[14];                    //! L1 for 7 defined w0= 3, 3.5 ... 6 for selected electrons
213   
214   //Fill MC dependent histograms, Origin of this cluster is ...
215
216   TH2F * fhMCDeltaE[2][10]  ;                  //! MC-Reco E distribution coming from MC particle     
217   TH2F * fhMC2E[2][10]  ;                      //! E distribution, Reco vs MC coming from MC particle
218   
219   TH1F * fhMCE[2][10];                          //! Number of identified electron vs cluster energy coming from MC particle
220   TH1F * fhMCPt[2][10];                         //! Number of identified electron vs cluster energy coming from MC particle
221   TH2F * fhMCPhi[2][10];                        //! Phi of identified electron coming from MC particle
222   TH2F * fhMCEta[2][10];                        //! eta of identified electron coming from MC particle
223   
224   // Shower Shape MC
225
226   TH2F * fhMCELambda0[2][6] ;                   //! E vs Lambda0 from MC particle
227   
228   TH2F * fhMCEDispEta[2][6] ;                   //! shower dispersion in eta direction from MC particle
229   TH2F * fhMCEDispPhi[2][6] ;                   //! shower dispersion in phi direction from MC particle
230   TH2F * fhMCESumEtaPhi[2][6] ;                 //! shower dispersion in eta vs phi direction from MC particle
231   TH2F * fhMCEDispEtaPhiDiff[2][6] ;            //! shower dispersion in eta -phi direction from MC particle
232   TH2F * fhMCESphericity[2][6] ;                //! shower sphericity, eta vs phi from MC particle
233
234   TH2F * fhMCElectronELambda0NoOverlap ;        //! E vs Lambda0 from MC electrons, no overlap
235   TH2F * fhMCElectronELambda0TwoOverlap ;       //! E vs Lambda0 from MC electrons, 2 particles overlap
236   TH2F * fhMCElectronELambda0NOverlap ;         //! E vs Lambda0 from MC electrons, N particles overlap
237   
238   //Embedding
239   TH2F * fhEmbeddedSignalFractionEnergy ;       //! Fraction of electron energy of embedded signal vs cluster energy
240   
241   TH2F * fhEmbedElectronELambda0FullSignal ;    //!  Lambda0 vs E for embedded electrons with more than 90% of the cluster energy
242   TH2F * fhEmbedElectronELambda0MostlySignal ;  //!  Lambda0 vs E for embedded electrons with 90%<fraction<50% 
243   TH2F * fhEmbedElectronELambda0MostlyBkg ;     //!  Lambda0 vs E for embedded electrons with 50%<fraction<10% 
244   TH2F * fhEmbedElectronELambda0FullBkg ;       //!  Lambda0 vs E for embedded electrons with less than 10% of the cluster energy
245   
246   AliAnaElectron(              const AliAnaElectron & el) ; // cpy ctor  
247   AliAnaElectron & operator = (const AliAnaElectron & el) ; // cpy assignment
248   
249   ClassDef(AliAnaElectron,5)
250
251 } ;
252  
253
254 #endif//ALIANAELECTRON_H
255
256
257