AliPhysics  fde8a9f (fde8a9f)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskPi0Hadron.cxx
Go to the documentation of this file.
1 //
2 // Task to estimate the number of gamma-hadron
3 // statistic available in the Pb+Pb run.
4 //
5 // Author: E. Epple
6 
7 #include <Riostream.h>
8 #include <TClonesArray.h>
9 #include <TH1F.h>
10 #include <TH2F.h>
11 #include <TH3F.h>
12 #include <THnSparse.h>
13 #include <TList.h>
14 #include <TLorentzVector.h>
15 
16 #include "AliParticleContainer.h"
17 #include "AliClusterContainer.h"
18 #include "AliAnalysisManager.h"
19 #include "AliCentrality.h"
20 #include "AliVCluster.h"
21 #include "AliVParticle.h"
22 #include "AliVTrack.h"
23 #include "AliAODTrack.h"
24 #include "AliEmcalJet.h"
25 #include "AliVEventHandler.h"
26 #include "AliAODEvent.h"
27 #include "AliExternalTrackParam.h"
28 #include "AliTrackerBase.h"
29 #include "AliLog.h"
30 #include "AliEMCALGeometry.h"
31 #include "AliEMCALGeoParams.h"
32 #include "AliPicoTrack.h"
33 #include "AliVVZERO.h"
34 #include "AliESDUtils.h"
35 //#include "AliCaloTrackReader.h"
36 
38 
39 using std::cout;
40 using std::endl;
41 
43 
44 //________________________________________________________________________
47 fCellEnergyCut(0.05),
48 fMaxCellsInCluster(50),
49 
50 fParticleLevel(kFALSE),
51 fIsMC(kFALSE),
52 fCentMethod2(""),
53 fCentMethod3(""),
54 
55 fOutputList1(),
56 fOutputList2(),
57 fOutputList3(),
58 
59 fHistClusPairInvarMass(0), //-<()>-//
60 fHistClusPairInvarMasspTSlice(0),
61 fHistReadout(0), //-<()>-//
62 fHistClusPairInvarMasspT(0),
63 fHistClusPairInvarMassE(0),
64 fHistClusPairInvarMassPlay(0),
65 
66 fHistNoClus_pt(0),
67 fHistNoClus_pt_tr(0),
68 fHistNoClus_ptH(0),
69 fHistNoClus_ptH_tr(0),
70 fHistpi0(0),
71 fHist_DetaDphi(),
72 fHistpt_assHadron(0),
73 fHistpt_assHadron_tr(0),
74 fHist_DP_gh(0)
75 
76 {
77  // Default constructor.
78  fAODfilterBits[0] = 0;
79  fAODfilterBits[1] = 0;
80 
81  fRtoD=180.0/TMath::Pi();
82 
83  SetMakeGeneralHistograms(kTRUE); //What is this??
84 }
85 //________________________________________________________________________
87 {
88  // Destructor
89 
90  //Copied from chris yaldo. Ask Salvatore about it!
91  // Destructor. Clean-up the output list, but not the histograms that are put inside
92  // (the list is owner and will clean-up these histograms). Protect in PROOF case.
93  if (fOutput && !AliAnalysisManager::GetAnalysisManager()->IsProofMode())
94  {
95  delete fOutputList1;
96  }
97 }
98 //________________________________________________________________________
100 {
101  // Create histograms
103 
104  //Define sublists/folders for a better organisation of the figures
105  fOutputList1 = new TList();
106  fOutputList1->SetOwner();
107  fOutputList1->SetName("p_{T} distributions of the gamma");
108  fOutputList2 = new TList();
109  fOutputList2->SetOwner();
110  fOutputList2->SetName("p_{T} distributions of the associated hadrons, for a given p_{T}^{gamma}");
111  fOutputList3 = new TList();
112  fOutputList3->SetOwner();
113  fOutputList3->SetName("Delta phi^{g-h} for a given p_{T}^{gamma}");
114 
115  //common bins for the histograms
116  Int_t nbins[5] = {0};
117  Double_t min[5] = {0};
118  Double_t max[5] = {0};
119 
120  //settings for p_t cluster distributon
121  nbins[0] = 31;
122  min[0] = 0;
123  max[0] = 31;
124  //settings for p_t hadron distribution
125  nbins[1] = 60; //do 1/2 GeV bins so that you can see the 0.5 cut to set as a minimum pT to combine hadron and gamma
126  min[1] = 0;
127  max[1] = 30;
128  //settings for delta phi (g-h) distribution
129  nbins[2] = 100;
130  min[2] = -300;
131  max[2] = 300;
132  //settings for delta eta (g-h) distribution
133  nbins[3] = 30;
134  min[3] = -3;
135  max[3] = 3;
136  //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
137  //
138  // Create Histograms
139  //
140  //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
141 
142  fHistClusPairInvarMass = new TH1F("fHistClusPairInvarMass","Invariant Mass of Cluster Pairs;Invariant Mass of Pair;dN/dm",200, 0, 1); //-<()>-//
143  fOutput->Add(fHistClusPairInvarMass); //-<()>-//
144  fHistClusPairInvarMasspTSlice = new TH2F("fHistClusPairInvarMasspTSlice","Invariant Mass of Cluster Pairs;Invariant Mass of Pair;dN/dm",200, 0, 1, 100, 0, 20); //-<()>-//
145  fOutput->Add(fHistClusPairInvarMasspTSlice); //-<()>-//
146 
147  fHistClusPairInvarMasspT = new TH2F("fHistClusPairInvarMasspT","Invariant Mass of Cluster Pairs;Invariant Mass of Pair;p_{T} of Pi0",200, 0, 1, 100, 0, 20);
148  fOutput->Add(fHistClusPairInvarMasspT); //-<()>-//
149  fHistClusPairInvarMassE = new TH2F("fHistClusPairInvarMassE","Invariant Mass of Cluster Pairs;Invariant Mass of Pair;Energy of Pi0",200, 0, 1, 100, 0, 5);
150  fOutput->Add(fHistClusPairInvarMassE); //-<()>-//
151  fHistClusPairInvarMassPlay = new TH2F("fHistClusPairInvarMassPlay","Invariant Mass of Cluster Pairs;Invariant Mass of Pair; Angular distance",200, 0, 1, 100, 0, 6);
152  fOutput->Add(fHistClusPairInvarMassPlay); //-<()>-//
153  fHistReadout = new TH1F("fHistReadout","Particle ID",1000, 0, .004); //-<()>-//
154  fOutput->Add(fHistReadout); //-<()>-//
155 
156  //.................................
157  // p_T^{Cluster} distribution under different conditions
158 
159  // all clusters
160  fHistNoClus_pt = new TH1F(Form("fHistNoClus_pt_%0d",1),Form("fHistNoClus_pt_%0d",1), nbins[0], min[0], max[0]);
161  fHistNoClus_pt->GetXaxis()->SetTitle("p_{T}^{Calo Cluster}");
162  fHistNoClus_pt->GetYaxis()->SetTitle(Form("No. of Clusters [counts/%0.1f GeV/c]",fHistNoClus_pt->GetBinWidth(0)));
163 
164  //trigger clusters as a function of p_T^{Cluster}
165  fHistNoClus_pt_tr = new TH1F(Form("fHistNoTrClus_pt_tr_%0d",1),Form("fHistNoTrClus_pt_tr_%0d",1), nbins[0], min[0], max[0]);
166  fHistNoClus_pt_tr->GetXaxis()->SetTitle("p_{T}^{trig. #gamma}");
167  fHistNoClus_pt_tr->GetYaxis()->SetTitle(Form("No. of trig. #gamma [counts/%0.1f GeV/c]",fHistNoClus_pt_tr->GetBinWidth(0)));
168 
169  //clusters p_T if there was a hadron present
170  fHistNoClus_ptH = new TH1F(Form("fHistNoClus_ptH_%0d",1),Form("fHistNoClus_ptH_%0d",1), nbins[0], min[0], max[0]);
171  fHistNoClus_ptH->GetXaxis()->SetTitle("p_{T}^{Calo Cluster}");
172  fHistNoClus_ptH->GetYaxis()->SetTitle(Form("No. of Clus. with h [counts/%0.1f GeV/c]",fHistNoClus_ptH->GetBinWidth(0)));
173 
174  //trigger clusters p_T if there was a hadron present
175  fHistNoClus_ptH_tr = new TH1F(Form("fHistNoClus_ptH_tr_%0d",1),Form("fHistNoClus_ptH_tr_%0d",1), nbins[0], min[0], max[0]);
176  fHistNoClus_ptH_tr->GetXaxis()->SetTitle("p_{T}^{Calo Cluster}");
177  fHistNoClus_ptH_tr->GetYaxis()->SetTitle(Form("No. of Clus. with h [counts/%0.1f GeV/c]",fHistNoClus_ptH_tr->GetBinWidth(0)));
178 
183  fOutput->Add(fOutputList1);
184 
185  //.................................
186  // two dimensional delta eta delta phi distributions
187  fHist_DetaDphi = new TH2F(Form("fHist_DetaDphi_%0d",1),Form("fHist_DetaDphi_%0d",1),nbins[2],min[2],max[2],nbins[3],min[3],max[3]);
188  fHist_DetaDphi->GetXaxis()->SetTitle(Form("#Delta #Phi^{#gamma-h} %0.1d<p_{T}^{#gamma}<%0.1d",0,100));
189  fHist_DetaDphi->GetYaxis()->SetTitle(Form("#Delta #eta^{#gamma-h} %0.1d<p_{T}^{#gamma}<%0.1d",0,100));
190  fOutput->Add(fHist_DetaDphi);
191 
192  //test!!
193 
194  fHistpi0 = new TH1F(Form("fHistpi0_%0d",1),Form("fHistpi0_%0d",1), 500, 0, 0.5);
195  fHistpi0->GetXaxis()->SetTitle("M_{#gamma#gamma}");
196  fHistpi0->GetYaxis()->SetTitle("Entries");
197  fOutput->Add(fHistpi0);
198 
199 
200 
201  //.................................
202  //Initiate histograms for given p_t gamma bins!
203  //Later you can summ the histograms according to the expected statistic!
204  Int_t NoOfDPhistos = nbins[0];
205 
206  fHistpt_assHadron = new TH1*[NoOfDPhistos]; // make a p_t histogram of the associated hadron for each p_T bin of the gamma
207  fHistpt_assHadron_tr = new TH1*[NoOfDPhistos]; // make a p_t histogram of the associated hadron for each p_T bin of the trigger-gamma
208  fHist_DP_gh = new TH1*[NoOfDPhistos]; // make a p_t histogram of the associated hadron for each p_T bin of the gamma
209 
210  //
211  for(Int_t i=0; i<NoOfDPhistos+1; i++)
212  {
213  //check whether the max is the
214  //same as the histogram size
215  Double_t BinWidth,BinValStart;
216 
217  if(i==0)
218  {
219  //these are histograms over the full p_T gamma range (no binnings)
220  BinWidth = fHistNoClus_ptH->GetBinWidth(1);
221  BinValStart = fHistNoClus_ptH->GetXaxis()->GetBinCenter(1)-BinWidth/2.0;
222  BinWidth =100; //to get the full length of the histogram
223  }
224  else
225  {
226  //these are histograms for a certain p_T of the gamma
227  BinWidth = fHistNoClus_ptH->GetBinWidth(i);
228  BinValStart = fHistNoClus_ptH->GetXaxis()->GetBinCenter(i)-BinWidth/2.0;
229  //cout<<"BinStart: "<<fHistNoClus_ptH->GetBinCenter(i)<<", width "<<BinWidth<<endl;
230  }
231 
232  //.................................
233  //Initiate the delta phi and p_t associated hadron histograms for each p_t bin of the gamma!
234  fHistpt_assHadron[i] = new TH1F(Form("fHistAssHadron_pt_%0d",i),Form("fHistAssHadron_pt_%0d",i), nbins[1], min[1], max[1]);
235  fHistpt_assHadron[i]->GetXaxis()->SetTitle(Form("p_{T}^{assoc. h} %0.1f<p_{T}^{#gamma}<%0.1f",BinValStart,BinValStart+BinWidth));
236  fHistpt_assHadron[i]->GetYaxis()->SetTitle(Form("dN^{assoc. h}/dp_{T}^{h} [counts/%0.1f GeV/c]",fHistpt_assHadron[i]->GetBinWidth(1)));
237 
238  fHistpt_assHadron_tr[i] = new TH1F(Form("fHistAssHadron_pt_tr_%0d",i),Form("fHistAssHadron_pt_tr_%0d",i), nbins[1], min[1], max[1]);
239  fHistpt_assHadron_tr[i]->GetXaxis()->SetTitle(Form("p_{T}^{assoc. h} %0.1f<p_{T}^{trigg. #gamma}<%0.1f",BinValStart,BinValStart+BinWidth));
240  fHistpt_assHadron_tr[i]->GetYaxis()->SetTitle(Form("dN^{assoc. h}/dp^{h}_{T} [counts/%0.1f GeV/c]",fHistpt_assHadron_tr[i]->GetBinWidth(1)));
241 
242  if(i!=0)fOutputList2->Add(fHistpt_assHadron[i]);
243  if(i!=0)fOutputList2->Add(fHistpt_assHadron_tr[i]);
244 
245  //.................................
246  //Initiate the delta phi and p_t associated hadron histograms for each p_t bin of the gamma!
247  fHist_DP_gh[i] = new TH1F(Form("fHist_DP_gh_%0d",i),Form("fHist_DP_gh_%0d",i), nbins[2], min[2], max[2]);
248  fHist_DP_gh[i]->GetXaxis()->SetTitle(Form("#Delta #Phi^{#gamma-h} %0.1f<p_{T}^{#gamma}<%0.1f",BinValStart,BinValStart+BinWidth));
249  fHist_DP_gh[i]->GetYaxis()->SetTitle(Form("dN^{#gamma-h}/#Delta #Phi^{#gamma-h} [counts/%0.1f^{#circ}]",fHist_DP_gh[i]->GetBinWidth(1)));
250 
251  if(i!=0)fOutputList3->Add(fHist_DP_gh[i]);
252  }
253  fOutput->Add(fOutputList2);
254  fOutput->Add(fOutputList3);
255  fOutput->Add(fHistpt_assHadron[0]);
256  fOutput->Add(fHistpt_assHadron_tr[0]);
257  fOutput->Add(fHist_DP_gh[0]);
258 
259  PostData(1, fOutput); // Post data for ALL output slots >0 here, to get at least an empty histogram
260 }
261 
262 //________________________________________________________________________
264 {
266 }
267 //________________________________________________________________________
269 {
270  // Retrieve event objects.
272  {
273  return kFALSE;
274  }
275  if (!fCentMethod2.IsNull() || !fCentMethod3.IsNull())
276  {
277  if (fBeamType == kAA || fBeamType == kpA )
278  {
279  AliCentrality *aliCent = InputEvent()->GetCentrality();
280  if (aliCent)
281  {
282  if (!fCentMethod2.IsNull())
283  {
284  // fCent2 = aliCent->GetCentralityPercentile(fCentMethod2);
285  }
286  if (!fCentMethod3.IsNull())
287  {
288  // fCent3 = aliCent->GetCentralityPercentile(fCentMethod3);
289  }
290  }
291  }
292  }
293  return kTRUE;
294 }
295 //________________________________________________________________________
297 {
298  Float_t clusSum = 0;
299  Int_t nclusters = 0;
300  if (fCaloClusters)
301  {
302  AliVCluster *leadingClus = 0;
303  nclusters = DoClusterLoop(clusSum, leadingClus);
304  AliDebug(2,Form("%d clusters found in the event", nclusters));
305  }
306  return kTRUE;
307 }
308 //________________________________________________________________________
310 {
311  // Do cell loop.
312  // Counts the number of fired cells
313  AliVCaloCells *cells = InputEvent()->GetEMCALCells();
314 
315  if(!cells) return 0;
316 
317  const Int_t ncells = cells->GetNumberOfCells();
318  Int_t nAccCells = 0;
319 
320  for(Int_t pos = 0; pos < ncells; pos++)
321  {
322  Float_t amp = cells->GetAmplitude(pos);
323  Int_t absId = cells->GetCellNumber(pos);
324 
325  if(amp < fCellEnergyCut) continue;
326 
327  nAccCells++;
328  sum += amp;
329  }
330 
331  return nAccCells;
332 }
333 //________________________________________________________________________
335 {
336  //................................
337  // Do cluster loop.
338  AliClusterContainer* clusters = GetClusterContainer(0); //how do I know which cells are selected
340  if (!clusters) return 0;
341  Int_t NoOfClustersInEvent =clusters->GetNClusters();
342  Int_t nAccClusters = 0;
343  sum = 0;
344  leading = 0;
345 
346  AliVCluster* cluster = 0;
347  AliVCluster* cluster2= 0;
348  AliVParticle* leadingTrack = 0;
349  AliVParticle* track = 0;
350 
351  Int_t Loop_counter=0;
352 
353  TLorentzVector SumCaloClusterVec; //-<()>-//
354  AliVCluster* othercluster = 0;//-<()>-//
355  clusters->ResetCurrentID();
356  Int_t naccept = clusters->GetNAcceptedClusters(); //<>//
357  Int_t nclust = clusters->GetNClusters(); //<>//
358  Int_t loop = 0;
359  clusters->ResetCurrentID(); //<>//
360 
361  for( Int_t NoCluster1 = 0; NoCluster1 < NoOfClustersInEvent-1; NoCluster1++ )
362  {//first cluster
363 
364  cluster=(AliVCluster*) clusters->GetAcceptCluster(NoCluster1);
365  //cluster=(AliVCluster*) clusters->GetCluster(NoCluster1);
366  if(!cluster || !AccClusterForAna(cluster))continue; //check if the cluster is a good cluster
367 
368  sum += cluster->E();
369  if (!leading || leading->E() < cluster->E()) leading = cluster;
370 
371  TLorentzVector CaloClusterVec;
372  cluster->GetMomentum(CaloClusterVec, fVertex);
373 
374  fHistNoClus_pt->Fill(CaloClusterVec.Pt()); //the .pt only works for gammas (E=M) for other particle this is wrong
375 
376  //................................
377  // Do track loop.
378  if (!tracks) return 0;
379  tracks->ResetCurrentID();
380 
381  while((track = tracks->GetNextAcceptParticle()))
382  {
383  if (!leadingTrack || leadingTrack->Pt() < leadingTrack->Pt()) leadingTrack = track;
384  Fill_GH_Hisograms(1,CaloClusterVec,track,2,0,-360);
385 
386  if(leading)
387  {
388  TLorentzVector leadingClusVect;
389  leading->GetMomentum(leadingClusVect, fVertex);
391  }
392  }
393  //end of correlated hadron check!
394  nAccClusters++;
395 
396  //double cluster loop for testing
397  for( Int_t NoCluster2 = 0; NoCluster2 < NoOfClustersInEvent; NoCluster2++ )
398  {
399  if(NoCluster1!=NoCluster2)
400  {
401  cluster2=(AliVCluster*) clusters->GetAcceptCluster(NoCluster2);
402 
403  if(!cluster2 || !AccClusterForAna(cluster2))continue; //check if the cluster is a good cluster
404  TLorentzVector CaloClusterVec2;
405  TLorentzVector CaloClusterVecpi0;
406  cluster2->GetMomentum(CaloClusterVec2, fVertex);
407  if(cluster2->E()>2 && cluster->E()>2)
408  {
409  CaloClusterVecpi0=CaloClusterVec+CaloClusterVec2;
410  fHistpi0->Fill(CaloClusterVecpi0.M());
411  }
412  }
413  }
414  Loop_counter++;
415 
416 
417  for(Int_t i=loop;i<=nclust-1;i++) //-<()>--
418  {
419  othercluster=clusters->GetCluster(i);
420  if((othercluster)&&(othercluster != cluster)&&(AcceptCluster(othercluster)))
421  {
422  TLorentzVector OtherCaloClusterVec;
423  othercluster->GetMomentum(OtherCaloClusterVec, fVertex);
424  //clusters->GetMomentum(OtherCaloClusterVec, i);
425  SumCaloClusterVec = OtherCaloClusterVec + CaloClusterVec;
426  fHistClusPairInvarMass->Fill(SumCaloClusterVec.M());
427  fHistClusPairInvarMasspTSlice->Fill(SumCaloClusterVec.M(),SumCaloClusterVec.Pt());
428  fHistClusPairInvarMasspT->Fill(SumCaloClusterVec.M(),SumCaloClusterVec.Pt());
429  fHistClusPairInvarMassE->Fill(SumCaloClusterVec.M(),SumCaloClusterVec.E());
430  Double_t twoangsize= sqrt(pow(OtherCaloClusterVec.Theta()-CaloClusterVec.Theta(),2)+pow(OtherCaloClusterVec.Phi()-CaloClusterVec.Phi(),2));
431  fHistClusPairInvarMassPlay->Fill(SumCaloClusterVec.M(),OtherCaloClusterVec.Phi()-CaloClusterVec.Phi()+3.141598265259);
432  }
433  }
434  fHistReadout->Fill(CaloClusterVec.M()); //<()>//
435 
436 
437 
438  }
439  //if(clusters->GetLeadingCluster("e")!=leading)cout<<"why did that happen?"<<endl;
440 
441  return nAccClusters;
442 }
443 //________________________________________________________________________
445 {
446  // Do track loop.
448 
449  if (!tracks) return 0;
450 
451  Int_t nAccTracks = 0;
452 
453  sum = 0;
454  leading = 0;
455 
456  Int_t neg = 0;
457  Int_t zero = 0;
458 
459  tracks->ResetCurrentID();
460  AliVParticle* track = 0;
461  while ((track = tracks->GetNextAcceptParticle()))
462  {
463  nAccTracks++;
464 
465  sum += track->P();
466 
467  if (!leading || leading->Pt() < track->Pt()) leading = track;
468 
469  }
470 
471  return nAccTracks;
472 }
473 //________________________________________________________________________
475 {
476  //Accepts clusters if certain conditions are fulfilled
477  Bool_t Accepted=0; //By default rejceted
478 
479  //double check these cuts carefully with the experts
480  if(cluster->E()>0.3 && cluster->GetNCells()>1)
481  {
482  //Now accept the cluster as a good candidate for your analysis
483  Accepted=1;
484  }
485 
486  return Accepted;
487 }
488 //________________________________________________________________________
489 Double_t AliAnalysisTaskPi0Hadron::DeltaPhi(TLorentzVector ClusterVec,AliVParticle* TrackVec)
490 {
491  Double_t Phi_g = ClusterVec.Phi();
492  Double_t Phi_h = TrackVec->Phi();
493 
494  Double_t dPhi = -999;
495  Double_t pi = TMath::Pi();
496 
497  if(Phi_g<0) cout<<"problem1?? phig "<<Phi_g<<endl;
498  if(Phi_g>2*pi)cout<<"problem2?? phig "<<Phi_g<<endl;
499 
500 
501 
502  if (Phi_g < 0) Phi_g += 2*pi;
503  else if (Phi_g > 2*pi) Phi_g -= 2*pi;
504  if (Phi_h < 0) Phi_h += 2*pi;
505  else if (Phi_h) Phi_h -= 2*pi;
506 
507 
508  dPhi = Phi_g-Phi_h;
509 
510 
511  //if (dPhi < rangeMin) dPhi += 2*pi;
512  //else if (dPhi > rangeMax) dPhi -= 2*pi;
513 
514  return dPhi;
515 }
516 //________________________________________________________________________
517 void AliAnalysisTaskPi0Hadron::Fill_GH_Hisograms(Int_t identifier,TLorentzVector ClusterVec,AliVParticle* TrackVec, Double_t ClusterEcut, Double_t TrackPcut, Double_t Anglecut)
518 {
519  //this function fill several histograms under different cut conditions.
520  //it is run within a cluster{ track{}} loop to get all combinations.
521 
522  //important!! the identifier is right now useless because there is only on set of
523  //histograms. Later this set can be cloned so that we can check several types of different cuts in paralell
524 
525  Double_t deltaPhi,deltaEta;
526  Double_t DP_alternative = DeltaPhi(ClusterVec,TrackVec);
527  deltaPhi=fRtoD*(ClusterVec.Phi()-TrackVec->Phi());
528  deltaEta=ClusterVec.Eta()-TrackVec->Eta();
529 
530  if(ClusterVec.Pt()>=ClusterEcut && TrackVec->Pt()>=TrackPcut && deltaPhi>=Anglecut)
531  {
532  fHistNoClus_ptH->Fill(ClusterVec.Pt()); //the .pt only works for gammas (E=M) for other particle this is wrong
533  fHistpt_assHadron[0]->Fill(TrackVec->Pt());
534  fHist_DP_gh[0] ->Fill(deltaPhi);
535  fHist_DetaDphi ->Fill(deltaPhi,deltaEta);
536 
537  //fill histograms for different ranges of p_t^{g}
538  for(Int_t i=1;i<fHistNoClus_ptH->GetNbinsX()+1;i++) // be careful hard coded from max[0] value -- need better variable // fHistNoClus_ptH->GetLast bin etc??
539  {
540  //look in each p_T bin of the gamma (fHistNoClus_ptH histogram) how the pt
541  //distribution of the associated hadron looks like.
542  Double_t BinWidth = fHistNoClus_ptH->GetBinWidth(i);
543  Double_t BinValStart = fHistNoClus_ptH->GetXaxis()->GetBinCenter(i)-BinWidth/2.0;
544 
545  //right now the ranges are defined via different histogram bins of the gmma p_t histogram
546  // that might be changed later.
547  if(ClusterVec.Pt()>=BinValStart && ClusterVec.Pt()<BinValStart+BinWidth)
548  {
549  fHistpt_assHadron[i]->Fill(TrackVec->Pt());
550  fHist_DP_gh[i] ->Fill(deltaPhi);
551  }
552  }
553 
554  }
555 }
virtual AliVParticle * GetNextAcceptParticle()
double Double_t
Definition: External.C:58
TH1 * fHistNoClus_ptH
No of calorimeter trigger Clusters as a function of p_T.
Definition: External.C:236
Int_t DoClusterLoop(Float_t &sum, AliVCluster *&leading)
TH1 * fHistNoClus_pt_tr
No of calorimeter Clusters as a function of p_T.
TList * fOutputList3
Output list.
Bool_t AcceptCluster(AliVCluster *clus, Int_t c=0) const
void Fill_GH_Hisograms(Int_t identifier, TLorentzVector ClusterVec, AliVParticle *TrackVec, Double_t ClusterEcut, Double_t TrackPcut, Double_t Anglecut)
Bool_t AccClusterForAna(AliVCluster *cluster)
Container for particles within the EMCAL framework.
AliParticleContainer * GetParticleContainer(Int_t i=0) const
TClonesArray * fCaloClusters
!clusters
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
AliClusterContainer * GetClusterContainer(Int_t i=0) const
AliVCluster * GetAcceptCluster(Int_t i) const
TH1 ** fHist_DP_gh
pt distributions of the associated hadron in a certain p_t bin of the gamma that triggered the event ...
Int_t GetNClusters() const
Int_t GetNAcceptedClusters() const
BeamType fBeamType
!event beam type
AliVCluster * GetCluster(Int_t i) const
AliEmcalList * fOutput
!output list
Int_t DoTrackLoop(Float_t &sum, AliVParticle *&leading)
Double_t fVertex[3]
!event vertex
Base task in the EMCAL jet framework.
TH1 * fHistNoClus_ptH_tr
No of calorimeter Clusters as a function of p_T with a hadron in the second hemisphere.
TList * fOutputList2
Output list.
const Double_t pi
const Int_t nbins
TH1 * fHistpi0
No of g-h pairs in the deta eta delta phi plane.
bool Bool_t
Definition: External.C:53
Double_t DeltaPhi(TLorentzVector ClusterVec, AliVParticle *TrackVec)
TH2 * fHist_DetaDphi
No of calorimeter trigger Clusters as a function of p_T with a hadron in the second hemisphere...
Container structure for EMCAL clusters.
TH1 ** fHistpt_assHadron_tr
pt distributions of the associated hadron in a certain p_t bin of the gamma
Definition: External.C:196
ClassImp(AliAnalysisTaskPi0Hadron) AliAnalysisTaskPi0Hadron