]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/PartCorrDep/AliAnaPhoton.h
e22eb639f904ef699bc308b7083c71eda600c46c
[u/mrichter/AliRoot.git] / PWG4 / PartCorrDep / AliAnaPhoton.h
1 #ifndef ALIANAPHOTON_H
2 #define ALIANAPHOTON_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice     */
5 /* $Id: AliAnaPhoton.h 27413 2008-07-18 13:28:12Z gconesab $ */
6
7 //_________________________________________________________________________
8 //
9 // Class for the photon identification.
10 // Clusters from calorimeters are identified as photons
11 // and kept in the AOD. Few histograms produced.
12 // Produces input for other analysis classes like AliAnaPi0, 
13 // AliAnaParticleHadronCorrelation ... 
14 //
15
16 //-- Author: Gustavo Conesa (INFN-LNF)
17
18 // --- ROOT system ---
19 class TH2F ;
20 class TH1F;
21 class TString ;
22 class TObjString;
23 class TList ;
24
25 // --- ANALYSIS system ---
26 #include "AliAnaPartCorrBaseClass.h"
27
28 class AliAnaPhoton : public AliAnaPartCorrBaseClass {
29
30  public: 
31   AliAnaPhoton() ;              // default ctor
32   virtual ~AliAnaPhoton() { ; } // virtual dtor
33         
34   //---------------------------------------
35   // General analysis frame methods
36   //---------------------------------------
37   
38   TObjString * GetAnalysisCuts();
39   
40   TList      * GetCreateOutputObjects();
41   
42   void         Init();
43
44   void         InitParameters();
45
46   void         MakeAnalysisFillAOD()  ;
47
48   void         MakeAnalysisFillHistograms() ; 
49   
50   void         Print(const Option_t * opt)const;
51     
52   
53   // Analysis methods
54   
55   Bool_t       ClusterSelected(AliVCluster* cl, TLorentzVector mom) ;
56   
57   void         FillAcceptanceHistograms();
58
59   void         FillShowerShapeHistograms( AliVCluster* cluster, const Int_t mcTag) ;
60   
61   void         SwitchOnFillShowerShapeHistograms()    { fFillSSHistograms = kTRUE  ; }
62   void         SwitchOffFillShowerShapeHistograms()   { fFillSSHistograms = kFALSE ; }  
63   
64   
65   // Analysis parameters setters getters
66   
67   TString      GetCalorimeter()                 const { return fCalorimeter        ; }
68   void         SetCalorimeter(TString  & det)         { fCalorimeter = det         ; }
69     
70   // ** Cluster selection methods **
71   
72   void         SetMinDistanceToBadChannel(Float_t m1, Float_t m2, Float_t m3) {
73                 fMinDist = m1; fMinDist2 = m2; fMinDist3 = m3; }
74
75   void         SetTimeCut(Double_t min, Double_t max) { fTimeCutMin = min; 
76                                                         fTimeCutMax = max          ; }
77   Double_t     GetTimeCutMin()                  const { return fTimeCutMin         ; }
78   Double_t     GetTimeCutMax()                  const { return fTimeCutMax         ; }  
79         
80   void         SetNCellCut(Int_t n)                   { fNCellsCut = n             ; }
81   Double_t     GetNCellCut()                    const { return fNCellsCut          ; }
82   
83   Bool_t       IsTrackMatchRejectionOn()        const { return fRejectTrackMatch   ; }
84   void         SwitchOnTrackMatchRejection()          { fRejectTrackMatch = kTRUE  ; }
85   void         SwitchOffTrackMatchRejection()         { fRejectTrackMatch = kFALSE ; }  
86           
87   void         FillNOriginHistograms(Int_t n)         { fNOriginHistograms = n ; 
88     if(n > 14) fNOriginHistograms = 14; }
89   void         FillNPrimaryHistograms(Int_t n)        { fNPrimaryHistograms= n ;
90     if(n > 7)  fNPrimaryHistograms = 7; }
91
92   // For histograms in arrays, index in the array, corresponding to a particle
93   enum mcTypes    { kmcPhoton = 0,        kmcPi0Decay = 1,       kmcOtherDecay = 2,  
94                     kmcPi0 = 3,           kmcEta = 4,            kmcElectron = 5,       
95                     kmcConversion = 6,    kmcOther = 7,          kmcAntiNeutron = 8,    
96                     kmcAntiProton = 9,    kmcPrompt = 10,        kmcFragmentation = 11, 
97                     kmcISR = 12,          kmcString = 13                               };  
98
99   enum mcPTypes   { kmcPPhoton = 0,       kmcPPi0Decay = 1,       kmcPOtherDecay = 2,  kmcPOther = 3,
100                     kmcPPrompt = 4,       kmcPFragmentation = 5,  kmcPISR = 6           };  
101   
102   enum mcssTypes  { kmcssPhoton = 0,      kmcssOther = 1,       kmcssPi0 = 2,         
103                     kmcssEta = 3,         kmcssConversion = 4,  kmcssElectron = 5       };  
104   
105   private:
106  
107   TString  fCalorimeter ;                // Calorimeter where the gamma is searched;
108   Float_t  fMinDist ;                    // Minimal distance to bad channel to accept cluster
109   Float_t  fMinDist2;                    // Cuts on Minimal distance to study acceptance evaluation
110   Float_t  fMinDist3;                    // One more cut on distance used for acceptance-efficiency study
111   Bool_t   fRejectTrackMatch ;           // If PID on, reject clusters which have an associated TPC track
112   Double_t fTimeCutMin  ;                // Remove clusters/cells with time smaller than this value, in ns
113   Double_t fTimeCutMax  ;                // Remove clusters/cells with time larger than this value, in ns
114   Int_t    fNCellsCut ;                  // Accept for the analysis clusters with more than fNCellsCut cells
115   Bool_t   fFillSSHistograms ;           // Fill shower shape histograms
116   Int_t    fNOriginHistograms;           // Fill only NOriginHistograms of the 14 defined types
117   Int_t    fNPrimaryHistograms;          // Fill only NPrimaryHistograms of the 7 defined types
118
119   //Histograms 
120   TH1F * fhClusterCuts[9];               //! control histogram on the different photon selection cuts
121   TH2F * fhNCellsE;                      //! number of cells in cluster vs E 
122   TH2F * fhMaxCellDiffClusterE;          //! Fraction of energy carried by cell with maximum energy
123   TH2F * fhTimeE;                        //! time of cluster vs E 
124
125   TH1F * fhEPhoton    ;                  //! Number of identified photon vs energy
126   TH1F * fhPtPhoton   ;                  //! Number of identified photon vs transerse momentum 
127   TH2F * fhPhiPhoton  ;                  //! Azimuthal angle of identified  photon vs transerse momentum 
128   TH2F * fhEtaPhoton  ;                  //! Pseudorapidity of identified  photon vs transerse momentum 
129   TH2F * fhEtaPhiPhoton  ;               //! Pseudorapidity vs Phi of identified  photon for transerse momentum > 0.5
130   TH2F * fhEtaPhi05Photon  ;             //! Pseudorapidity vs Phi of identified  photon for transerse momentum < 0.5
131   
132   //Shower shape
133   
134   TH2F * fhDispE;                         //! cluster dispersion vs E
135   TH2F * fhLam0E;                         //! cluster lambda0 vs  E
136   TH2F * fhLam1E;                         //! cluster lambda1 vs  E  
137
138   TH2F * fhDispETRD;                      //! cluster dispersion vs E, SM covered by TRD
139   TH2F * fhLam0ETRD;                      //! cluster lambda0 vs  E, SM covered by TRD
140   TH2F * fhLam1ETRD;                      //! cluster lambda1 vs  E, SM covered by TRD 
141
142   TH2F * fhNCellsLam0LowE;                //! number of cells in cluster vs lambda0
143   TH2F * fhNCellsLam1LowE;                //! number of cells in cluster vs lambda1
144   TH2F * fhNCellsDispLowE;                //! number of cells in cluster vs dispersion
145   TH2F * fhNCellsLam0HighE;               //! number of cells in cluster vs lambda0, E>2
146   TH2F * fhNCellsLam1HighE;               //! number of cells in cluster vs lambda1, E>2
147   TH2F * fhNCellsDispHighE;               //! number of cells in cluster vs dispersion, E>2
148   
149   TH2F * fhEtaLam0LowE;                   //! cluster eta vs lambda0, E<2
150   TH2F * fhPhiLam0LowE;                   //! cluster phi vs lambda0, E<2
151   TH2F * fhEtaLam0HighE;                  //! cluster eta vs lambda0, E>2
152   TH2F * fhPhiLam0HighE;                  //! cluster phi vs lambda0, E>2
153   TH2F * fhLam0DispLowE;                  //! cluster lambda0 vs dispersion, E<2
154   TH2F * fhLam0DispHighE;                 //! cluster lambda0 vs dispersion, E>2
155   TH2F * fhLam1Lam0LowE;                  //! cluster lambda1 vs lambda0, E<2
156   TH2F * fhLam1Lam0HighE;                 //! cluster lambda1 vs lambda0, E>2
157   TH2F * fhDispLam1LowE;                  //! cluster disp vs lambda1, E<2
158   TH2F * fhDispLam1HighE;                 //! cluster disp vs lambda1, E>2
159     
160   //Fill MC dependent histograms, Origin of this cluster is ...
161
162   TH2F * fhMCDeltaE[14]  ;                      //! MC-Reco E distribution coming from MC particle     
163   TH2F * fhMCDeltaPt[14] ;                      //! MC-Reco pT distribution coming from MC particle
164   TH2F * fhMC2E[14]  ;                          //! E distribution, Reco vs MC coming from MC particle
165   TH2F * fhMC2Pt[14] ;                          //! pT distribution, Reco vs MC coming from MC particle
166   
167   TH1F * fhMCE[14];                             //! Number of identified photon vs cluster energy coming from MC particle
168   TH1F * fhMCPt[14];                            //! Number of identified photon vs cluster pT     coming from MC particle
169   TH2F * fhMCPhi[14];                           //! Phi of identified photon coming from MC particle
170   TH2F * fhMCEta[14];                           //! eta of identified photon coming from MC particle
171
172   TH1F * fhEPrimMC[7];                          //! Number of generated photon vs energy
173   TH1F * fhPtPrimMC[7];                         //! Number of generated photon vs pT   
174   TH2F * fhPhiPrimMC[7];                        //! Phi of generted photon
175   TH2F * fhYPrimMC[7];                          //! Rapidity of generated photon 
176   
177   TH1F * fhEPrimMCAcc[7];                       //! Number of generated photon vs energy, in calorimeter acceptance
178   TH1F * fhPtPrimMCAcc[7];                      //! Number of generated photon vs pT, in calorimeter acceptance   
179   TH2F * fhPhiPrimMCAcc[7];                     //! Phi of generted photon, in calorimeter acceptance
180   TH2F * fhYPrimMCAcc[7];                       //! Rapidity of generated photon, in calorimeter acceptance   
181   
182   // Shower Shape MC
183
184   TH2F * fhMCELambda0[6] ;                      //! E vs Lambda0     from MC particle
185   TH2F * fhMCELambda1[6] ;                      //! E vs Lambda1     from MC particle
186   TH2F * fhMCEDispersion[6] ;                   //! E vs Dispersion  from MC particle
187   
188   TH2F * fhMCPhotonELambda0NoOverlap ;          //! E vs Lambda0     from MC photons, no overlap
189   TH2F * fhMCPhotonELambda0TwoOverlap ;         //! E vs Lambda0     from MC photons, 2 particles overlap
190   TH2F * fhMCPhotonELambda0NOverlap ;           //! E vs Lambda0     from MC photons, N particles overlap
191   
192   TH2F * fhMCLambda0vsClusterMaxCellDiffE0[6];  //! Lambda0 vs fraction of energy of max cell for E < 2 GeV
193   TH2F * fhMCLambda0vsClusterMaxCellDiffE2[6];  //! Lambda0 vs fraction of energy of max cell for 2< E < 6 GeV
194   TH2F * fhMCLambda0vsClusterMaxCellDiffE6[6];  //! Lambda0 vs fraction of energy of max cell for E > 6 GeV
195   TH2F * fhMCNCellsvsClusterMaxCellDiffE0[6];   //! NCells  vs fraction of energy of max cell for E < 2
196   TH2F * fhMCNCellsvsClusterMaxCellDiffE2[6];   //! NCells  vs fraction of energy of max cell for 2 < E < 6 GeV
197   TH2F * fhMCNCellsvsClusterMaxCellDiffE6[6];   //! NCells  vs fraction of energy of max cell for E > 6
198   TH2F * fhMCNCellsE[6];                        //! NCells per cluster vs energy
199   TH2F * fhMCMaxCellDiffClusterE[6];            //! Fraction of energy carried by cell with maximum energy
200
201   //Embedding
202   TH2F * fhEmbeddedSignalFractionEnergy ;       //! Fraction of photon energy of embedded signal vs cluster energy
203   
204   TH2F * fhEmbedPhotonELambda0FullSignal ;      //!  Lambda0 vs E for embedded photons with more than 90% of the cluster energy
205   TH2F * fhEmbedPhotonELambda0MostlySignal ;    //!  Lambda0 vs E for embedded photons with 90%<fraction<50% 
206   TH2F * fhEmbedPhotonELambda0MostlyBkg ;       //!  Lambda0 vs E for embedded photons with 50%<fraction<10% 
207   TH2F * fhEmbedPhotonELambda0FullBkg ;         //!  Lambda0 vs E for embedded photons with less than 10% of the cluster energy
208   
209   TH2F * fhEmbedPi0ELambda0FullSignal ;         //!  Lambda0 vs E for embedded photons with more than 90% of the cluster energy
210   TH2F * fhEmbedPi0ELambda0MostlySignal ;       //!  Lambda0 vs E for embedded photons with 90%<fraction<50% 
211   TH2F * fhEmbedPi0ELambda0MostlyBkg ;          //!  Lambda0 vs E for embedded photons with 50%<fraction<10% 
212   TH2F * fhEmbedPi0ELambda0FullBkg ;            //!  Lambda0 vs E for embedded photons with less than 10% of the cluster energy
213   
214   AliAnaPhoton(const AliAnaPhoton & g) ;               // cpy ctor
215   AliAnaPhoton & operator = (const AliAnaPhoton & g) ; // cpy assignment
216   
217   ClassDef(AliAnaPhoton,19)
218
219 } ;
220  
221 #endif//ALIANAPHOTON_H
222
223
224