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