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