]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/AliAnaGammaJetLeadCone.h
macro added: library checks specific to each HLT module
[u/mrichter/AliRoot.git] / PWG4 / AliAnaGammaJetLeadCone.h
1 #ifndef ALIANAGAMMAJETLEADCONE_H
2 #define ALIANAGAMMAJETLEADCONE_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice     */
5 /* $Id$ */
6
7 /* History of cvs commits:
8  *
9  * $Log$
10  * Revision 1.2  2007/08/17 12:40:04  schutz
11  * New analysis classes by Gustavo Conesa
12  *
13  * Revision 1.1.2.1  2007/07/26 10:32:09  schutz
14  * new analysis classes in the the new analysis framework
15  *
16  *
17  */
18
19 //_________________________________________________________________________
20 // Class that contains the algorithm for the reconstruction of jet, cone around leading particle
21 //  Class created from old AliPHOSGammaJet
22 //  (see AliRoot versions previous Release 4-09)
23 //-- Author: Gustavo Conesa (INFN-LNF)
24
25 #include "AliAnaGammaCorrelation.h"
26
27 class AliAnaGammaJetLeadCone : public AliAnaGammaCorrelation {
28
29 public: 
30   
31   AliAnaGammaJetLeadCone() ; // default ctor
32   AliAnaGammaJetLeadCone(const AliAnaGammaJetLeadCone & g) ; // cpy ctor
33   AliAnaGammaJetLeadCone & operator = (const AliAnaGammaJetLeadCone & g) ;//cpy assignment
34   virtual ~AliAnaGammaJetLeadCone() ; //virtual dtor
35   
36   TList * GetCreateOutputObjects();
37
38   void InitParameters();
39
40   void Print(const Option_t * opt) const;
41  
42   Bool_t   AreSeveralConeAndPtCuts() const {return fSeveralConeAndPtCuts ; }
43   void SetSeveralConeAndPtCuts(Bool_t several){fSeveralConeAndPtCuts = several ;}
44
45   Bool_t   IsPbPb() const {return fPbPb ; }
46   void SetPbPb(Bool_t opt){fPbPb = opt; }
47
48   Double_t GetEtaEMCALCut() const {return fEtaEMCALCut;}
49   Double_t GetPhiEMCALCut(Int_t i) const {return fPhiEMCALCut[i];}
50   void SetEtaEMCALCut(Double_t etacut) {fEtaEMCALCut = etacut ; }
51   void SetPhiEMCALCut(Double_t phi, Int_t i){fPhiEMCALCut[i] = phi; }
52
53   Double_t GetPtJetSelectionCut() const {return fPtJetSelectionCut ; }
54   Double_t GetJetRatioMaxCut() const {return fJetRatioMaxCut ; }
55   Double_t GetJetRatioMinCut() const {return fJetRatioMinCut ; }
56  
57   void SetPtJetSelectionCut(Double_t cut){fPtJetSelectionCut = cut; }
58   void SetJetSelection(UInt_t select){ fSelect= select ; }
59
60   Int_t       GetJetNCones() const {return fJetNCone ; }
61   Int_t       GetJetNPtThres() const {return fJetNPt ; }
62   Float_t    GetJetCone() const {return fJetCone ; }
63   Float_t    GetJetPtThreshold() const {return fJetPtThreshold ; }
64   Float_t    GetJetPtThresPbPb() const {return fJetPtThresPbPb ; }
65   Float_t    GetJetCones(Int_t i) const {return fJetCones[i] ; }
66   Float_t    GetJetPtThreshold(Int_t i) const {return fJetPtThres[i] ; }
67   TString   GetJetConeName(Int_t i) const {return fJetNameCones[i] ; }
68   TString   GetJetPtThresName(Int_t i) const {return fJetNamePtThres[i] ; }
69
70   void SetJetNCones(Int_t n){fJetNCone = n ; }
71   void SetJetNPtThresholds(Int_t n){fJetNPt = n ; }
72   void SetJetCones(Int_t i, Float_t cone, TString sc)
73     {fJetCones[i] = cone ; fJetNameCones[i] = sc; };
74   void SetCone(Float_t cone)
75     {fJetCone = cone; }
76   void SetJetPtThreshold(Float_t pt){fJetPtThreshold = pt; };
77   void SetJetPtThresPbPb(Float_t pt){fJetPtThresPbPb = pt; };
78   void SetJetPtThresholds(Int_t i,Float_t pt, TString spt){fJetPtThres[i] = pt ; 
79   fJetNamePtThres[i] = spt; };
80
81   void SetJetRatioCutRange(Double_t ratiomin, Double_t ratiomax)
82     {fJetRatioMaxCut =ratiomax;  fJetRatioMinCut = ratiomin ; }
83   void SetJetCTSRatioCutRange(Double_t ratiomin, Double_t ratiomax)
84     {fJetCTSRatioMaxCut =ratiomax;  fJetCTSRatioMinCut = ratiomin ; }
85   
86   void MakeGammaCorrelation(TParticle * pGamma, TClonesArray * plCTS,   TClonesArray * plNe) ;
87   
88   private:
89
90   Double_t CalculateJetRatioLimit(const Double_t ptg, const Double_t *param, 
91                                   const Double_t *x);
92   void FillJetHistos(TClonesArray * pl, Double_t ptg, Double_t ptl,TString type, TString lastname);
93
94   Bool_t IsJetSelected(const Double_t ptg, const Double_t ptjet);
95
96   void MakeJet(TClonesArray * plCTS, TClonesArray * plNe, 
97                TParticle * pGamma, TParticle* pLeading, TString lastname); 
98   
99   void GetLeadingCharge(TClonesArray * pl, TParticle *pGamma, TParticle * pLeading) const ;
100   void GetLeadingPi0   (TClonesArray * pl, TParticle *pGamma, TParticle * pLeading)  ;
101   Bool_t GetLeadingParticle(TClonesArray * plCTS, TClonesArray * plNe, 
102                             TParticle *pGamma, TParticle * pLeading) ;
103   
104   void SetJet(TParticle * part, Bool_t & b, Float_t cone, Double_t eta, 
105               Double_t phi);
106
107   private:
108
109   Bool_t       fPbPb;          // PbPb event
110   Bool_t       fSeveralConeAndPtCuts;     //  To play with the jet cone size and pt th.
111
112   Double_t   fEtaEMCALCut ;         // Eta EMCAL acceptance
113   Double_t   fPhiEMCALCut[2] ; // Phi cut maximum
114
115   //Jet selection parameters
116   //Fixed cuts (old)
117   Double_t   fJetCTSRatioMaxCut ; // Leading particle/gamma Ratio cut maximum
118   Double_t   fJetCTSRatioMinCut ; // Leading particle/gamma Ratio cut minimum
119   Double_t   fJetRatioMaxCut ; // Jet/gamma Ratio cut maximum
120   Double_t   fJetRatioMinCut ; // Jet/gamma Ratio cut minimum
121
122   //Cuts depending on jet pt
123   Double_t fJetE1[2];    //Rec. jet energy parameters
124   Double_t fJetE2[2];    //Rec. jet energy parameters
125   Double_t fJetSigma1[2];//Rec. sigma of jet energy  parameters
126   Double_t fJetSigma2[2];//Rec. sigma of jet energy  parameters
127   Double_t fBkgMean[6];  //Background mean energy 
128   Double_t fBkgRMS[6];   //Background RMS
129   Double_t fJetXMin1[6]; //X Factor to set jet min limit for pp
130   Double_t fJetXMin2[6]; //X Factor to set jet min limit for PbPb
131   Double_t fJetXMax1[6]; //X Factor to set jet max limit for pp
132   Double_t fJetXMax2[6]; //X Factor to set jet max limit for PbPb
133
134   Int_t         fJetNCone ;            // Number of jet cones sizes
135   Int_t         fJetNPt   ;            // Number of jet particle pT threshold
136   Double_t   fJetCone  ;            // Jet cone sizes under study (!fSeveralConeAndPtCuts)
137   Double_t   fJetCones[10];         // Jet cone sizes under study (fSeveralConeAndPtCuts)
138   TString     fJetNameCones[10];     // String name of cone to append to histos
139   Double_t   fJetPtThreshold;       // Jet pT threshold under study(!fSeveralConeAndPtCuts)
140   Double_t   fJetPtThresPbPb;       // Jet pT threshold under study(!fSeveralConeAndPtCuts)
141   Double_t   fJetPtThres[10];       // Jet pT threshold under study(fSeveralConeAndPtCuts)
142   TString     fJetNamePtThres[10];   // String name of pt th to append to histos
143   Double_t   fPtJetSelectionCut; // Jet pt to change to low pt jets analysis
144   UInt_t       fSelect  ;   //kTRUE: Selects all jets, no limits.
145  
146   //Histograms
147
148   TH2F * fhPhiCharged  ; 
149   TH2F * fhPhiNeutral   ; 
150   TH2F * fhEtaCharged  ; 
151   TH2F * fhEtaNeutral   ; 
152   TH2F * fhDeltaPhiGammaCharged  ;  
153   TH2F * fhDeltaPhiGammaNeutral   ; 
154   TH2F * fhDeltaEtaGammaCharged  ; 
155   TH2F * fhDeltaEtaGammaNeutral  ; 
156
157   TH2F * fhAnglePairLeading  ; 
158   TH2F * fhInvMassPairLeading  ; 
159   TH2F * fhChargedRatio  ; 
160   TH2F * fhNeutralRatio   ; 
161   TH1F * fhNBkg   ; 
162   TH2F * fhNLeading  ; 
163   TH1F * fhNJet  ; 
164   TH2F * fhJetRatio  ; 
165   TH2F * fhJetPt   ; 
166   TH2F * fhBkgRatio   ; 
167   TH2F * fhBkgPt  ; 
168   TH2F * fhJetFragment  ; 
169   TH2F * fhBkgFragment  ; 
170   TH2F * fhJetPtDist  ; 
171   TH2F * fhBkgPtDist  ; 
172
173   TH2F * fhJetRatios[5][5];
174   TH2F * fhJetPts[5][5];
175   TH2F * fhBkgRatios[5][5];  
176   TH2F * fhBkgPts[5][5];
177   
178   TH2F * fhNLeadings[5][5];
179   TH1F * fhNJets[5][5];
180   TH1F * fhNBkgs[5][5];
181   
182   TH2F * fhJetFragments[5][5];
183   TH2F * fhBkgFragments[5][5];
184   TH2F * fhJetPtDists[5][5];
185   TH2F * fhBkgPtDists[5][5];
186   
187
188   ClassDef(AliAnaGammaJetLeadCone,1)
189 } ;
190  
191
192 #endif //ALIANAGAMMAJETLEADCONE_H
193
194
195