1 #ifndef ALIPHOSGammaJet_H
2 #define ALIPHOSGammaJet_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
7 //_________________________________________________________________________
8 // Class for the analysis of gamma-jet correlations.
9 // Basically it seaches for a prompt photon in the PHOS acceptance,
10 // if so we construct a jet around the highest pt particle in the opposite
11 // side in azimuth. This jet has to fullfill several conditions to be
12 // accepted. Then the fragmentation function of this jet is constructed
14 //*-- Author: Gustavo Conesa & Yves Schutz (IFIC, CERN)
16 // --- ROOT system ---
20 class AliPHOSGeometry ;
21 class AliPHOSFastGlobalReconstruction ;
22 //#include "../PYTHIA6/AliGenPythia.h"
23 // --- AliRoot header files ---
25 class AliPHOSGammaJet : public TTask {
29 AliPHOSGammaJet() ; // default ctor
30 AliPHOSGammaJet(const TString inputfilename) ; //ctor
31 AliPHOSGammaJet(const AliPHOSGammaJet & gj) ; // cpy ctor
32 AliPHOSGammaJet & operator = (const AliPHOSGammaJet & /*rvalue*/)
33 { return *this ;} //assignement operator requested by coding convention but not needed
34 virtual ~AliPHOSGammaJet() ; //virtual dtor
35 virtual void Exec(Option_t *option);
37 Double_t GetAngleMaxParam(Int_t i) const {return fAngleMaxParam.At(i) ; }
38 Double_t GetEtaCut() const {return fEtaCut;}
39 Double_t GetPhiEMCALCut(Int_t i) const {return fPhiEMCALCut[i];}
40 TString GetHIJINGFileName() const {return fHIJINGFileName ; }
41 TString GetHistosFileName() const {return fOutputFileName ; }
42 Double_t GetInvMassMaxCut() const {return fInvMassMaxCut ; }
43 Double_t GetInvMassMinCut() const {return fInvMassMinCut ; }
44 Double_t GetPhiMaxCut() const {return fPhiMaxCut ; }
45 Double_t GetPhiMinCut() const {return fPhiMinCut ; }
46 Double_t GetPtCut() const {return fPtCut ; }
47 Double_t GetNeutralPtCut() const {return fNeutralPtCut ; }
48 Double_t GetChargedPtCut() const {return fChargedPtCut ; }
49 Double_t GetPtJetSelectionCut() const {return fPtJetSelectionCut ; }
50 Double_t GetMinDistance() const {return fMinDistance ; }
51 Double_t GetJetRatioMaxCut() const {return fJetRatioMaxCut ; }
52 Double_t GetJetRatioMinCut() const {return fJetRatioMinCut ; }
53 Double_t GetRatioMaxCut() const {return fRatioMaxCut ; }
54 Double_t GetRatioMinCut() const {return fRatioMinCut ; }
55 Int_t GetNEvent() const {return fNEvent ; }
56 Int_t GetNCones() const {return fNCone ; }
57 Int_t GetNPtThres() const {return fNPt ; }
58 Float_t GetCone() const {return fCone ; }
59 Float_t GetPtThreshold() const {return fPtThreshold ; }
60 Float_t GetCones(Int_t i) const {return fCones[i] ; }
61 Float_t GetPtThreshold(Int_t i) const {return fPtThres[i] ; }
62 TString GetConeName(Int_t i) const {return fNameCones[i] ; }
63 TString GetPtThresName(Int_t i) const {return fNamePtThres[i] ; }
64 Bool_t GetTPCCutsLikeEMCAL() const {return fTPCCutsLikeEMCAL ; }
66 Bool_t IsAnyConeOrPt() const {return fAnyConeOrPt ; }
67 Bool_t IsFastReconstruction() const {return fOptFast ; }
68 Bool_t IsHIJING() const {return fHIJING ; }
69 Bool_t IsOnlyCharged() const {return fOnlyCharged ; }
71 void Plot(TString what="all", Option_t *option="") const;
72 void Print(char * opt);
74 void SetAngleMaxParam(Int_t i, Double_t par)
75 {fAngleMaxParam.AddAt(par,i) ; }
76 void SetAnyConeOrPt(Bool_t any){fAnyConeOrPt = any ;}
77 void SetEtaCut(Double_t etacut) {fEtaCut = etacut ; }
78 void SetPhiEMCALCut(Double_t phi, Int_t i){fPhiEMCALCut[i] = phi; }
79 void SetFastReconstruction(Bool_t fast){fOptFast = fast ; }
80 void SetHIJING(Bool_t opt){fHIJING = opt; }
81 void SetHIJINGFileName(TString file){fHIJINGFileName = file ; }
82 void SetNCones(Int_t n){fNCone = n ; }
83 void SetNPtThresholds(Int_t n){fNPt = n ; }
84 void SetCones(Int_t i, Float_t cone, TString sc)
85 {fCones[i] = cone ; fNameCones[i] = sc; };
86 void SetCone(Float_t cone)
88 void SetPtThreshold(Float_t pt){fPtThreshold = pt; };
89 void SetPtThresholds(Int_t i,Float_t pt, TString spt){fPtThres[i] = pt ;
90 fNamePtThres[i] = spt; };
91 void SetOnlyCharged(Bool_t opt){fOnlyCharged = opt; }
92 void SetPythiaFileName(TString file){fInputFileName = file ; }
93 void SetHistosFileName(TString file){fOutputFileName = file ; }
94 void SetInvMassCutRange(Double_t invmassmin, Double_t invmassmax)
95 {fInvMassMaxCut =invmassmax; fInvMassMinCut =invmassmin;}
96 void SetJetRatioCutRange(Double_t ratiomin, Double_t ratiomax)
97 {fJetRatioMaxCut =ratiomax; fJetRatioMinCut = ratiomin ; }
98 void SetJetTPCRatioCutRange(Double_t ratiomin, Double_t ratiomax)
99 {fJetTPCRatioMaxCut =ratiomax; fJetTPCRatioMinCut = ratiomin ; }
100 void SetNEvent(Int_t n){fNEvent = n ; }
101 void SetMinDistance(Double_t min){fMinDistance = min ; }
102 void SetPhiCutRange(Double_t phimin, Double_t phimax)
103 {fPhiMaxCut =phimax; fPhiMinCut =phimin;}
104 void SetPtCut(Double_t ptcut)
106 void SetNeutralPtCut(Double_t ptcut)
107 {fNeutralPtCut =ptcut;}
108 void SetChargedPtCut(Double_t ptcut)
109 {fChargedPtCut =ptcut;}
110 void SetPtJetSelectionCut(Double_t cut){fPtJetSelectionCut = cut; }
111 void SetJetSelection(Bool_t select){ fSelect= select ; }
112 void SetRatioCutRange(Double_t ratiomin, Double_t ratiomax)
113 {fRatioMaxCut = ratiomax; fRatioMinCut = ratiomin;}
114 void SetTPCCutsLikeEMCAL(Bool_t b){ fTPCCutsLikeEMCAL= b ; }
118 // void AddHIJINGToList(TList & particleList, TList & particleListCh,
119 // TList & particleListNe, const Int_t iEvent,
120 // const TLorentzVector gamma, Double_t & rot );
122 void AddHIJINGToList(Int_t iEvent, TClonesArray * particleList,
123 TClonesArray * plCh, TClonesArray * plNe,
124 TClonesArray * plNePHOS, const AliPHOSGeometry * geom);
127 Double_t CalculateJetRatioLimit(const Double_t ptg, const Double_t *param,
130 void CreateParticleList(Int_t iEvent, TClonesArray * particleList,
131 TClonesArray * plCh, TClonesArray * plNe,
132 TClonesArray * plNePHOS,
133 const AliPHOSGeometry * geom );
135 void FillJetHistos(TClonesArray * pl, Double_t ptg, TString conf, TString type);
137 void FillJetHistosAnyConeOrPt( TClonesArray * pl, Double_t ptg, TString conf,
138 TString type, TString cone, TString ptcut);
139 Bool_t IsAngleInWindow(const Float_t angle, const Float_t e);
140 Bool_t IsJetSelected(const Double_t ptg, const Double_t ptjet,
143 void MakeJet(TClonesArray * particleList,
144 Double_t ptg, Double_t phig,
145 Double_t ptl, Double_t phil, Double_t etal,
146 TString type, TLorentzVector & jet);
147 void MakeJetAnyConeOrPt(TClonesArray * particleList, Double_t ptg,
148 Double_t phig, Double_t ptl, Double_t phil,
149 Double_t etal, TString type);
150 void GetGammaJet(TClonesArray * pl, Double_t &pt,
151 Double_t &phi, Double_t &eta, Bool_t &Is) const;
153 void GetLeadingCharge(TClonesArray * pl,
154 Double_t ptg, Double_t phig,
155 Double_t &pt, Double_t &eta, Double_t &phi) const ;
156 void GetLeadingPi0 (TClonesArray * pl,
157 Double_t ptg, Double_t phig,
158 Double_t &pt, Double_t &eta, Double_t &phi) ;
160 void InitParameters();
161 Double_t MakeEnergy(const Double_t energy) ;
163 void MakePhoton(TLorentzVector & particle) ;
164 TVector3 MakePosition(const Double_t energy, const TVector3 pos) ;
166 void Pi0Decay(Double_t mPi0, TLorentzVector &p0,
167 TLorentzVector &p1, TLorentzVector &p2, Double_t &angle) ;
168 Double_t SigmaE(Double_t energy) ;
169 Double_t SigmaP(Double_t energy) ;
171 void SetJet(TParticle * part, Bool_t & b, Float_t cone, Double_t eta,
175 Bool_t fAnyConeOrPt; // To play with the jet cone size and pt th.
176 Option_t * fOptionGJ ; //! Fill most interesting histograms
177 // and give interesting information
178 TFile * fOutputFile ; //! Output file
179 TString fOutputFileName; //! Output file Name
180 TString fInputFileName; //!
181 TString fHIJINGFileName; //!
182 Bool_t fHIJING; // Add HIJING event to PYTHIA event?
183 Double_t fEtaCut ; // Eta cut
184 Bool_t fOnlyCharged ; // Only jets of charged particles
185 Double_t fPhiEMCALCut[2] ; // Phi cut maximum
186 Double_t fPhiMaxCut ; // Phi cut maximum
187 Double_t fPhiMinCut ; // Phi cut minimun
188 Double_t fPtCut ; // Min pt in PHOS
189 Double_t fNeutralPtCut ; // Min pt detected in PHOS
190 Double_t fChargedPtCut ; // Min pt detected in TPC
191 Double_t fInvMassMaxCut ; // Invariant Mass cut maximum
192 Double_t fInvMassMinCut ; // Invariant Masscut minimun
193 Double_t fMinDistance ; // Minimal distance to resolve gamma decay.
194 Double_t fRatioMaxCut ; // Leading particle/gamma Ratio cut maximum
195 Double_t fRatioMinCut ; // Leading particle/gamma Ratio cut minimum
196 Bool_t fTPCCutsLikeEMCAL ; //Same jet energy ratio limits for both conf.
198 //Jet selection parameters
200 Double_t fJetTPCRatioMaxCut ; // Leading particle/gamma Ratio cut maximum
201 Double_t fJetTPCRatioMinCut ; // Leading particle/gamma Ratio cut minimum
202 Double_t fJetRatioMaxCut ; // Jet/gamma Ratio cut maximum
203 Double_t fJetRatioMinCut ; // Jet/gamma Ratio cut minimum
205 //Cuts depending on jet pt
206 Double_t fJetE1[2]; //Rec. jet energy parameters
207 Double_t fJetE2[2]; //Rec. jet energy parameters
208 Double_t fJetSigma1[2];//Rec. sigma of jet energy parameters
209 Double_t fJetSigma2[2];//Rec. sigma of jet energy parameters
210 Double_t fBkgMean[6]; //Background mean energy
211 Double_t fBkgRMS[6]; //Background RMS
212 Double_t fJetXMin1[6]; //X Factor to set jet min limit for pp
213 Double_t fJetXMin2[6]; //X Factor to set jet min limit for PbPb
214 Double_t fJetXMax1[6]; //X Factor to set jet max limit for pp
215 Double_t fJetXMax2[6]; //X Factor to set jet max limit for PbPb
217 Int_t fNEvent ; // Number of events to analyze
218 Int_t fNCone ; // Number of jet cones sizes
219 Int_t fNPt ; // Number of jet particle pT threshold
220 Double_t fCone ; // Jet cone sizes under study (!fAnyConeSize)
221 Double_t fCones[10]; // Jet cone sizes under study (fAnyConeSize)
222 TString fNameCones[10]; // String name of cone to append to histos
223 Double_t fPtThreshold; // Jet pT threshold under study(!fAnyConeSize)
224 Double_t fPtThres[10]; // Jet pT threshold under study(fAnyConeSize)
225 Double_t fPtJetSelectionCut; // Jet pt to change to low pt jets analysis
226 TString fNamePtThres[10]; // String name of pt th to append to histos
227 TObjArray * fListHistos ; //! list of Histograms
228 AliPHOSFastGlobalReconstruction * fFastRec; //Pointer to fast recons.
229 Bool_t fOptFast; // Do we want fast Rec?
230 TRandom fRan ; //! random number generator
231 //Energy and position parameters
232 Double_t fResPara1 ; // parameter for the energy resolution dependence
233 Double_t fResPara2 ; // parameter for the energy resolution dependence
234 Double_t fResPara3 ; // parameter for the energy resolution dependence
235 Double_t fPosParaA ; // parameter for the position resolution
236 Double_t fPosParaB ; // parameter for the position resolution
237 TArrayD fAngleMaxParam ; //Max opening angle selection parameters
238 Bool_t fSelect ; //Select jet within limits
240 ClassDef(AliPHOSGammaJet,2)
244 #endif //ALIPHOSGammaJet_H