AliPhysics  v5-06-40-01 (42bb456)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliAnalysisTaskChargedParticlesRef.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 <TMath.h>
20 #include <THashList.h>
21 #include <TString.h>
22 
23 #include "AliAnalysisUtils.h"
24 #include "AliAODTrack.h"
25 #include "AliESDtrackCuts.h"
26 #include "AliESDEvent.h"
27 #include "AliESDtrack.h"
28 #include "AliInputEventHandler.h"
29 #include "AliVVertex.h"
30 
32 #include "AliEMCalHistoContainer.h"
34 
38 
39 namespace EMCalTriggerPtAnalysis {
40 
44 AliAnalysisTaskChargedParticlesRef::AliAnalysisTaskChargedParticlesRef() :
45  AliAnalysisTaskSE(),
46  fTrackCuts(NULL),
47  fAnalysisUtil(NULL),
48  fHistos(NULL),
49  fTriggerStringFromPatches(kFALSE),
50  fYshift(0.465),
51  fEtaSign(1)
52 {
53  // Restrict analysis to the EMCAL acceptance
54  fEtaLabCut[0] = -0.6;
55  fEtaLabCut[1] = 0.6;
56  fEtaCmsCut[0] = -0.13;
57  fEtaCmsCut[1] = 0.13;
58 }
59 
65  AliAnalysisTaskSE(name),
66  fTrackCuts(NULL),
67  fAnalysisUtil(NULL),
68  fHistos(NULL),
69  fTriggerStringFromPatches(kFALSE),
70  fYshift(0.465),
71  fEtaSign(1)
72 {
73  // Restrict analysis to the EMCAL acceptance
74  fEtaLabCut[0] = -0.6;
75  fEtaLabCut[1] = 0.6;
76  fEtaCmsCut[0] = -0.13;
77  fEtaCmsCut[1] = 0.13;
78  DefineOutput(1, TList::Class());
79 }
80 
85  if(fTrackCuts) delete fTrackCuts;
86  if(fAnalysisUtil) delete fAnalysisUtil;
87  if(fHistos) delete fHistos;
88 }
89 
94  fAnalysisUtil = new AliAnalysisUtils;
95 
96  fTrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011(true, 1);
97  fTrackCuts->SetName("Standard Track cuts");
98  fTrackCuts->SetMinNCrossedRowsTPC(120);
99  fTrackCuts->SetMaxDCAToVertexXYPtDep("0.0182+0.0350/pt^1.01");
100 
101  TArrayD oldbinning, newbinning;
102  CreateOldPtBinning(oldbinning);
103  CreateNewPtBinning(newbinning);
104 
105  fHistos = new AliEMCalHistoContainer("Ref");
106  // Exclusive means classes without higher trigger classes:
107  // EG2excl means EG2 && !EG1
108  // EJ2excl means EJ2 && !EJ1
109  // MBExcl means MinBias && !EMCAL trigger
110  // Combined means: gamma and ANY jet class, jet and ANY gamma class
111  // Jonly means: No gamma class fired at the same time
112  // Gonly means: No jet class fired at the same time
113  TString triggers[14] = {"MB", "EJ1", "EJ2", "EG1", "EG2", "EG2excl", "EJ2excl", "MBexcl", "E1combined", "E1Jonly", "E1Gonly", "E2combined", "E2Jonly", "E2Gonly"};
114  Double_t ptcuts[5] = {1., 2., 5., 10., 20.};
115  for(TString *trg = triggers; trg < triggers+14; trg++){
116  fHistos->CreateTH1(Form("hEventCount%s", trg->Data()), Form("Event Counter for trigger class %s", trg->Data()), 1, 0.5, 1.5);
117  fHistos->CreateTH1(Form("hVertexBefore%s", trg->Data()), Form("Vertex distribution before z-cut for trigger class %s", trg->Data()), 500, -50, 50);
118  fHistos->CreateTH1(Form("hVertexAfter%s", trg->Data()), Form("Vertex distribution after z-cut for trigger class %s", trg->Data()), 100, -10, 10);
119  fHistos->CreateTH1(Form("hPtEtaAllOldBinning%s", trg->Data()), Form("Charged particle pt distribution all eta old binning trigger %s", trg->Data()), oldbinning);
120  fHistos->CreateTH1(Form("hPtEtaCentOldBinning%s", trg->Data()), Form("Charged particle pt distribution central eta old binning trigger %s", trg->Data()), oldbinning);
121  fHistos->CreateTH1(Form("hPtEtaAllNewBinning%s", trg->Data()), Form("Charged particle pt distribution all eta new binning trigger %s", trg->Data()), newbinning);
122  fHistos->CreateTH1(Form("hPtEtaCentNewBinning%s", trg->Data()), Form("Charged particle pt distribution central eta new binning trigger %s", trg->Data()), newbinning);
123  fHistos->CreateTH1(Form("hPtEMCALEtaAllOldBinning%s", trg->Data()), Form("Charged particle in EMCAL pt distribution all eta old binning trigger %s", trg->Data()), oldbinning);
124  fHistos->CreateTH1(Form("hPtEMCALEtaCentOldBinning%s", trg->Data()), Form("Charged particle in EMCAL pt distribution central eta old binning trigger %s", trg->Data()), oldbinning);
125  fHistos->CreateTH1(Form("hPtEMCALEtaAllNewBinning%s", trg->Data()), Form("Charged particle in EMCAL pt distribution all eta new binning trigger %s", trg->Data()), newbinning);
126  fHistos->CreateTH1(Form("hPtEMCALEtaCentNewBinning%s", trg->Data()), Form("Charged particle in EMCAL pt distribution central eta new binning trigger %s", trg->Data()), newbinning);
127  for(int ipt = 0; ipt < 5; ipt++){
129  Form("hEtaLabDistAllPt%d%s", static_cast<Int_t>(ptcuts[ipt]), trg->Data()),
130  Form("Eta (lab) distribution without etacut for tracks with Pt above 1 GeV/c trigger %s", trg->Data()),
131  100,
132  -1.,
133  1.
134  );
136  Form("hEtaLabDistCutPt%d%s", static_cast<Int_t>(ptcuts[ipt]), trg->Data()),
137  Form("Eta (lab) distribution with etacut for tracks with Pt above 1 GeV/c trigger %s", trg->Data()),
138  100,
139  -1.,
140  1.
141  );
143  Form("hEtaCentDistAllPt%d%s", static_cast<Int_t>(ptcuts[ipt]), trg->Data()),
144  Form("Eta (cent) distribution without etacut for tracks with Pt above 1 GeV/c trigger %s",
145  trg->Data()),
146  160,
147  -1.3,
148  1.3
149  );
151  Form("hEtaCentDistCutPt%d%s", static_cast<Int_t>(ptcuts[ipt]), trg->Data()),
152  Form("Eta (cent) distribution with etacut for tracks with Pt above 1 GeV/c trigger %s", trg->Data()),
153  160,
154  -1.3,
155  1.3
156  );
158  Form("hEtaLabDistAllEMCALPt%d%s", static_cast<Int_t>(ptcuts[ipt]), trg->Data()),
159  Form("Eta (lab) distribution without etacut for tracks in EMCAL with Pt above %.1f GeV/c trigger %s", ptcuts[ipt], trg->Data()),
160  100,
161  -1.,
162  1.
163  );
165  Form("hEtaLabDistCutEMCALPt%d%s", static_cast<Int_t>(ptcuts[ipt]), trg->Data()),
166  Form("Eta (lab) distribution with etacut for tracks in EMCAL with Pt above %.1f GeV/c trigger %s", ptcuts[ipt], trg->Data()),
167  100,
168  -1.,
169  1.
170  );
172  Form("hEtaCentDistAllEMCALPt%d%s", static_cast<Int_t>(ptcuts[ipt]), trg->Data()),
173  Form("Eta (cent) distribution without etacut for tracks in EMCAL with Pt above %.1f GeV/c trigger %s", ptcuts[ipt], trg->Data()),
174  160,
175  -1.3,
176  1.3
177  );
179  Form("hEtaCentDistCutEMCALPt%d%s", static_cast<Int_t>(ptcuts[ipt]), trg->Data()),
180  Form("Eta (cent) distribution with etacut for tracks in EMCAL with Pt above %.1f GeV/c trigger %s", ptcuts[ipt], trg->Data()),
181  160,
182  -1.3,
183  1.3
184  );
186  Form("hPhiDistAllPt%d%s", static_cast<Int_t>(ptcuts[ipt]), trg->Data()),
187  Form("#phi distribution of particles with Pt above %.1f GeV/c trigger %s", ptcuts[ipt], trg->Data()),
188  300,
189  0.,
190  2*TMath::Pi()
191  );
192  }
193  }
194  PostData(1, fHistos->GetListOfHistograms());
195 }
196 
206  // Select event
207  TString triggerstring = "";
209  triggerstring = GetFiredTriggerClassesFromPatches(dynamic_cast<TClonesArray *>(fInputEvent->FindListObject("EmcalTriggers")));
210  } else {
211  triggerstring = fInputEvent->GetFiredTriggerClasses();
212  }
213  Bool_t isMinBias = fInputHandler->IsEventSelected() & AliVEvent::kINT7,
214  isEJ1 = triggerstring.Contains("EJ1"),
215  isEJ2 = triggerstring.Contains("EJ2"),
216  isEG1 = triggerstring.Contains("EG1"),
217  isEG2 = triggerstring.Contains("EG2");
218  if(!(isMinBias || isEG1 || isEG2 || isEJ1 || isEJ2)) return;
219  const AliVVertex *vtx = fInputEvent->GetPrimaryVertex();
220  //if(!fInputEvent->IsPileupFromSPD(3, 0.8, 3., 2., 5.)) return; // reject pileup event
221  if(vtx->GetNContributors() < 1) return;
222  // Fill reference distribution for the primary vertex before any z-cut
223  if(isMinBias) fHistos->FillTH1("hVertexBeforeMB", vtx->GetZ());
224  if(isEJ1) fHistos->FillTH1("hVertexBeforeEJ1", vtx->GetZ());
225  if(isEJ2) fHistos->FillTH1("hVertexBeforeEJ2", vtx->GetZ());
226  if(isEG1) fHistos->FillTH1("hVertexBeforeEG1", vtx->GetZ());
227  if(isEG2) fHistos->FillTH1("hVertexBeforeEG2", vtx->GetZ());
228  if(!fAnalysisUtil->IsVertexSelected2013pA(fInputEvent)) return; // Apply new vertex cut
229  if(fAnalysisUtil->IsPileUpEvent(fInputEvent)) return; // Apply new vertex cut
230  // Apply vertex z cut
231  if(vtx->GetZ() < -10. || vtx->GetZ() > 10.) return;
232 
233  // Fill Event counter and reference vertex distributions for the different trigger classes
234  if(isMinBias){
235  fHistos->FillTH1("hEventCountMB", 1);
236  fHistos->FillTH1("hVertexAfterMB", vtx->GetZ());
237  // Check for exclusive classes
238  if(!(isEG1 || isEG2 || isEJ1 || isEJ2)){
239  fHistos->FillTH1("hEventCountMBexcl", 1);
240  fHistos->FillTH1("hVertexAfterMBexcl", vtx->GetZ());
241  }
242  }
243  if(isEJ1){
244  fHistos->FillTH1("hEventCountEJ1", 1);
245  fHistos->FillTH1("hVertexAfterEJ1", vtx->GetZ());
246  if(isEG1 || isEG2){
247  fHistos->FillTH1("hEventCountE1combined", 1);
248  fHistos->FillTH1("hVertexAfterE1combined", vtx->GetZ());
249  } else {
250  fHistos->FillTH1("hEventCountE1Jonly", 1);
251  fHistos->FillTH1("hVertexAfterE1Jonly", vtx->GetZ());
252  }
253  }
254  if(isEJ2){
255  fHistos->FillTH1("hEventCountEJ2", 1);
256  fHistos->FillTH1("hVertexAfterEJ2", vtx->GetZ());
257  // Check for exclusive classes
258  if(!isEJ1){
259  fHistos->FillTH1("hEventCountEJ2excl", 1);
260  fHistos->FillTH1("hVertexAfterEJ2excl", vtx->GetZ());
261  }
262  if(isEG1 || isEG2){
263  fHistos->FillTH1("hEventCountE2combined", 1);
264  fHistos->FillTH1("hVertexAfterE2combined", vtx->GetZ());
265  } else {
266  fHistos->FillTH1("hEventCountE2Jonly", 1);
267  fHistos->FillTH1("hVertexAfterE2Jonly", vtx->GetZ());
268  }
269  }
270  if(isEG1){
271  fHistos->FillTH1("hEventCountEG1", 1);
272  fHistos->FillTH1("hVertexAfterEG1", vtx->GetZ());
273  if(!(isEJ1 || isEJ2)){
274  fHistos->FillTH1("hEventCountE1Gonly", 1);
275  fHistos->FillTH1("hVertexAfterE1Gonly", vtx->GetZ());
276  }
277  }
278  if(isEG2){
279  fHistos->FillTH1("hEventCountEG2", 1);
280  fHistos->FillTH1("hVertexAfterEG2", vtx->GetZ());
281  // Check for exclusive classes
282  if(!isEG1){
283  fHistos->FillTH1("hEventCountEG2excl", 1);
284  fHistos->FillTH1("hVertexAfterEG2excl", vtx->GetZ());
285  }
286  if(!(isEJ1 || isEJ2)){
287  fHistos->FillTH1("hEventCountE2Gonly", 1);
288  fHistos->FillTH1("hVertexAfterE2Gonly", vtx->GetZ());
289  }
290  }
291 
292  // Loop over tracks, fill select particles
293  // Histograms
294  // - Full eta_{lab} (-0.8, 0.8), new binning
295  // - Full eta_{lab} (-0.8, 0.8), old binning
296  // - Eta distribution for tracks above 1, 2, 5, 10 GeV/c without eta cut
297  // - Central eta_{cms} (-0.3, -0.2), new binning,
298  // - Central eta_{cms} (-0.8, -0.2), old binning,
299  // - Eta distribution for tracks above 1, 2, 5, 10 GeV/c
300  // - Eta distribution for tracks above 1, 2, 5, 10 GeV/c with eta cut
301  AliVTrack *checktrack(NULL);
302  int ptmin[5] = {1,2,5,10,20}; // for eta distributions
303  Bool_t isEMCAL(kFALSE);
304  for(int itrk = 0; itrk < fInputEvent->GetNumberOfTracks(); ++itrk){
305  checktrack = dynamic_cast<AliVTrack *>(fInputEvent->GetTrack(itrk));
306  if(!checktrack) continue;
307  if((checktrack->Eta() < fEtaLabCut[0]) || (checktrack->Eta() > fEtaLabCut[1])) continue;
308  if(TMath::Abs(checktrack->Pt()) < 0.1) continue;
309  isEMCAL = (checktrack->Phi() > 1.5 && checktrack->Phi() < 3.1) ? kTRUE : kFALSE;
310 
311  // Calculate eta in cms frame according
312  // EPJC74 (2014) 3054:
313  // eta_cms = - eta_lab - |yshift|
314  Double_t etacent = -1. * checktrack->Eta() - TMath::Abs(fYshift);
315  etacent *= fEtaSign;
316 
317  Bool_t etacentcut = etacent > fEtaCmsCut[0] && etacent < fEtaCmsCut[1];
318 
319  // Distinguish track selection for ESD and AOD tracks
320  AliESDtrack *esdtrack(NULL);
321  AliAODTrack *aodtrack(NULL);
322  if((esdtrack = dynamic_cast<AliESDtrack *>(checktrack))){
323  if(!TrackSelectionESD(esdtrack)) continue;
324  } else if((aodtrack = dynamic_cast<AliAODTrack *>(checktrack))){
325  if(!TrackSelectionAOD(aodtrack)) continue;
326  } else {
327  continue;
328  }
329 
330  // fill histograms allEta
331  if(isMinBias){
332  FillTrackHistos("MB", checktrack->Pt(), checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL);
333  // check for exclusive classes
334  if(!(isEG1 || isEG2 || isEJ1 || isEJ2)){
335  FillTrackHistos("MBexcl", checktrack->Pt(), checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL);
336  }
337  }
338  if(isEJ1){
339  FillTrackHistos("EJ1", checktrack->Pt(), checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL);
340  if(isEG1 || isEG2) {
341  FillTrackHistos("E1combined", checktrack->Pt(), checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL);
342  } else {
343  FillTrackHistos("E1Jonly", checktrack->Pt(), checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL);
344  }
345  }
346  if(isEJ2){
347  FillTrackHistos("EJ2", checktrack->Pt(), checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL);
348  // check for exclusive classes
349  if(!isEJ1){
350  FillTrackHistos("EJ2excl", checktrack->Pt(), checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL);
351  }
352  if(isEG1 || isEG2){
353  FillTrackHistos("E2combined", checktrack->Pt(), checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL);
354  } else {
355  FillTrackHistos("E2Jonly", checktrack->Pt(), checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL);
356  }
357  }
358  if(isEG1){
359  FillTrackHistos("EG1", checktrack->Pt(), checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL);
360  if(!(isEJ1 || isEJ2)){
361  FillTrackHistos("E1Gonly", checktrack->Pt(), checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL);
362  }
363  }
364  if(isEG2){
365  FillTrackHistos("EG2", checktrack->Pt(), checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL);
366  // check for exclusive classes
367  if(!isEG1){
368  FillTrackHistos("EG2excl", checktrack->Pt(), checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL);
369  }
370  if(!(isEJ2 || isEJ1)){
371  FillTrackHistos("E2Gonly", checktrack->Pt(), checktrack->Eta() * fEtaSign, etacent, checktrack->Phi(), etacentcut, isEMCAL);
372  }
373  }
374  }
375  PostData(1, fHistos->GetListOfHistograms());
376 }
377 
389  const char *eventclass,
390  Double_t pt,
391  Double_t etalab,
392  Double_t etacent,
393  Double_t phi,
394  Bool_t etacut,
395  Bool_t inEmcal
396  )
397 {
398  fHistos->FillTH1(Form("hPtEtaAllNewBinning%s", eventclass), TMath::Abs(pt));
399  fHistos->FillTH1(Form("hPtEtaAllOldBinning%s", eventclass), TMath::Abs(pt));
400  if(inEmcal){
401  fHistos->FillTH1(Form("hPtEMCALEtaAllNewBinning%s", eventclass), TMath::Abs(pt));
402  fHistos->FillTH1(Form("hPtEMCALEtaAllOldBinning%s", eventclass), TMath::Abs(pt));
403  }
404 
405  int ptmin[5] = {1,2,5,10,20}; // for eta distributions
406  for(int icut = 0; icut < 5; icut++){
407  if(TMath::Abs(pt) > static_cast<double>(ptmin[icut])){
408  fHistos->FillTH1(Form("hPhiDistAllPt%d%s", ptmin[icut], eventclass), phi);
409  fHistos->FillTH1(Form("hEtaLabDistAllPt%d%s", ptmin[icut], eventclass), etalab);
410  fHistos->FillTH1(Form("hEtaCentDistAllPt%d%s", ptmin[icut], eventclass), etacent);
411  if(inEmcal){
412  fHistos->FillTH1(Form("hEtaLabDistAllEMCALPt%d%s", ptmin[icut], eventclass), etalab);
413  fHistos->FillTH1(Form("hEtaCentDistAllEMCALPt%d%s", ptmin[icut], eventclass), etacent);
414  }
415  }
416  }
417 
418  if(etacut){
419  fHistos->FillTH1(Form("hPtEtaCentNewBinning%s", eventclass), TMath::Abs(pt));
420  fHistos->FillTH1(Form("hPtEtaCentOldBinning%s", eventclass), TMath::Abs(pt));
421  if(inEmcal){
422  fHistos->FillTH1(Form("hPtEMCALEtaCentNewBinning%s", eventclass), TMath::Abs(pt));
423  fHistos->FillTH1(Form("hPtEMCALEtaCentOldBinning%s", eventclass), TMath::Abs(pt));
424  }
425  for(int icut = 0; icut < 5; icut++){
426  if(TMath::Abs(pt) > static_cast<double>(ptmin[icut])){
427  fHistos->FillTH1(Form("hEtaLabDistCutPt%d%s", ptmin[icut], eventclass), etalab);
428  fHistos->FillTH1(Form("hEtaCentDistCutPt%d%s", ptmin[icut], eventclass), etacent);
429  if(inEmcal){
430  fHistos->FillTH1(Form("hEtaLabDistCutEMCALPt%d%s", ptmin[icut], eventclass), etalab);
431  fHistos->FillTH1(Form("hEtaCentDistCutEMCALPt%d%s", ptmin[icut], eventclass), etacent);
432  }
433  }
434  }
435  }
436 }
437 
438 
444  std::vector<double> mybinning;
445  std::map<double,double> definitions;
446  definitions.insert(std::pair<double,double>(2.5, 0.1));
447  definitions.insert(std::pair<double,double>(7., 0.25));
448  definitions.insert(std::pair<double,double>(15., 0.5));
449  definitions.insert(std::pair<double,double>(25., 1.));
450  definitions.insert(std::pair<double,double>(40., 2.5));
451  definitions.insert(std::pair<double,double>(50., 5.));
452  definitions.insert(std::pair<double,double>(100., 10.));
453  double currentval = 0;
454  for(std::map<double,double>::iterator id = definitions.begin(); id != definitions.end(); ++id){
455  double limit = id->first, binwidth = id->second;
456  while(currentval < limit){
457  currentval += binwidth;
458  mybinning.push_back(currentval);
459  }
460  }
461  binning.Set(mybinning.size());
462  int ib = 0;
463  for(std::vector<double>::iterator it = mybinning.begin(); it != mybinning.end(); ++it)
464  binning[ib++] = *it;
465 }
466 
472  std::vector<double> mybinning;
473  std::map<double,double> definitions;
474  definitions.insert(std::pair<double, double>(1, 0.05));
475  definitions.insert(std::pair<double, double>(2, 0.1));
476  definitions.insert(std::pair<double, double>(4, 0.2));
477  definitions.insert(std::pair<double, double>(7, 0.5));
478  definitions.insert(std::pair<double, double>(16, 1));
479  definitions.insert(std::pair<double, double>(36, 2));
480  definitions.insert(std::pair<double, double>(40, 4));
481  definitions.insert(std::pair<double, double>(50, 5));
482  definitions.insert(std::pair<double, double>(100, 10));
483  definitions.insert(std::pair<double, double>(200, 20));
484  double currentval = 0.;
485  mybinning.push_back(currentval);
486  for(std::map<double,double>::iterator id = definitions.begin(); id != definitions.end(); ++id){
487  double limit = id->first, binwidth = id->second;
488  while(currentval < limit){
489  currentval += binwidth;
490  mybinning.push_back(currentval);
491  }
492  }
493  binning.Set(mybinning.size());
494  int ib = 0;
495  for(std::vector<double>::iterator it = mybinning.begin(); it != mybinning.end(); ++it)
496  binning[ib++] = *it;
497 }
498 
505  return fTrackCuts->AcceptTrack(track);
506 }
507 
514  if(!track->TestFilterBit(AliAODTrack::kTrkGlobal)) return false;
515  if(track->GetTPCNCrossedRows() < 120) return false;
516  return true;
517 }
518 
524 TString AliAnalysisTaskChargedParticlesRef::GetFiredTriggerClassesFromPatches(const TClonesArray* triggerpatches) const {
525  TString triggerstring = "";
526  Int_t nEJ1 = 0, nEJ2 = 0, nEG1 = 0, nEG2 = 0;
527  double minADC_EJ1 = 260.,
528  minADC_EJ2 = 127.,
529  minADC_EG1 = 140.,
530  minADC_EG2 = 89.;
531  for(TIter patchIter = TIter(triggerpatches).Begin(); patchIter != TIter::End(); ++patchIter){
532  AliEmcalTriggerPatchInfo *patch = dynamic_cast<AliEmcalTriggerPatchInfo *>(*patchIter);
533  if(!patch->IsOfflineSimple()) continue;
534  if(patch->IsJetHighSimple() && patch->GetADCOfflineAmp() > minADC_EJ1) nEJ1++;
535  if(patch->IsJetLowSimple() && patch->GetADCOfflineAmp() > minADC_EJ2) nEJ2++;
536  if(patch->IsGammaHighSimple() && patch->GetADCOfflineAmp() > minADC_EG1) nEG1++;
537  if(patch->IsGammaLowSimple() && patch->GetADCOfflineAmp() > minADC_EG2) nEG2++;
538  }
539  if(nEJ1) triggerstring += "EJ1";
540  if(nEJ2){
541  if(triggerstring.Length()) triggerstring += ",";
542  triggerstring += "EJ2";
543  }
544  if(nEG1){
545  if(triggerstring.Length()) triggerstring += ",";
546  triggerstring += "EG1";
547  }
548  if(nEG2){
549  if(triggerstring.Length()) triggerstring += ",";
550  triggerstring += "EG2";
551  }
552  return triggerstring;
553 }
554 
555 } /* namespace EMCalTriggerPtAnalysis */
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
Double_t fEtaSign
Sign of the eta distribution (swaps when beam directions swap): p-Pb: +1, Pb-p: -1.
void CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Container class for histograms for the high- charged particle analysis.
TString GetFiredTriggerClassesFromPatches(const TClonesArray *triggerpatches) const
Main data structure storing all relevant information of EMCAL/DCAL trigger patches.
Bool_t fTriggerStringFromPatches
Do rebuild the trigger string from trigger patches.
void FillTrackHistos(const char *eventclass, Double_t pt, Double_t eta, Double_t etacent, Double_t phi, Bool_t etacut, Bool_t inEmcal)
Declarartion of class AliEMCalHistoContainer.
const Double_t ptmin
Double_t fEtaCmsCut[2]
Cut applied in Eta centre-of-mass frame.
Class to make array of trigger patch objects in AOD/ESD events.
void FillTH1(const char *hname, double x, double weight=1.)