]>
Commit | Line | Data |
---|---|---|
f9cea31c | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | /* $Id$ */ | |
16 | ||
17 | /* History of cvs commits: | |
18 | * | |
19 | * $Log$ | |
bdcfac30 | 20 | * Revision 1.4.4.2 2007/07/26 10:32:09 schutz |
21 | * new analysis classes in the the new analysis framework | |
2a1d8a29 | 22 | * |
f9cea31c | 23 | * |
24 | */ | |
25 | ||
26 | //_________________________________________________________________________ | |
bdcfac30 | 27 | // Class for the analysis of gamma - hadron correlations |
f9cea31c | 28 | //*-- Author: Gustavo Conesa (LNF-INFN) |
29 | ////////////////////////////////////////////////////////////////////////////// | |
30 | ||
31 | ||
32 | // --- ROOT system --- | |
f9cea31c | 33 | #include "Riostream.h" |
bdcfac30 | 34 | |
35 | //---- AliRoot system ---- | |
f9cea31c | 36 | #include "AliLog.h" |
bdcfac30 | 37 | #include "AliNeutralMesonSelection.h" |
38 | #include "AliAnaGammaHadron.h" | |
f9cea31c | 39 | |
40 | ClassImp(AliAnaGammaHadron) | |
41 | ||
bdcfac30 | 42 | |
f9cea31c | 43 | //____________________________________________________________________________ |
bdcfac30 | 44 | AliAnaGammaHadron::AliAnaGammaHadron() : |
45 | AliAnaGammaCorrelation(), | |
46 | fhPhiCharged(0), fhPhiNeutral(0), fhEtaCharged(0), fhEtaNeutral(0), | |
47 | fhDeltaPhiGammaCharged(0), fhDeltaPhiGammaNeutral(0), | |
48 | fhDeltaEtaGammaCharged(0), fhDeltaEtaGammaNeutral(0), | |
49 | fhCorrelationGammaNeutral(0), fhCorrelationGammaCharged(0) | |
f9cea31c | 50 | { |
bdcfac30 | 51 | //Default Ctor |
f9cea31c | 52 | |
bdcfac30 | 53 | SetCorrelationType(kHadron); |
54 | //Initialize parameters | |
55 | InitParameters(); | |
f9cea31c | 56 | } |
57 | ||
f9cea31c | 58 | //____________________________________________________________________________ |
bdcfac30 | 59 | AliAnaGammaHadron::AliAnaGammaHadron(const AliAnaGammaHadron & g) : |
60 | AliAnaGammaCorrelation(g), | |
61 | fhPhiCharged(g.fhPhiCharged), fhPhiNeutral(g.fhPhiNeutral), | |
62 | fhEtaCharged(g.fhEtaCharged), fhEtaNeutral(g.fhEtaNeutral), | |
63 | fhDeltaPhiGammaCharged(g.fhDeltaPhiGammaCharged), | |
64 | fhDeltaPhiGammaNeutral(g.fhDeltaPhiGammaNeutral), | |
65 | fhDeltaEtaGammaCharged(g.fhDeltaEtaGammaCharged), | |
66 | fhDeltaEtaGammaNeutral(g.fhDeltaEtaGammaNeutral), | |
67 | fhCorrelationGammaNeutral(g.fhCorrelationGammaNeutral), | |
68 | fhCorrelationGammaCharged(g.fhCorrelationGammaCharged) | |
f9cea31c | 69 | { |
70 | // cpy ctor | |
f9cea31c | 71 | |
72 | } | |
73 | ||
463ee300 | 74 | //_________________________________________________________________________ |
75 | AliAnaGammaHadron & AliAnaGammaHadron::operator = (const AliAnaGammaHadron & source) | |
76 | { | |
bdcfac30 | 77 | // assignment operator |
78 | ||
79 | if(this == &source)return *this; | |
80 | ((AliAnaGammaCorrelation *)this)->operator=(source); | |
463ee300 | 81 | |
bdcfac30 | 82 | fhPhiCharged = source.fhPhiCharged ; fhPhiNeutral = source.fhPhiNeutral ; |
83 | fhEtaCharged = source.fhEtaCharged ; fhEtaNeutral = source.fhEtaNeutral ; | |
84 | fhDeltaPhiGammaCharged = source.fhDeltaPhiGammaCharged ; | |
85 | fhDeltaPhiGammaNeutral = source.fhDeltaPhiGammaNeutral ; | |
86 | fhDeltaEtaGammaCharged = source.fhDeltaEtaGammaCharged ; | |
87 | fhDeltaEtaGammaNeutral = source.fhDeltaEtaGammaNeutral ; | |
88 | ||
89 | fhCorrelationGammaNeutral = source.fhCorrelationGammaNeutral ; | |
90 | fhCorrelationGammaCharged = source.fhCorrelationGammaCharged ; | |
463ee300 | 91 | |
92 | return *this; | |
bdcfac30 | 93 | |
463ee300 | 94 | } |
95 | ||
f9cea31c | 96 | //____________________________________________________________________________ |
97 | AliAnaGammaHadron::~AliAnaGammaHadron() | |
98 | { | |
f9cea31c | 99 | |
100 | delete fhPhiCharged ; | |
101 | delete fhPhiNeutral ; | |
102 | delete fhEtaCharged ; | |
103 | delete fhEtaNeutral ; | |
104 | delete fhDeltaPhiGammaCharged ; | |
105 | delete fhDeltaPhiGammaNeutral ; | |
106 | delete fhDeltaEtaGammaCharged ; | |
107 | delete fhDeltaEtaGammaNeutral ; | |
108 | ||
109 | delete fhCorrelationGammaNeutral ; | |
bdcfac30 | 110 | delete fhCorrelationGammaCharged ; |
111 | ||
f9cea31c | 112 | } |
113 | ||
2a1d8a29 | 114 | |
115 | //________________________________________________________________________ | |
bdcfac30 | 116 | TList * AliAnaGammaHadron::GetCreateOutputObjects() |
2a1d8a29 | 117 | { |
118 | ||
463ee300 | 119 | // Create histograms to be saved in output file and |
bdcfac30 | 120 | // store them in fOutputContainer |
121 | TList * outputContainer = new TList() ; | |
122 | outputContainer->SetName("GammaCorrelationHistos") ; | |
2a1d8a29 | 123 | |
124 | fhPhiCharged = new TH2F | |
125 | ("PhiCharged","#phi_{#pi^{#pm}} vs p_{T #gamma}", | |
126 | 120,0,120,120,0,7); | |
127 | fhPhiCharged->SetYTitle("#phi_{#pi^{#pm}} (rad)"); | |
128 | fhPhiCharged->SetXTitle("p_{T #gamma} (GeV/c)"); | |
2a1d8a29 | 129 | |
130 | fhEtaCharged = new TH2F | |
131 | ("EtaCharged","#eta_{#pi^{#pm}} vs p_{T #gamma}", | |
132 | 120,0,120,120,-1,1); | |
133 | fhEtaCharged->SetYTitle("#eta_{#pi^{#pm}} (rad)"); | |
134 | fhEtaCharged->SetXTitle("p_{T #gamma} (GeV/c)"); | |
bdcfac30 | 135 | |
2a1d8a29 | 136 | fhDeltaPhiGammaCharged = new TH2F |
137 | ("DeltaPhiGammaCharged","#phi_{#gamma} - #phi_{charged #pi} vs p_{T #gamma}", | |
138 | 200,0,120,200,0,6.4); | |
139 | fhDeltaPhiGammaCharged->SetYTitle("#Delta #phi"); | |
140 | fhDeltaPhiGammaCharged->SetXTitle("p_{T #gamma} (GeV/c)"); | |
2a1d8a29 | 141 | |
142 | fhDeltaEtaGammaCharged = new TH2F | |
143 | ("DeltaEtaGammaCharged","#eta_{#gamma} - #eta_{#pi^{#pm}} vs p_{T #gamma}", | |
144 | 200,0,120,200,-2,2); | |
145 | fhDeltaEtaGammaCharged->SetYTitle("#Delta #eta"); | |
146 | fhDeltaEtaGammaCharged->SetXTitle("p_{T #gamma} (GeV/c)"); | |
2a1d8a29 | 147 | |
bdcfac30 | 148 | fhCorrelationGammaCharged = |
149 | new TH2F("CorrelationGammaCharged","z_{#gamma #pi} = p_{T #pi^{#pm}} / p_{T #gamma}", | |
150 | 240,0.,120.,1000,0.,1.2); | |
151 | fhCorrelationGammaCharged->SetYTitle("z_{#gamma #pi}"); | |
152 | fhCorrelationGammaCharged->SetXTitle("p_{T #gamma}"); | |
2a1d8a29 | 153 | |
bdcfac30 | 154 | outputContainer->Add(fhPhiCharged) ; |
155 | outputContainer->Add(fhEtaCharged) ; | |
156 | outputContainer->Add(fhDeltaPhiGammaCharged) ; | |
157 | outputContainer->Add(fhDeltaEtaGammaCharged) ; | |
158 | outputContainer->Add(fhCorrelationGammaCharged) ; | |
159 | ||
160 | if(!AreJetsOnlyInCTS()){ | |
161 | //---- kHadron and kJetLeadCone ---- | |
162 | fhPhiNeutral = new TH2F | |
163 | ("PhiNeutral","#phi_{#pi^{0}} vs p_{T #gamma}", | |
164 | 120,0,120,120,0,7); | |
165 | fhPhiNeutral->SetYTitle("#phi_{#pi^{0}} (rad)"); | |
166 | fhPhiNeutral->SetXTitle("p_{T #gamma} (GeV/c)"); | |
2a1d8a29 | 167 | |
bdcfac30 | 168 | fhEtaNeutral = new TH2F |
169 | ("EtaNeutral","#eta_{#pi^{0}} vs p_{T #gamma}", | |
170 | 120,0,120,120,-1,1); | |
171 | fhEtaNeutral->SetYTitle("#eta_{#pi^{0}} (rad)"); | |
172 | fhEtaNeutral->SetXTitle("p_{T #gamma} (GeV/c)"); | |
2a1d8a29 | 173 | |
bdcfac30 | 174 | fhDeltaPhiGammaNeutral = new TH2F |
175 | ("DeltaPhiGammaNeutral","#phi_{#gamma} - #phi_{#pi^{0}} vs p_{T #gamma}", | |
176 | 200,0,120,200,0,6.4); | |
177 | fhDeltaPhiGammaNeutral->SetYTitle("#Delta #phi"); | |
178 | fhDeltaPhiGammaNeutral->SetXTitle("p_{T #gamma} (GeV/c)"); | |
2a1d8a29 | 179 | |
bdcfac30 | 180 | fhDeltaEtaGammaNeutral = new TH2F |
181 | ("DeltaEtaGammaNeutral","#eta_{#gamma} - #eta_{#pi^{#pm}} vs p_{T #gamma}", | |
182 | 200,0,120,200,-2,2); | |
183 | fhDeltaEtaGammaNeutral->SetYTitle("#Delta #eta"); | |
184 | fhDeltaEtaGammaNeutral->SetXTitle("p_{T #gamma} (GeV/c)"); | |
2a1d8a29 | 185 | |
2a1d8a29 | 186 | fhCorrelationGammaNeutral = |
187 | new TH2F("CorrelationGammaNeutral","z_{#gamma #pi} = p_{T #pi^{0}} / p_{T #gamma}", | |
188 | 240,0.,120.,1000,0.,1.2); | |
189 | fhCorrelationGammaNeutral->SetYTitle("z_{#gamma #pi}"); | |
190 | fhCorrelationGammaNeutral->SetXTitle("p_{T #gamma}"); | |
f9cea31c | 191 | |
bdcfac30 | 192 | outputContainer->Add(fhPhiNeutral) ; |
193 | outputContainer->Add(fhEtaNeutral) ; | |
194 | outputContainer->Add(fhDeltaPhiGammaNeutral) ; | |
195 | outputContainer->Add(fhDeltaEtaGammaNeutral) ; | |
196 | outputContainer->Add(fhCorrelationGammaNeutral) ; | |
f9cea31c | 197 | } |
bdcfac30 | 198 | |
199 | SetOutputContainer(outputContainer); | |
f9cea31c | 200 | |
bdcfac30 | 201 | return outputContainer; |
202 | } | |
f9cea31c | 203 | |
bdcfac30 | 204 | //____________________________________________________________________________ |
205 | void AliAnaGammaHadron::InitParameters() | |
206 | { | |
207 | ||
208 | //Initialize the parameters of the analysis. | |
f9cea31c | 209 | |
bdcfac30 | 210 | SetMinPtHadron(2.) ; |
211 | SetDeltaPhiCutRange(1.5,4.5); | |
212 | SetJetsOnlyInCTS(kFALSE) ; | |
f9cea31c | 213 | |
bdcfac30 | 214 | } |
f9cea31c | 215 | |
bdcfac30 | 216 | //__________________________________________________________________ |
217 | void AliAnaGammaHadron::Print(const Option_t * opt) const | |
218 | { | |
f9cea31c | 219 | |
bdcfac30 | 220 | //Print some relevant parameters set for the analysis |
221 | if(! opt) | |
222 | return; | |
223 | ||
224 | Info("Print", "%s %s", GetName(), GetTitle() ) ; | |
225 | printf("Correlation analysis = %d\n", kHadron) ; | |
226 | printf("pT Hadron > %f\n", GetMinPtHadron()) ; | |
227 | printf("Phi gamma-Hadron < %f\n", GetDeltaPhiMaxCut()) ; | |
228 | printf("Phi gamma-Hadron > %f\n", GetDeltaPhiMinCut()) ; | |
f9cea31c | 229 | |
f9cea31c | 230 | |
bdcfac30 | 231 | } |
f9cea31c | 232 | |
bdcfac30 | 233 | //____________________________________________________________________________ |
234 | void AliAnaGammaHadron::MakeGammaCorrelation(TParticle * pGamma, TClonesArray * plCTS, TClonesArray * plCalo) | |
235 | { | |
236 | //Gamma Hadron Correlation Analysis | |
237 | AliDebug(2, "Make gamma-hadron correlation"); | |
f9cea31c | 238 | |
bdcfac30 | 239 | MakeGammaChargedCorrelation(pGamma, plCTS); |
240 | if(!AreJetsOnlyInCTS()) | |
241 | MakeGammaNeutralCorrelation(pGamma, plCalo); | |
f9cea31c | 242 | |
f9cea31c | 243 | |
bdcfac30 | 244 | } |
f9cea31c | 245 | |
246 | //____________________________________________________________________________ | |
bdcfac30 | 247 | void AliAnaGammaHadron::MakeGammaChargedCorrelation(TParticle * pGamma, TClonesArray * pl) |
f9cea31c | 248 | { |
bdcfac30 | 249 | //Gamma Charged Hadron Correlation Analysis |
250 | AliDebug(2,"Make gamma-charged hadron correlation"); | |
251 | ||
f9cea31c | 252 | Double_t ptg = pGamma->Pt(); |
253 | Double_t phig = pGamma->Phi(); | |
254 | Double_t pt = -100.; | |
255 | Double_t rat = -100.; | |
256 | Double_t phi = -100. ; | |
257 | ||
258 | for(Int_t ipr = 0;ipr < pl->GetEntries() ; ipr ++ ){ | |
259 | ||
260 | TParticle * particle = dynamic_cast<TParticle *>(pl->At(ipr)) ; | |
261 | ||
262 | pt = particle->Pt(); | |
263 | rat = pt/ptg ; | |
264 | phi = particle->Phi() ; | |
265 | ||
bdcfac30 | 266 | AliDebug(3,Form("pt %f, phi %f, phi gamma %f. Cuts: delta phi min %f, max%f, pT min %f",pt,phi,phig,GetDeltaPhiMinCut(),GetDeltaPhiMaxCut(),GetMinPtHadron())); |
f9cea31c | 267 | |
268 | fhEtaCharged->Fill(ptg,particle->Eta()); | |
269 | fhPhiCharged->Fill(ptg,phi); | |
270 | fhDeltaEtaGammaCharged->Fill(ptg,pGamma->Eta()-particle->Eta()); | |
271 | fhDeltaPhiGammaCharged->Fill(ptg,phig-phi); | |
272 | //Selection within angular and energy limits | |
bdcfac30 | 273 | if(((phig-phi)> GetDeltaPhiMinCut()) && ((phig-phi)<GetDeltaPhiMaxCut()) && pt > GetMinPtHadron()){ |
f9cea31c | 274 | AliDebug(2,Form("Selected: pt %f, phi %f",pt,phi)); |
275 | fhCorrelationGammaCharged->Fill(ptg,rat); | |
276 | } | |
277 | }//particle loop | |
278 | } | |
279 | ||
280 | //____________________________________________________________________________ | |
bdcfac30 | 281 | void AliAnaGammaHadron::MakeGammaNeutralCorrelation(TParticle * pGamma, TClonesArray * pl) |
f9cea31c | 282 | { |
bdcfac30 | 283 | //Gamma Neutral Hadron Correlation Analysis |
284 | AliDebug(2,"Make gamma-neutral hadron correlation"); | |
f9cea31c | 285 | |
f9cea31c | 286 | Double_t pt = -100.; |
287 | Double_t rat = -100.; | |
288 | Double_t phi = -100. ; | |
289 | Double_t ptg = pGamma->Pt(); | |
290 | Double_t phig = pGamma->Phi(); | |
f9cea31c | 291 | |
bdcfac30 | 292 | TIter next(pl); |
293 | TParticle * particlei = 0; | |
294 | TParticle * particlej = 0; | |
295 | TLorentzVector gammai; | |
296 | TLorentzVector gammaj; | |
297 | ||
f9cea31c | 298 | Int_t iPrimary = -1; |
f9cea31c | 299 | Int_t ksPdg = 0; |
300 | Int_t jPrimary=-1; | |
bdcfac30 | 301 | |
302 | while ( (particlei = (TParticle*)next()) ) { | |
f9cea31c | 303 | iPrimary++; |
bdcfac30 | 304 | ksPdg = particlei->GetPdgCode(); |
305 | AliDebug(2, Form("neutral particles opposite to gamma: pt %f, pdg %d", particlei->Pt(),ksPdg)); | |
f9cea31c | 306 | //2 gamma overlapped, found with PID |
307 | if(ksPdg == 111){ | |
bdcfac30 | 308 | pt = particlei->Pt(); |
f9cea31c | 309 | rat = pt/ptg ; |
bdcfac30 | 310 | phi = particlei->Phi() ; |
311 | fhEtaNeutral->Fill(ptg,particlei->Eta()); | |
312 | fhPhiNeutral->Fill(ptg,phi); | |
313 | fhDeltaEtaGammaNeutral->Fill(ptg,pGamma->Eta()-particlei->Eta()); | |
314 | fhDeltaPhiGammaNeutral->Fill(ptg,phig-phi); | |
315 | ||
f9cea31c | 316 | //Selection within angular and energy limits |
bdcfac30 | 317 | if( (phig-phi)>GetDeltaPhiMinCut() && (phig-phi)<GetDeltaPhiMaxCut() && pt > GetMinPtHadron()){ |
f9cea31c | 318 | fhCorrelationGammaNeutral ->Fill(ptg,rat); |
bdcfac30 | 319 | AliDebug(2,Form("Selected pi0: pt %f, phi %f",pt,phi)); |
f9cea31c | 320 | }// cuts |
321 | }// pdg = 111 | |
322 | ||
323 | //Make invariant mass analysis | |
bdcfac30 | 324 | else if(ksPdg == 22){// gamma i |
325 | ||
f9cea31c | 326 | //Search the photon companion in case it comes from a Pi0 decay |
bdcfac30 | 327 | //Apply several cuts to select the good pair; |
328 | particlei->Momentum(gammai); | |
329 | jPrimary=-1; | |
f9cea31c | 330 | TIter next2(pl); |
bdcfac30 | 331 | while ( (particlej = (TParticle*)next2()) ) { |
332 | jPrimary++; | |
333 | if(jPrimary>iPrimary){ | |
334 | ksPdg = particlej->GetPdgCode(); | |
335 | particlej->Momentum(gammaj); | |
336 | if(ksPdg == 22 ){ | |
337 | ||
f9cea31c | 338 | phi = (gammai+gammaj).Phi(); |
339 | if(phi < 0) | |
340 | phi+=TMath::TwoPi(); | |
bdcfac30 | 341 | rat = (gammai+gammaj).Pt()/ptg ; |
342 | ||
343 | //Fill histograms | |
f9cea31c | 344 | fhEtaNeutral->Fill(ptg,(gammai+gammaj).Eta()); |
345 | fhPhiNeutral->Fill(ptg,phi); | |
346 | fhDeltaEtaGammaNeutral->Fill(ptg,pGamma->Eta()-(gammai+gammaj).Eta()); | |
347 | fhDeltaPhiGammaNeutral->Fill(ptg,phig-phi); | |
bdcfac30 | 348 | |
349 | //Select good pair (good phit, pt cuts, aperture and invariant mass) | |
350 | if(GetNeutralMesonSelection()->SelectPair(pGamma, gammai, gammaj)){ | |
351 | AliDebug(2,Form("Selected gamma pair: pt %f, phi %f",(gammai+gammaj).Pt(),phi)); | |
352 | //correlation histogram | |
353 | fhCorrelationGammaNeutral ->Fill(ptg,rat); | |
354 | }//pair selection | |
355 | }//if pair of gammas | |
356 | }//jPrimary>iPrimary | |
f9cea31c | 357 | }//while |
358 | }// if pdg = 22 | |
359 | }//while | |
bdcfac30 | 360 | |
f9cea31c | 361 | } |