]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGGA/CaloTrackCorrelations/AliAnaParticleHadronCorrelation.h
AliAnaNeutralMesonSelection : Add possibility to select side band pairs of pi0/eta...
[u/mrichter/AliRoot.git] / PWGGA / CaloTrackCorrelations / AliAnaParticleHadronCorrelation.h
1 #ifndef ALIANAPARTICLEHADRONCORRELATION_H
2 #define ALIANAPARTICLEHADRONCORRELATION_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice     */
5
6 //_________________________________________________________________________
7 // Class that contains the algorithm for the analysis of particle - hadron correlations
8 // Particle (for example direct gamma) must be found in a previous analysis 
9 //-- Author: Gustavo Conesa (INFN-LNF)
10
11 //  Modified by Yaxian Mao:
12 // 1. add the UE subtraction for corrlation study
13 // 2. change the correlation variable
14 // 3. Only use leading particle(cluster/track) as trigger for correlation (2010/07/02)
15 // 4. Make decay photon-hadron correlations where decay contribute pi0 mass (2010/09/09)
16 // 5. fill the pout to extract kt at the end, also to study charge asymmetry(2010/10/06) 
17 // 6. Add the possibility for event selection analysis based on vertex and multiplicity bins (10/10/2010)
18 // 7. change the way of delta phi cut for UE study due to memory issue (reduce histograms)
19 // 8. Add the possibility to request the absolute leading particle at the near side or not, set trigger bins, general clean-up (08/2011)
20
21 // --- ROOT system ---
22 //class TH3D;
23
24 // --- Analysis system ---
25 #include "AliAnaCaloTrackCorrBaseClass.h"
26 class AliAODPWG4ParticleCorrelation ;
27
28 class AliAnaParticleHadronCorrelation : public AliAnaCaloTrackCorrBaseClass {
29   
30  public: 
31   
32   AliAnaParticleHadronCorrelation() ; // default ctor
33   virtual ~AliAnaParticleHadronCorrelation() {;} //virtual dtor
34   
35   // General methods
36     
37   TObjString * GetAnalysisCuts();
38   
39   TList      * GetCreateOutputObjects();
40   
41   void         InitParameters();
42   
43   void         MakeAnalysisFillAOD()  ;
44   
45   void         MakeAnalysisFillHistograms() ; 
46   
47   void         Print(const Option_t * opt) const;
48   
49   // Main analysis methods
50   
51   Bool_t       MakeChargedCorrelation  (AliAODPWG4ParticleCorrelation * aodParticle, const TObjArray* pl, const Bool_t bFillHisto) ;
52   
53   Bool_t       MakeNeutralCorrelation  (AliAODPWG4ParticleCorrelation * aodParticle, const TObjArray* pl, const Bool_t bFillHisto) ;
54   
55   void         MakeMCChargedCorrelation(AliAODPWG4ParticleCorrelation * aodParticle);
56   
57   
58   // Parameter setter and getter
59   
60   Float_t      GetMinimumTriggerPt()     const { return fMinTriggerPt     ; }
61   
62   Float_t      GetMaximumAssociatedPt()  const { return fMaxAssocPt       ; }
63   Float_t      GetMinimumAssociatedPt()  const { return fMinAssocPt       ; }
64   
65   Double_t     GetDeltaPhiMaxCut()       const { return fDeltaPhiMaxCut   ; }
66   Double_t     GetDeltaPhiMinCut()       const { return fDeltaPhiMinCut   ; }
67   
68   Double_t     GetUeDeltaPhiMaxCut()     const { return fUeDeltaPhiMaxCut ; }
69   Double_t     GetUeDeltaPhiMinCut()     const { return fUeDeltaPhiMinCut ; }
70   
71   void         SetMinimumTriggerPt(Float_t min){  fMinTriggerPt = min     ; }
72   
73   void         SetAssociatedPtRange(Float_t min, Float_t max)
74     { fMaxAssocPt   = max ;          fMinAssocPt  = min          ; }
75   
76   void         SetDeltaPhiCutRange(Double_t phimin, Double_t phimax)
77     { fDeltaPhiMaxCut   = phimax ;   fDeltaPhiMinCut   = phimin   ; }
78   
79   void         SetUeDeltaPhiCutRange(Double_t uephimin, Double_t uephimax)
80     { fUeDeltaPhiMaxCut = uephimax;  fUeDeltaPhiMinCut = uephimin ; }
81   
82   Bool_t       IsSeveralUEOn()           const { return fMakeSeveralUE    ; }
83   void         SwitchOnSeveralUECalculation()  { fMakeSeveralUE = kTRUE   ; }
84   void         SwitchOffSeveralUECalculation() { fMakeSeveralUE = kFALSE  ; }
85
86   // Do trigger-neutral correlation
87   Bool_t       DoNeutralCorr()           const { return fNeutralCorr      ; }
88   void         SwitchOnNeutralCorr()           { fNeutralCorr = kTRUE     ; }
89   void         SwitchOffNeutralCorr()          { fNeutralCorr = kFALSE    ; }  
90   
91   // Taking the absolute leading as the trigger or not
92   Bool_t       DoAbsoluteLeading()       const { return fMakeAbsoluteLeading   ; }
93   void         SwitchOnAbsoluteLeading()       { fMakeAbsoluteLeading = kTRUE  ; }
94   void         SwitchOffAbsoluteLeading()      { fMakeAbsoluteLeading = kFALSE ; }
95   
96   // Taking the near side leading as the trigger or not
97   Bool_t       DoNearSideLeading()       const { return fMakeNearSideLeading   ; }
98   void         SwitchOnNearSideLeading()       { fMakeNearSideLeading = kTRUE  ; }
99   void         SwitchOffNearSideLeading()      { fMakeNearSideLeading = kFALSE ; }
100   
101   // Do decay-hadron correlation if it is pi0 trigger
102   Bool_t       IsPi0Trigger()            const { return fPi0Trigger       ; }
103   void         SwitchOnDecayCorr()             { fPi0Trigger = kTRUE      ; }
104   void         SwitchOffDecayCorr()            { fPi0Trigger = kFALSE     ; }  
105   
106   Bool_t       OnlyIsolated()            const { return fSelectIsolated   ; }
107   void         SelectIsolated(Bool_t s)        { fSelectIsolated   = s    ; }
108
109   void         SetPi0AODBranchName(TString n)  { fPi0AODBranchName = n    ; }
110   
111   void         SetNAssocPtBins(Int_t n) ;     
112   void         SetAssocPtBinLimit(Int_t ibin, Float_t pt) ;
113                 
114  private:
115   Float_t      fMinTriggerPt ;                 // Minimum trigger hadron pt
116   Float_t      fMaxAssocPt ;                   // Maximum associated hadron pt
117   Float_t      fMinAssocPt ;                   // Minimum associated hadron pt
118   Double_t     fDeltaPhiMaxCut ;               // Minimum Delta Phi Gamma-Hadron
119   Double_t     fDeltaPhiMinCut ;               // Maximum Delta Phi Gamma-Hadron
120   Bool_t       fSelectIsolated ;               // Select only trigger particles isolated
121   Bool_t       fMakeSeveralUE ;                // Do analysis for several underlying events contribution
122   Double_t     fUeDeltaPhiMaxCut ;             // Minimum Delta Phi Gamma-Underlying Hadron
123   Double_t     fUeDeltaPhiMinCut ;             // Maximum Delta Phi Gamma-Underlying Hadron
124   TString      fPi0AODBranchName;              // Name of AOD branch with pi0, not trigger
125   Bool_t       fNeutralCorr ;                  // switch the analysis with neutral particles
126   Bool_t       fPi0Trigger ;                   // switch the analysis with decay photon from pi0 trigger
127   Bool_t       fMakeAbsoluteLeading ;          // requesting absolute leading triggers
128   Bool_t       fMakeNearSideLeading ;          // requesting near side leading (+-90ยบ from trigger particle) triggers
129   Int_t        fLeadingTriggerIndex ;          // Store here per event the trigger index, to avoid too many loops
130   
131   Int_t        fNAssocPtBins ;                 // Number of associated pT bins under study
132   Float_t      fAssocPtBinLimit[10] ;          // Associated pT under study
133   
134   //Histograms
135
136   //leading particles 
137   TH1F *       fhPtLeading;                    //! pT distribution of leading particles
138   TH2F *       fhPhiLeading;                   //! phi distribution vs pT of leading particles
139   TH2F *       fhEtaLeading;                   //! eta distribution vs pT of leading particles
140   
141   //trigger-charged histograms
142   TH2F *       fhDeltaPhiDeltaEtaCharged ;     //! differences of eta and phi between trigger and charged hadrons
143   TH2F *       fhPhiCharged  ;                 //! Phi distribution of charged particles
144   TH2F *       fhEtaCharged  ;                 //! Eta distribution of charged particles
145   TH2F *       fhDeltaPhiCharged  ;            //! Difference of charged particle phi and trigger particle  phi as function of  trigger particle pT
146   TH2F *       fhDeltaEtaCharged  ;            //! Difference of charged particle eta and trigger particle  eta as function of  trigger particle pT
147   TH2F *       fhDeltaPhiChargedPt  ;          //! Difference of charged particle phi and trigger particle  phi as function of charged particle pT
148   TH2F *       fhDeltaPhiUeChargedPt ;         //! Difference of charged particle from underlying events phi and trigger particle  phi as function of charged particle pT
149   TH2F *       fhXECharged  ;                  //! Trigger particle -charged hadron momentum imbalance histogram
150   TH2F *       fhXEUeCharged  ;                //! Trigger particle -underlying charged hadron momentum imbalance histogram  
151   TH2F *       fhXEPosCharged  ;               //! Trigger particle -positive charged hadron momentum imbalance histogram
152   TH2F *       fhXENegCharged  ;               //! Trigger particle -negative charged hadron momentum imbalance histogram 
153   TH2F *       fhPtHbpXECharged  ;             //! Trigger particle -charged hadron momentum HBP histogram
154   TH2F *       fhPtHbpXEUeCharged  ;           //! Trigger particle -underlying charged hadron momentum HBP histogram  
155   TH2F *       fhZTCharged  ;                  //! Trigger particle -charged hadron momentum imbalance histogram
156   TH2F *       fhZTUeCharged  ;                //! Trigger particle -underlying charged hadron momentum imbalance histogram  
157   TH2F *       fhZTPosCharged  ;               //! Trigger particle -positive charged hadron momentum imbalance histogram
158   TH2F *       fhZTNegCharged  ;               //! Trigger particle -negative charged hadron momentum imbalance histogram 
159   TH2F *       fhPtHbpZTCharged  ;             //! Trigger particle -charged hadron momentum HBP histogram
160   TH2F *       fhPtHbpZTUeCharged  ;           //! Trigger particle -underlying charged hadron momentum HBP histogram  
161  
162   //if several UE calculation is on, most useful for jet-jet events contribution
163   TH2F *       fhDeltaPhiUeLeftCharged  ;      //! Difference of charged particle from underlying events phi and trigger particle  phi as function of charged particle pT
164   TH2F *       fhDeltaPhiUeRightCharged  ;     //! Difference of charged particle from underlying events phi and trigger particle  phi 
165   TH2F *       fhXEUeLeftCharged  ;            //! Trigger particle -underlying charged hadron momentum imbalance histogram 
166   TH2F *       fhXEUeRightCharged ;            //! Trigger particle -underlying charged hadron momentum imbalance histogram  
167   TH2F *       fhPtHbpXEUeLeftCharged  ;       //! Trigger particle -underlying charged hadron momentum HBP histogram 
168   TH2F *       fhPtHbpXEUeRightCharged  ;      //! Trigger particle -underlying charged hadron momentum HBP histogram  
169   TH2F *       fhZTUeLeftCharged  ;            //! Trigger particle -underlying charged hadron momentum imbalance histogram 
170   TH2F *       fhZTUeRightCharged ;            //! Trigger particle -underlying charged hadron momentum imbalance histogram  
171   TH2F *       fhPtHbpZTUeLeftCharged  ;       //! Trigger particle -underlying charged hadron momentum HBP histogram 
172   TH2F *       fhPtHbpZTUeRightCharged  ;      //! Trigger particle -underlying charged hadron momentum HBP histogram 
173   
174   //for pout and kt extraction
175   TH2F *       fhPtTrigPout  ;                 //! Pout =associated pt*sin(delta phi) distribution vs trigger pt 
176   TH2F *       fhPtTrigCharged ;               //! trigger and correlated particl pt, to be used for mean value for kt  
177   
178   //if different multiplicity analysis asked
179   TH2F **      fhTrigDeltaPhiCharged ;         //![GetMultiBin()] differences of phi between trigger and charged hadrons
180   TH2F **      fhTrigDeltaEtaCharged ;         //![GetMultiBin()] differences of eta between trigger and charged hadrons
181   TH2F **      fhTrigXECorr  ;                   //![GetMultiBin()] Trigger particle -charged hadron momentum imbalance histogram
182   TH2F **      fhTrigXEUeCorr  ;                 //![GetMultiBin()] Trigger particle -UE charged hadron momentum imbalance histogram
183   TH2F **      fhTrigZTCorr  ;                   //![GetMultiBin()] Trigger particle -charged hadron momentum imbalance histogram
184   TH2F **      fhTrigZTUeCorr  ;                 //![GetMultiBin()] Trigger particle -UE charged hadron momentum imbalance histogram
185   
186   TH2F *       fhAssocPt ;                     //! Trigger pT vs associated pT 
187   TH2F *       fhAssocPtBkg;                   //! Trigger pT vs associated pT for background
188   TH2F **      fhDeltaPhiAssocPtBin;           //![fNAssocPtBins] Trigger pT vs dPhi for different associated pt bins
189   TH2F **      fhDeltaPhiAssocPtBinHMPID;      //![fNAssocPtBins] Trigger pT vs dPhi for different associated pt bins, track with HMPID  
190   TH2F **      fhDeltaPhiAssocPtBinHMPIDAcc;   //![fNAssocPtBins] Trigger pT vs dPhi for different associated pt bins, track with HMPIDAcc  
191   TH2F **      fhDeltaPhiBradAssocPtBin;       //![fNAssocPtBins] Trigger pT vs dPhi Brad (?) for different associated pt bins
192   TH2F *       fhDeltaPhiBrad;                 //! Trigger pT vs dPhi Brad (?) for different associated pt bins
193   TH2F **      fhXEAssocPtBin ;                //![fNAssocPtBins] Trigger pT vs xE for different associated pt bins
194   TH2F *       fhXE ;                          //! Trigger pT vs xE for different associated pt bins
195   TH2F **      fhZTAssocPtBin ;                //![fNAssocPtBins] Trigger pT vs zT for different associated pt bins
196   TH2F *       fhZT ;                          //! Trigger pT vs zT for different associated pt bins
197
198   //trigger-neutral histograms
199   TH2F *       fhDeltaPhiDeltaEtaNeutral ;     //! differences of eta and phi between trigger and neutral hadrons (pi0)
200   TH2F *       fhPhiNeutral   ;                //! Phi distribution of neutral particles  
201   TH2F *       fhEtaNeutral   ;                //! Eta distribution of neutral particles
202   TH2F *       fhDeltaPhiNeutral   ;           //! Difference of neutral particle phi and trigger particle  phi as function of  trigger particle pT
203   TH2F *       fhDeltaEtaNeutral  ;            //! Difference of neutral particle eta and trigger particle  eta as function of  trigger particle pT
204   TH2F *       fhDeltaPhiNeutralPt  ;          //! Difference of neutral particle phi and trigger particle  phi as function of neutral particle particle pT
205   TH2F *       fhDeltaPhiUeNeutralPt ;         //! Difference of neutral particle phi and trigger particle  phi as function of neutral particle particle pT  
206   TH2F *       fhXENeutral  ;                  //! Trigger particle - neutral hadron momentum imbalance histogram 
207   TH2F *       fhXEUeNeutral  ;                //! Trigger particle - neutral hadron momentum imbalance histogram 
208   TH2F *       fhPtHbpXENeutral  ;             //! Trigger particle -neutral particle momentum HBP histogram
209   TH2F *       fhPtHbpXEUeNeutral  ;           //! Trigger particle -underlying neutral hadron momentum HBP histogram  
210   TH2F *       fhZTNeutral  ;                  //! Trigger particle - neutral hadron momentum imbalance histogram 
211   TH2F *       fhZTUeNeutral  ;                //! Trigger particle - neutral hadron momentum imbalance histogram 
212   TH2F *       fhPtHbpZTNeutral  ;             //! Trigger particle -neutral particle momentum HBP histogram
213   TH2F *       fhPtHbpZTUeNeutral  ;           //! Trigger particle -underlying neutral hadron momentum HBP histogram  
214   
215   //if several UE calculation is on, most useful for jet-jet events contribution
216   TH2F *       fhDeltaPhiUeLeftNeutral  ;      //! Difference of charged particle from underlying events phi and trigger particle  phi as function of neutral particle pT
217   TH2F *       fhDeltaPhiUeRightNeutral  ;     //! Difference of charged particle from underlying events phi and trigger particle  phi 
218   TH2F *       fhXEUeLeftNeutral  ;            //! Trigger particle -underlying neutral hadron momentum imbalance histogram 
219   TH2F *       fhXEUeRightNeutral ;            //! Trigger particle -underlying neutral hadron momentum imbalance histogram 
220   TH2F *       fhPtHbpXEUeLeftNeutral  ;       //! Trigger particle -underlying neutral hadron momentum HBP histogram 
221   TH2F *       fhPtHbpXEUeRightNeutral  ;      //! Trigger particle -underlying neutral hadron momentum HBP histogram 
222   TH2F *       fhZTUeLeftNeutral  ;            //! Trigger particle -underlying neutral hadron momentum imbalance histogram 
223   TH2F *       fhZTUeRightNeutral ;            //! Trigger particle -underlying neutral hadron momentum imbalance histogram 
224   TH2F *       fhPtHbpZTUeLeftNeutral  ;       //! Trigger particle -underlying neutral hadron momentum HBP histogram 
225   TH2F *       fhPtHbpZTUeRightNeutral  ;      //! Trigger particle -underlying neutral hadron momentum HBP histogram 
226   
227   //for decay photon trigger correlation
228   TH2F *       fhPtPi0DecayRatio ;             //! for pi0 pt and ratio of decay photon pt
229   TH2F *       fhDeltaPhiDecayCharged  ;       //! Difference of charged particle phi and decay trigger
230   TH2F *       fhXEDecayCharged ;              //! Trigger particle (decay from pi0)-charged hadron momentum imbalance histogram    
231   TH2F *       fhZTDecayCharged ;              //! Trigger particle (decay from pi0)-charged hadron momentum imbalance histogram    
232   TH2F *       fhDeltaPhiDecayNeutral  ;       //! Difference of neutral particle phi and decay trigger
233   TH2F *       fhXEDecayNeutral ;              //! Trigger particle (decay from pi0)-neutral hadron momentum imbalance histogram  
234   TH2F *       fhZTDecayNeutral ;              //! Trigger particle (decay from pi0)-neutral hadron momentum imbalance histogram  
235
236   //if the data is MC, fill MC information
237   TH2F *       fh2phiLeadingParticle;          //! #phi resolution for triggers
238   TH1F *       fhMCLeadingCount;               //! add explanation
239   TH2F *       fhMCEtaCharged;                 //! add explanation
240   TH2F *       fhMCPhiCharged;                 //! add explanation
241   TH2F *       fhMCDeltaEtaCharged;            //! add explanation
242   TH2F *       fhMCDeltaPhiCharged;            //! add explanation
243   TH2F *       fhMCDeltaPhiDeltaEtaCharged;    //! add explanation
244   TH2F *       fhMCDeltaPhiChargedPt;          //! add explanation
245   TH2F *       fhMCPtXECharged;                //! add explanation
246   TH2F *       fhMCPtHbpXECharged;             //! add explanation
247   TH2F *       fhMCPtZTCharged;                //! add explanation
248   TH2F *       fhMCPtHbpZTCharged;             //! add explanation
249   TH2F *       fhMCPtTrigPout ;                //! add explanation
250   TH2F *       fhMCPtAssocDeltaPhi  ;          //! Pout =associated pt*sin(delta phi) distribution
251
252   AliAnaParticleHadronCorrelation(              const AliAnaParticleHadronCorrelation & ph) ; // cpy ctor
253   AliAnaParticleHadronCorrelation & operator = (const AliAnaParticleHadronCorrelation & ph) ; // cpy assignment
254         
255   ClassDef(AliAnaParticleHadronCorrelation,11)
256 } ;
257  
258
259 #endif //ALIANAPARTICLEHADRONCORRELATION_H
260
261
262