AliPhysics  2797316 (2797316)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskChargedParticlesRefMC.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2015, 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 #include <vector>
16 #include <map>
17 
18 #include <TArrayD.h>
19 #include <TChain.h>
20 #include <TClonesArray.h>
21 #include <TFile.h>
22 #include <THashList.h>
23 #include <TH1.h>
24 #include <THistManager.h>
25 #include <TKey.h>
26 #include <TList.h>
27 #include <TPDGCode.h>
28 #include <TProfile.h>
29 #include <TMath.h>
30 #include <TString.h>
31 #include <TSystem.h>
32 #include <TTree.h>
33 
34 #include "AliAnalysisManager.h"
35 #include "AliAnalysisUtils.h"
36 #include "AliAODMCHeader.h"
37 #include "AliAODInputHandler.h"
38 #include "AliAODMCParticle.h"
39 #include "AliAODTrack.h"
41 #include "AliEmcalTrackSelection.h"
43 #include "AliEMCALTriggerPatchInfo.h"
44 #include "AliEMCALGeometry.h"
45 #include "AliEMCALRecoUtils.h"
46 #include "AliESDEvent.h"
47 #include "AliESDtrack.h"
48 #include "AliGenPythiaEventHeader.h"
49 #include "AliInputEventHandler.h"
50 #include "AliMCEvent.h"
51 #include "AliVVertex.h"
52 
55 
59 
60 namespace EMCalTriggerPtAnalysis {
61 
65 AliAnalysisTaskChargedParticlesRefMC::AliAnalysisTaskChargedParticlesRefMC():
66  AliAnalysisTaskSE(),
67  fTrackCuts(NULL),
68  fAnalysisUtil(NULL),
69  fTriggerSelection(NULL),
70  fHistos(NULL),
71  fGeometry(NULL),
72  fWeightHandler(NULL),
73  fUsePythiaHard(kFALSE),
74  fPtHard(0),
75  fPtHardBin(0),
76  fNTrials(0),
77  fXsection(0),
78  fYshift(0.465),
79  fEtaSign(1),
80  fFracPtHard(-1)
81 {
82  // Restrict analysis to the EMCAL acceptance
83  fEtaLabCut[0] = -0.6;
84  fEtaLabCut[1] = 0.6;
85  fEtaCmsCut[0] = -0.13;
86  fEtaCmsCut[1] = 0.13;
87 }
88 
94  AliAnalysisTaskSE(name),
95  fTrackCuts(NULL),
96  fAnalysisUtil(NULL),
97  fTriggerSelection(NULL),
98  fHistos(NULL),
99  fGeometry(NULL),
100  fWeightHandler(NULL),
101  fUsePythiaHard(kFALSE),
102  fPtHard(0),
103  fPtHardBin(0),
104  fNTrials(0),
105  fXsection(0),
106  fYshift(0.465),
107  fEtaSign(1),
108  fFracPtHard(-1)
109 {
110  // Restrict analysis to the EMCAL acceptance
111  fEtaLabCut[0] = -0.6;
112  fEtaLabCut[1] = 0.6;
113  fEtaCmsCut[0] = -0.13;
114  fEtaCmsCut[1] = 0.13;
115  DefineOutput(1, TList::Class());
116 }
117 
122  //if(fTrackCuts) delete fTrackCuts;
123  if(fAnalysisUtil) delete fAnalysisUtil;
125  if(fHistos) delete fHistos;
126 }
131  if(!fAnalysisUtil) fAnalysisUtil = new AliAnalysisUtils;
132  fHistos = new THistManager("Ref");
133 
134  if(!fTrackCuts) InitializeTrackCuts("standard",fInputHandler->IsA() == AliAODInputHandler::Class());
135 
136  OldPtBinning oldbinning;
137  NewPtBinning newbinning;
138 
139  fHistos->CreateTH1("hNtrials", "Number of trials", 1, 0.5, 1.5);
140  fHistos->CreateTProfile("hCrossSection", "PYTHIA cross section", 1, 0.5, 1.5);
141  fHistos->CreateTH1("hNtrialsNoSelect", "Number of trials (without event selection)", 1, 0.5, 1.5);
142  fHistos->CreateTH1("hNtrialsEvent", "Number of trials (from header, after event selection)", 1, 0.5, 1.5);
143  fHistos->CreateTProfile("hCrossSectionEvent", "PYTHIA cross section (from header, after event selection)", 1, 0.5, 1.5);
144  fHistos->CreateTH1("hPtHard", "Pt of the hard interaction", 1000, 0., 500);
145  fHistos->CreateTH1("hTriggerJetPtNoCut", "pt of trigger jets wihtout cuts", 1000, 0., 500);
146  fHistos->CreateTH1("hRatioPtJetPtHardNoCut", "Ratio of pt jet / pt hard without cut", 1000, 0., 20.);
147  fHistos->CreateTH1("hTriggerJetPtWithCut", "pt of trigger jets after cuts", 1000, 0., 500);
148  fHistos->CreateTH1("hRatioPtJetPtHardWithCut", "Ratio of pt jet / pt hard with cut on this ratio", 1000, 0., 20.);
149  TString triggers[7] = {"True", "MB", "EMC7", "EJ1", "EJ2", "EG1", "EG2"};
150  Double_t ptcuts[5] = {1., 2., 5., 10., 20.};
151  TString species[6] = {"El", "Mu", "Pi", "Ka", "Pr", "Ot"};
152  for(TString *trg = triggers; trg < triggers + sizeof(triggers)/sizeof(TString); trg++){
153  fHistos->CreateTH1(Form("hEventCount%s", trg->Data()), Form("Event Counter for trigger class %s", trg->Data()), 1, 0.5, 1.5);
154  fHistos->CreateTH1(Form("hVertexBefore%s", trg->Data()), Form("Vertex distribution before z-cut for trigger class %s", trg->Data()), 500, -50, 50);
155  fHistos->CreateTH1(Form("hVertexAfter%s", trg->Data()), Form("Vertex distribution after z-cut for trigger class %s", trg->Data()), 100, -10, 10);
156  fHistos->CreateTH1(Form("hPtEtaAllOldBinning%s", trg->Data()), Form("Charged particle pt distribution all eta old binning trigger %s", trg->Data()), oldbinning);
157  fHistos->CreateTH1(Form("hPtEtaCentOldBinning%s", trg->Data()), Form("Charged particle pt distribution central eta old binning trigger %s", trg->Data()), oldbinning);
158  fHistos->CreateTH1(Form("hPtEtaAllNewBinning%s", trg->Data()), Form("Charged particle pt distribution all eta new binning trigger %s", trg->Data()), newbinning);
159  fHistos->CreateTH1(Form("hPtEtaCentNewBinning%s", trg->Data()), Form("Charged particle pt distribution central eta new binning trigger %s", trg->Data()), newbinning);
160  fHistos->CreateTH1(Form("hPtEMCALEtaAllOldBinning%s", trg->Data()), Form("Charged particle in EMCAL pt distribution all eta old binning trigger %s", trg->Data()), oldbinning);
161  fHistos->CreateTH1(Form("hPtEMCALEtaCentOldBinning%s", trg->Data()), Form("Charged particle in EMCAL pt distribution central eta old binning trigger %s", trg->Data()), oldbinning);
162  fHistos->CreateTH1(Form("hPtEMCALEtaAllNewBinning%s", trg->Data()), Form("Charged particle in EMCAL pt distribution all eta new binning trigger %s", trg->Data()), newbinning);
163  fHistos->CreateTH1(Form("hPtEMCALEtaCentNewBinning%s", trg->Data()), Form("Charged particle in EMCAL pt distribution central eta new binning trigger %s", trg->Data()), newbinning);
164  fHistos->CreateTH1(Form("hPtEMCALNoTRDEtaAllOldBinning%s", trg->Data()), Form("Charged particle in EMCAL (no TRD in front) pt distribution all eta old binning trigger %s", trg->Data()), oldbinning);
165  fHistos->CreateTH1(Form("hPtEMCALNoTRDEtaCentOldBinning%s", trg->Data()), Form("Charged particle in EMCAL (no TRD in front) pt distribution central eta old binning trigger %s", trg->Data()), oldbinning);
166  fHistos->CreateTH1(Form("hPtEMCALNoTRDEtaAllNewBinning%s", trg->Data()), Form("Charged particle in EMCAL (no TRD in front) pt distribution all eta new binning trigger %s", trg->Data()), newbinning);
167  fHistos->CreateTH1(Form("hPtEMCALNoTRDEtaCentNewBinning%s", trg->Data()), Form("Charged particle in EMCAL (no TRD in front) pt distribution central eta new binning trigger %s", trg->Data()), newbinning);
168  fHistos->CreateTH1(Form("hPtEMCALWithTRDEtaAllOldBinning%s", trg->Data()), Form("Charged particle in EMCAL (with TRD in front) pt distribution all eta old binning trigger %s", trg->Data()), oldbinning);
169  fHistos->CreateTH1(Form("hPtEMCALWithTRDEtaCentOldBinning%s", trg->Data()), Form("Charged particle in EMCAL (with TRD in front) pt distribution central eta old binning trigger %s", trg->Data()), oldbinning);
170  fHistos->CreateTH1(Form("hPtEMCALWithTRDEtaAllNewBinning%s", trg->Data()), Form("Charged particle in EMCAL (with TRD in front) pt distribution all eta new binning trigger %s", trg->Data()), newbinning);
171  fHistos->CreateTH1(Form("hPtEMCALWithTRDEtaCentNewBinning%s", trg->Data()), Form("Charged particle in EMCAL (with TRD in front) pt distribution central eta new binning trigger %s", trg->Data()), newbinning);
172  for(TString *piditer = species; piditer < species + sizeof(species)/sizeof(TString); ++piditer){
173  fHistos->CreateTH1(Form("hPtEtaAllOldBinning%s%s", piditer->Data(), trg->Data()), Form("Charged %s pt distribution all eta old binning trigger %s", piditer->Data(), trg->Data()), oldbinning);
174  fHistos->CreateTH1(Form("hPtEtaCentOldBinning%s%s", piditer->Data(), trg->Data()), Form("Charged %s pt distribution central eta old binning trigger %s", piditer->Data(), trg->Data()), oldbinning);
175  fHistos->CreateTH1(Form("hPtEtaAllNewBinning%s%s", piditer->Data(), trg->Data()), Form("Charged %s pt distribution all eta new binning trigger %s", piditer->Data(), trg->Data()), newbinning);
176  fHistos->CreateTH1(Form("hPtEtaCentNewBinning%s%s", piditer->Data(), trg->Data()), Form("Charged %s pt distribution central eta new binning trigger %s", piditer->Data(), trg->Data()), newbinning);
177  fHistos->CreateTH1(Form("hPtEMCALEtaAllOldBinning%s%s", piditer->Data(), trg->Data()), Form("Charged %s in EMCAL pt distribution all eta old binning trigger %s", piditer->Data(), trg->Data()), oldbinning);
178  fHistos->CreateTH1(Form("hPtEMCALEtaCentOldBinning%s%s", piditer->Data(), trg->Data()), Form("Charged %s in EMCAL pt distribution central eta old binning trigger %s", piditer->Data(), trg->Data()), oldbinning);
179  fHistos->CreateTH1(Form("hPtEMCALEtaAllNewBinning%s%s", piditer->Data(), trg->Data()), Form("Charged %s in EMCAL pt distribution all eta new binning trigger %s", piditer->Data(), trg->Data()), newbinning);
180  fHistos->CreateTH1(Form("hPtEMCALEtaCentNewBinning%s%s", piditer->Data(), trg->Data()), Form("Charged %s in EMCAL pt distribution central eta new binning trigger %s", piditer->Data(), trg->Data()), newbinning);
181  fHistos->CreateTH1(Form("hPtEMCALNoTRDEtaAllOldBinning%s%s", piditer->Data(), trg->Data()), Form("Charged %s in EMCAL (no TRD in front) pt distribution all eta old binning trigger %s", piditer->Data(), trg->Data()), oldbinning);
182  fHistos->CreateTH1(Form("hPtEMCALNoTRDEtaCentOldBinning%s%s", piditer->Data(), trg->Data()), Form("Charged %s in EMCAL (no TRD in front) pt distribution central eta old binning trigger %s", piditer->Data(), trg->Data()), oldbinning);
183  fHistos->CreateTH1(Form("hPtEMCALNoTRDEtaAllNewBinning%s%s", piditer->Data(), trg->Data()), Form("Charged %s in EMCAL (no TRD in front) pt distribution all eta new binning trigger %s", piditer->Data(), trg->Data()), newbinning);
184  fHistos->CreateTH1(Form("hPtEMCALNoTRDEtaCentNewBinning%s%s", piditer->Data(), trg->Data()), Form("Charged %s in EMCAL (no TRD in front) pt distribution central eta new binning trigger %s", piditer->Data(), trg->Data()), newbinning);
185  fHistos->CreateTH1(Form("hPtEMCALWithTRDEtaAllOldBinning%s%s", piditer->Data(), trg->Data()), Form("Charged %s in EMCAL (with TRD in front) pt distribution all eta old binning trigger %s", piditer->Data(), trg->Data()), oldbinning);
186  fHistos->CreateTH1(Form("hPtEMCALWithTRDEtaCentOldBinning%s%s", piditer->Data(), trg->Data()), Form("Charged %s in EMCAL (with TRD in front) pt distribution central eta old binning trigger %s", piditer->Data(), trg->Data()), oldbinning);
187  fHistos->CreateTH1(Form("hPtEMCALWithTRDEtaAllNewBinning%s%s", piditer->Data(), trg->Data()), Form("Charged %s in EMCAL (with TRD in front) pt distribution all eta new binning trigger %s", piditer->Data(), trg->Data()), newbinning);
188  fHistos->CreateTH1(Form("hPtEMCALWithTRDEtaCentNewBinning%s%s", piditer->Data(), trg->Data()), Form("Charged %s in EMCAL (with TRD in front) pt distribution central eta new binning trigger %s", piditer->Data(), trg->Data()), newbinning);
189  }
190  for(int ipt = 0; ipt < 5; ipt++){
192  Form("hEtaLabDistAllPt%d%s", static_cast<Int_t>(ptcuts[ipt]), trg->Data()),
193  Form("Eta (lab) distribution without etacut for tracks with Pt above %.1f GeV/c trigger %s", ptcuts[ipt], trg->Data()),
194  100,
195  -1.,
196  1.
197  );
199  Form("hEtaLabDistCutPt%d%s", static_cast<Int_t>(ptcuts[ipt]), trg->Data()),
200  Form("Eta (lab) distribution with etacut for tracks with Pt above %.1f GeV/c trigger %s", ptcuts[ipt], trg->Data()),
201  100,
202  -1.,
203  1.
204  );
206  Form("hEtaCentDistAllPt%d%s", static_cast<Int_t>(ptcuts[ipt]), trg->Data()),
207  Form("Eta (cent) distribution without etacut for tracks with Pt above %.1f GeV/c trigger %s", ptcuts[ipt], trg->Data()),
208  160,
209  -1.3,
210  1.3
211  );
213  Form("hEtaCentDistCutPt%d%s", static_cast<Int_t>(ptcuts[ipt]), trg->Data()),
214  Form("Eta (cent) distribution with etacut for tracks with Pt above %.1f GeV/c trigger %s", ptcuts[ipt], trg->Data()),
215  160,
216  -1.3,
217  1.3
218  );
220  Form("hEtaLabDistAllEMCALPt%d%s", static_cast<Int_t>(ptcuts[ipt]), trg->Data()),
221  Form("Eta (lab) distribution without etacut for tracks in EMCAL with Pt above %.1f GeV/c trigger %s", ptcuts[ipt], trg->Data()),
222  100,
223  -1.,
224  1.
225  );
227  Form("hEtaLabDistCutEMCALPt%d%s", static_cast<Int_t>(ptcuts[ipt]), trg->Data()),
228  Form("Eta (lab) distribution with etacut for tracks in EMCAL with Pt above %.1f GeV/c trigger %s", ptcuts[ipt], trg->Data()),
229  100,
230  -1.,
231  1.
232  );
234  Form("hEtaCentDistAllEMCALPt%d%s", static_cast<Int_t>(ptcuts[ipt]), trg->Data()),
235  Form("Eta (cent) distribution without etacut for tracks in EMCAL with Pt above %.1f GeV/c trigger %s", ptcuts[ipt], trg->Data()),
236  160,
237  -1.3,
238  1.3
239  );
241  Form("hEtaCentDistCutEMCALPt%d%s", static_cast<Int_t>(ptcuts[ipt]), trg->Data()),
242  Form("Eta (cent) distribution with etacut for tracks in EMCAL with Pt above %.1f GeV/c trigger %s", ptcuts[ipt], trg->Data()),
243  160,
244  -1.3,
245  1.3
246  );
248  Form("hPhiDistAllPt%d%s", static_cast<Int_t>(ptcuts[ipt]), trg->Data()),
249  Form("#phi distribution of particles with Pt above %.1f GeV/c trigger %s", ptcuts[ipt], trg->Data()),
250  300,
251  0.,
252  2*TMath::Pi()
253  );
254  }
255  }
256  //fHistos->GetListOfHistograms()->Add(fTrackCuts);
257  PostData(1, fHistos->GetListOfHistograms());
258 }
259 
260 void AliAnalysisTaskChargedParticlesRefMC::UserExec(Option_t*) { // Select event
261  if(!fMCEvent) return;
262  if(!fGeometry){
263  fGeometry = AliEMCALGeometry::GetInstanceFromRunNumber(InputEvent()->GetRunNumber());
264  }
265  AliGenPythiaEventHeader *pyheader = GetPythiaHeader();
266  if(pyheader){
267  FillTriggerJetHistograms(kFALSE, pyheader);
268  fHistos->FillTH1("hNtrialsNoSelect",1,pyheader->Trials());
269  if(fFracPtHard > 0){
270  // Apply outlier cut in case of a positive fraction of pthard
271  if(IsOutlier(pyheader))
272  return;
273  }
274  FillTriggerJetHistograms(kTRUE, pyheader);
275  }
276 
277  Double_t weight = fWeightHandler ? fWeightHandler->GetEventWeight(pyheader) : 1.;
278 
279  //TString triggerstring = GetFiredTriggerClasses(fTriggerPatches);
280  Bool_t isMinBias = fInputHandler->IsEventSelected() & AliVEvent::kINT7,
281  isEMC7 = kFALSE, isEJ1 = kFALSE, isEJ2 = kFALSE, isEG1 = kFALSE, isEG2 = kFALSE;
282  TClonesArray *fTriggerPatches = dynamic_cast<TClonesArray *>(fInputEvent->FindListObject("EmcalTriggers"));
283  if(fTriggerPatches && fTriggerSelection){
284  isEMC7 = isMinBias && fTriggerSelection->IsOfflineSelected(AliEmcalTriggerOfflineSelection::kTrgEL0, fTriggerPatches); // triggerstring.Contains("EMC7"),
285  isEJ1 = isMinBias && fTriggerSelection->IsOfflineSelected(AliEmcalTriggerOfflineSelection::kTrgEJ1, fTriggerPatches); // triggerstring.Contains("EJ1"),
286  isEJ2 = isMinBias && fTriggerSelection->IsOfflineSelected(AliEmcalTriggerOfflineSelection::kTrgEJ2, fTriggerPatches); // triggerstring.Contains("EJ2"),
287  isEG1 = isMinBias && fTriggerSelection->IsOfflineSelected(AliEmcalTriggerOfflineSelection::kTrgEG1, fTriggerPatches); // triggerstring.Contains("EG1"),
288  isEG2 = isMinBias && fTriggerSelection->IsOfflineSelected(AliEmcalTriggerOfflineSelection::kTrgEG2, fTriggerPatches); // triggerstring.Contains("EG2"); // In simulations triggered events are a subset of min. bias events
289 
290  }
291  if(!(isMinBias || isEG1 || isEG2 || isEJ1 || isEJ2)) return;
292  const AliVVertex *vtx = fInputEvent->GetPrimaryVertex();
293  //if(!fInputEvent->IsPileupFromSPD(3, 0.8, 3., 2., 5.)) return; // reject pileup event
294  if(vtx->GetNContributors() < 1) return;
295  // Fill reference distribution for the primary vertex before any z-cut
296  fHistos->FillTH1("hVertexBeforeTrue", vtx->GetZ(), weight);
297  if(isMinBias) fHistos->FillTH1("hVertexBeforeMB", vtx->GetZ(), weight);
298  if(isEMC7) fHistos->FillTH1("hVertexBeforeEMC7", vtx->GetZ(), weight);
299  if(isEJ1) fHistos->FillTH1("hVertexBeforeEJ1", vtx->GetZ(), weight);
300  if(isEJ2) fHistos->FillTH1("hVertexBeforeEJ2", vtx->GetZ(), weight);
301  if(isEG1) fHistos->FillTH1("hVertexBeforeEG1", vtx->GetZ(), weight);
302  if(isEG2) fHistos->FillTH1("hVertexBeforeEG2", vtx->GetZ(), weight);
303  if(!fAnalysisUtil->IsVertexSelected2013pA(fInputEvent)) return; // Apply new vertex cut
304  if(fAnalysisUtil->IsPileUpEvent(fInputEvent)) return; // Apply new vertex cut
305  // Apply vertex z cut
306  if(vtx->GetZ() < -10. || vtx->GetZ() > 10.) return;
307 
308  // Fill Event counter and reference vertex distributions for the different trigger classes
309  fHistos->FillTH1("hEventCountTrue", 1, weight);
310  fHistos->FillTH1("hVertexAfterTrue", vtx->GetZ(), weight);
311  if(isMinBias){
312  fHistos->FillTH1("hEventCountMB", 1, weight);
313  fHistos->FillTH1("hVertexAfterMB", vtx->GetZ(), weight);
314  }
315  if(isEMC7){
316  fHistos->FillTH1("hEventCountEMC7", 1, weight);
317  fHistos->FillTH1("hVertexAfterEMC7", vtx->GetZ(), weight);
318  }
319  if(isEJ1){
320  fHistos->FillTH1("hEventCountEJ1", 1, weight);
321  fHistos->FillTH1("hVertexAfterEJ1", vtx->GetZ(), weight);
322  }
323  if(isEJ2){
324  fHistos->FillTH1("hEventCountEJ2", 1, weight);
325  fHistos->FillTH1("hVertexAfterEJ2", vtx->GetZ(), weight);
326  }
327  if(isEG1){
328  fHistos->FillTH1("hEventCountEG1", 1, weight);
329  fHistos->FillTH1("hVertexAfterEG1", vtx->GetZ(), weight);
330  }
331  if(isEG2){
332  fHistos->FillTH1("hEventCountEG2", 1, weight);
333  fHistos->FillTH1("hVertexAfterEG2", vtx->GetZ(), weight);
334  }
335 
336  // Fill PYTHIA histograms from event header
337  if(pyheader){
338  fHistos->FillTH1("hNtrialsEvent", 1., pyheader->Trials());
339  fHistos->FillProfile("hCrossSectionEvent", 1., pyheader->GetXsection());
340  fHistos->FillTH1("hPtHard", pyheader->GetPtHard());
341  }
342 
343  // MonteCarlo Loop
344  // Histograms
345  // - Full eta (-0.8, 0.8), new binning
346  // - Full eta_{lab} (-0.8, 0.8), old binning
347  // - Eta distribution for tracks above 1, 2, 5, 10 GeV/c without eta cut
348  // - Central eta_{cms} (-0.3, 0.3), new binning,
349  // - Central eta_{cms} (-0.3, 0.3), old binning,
350  // - Eta distribution for tracks above 1, 2, 5, 10 GeV/c
351  // - Eta distribution for tracks above 1, 2, 5, 10 GeV/c with eta cut
352  AliVParticle *truepart = NULL;
353  Bool_t isEMCAL(kFALSE);
354  for(int ipart = 0; ipart < fMCEvent->GetNumberOfTracks(); ipart++){
355  truepart = fMCEvent->GetTrack(ipart);
356 
357  // Select only particles within ALICE acceptance
358  if((truepart->Eta() < fEtaLabCut[0]) || (truepart->Eta() > fEtaLabCut[1])) continue;
359  if(TMath::Abs(truepart->Pt()) < 0.1) continue;
360  if(!truepart->Charge()) continue;
361 
362  if(!IsPhysicalPrimary(truepart, fMCEvent)) continue;
363  isEMCAL = (truepart->Phi() > 1.5 && truepart->Phi() < 3.1) ? kTRUE : kFALSE;
364 
365  // Calculate eta in cms frame according
366  // EPJC74 (2014) 3054:
367  // eta_cms = - eta_lab - |yshift|
368  Double_t etacent = -1. * truepart->Eta() - TMath::Abs(fYshift);
369  etacent *= fEtaSign;
370 
371  Bool_t etacentcut = etacent > fEtaCmsCut[0] && etacent < fEtaCmsCut[1];
372 
373  // Get PID
374  TString pid = "";
375  switch(TMath::Abs(truepart->PdgCode())){
376  case kPiPlus: pid = "Pi"; break;
377  case kMuonMinus: pid = "Mu"; break;
378  case kElectron: pid = "El"; break;
379  case kKPlus: pid = "Ka"; break;
380  case kProton: pid = "Pr"; break;
381  default: pid = "Ot"; break;
382  };
383 
384  // Particle selected (do not filter TRD sectors for MC truth)
385  FillTrackHistos("True", weight, truepart->Pt(), truepart->Eta() * fEtaSign, etacent, truepart->Phi(), etacentcut, isEMCAL, kFALSE, pid);
386  }
387 
388  // Loop over tracks, fill select particles
389  // Histograms
390  // - Full eta (-0.8, 0.8), new binning
391  // - Full eta (-0.8, 0.8), old binning
392  // - Eta distribution for tracks above 1, 2, 5, 10 GeV/c without eta cut
393  // - Central eta (-0.8, -0.2), new binning,
394  // - Central eta (-0.8, -0.2), old binning,
395  // - Eta distribution for tracks above 1, 2, 5, 10 GeV/c
396  // - Eta distribution for tracks above 1, 2, 5, 10 GeV/c with eta cut
397  AliVTrack *checktrack(NULL);
398  AliVParticle *assocMC(NULL);
399  double ptparticle(-1.), etaparticle(-100.), etaEMCAL(0.), phiEMCAL(0.);
400  Bool_t hasTRD = kFALSE;
401  for(int itrk = 0; itrk < fInputEvent->GetNumberOfTracks(); ++itrk){
402  checktrack = dynamic_cast<AliVTrack *>(fInputEvent->GetTrack(itrk));
403  if(!checktrack) continue;
404  // Find associated particle
405  assocMC = fMCEvent->GetTrack(TMath::Abs(checktrack->GetLabel()));
406  if(!assocMC) continue; // Fake track
407  if(!IsPhysicalPrimary(assocMC, fMCEvent)) continue;
408 
409  // Select only particles within ALICE acceptance
410  if((checktrack->Eta() < fEtaLabCut[0]) || (checktrack->Eta() > fEtaLabCut[1])) continue;
411  if(TMath::Abs(checktrack->Pt()) < 0.1) continue;
412  if(checktrack->IsA() == AliESDtrack::Class()){
413  AliESDtrack copytrack(*(static_cast<AliESDtrack *>(checktrack)));
414  AliEMCALRecoUtils::ExtrapolateTrackToEMCalSurface(&copytrack);
415  etaEMCAL = copytrack.GetTrackEtaOnEMCal();
416  phiEMCAL = copytrack.GetTrackPhiOnEMCal();
417  } else {
418  AliAODTrack copytrack(*(static_cast<AliAODTrack *>(checktrack)));
419  AliEMCALRecoUtils::ExtrapolateTrackToEMCalSurface(&copytrack);
420  etaEMCAL = copytrack.GetTrackEtaOnEMCal();
421  phiEMCAL = copytrack.GetTrackPhiOnEMCal();
422  }
423  Int_t supermoduleID = -1;
424  isEMCAL = fGeometry->SuperModuleNumberFromEtaPhi(etaEMCAL, phiEMCAL, supermoduleID);
425  // Exclude supermodules 10 and 11 as they did not participate in the trigger
426  isEMCAL = isEMCAL && supermoduleID < 10;
427  hasTRD = isEMCAL && supermoduleID >= 4; // supermodules 4 - 10 have TRD in front in the 2012-2013 ALICE setup
428 
429  if(!fTrackCuts->IsTrackAccepted(checktrack)) continue;
430 
431  ptparticle = TMath::Abs(assocMC->Pt());
432  etaparticle = assocMC->Eta();
433 
434  // Calculate eta in cms frame according
435  // EPJC74 (2014) 3054:
436  // eta_cms = - eta_lab - |yshift|
437  Double_t etacent = -1. * checktrack->Eta() - TMath::Abs(fYshift);
438  etacent *= fEtaSign;
439 
440  Bool_t etacentcut = etacent > fEtaCmsCut[0] && etacent < fEtaCmsCut[1];
441 
442  // Get PID
443  TString assocpid = "";
444  switch(TMath::Abs(assocMC->PdgCode())){
445  case kPiPlus: assocpid = "Pi"; break;
446  case kMuonMinus: assocpid = "Mu"; break;
447  case kElectron: assocpid = "El"; break;
448  case kKPlus: assocpid = "Ka"; break;
449  case kProton: assocpid = "Pr"; break;
450  default: assocpid = "Ot"; break;
451  };
452 
453  // Go through the trigger classes and fill histograms
454  if(isMinBias){
455  FillTrackHistos("MB", weight, ptparticle, checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL, hasTRD, assocpid);
456  }
457  if(isEMC7){
458  FillTrackHistos("EMC7", weight, ptparticle, checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL, hasTRD, assocpid);
459  }
460  if(isEJ1){
461  FillTrackHistos("EJ1", weight, ptparticle, checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL, hasTRD, assocpid);
462  }
463  if(isEJ2){
464  FillTrackHistos("EJ2", weight, ptparticle, checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL, hasTRD, assocpid);
465  }
466  if(isEG1){
467  FillTrackHistos("EG1", weight, ptparticle, checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL, hasTRD, assocpid);
468  }
469  if(isEG2){
470  FillTrackHistos("EG2", weight, ptparticle, checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL, hasTRD, assocpid);
471  }
472  }
473  PostData(1, fHistos->GetListOfHistograms());
474 
475 }
476 
489  const char *eventclass,
490  Double_t weight,
491  Double_t pt,
492  Double_t etalab,
493  Double_t etacent,
494  Double_t phi,
495  Bool_t etacut,
496  Bool_t inEmcal,
497  Bool_t hasTRD,
498  const char *pid
499  )
500 {
501  fHistos->FillTH1(Form("hPtEtaAllNewBinning%s", eventclass), TMath::Abs(pt), weight);
502  fHistos->FillTH1(Form("hPtEtaAllOldBinning%s", eventclass), TMath::Abs(pt), weight);
503  fHistos->FillTH1(Form("hPtEtaAllNewBinning%s%s", pid, eventclass), TMath::Abs(pt), weight);
504  fHistos->FillTH1(Form("hPtEtaAllOldBinning%s%s", pid, eventclass), TMath::Abs(pt), weight);
505  if(inEmcal){
506  fHistos->FillTH1(Form("hPtEMCALEtaAllNewBinning%s", eventclass), TMath::Abs(pt), weight);
507  fHistos->FillTH1(Form("hPtEMCALEtaAllOldBinning%s", eventclass), TMath::Abs(pt), weight);
508  fHistos->FillTH1(Form("hPtEMCALEtaAllNewBinning%s%s", pid, eventclass), TMath::Abs(pt), weight);
509  fHistos->FillTH1(Form("hPtEMCALEtaAllOldBinning%s%s", pid, eventclass), TMath::Abs(pt), weight);
510  if(hasTRD){
511  fHistos->FillTH1(Form("hPtEMCALWithTRDEtaAllNewBinning%s", eventclass), TMath::Abs(pt), weight);
512  fHistos->FillTH1(Form("hPtEMCALWithTRDEtaAllOldBinning%s", eventclass), TMath::Abs(pt), weight);
513  fHistos->FillTH1(Form("hPtEMCALWithTRDEtaAllNewBinning%s%s", pid, eventclass), TMath::Abs(pt), weight);
514  fHistos->FillTH1(Form("hPtEMCALWithTRDEtaAllOldBinning%s%s", pid, eventclass), TMath::Abs(pt), weight);
515  } else {
516  fHistos->FillTH1(Form("hPtEMCALNoTRDEtaAllNewBinning%s", eventclass), TMath::Abs(pt), weight);
517  fHistos->FillTH1(Form("hPtEMCALNoTRDEtaAllOldBinning%s", eventclass), TMath::Abs(pt), weight);
518  fHistos->FillTH1(Form("hPtEMCALNoTRDEtaAllNewBinning%s%s", pid, eventclass), TMath::Abs(pt), weight);
519  fHistos->FillTH1(Form("hPtEMCALNoTRDEtaAllOldBinning%s%s", pid, eventclass), TMath::Abs(pt), weight);
520  }
521  }
522 
523  int ptmin[5] = {1,2,5,10,20}; // for eta distributions
524  for(int icut = 0; icut < 5; icut++){
525  if(TMath::Abs(pt) > static_cast<double>(ptmin[icut])){
526  fHistos->FillTH1(Form("hPhiDistAllPt%d%s", ptmin[icut], eventclass), phi, weight);
527  fHistos->FillTH1(Form("hEtaLabDistAllPt%d%s", ptmin[icut], eventclass), etalab, weight);
528  fHistos->FillTH1(Form("hEtaCentDistAllPt%d%s", ptmin[icut], eventclass), etacent, weight);
529  if(inEmcal){
530  fHistos->FillTH1(Form("hEtaLabDistAllEMCALPt%d%s", ptmin[icut], eventclass), etalab, weight);
531  fHistos->FillTH1(Form("hEtaCentDistAllEMCALPt%d%s", ptmin[icut], eventclass), etacent, weight);
532  }
533  }
534  }
535 
536  if(etacut){
537  fHistos->FillTH1(Form("hPtEtaCentNewBinning%s", eventclass), TMath::Abs(pt), weight);
538  fHistos->FillTH1(Form("hPtEtaCentOldBinning%s", eventclass), TMath::Abs(pt), weight);
539  fHistos->FillTH1(Form("hPtEtaCentNewBinning%s%s", pid, eventclass), TMath::Abs(pt), weight);
540  fHistos->FillTH1(Form("hPtEtaCentOldBinning%s%s", pid, eventclass), TMath::Abs(pt), weight);
541  if(inEmcal){
542  fHistos->FillTH1(Form("hPtEMCALEtaCentNewBinning%s", eventclass), TMath::Abs(pt), weight);
543  fHistos->FillTH1(Form("hPtEMCALEtaCentOldBinning%s", eventclass), TMath::Abs(pt), weight);
544  fHistos->FillTH1(Form("hPtEMCALEtaCentNewBinning%s%s", pid, eventclass), TMath::Abs(pt), weight);
545  fHistos->FillTH1(Form("hPtEMCALEtaCentOldBinning%s%s", pid, eventclass), TMath::Abs(pt), weight);
546  if(hasTRD){
547  fHistos->FillTH1(Form("hPtEMCALWithTRDEtaCentNewBinning%s", eventclass), TMath::Abs(pt), weight);
548  fHistos->FillTH1(Form("hPtEMCALWithTRDEtaCentOldBinning%s", eventclass), TMath::Abs(pt), weight);
549  fHistos->FillTH1(Form("hPtEMCALWithTRDEtaCentNewBinning%s%s", pid, eventclass), TMath::Abs(pt), weight);
550  fHistos->FillTH1(Form("hPtEMCALWithTRDEtaCentOldBinning%s%s", pid, eventclass), TMath::Abs(pt), weight);
551  } else {
552  fHistos->FillTH1(Form("hPtEMCALNoTRDEtaCentNewBinning%s", eventclass), TMath::Abs(pt), weight);
553  fHistos->FillTH1(Form("hPtEMCALNoTRDEtaCentOldBinning%s", eventclass), TMath::Abs(pt), weight);
554  fHistos->FillTH1(Form("hPtEMCALNoTRDEtaCentNewBinning%s%s", pid, eventclass), TMath::Abs(pt), weight);
555  fHistos->FillTH1(Form("hPtEMCALNoTRDEtaCentOldBinning%s%s", pid, eventclass), TMath::Abs(pt), weight);
556  }
557  }
558  for(int icut = 0; icut < 5; icut++){
559  if(TMath::Abs(pt) > static_cast<double>(ptmin[icut])){
560  fHistos->FillTH1(Form("hEtaLabDistCutPt%d%s", ptmin[icut], eventclass), etalab, weight);
561  fHistos->FillTH1(Form("hEtaCentDistCutPt%d%s", ptmin[icut], eventclass), etacent, weight);
562  if(inEmcal){
563  fHistos->FillTH1(Form("hEtaLabDistCutEMCALPt%d%s", ptmin[icut], eventclass), etalab, weight);
564  fHistos->FillTH1(Form("hEtaCentDistCutEMCALPt%d%s", ptmin[icut], eventclass), etacent, weight);
565  }
566  }
567  }
568  }
569 }
570 
576 void AliAnalysisTaskChargedParticlesRefMC::FillTriggerJetHistograms(Bool_t aftercut, AliGenPythiaEventHeader *const header){
577  TString ending = aftercut ? "WithCut" : "NoCut";
578  Float_t pbuf[4];
579  TLorentzVector jetvec;
580  TString hnameSpec = "hTriggerJetPt" + ending,
581  hnameptratio = "hRatioPtJetPtHard" + ending;
582  for(int ijet = 0; ijet < header->NTriggerJets(); ijet++){
583  memset(pbuf, 0, sizeof(Float_t) * 4);
584  header->TriggerJet(ijet, pbuf);
585  jetvec.SetPxPyPzE(pbuf[0], pbuf[1], pbuf[2], pbuf[3]);
586  fHistos->FillTH1(hnameSpec.Data(), TMath::Abs(jetvec.Pt()));
587  fHistos->FillTH1(hnameptratio.Data(), TMath::Abs(jetvec.Pt()/header->GetPtHard()));
588  }
589 }
590 
596 {
597  // Called when file changes.
598  if(!fUsePythiaHard) return kTRUE;
599 
600  TTree *tree = AliAnalysisManager::GetAnalysisManager()->GetTree();
601  if (!tree) {
602  AliError(Form("%s - UserNotify: No current tree!",GetName()));
603  return kFALSE;
604  }
605 
606  Float_t xsection = 0;
607  Float_t trials = 0;
608  Int_t pthardbin = 0;
609 
610  TFile *curfile = tree->GetCurrentFile();
611  if (!curfile) {
612  AliError(Form("%s - UserNotify: No current file!",GetName()));
613  return kFALSE;
614  }
615 
616  TChain *chain = dynamic_cast<TChain*>(tree);
617  if (chain) tree = chain->GetTree();
618 
619  Int_t nevents = tree->GetEntriesFast();
620 
621  PythiaInfoFromFile(curfile->GetName(), xsection, trials, pthardbin);
622 
623  fHistos->FillTH1("hNtrials", 1., trials);
624  fHistos->FillProfile("hCrossSection", 1., xsection);
625  //fHistos->FillTH1(pthardbin, nevents);
626 
627  return kTRUE;
628 }
629 
642 Bool_t AliAnalysisTaskChargedParticlesRefMC::PythiaInfoFromFile(const char* currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard) const {
643 
644  TString file(currFile);
645  fXsec = 0;
646  fTrials = 1;
647 
648  if (file.Contains(".zip#")) {
649  Ssiz_t pos1 = file.Index("root_archive",12,0,TString::kExact);
650  Ssiz_t pos = file.Index("#",1,pos1,TString::kExact);
651  Ssiz_t pos2 = file.Index(".root",5,TString::kExact);
652  file.Replace(pos+1,pos2-pos1,"");
653  } else {
654  // not an archive take the basename....
655  file.ReplaceAll(gSystem->BaseName(file.Data()),"");
656  }
657  AliDebug(1,Form("File name: %s",file.Data()));
658 
659  // Get the pt hard bin
660  TString strPthard(file);
661 
662  strPthard.Remove(strPthard.Last('/'));
663  strPthard.Remove(strPthard.Last('/'));
664  if (strPthard.Contains("AOD")) strPthard.Remove(strPthard.Last('/'));
665  strPthard.Remove(0,strPthard.Last('/')+1);
666  if (strPthard.IsDec())
667  pthard = strPthard.Atoi();
668  else
669  AliWarning(Form("Could not extract file number from path %s", strPthard.Data()));
670 
671  // problem that we cannot really test the existance of a file in a archive so we have to live with open error message from root
672  TFile *fxsec = TFile::Open(Form("%s%s",file.Data(),"pyxsec.root"));
673 
674  if (!fxsec) {
675  // next trial fetch the histgram file
676  fxsec = TFile::Open(Form("%s%s",file.Data(),"pyxsec_hists.root"));
677  if (!fxsec) {
678  // not a severe condition but inciate that we have no information
679  return kFALSE;
680  } else {
681  // find the tlist we want to be independtent of the name so use the Tkey
682  TKey* key = (TKey*)fxsec->GetListOfKeys()->At(0);
683  if (!key) {
684  fxsec->Close();
685  return kFALSE;
686  }
687  TList *list = dynamic_cast<TList*>(key->ReadObj());
688  if (!list) {
689  fxsec->Close();
690  return kFALSE;
691  }
692  fXsec = ((TProfile*)list->FindObject("h1Xsec"))->GetBinContent(1);
693  fTrials = ((TH1F*)list->FindObject("h1Trials"))->GetBinContent(1);
694  fxsec->Close();
695  }
696  } else { // no tree pyxsec.root
697  TTree *xtree = (TTree*)fxsec->Get("Xsection");
698  if (!xtree) {
699  fxsec->Close();
700  return kFALSE;
701  }
702  UInt_t ntrials = 0;
703  Double_t xsection = 0;
704  xtree->SetBranchAddress("xsection",&xsection);
705  xtree->SetBranchAddress("ntrials",&ntrials);
706  xtree->GetEntry(0);
707  fTrials = ntrials;
708  fXsec = xsection;
709  fxsec->Close();
710  }
711  return kTRUE;
712 }
713 
719  AliGenPythiaEventHeader *pythiaHeader = dynamic_cast<AliGenPythiaEventHeader*>(MCEvent()->GenEventHeader());
720  if (!pythiaHeader) {
721  // Check if AOD
722  AliAODMCHeader* aodMCH = dynamic_cast<AliAODMCHeader*>(InputEvent()->FindListObject(AliAODMCHeader::StdBranchName()));
723  if (aodMCH) {
724  for (UInt_t i = 0;i<aodMCH->GetNCocktailHeaders();i++) {
725  pythiaHeader = dynamic_cast<AliGenPythiaEventHeader*>(aodMCH->GetCocktailHeader(i));
726  if (pythiaHeader) break;
727  }
728  }
729  }
730  return pythiaHeader;
731 }
732 
740 }
741 
742 
743 
749 TString AliAnalysisTaskChargedParticlesRefMC::GetFiredTriggerClasses(const TClonesArray* triggerpatches) {
750  TString triggerstring = "";
751  Int_t nEJ1 = 0, nEJ2 = 0, nEG1 = 0, nEG2 = 0;
752  double minADC_EJ1 = 260.,
753  minADC_EJ2 = 127.,
754  minADC_EG1 = 140.,
755  minADC_EG2 = 89.;
756  for(TIter patchIter = TIter(triggerpatches).Begin(); patchIter != TIter::End(); ++patchIter){
757  AliEMCALTriggerPatchInfo *patch = dynamic_cast<AliEMCALTriggerPatchInfo *>(*patchIter);
758  if(!patch->IsOfflineSimple()) continue;
759  if(patch->IsJetHighSimple() && patch->GetADCOfflineAmp() > minADC_EJ1) nEJ1++;
760  if(patch->IsJetLowSimple() && patch->GetADCOfflineAmp() > minADC_EJ2) nEJ2++;
761  if(patch->IsGammaHighSimple() && patch->GetADCOfflineAmp() > minADC_EG1) nEG1++;
762  if(patch->IsGammaLowSimple() && patch->GetADCOfflineAmp() > minADC_EG2) nEG2++;
763  }
764  if(nEJ1) triggerstring += "EJ1";
765  if(nEJ2){
766  if(triggerstring.Length()) triggerstring += ",";
767  triggerstring += "EJ2";
768  }
769  if(nEG1){
770  if(triggerstring.Length()) triggerstring += ",";
771  triggerstring += "EG1";
772  }
773  if(nEG2){
774  if(triggerstring.Length()) triggerstring += ",";
775  triggerstring += "EG2";
776  }
777  return triggerstring;
778 }
779 
788 Bool_t AliAnalysisTaskChargedParticlesRefMC::IsPhysicalPrimary(const AliVParticle* const part, AliMCEvent* const mcevent) {
789  Bool_t physprim = false;
790  const AliAODMCParticle *aodmc = dynamic_cast<const AliAODMCParticle *>(part);
791  if(aodmc){
792  physprim = aodmc->IsPhysicalPrimary();
793  } else {
794  physprim = mcevent->IsPhysicalPrimary(part->GetLabel());
795  }
796  return physprim;
797 }
798 
804 Bool_t AliAnalysisTaskChargedParticlesRefMC::IsOutlier(AliGenPythiaEventHeader * const header) const {
805  Bool_t hasOutlier = kFALSE;
806  Float_t pbuf[4];
807  TLorentzVector jetvec;
808  for(int ijet = 0; ijet < header->NTriggerJets(); ijet++){
809  memset(pbuf, 0, sizeof(Float_t) * 4);
810  header->TriggerJet(ijet, pbuf);
811  jetvec.SetPxPyPzE(pbuf[0], pbuf[1], pbuf[2], pbuf[3]);
812  if(TMath::Abs(jetvec.Pt()) >= this->fFracPtHard * header->GetPtHard()){
813  hasOutlier = true;
814  break;
815  }
816  }
817  return hasOutlier;
818 }
819 
825 {
826  this->SetMinimum(0.);
827  this->AddStep(2.5, 0.1);
828  this->AddStep(7., 0.25);
829  this->AddStep(15., 0.5);
830  this->AddStep(25., 1.);
831  this->AddStep(40., 2.5);
832  this->AddStep(50., 5.);
833  this->AddStep(100., 10.);
834 }
835 
841 {
842  this->SetMinimum(0.);
843  this->AddStep(1, 0.05);
844  this->AddStep(2, 0.1);
845  this->AddStep(4, 0.2);
846  this->AddStep(7, 0.5);
847  this->AddStep(16, 1);
848  this->AddStep(36, 2);
849  this->AddStep(40, 4);
850  this->AddStep(50, 5);
851  this->AddStep(100, 10);
852  this->AddStep(200, 20);
853 }
854 
855 } /* namespace EMCalTriggerPtAnalysis */
const AliEMCalTriggerWeightHandler * fWeightHandler
Weight handler (optional)
void FillTriggerJetHistograms(Bool_t aftercut, AliGenPythiaEventHeader *const header)
static AliEmcalTrackSelection * TrackCutsFactory(TString name, Bool_t isAOD)
TSystem * gSystem
TList * list
void AddStep(Double_t max, Double_t binwidth)
Double_t fFracPtHard
Cut on the maximum fraction of pt hard of any trigger jet.
AliEmcalTriggerOfflineSelection * fTriggerSelection
Offline trigger selection.
void CreateTProfile(const char *name, const char *title, int nbinsX, double xmin, double xmax, Option_t *opt="")
THashList * GetListOfHistograms() const
Definition: THistManager.h:504
Bool_t IsPhysicalPrimary(const AliVParticle *const part, AliMCEvent *const mcevent)
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Helper class creating user defined custom binning.
void FillProfile(const char *name, double x, double y, double weight=1.)
const Double_t ptmin
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Bool_t PythiaInfoFromFile(const char *currFile, Float_t &fXsec, Float_t &fTrials, Int_t &pthard) const
Bool_t IsOfflineSelected(EmcalTriggerClass trgcls, const TClonesArray *const triggerpatches) const
Unit test class for charged particle distributions (MC case)
double GetEventWeight(const AliMCEvent *const event) const
void FillTrackHistos(const char *eventclass, Double_t weight, Double_t pt, Double_t eta, Double_t etacent, Double_t phi, Bool_t etacut, Bool_t inEmcal, Bool_t hasTRD, const char *pid)
ClassImp(AliAnalysisTaskCRC) AliAnalysisTaskCRC
TFile * file
Int_t nevents[nsamples]
Double_t fEtaSign
Sign of the eta distribution (swaps when beam directions swap): p-Pb: +1, Pb-p: -1.
Container class for histograms for the high- charged particle analysis.
Definition: THistManager.h:43
Int_t GetRunNumber(TString)
Definition: PlotMuonQA.C:2235
virtual bool IsTrackAccepted(AliVTrack *const trk)=0
void SetMinimum(Double_t min)