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