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