AliPhysics  ff07904 (ff07904)
AliAnalysisTaskPtEMCalTrigger.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-2014, 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 
16 #include <map>
17 #include <cstring>
18 #include <iostream>
19 #include <memory>
20 #include <vector>
21 #include <string>
22 #include <sstream>
23 
24 #include <TClonesArray.h>
25 #include <TDirectory.h>
26 #include <TH1.h>
27 #include <THashList.h>
28 #include <THistManager.h>
29 #include <TList.h>
30 #include <TKey.h>
31 #include <TMath.h>
32 #include <TObjArray.h>
33 #include <TObjString.h>
34 #include <TString.h>
35 #include <TVector2.h>
36 
37 #include "AliAODEvent.h"
38 #include "AliESDEvent.h"
39 #include "AliInputEventHandler.h"
40 #include "AliMCEvent.h"
41 #include "AliParticleContainer.h"
42 #include "AliVCluster.h"
43 #include "AliVParticle.h"
44 #include "AliVTrack.h"
45 #include "AliVVertex.h"
46 
47 #include "AliClusterContainer.h"
48 #include "AliEmcalJet.h"
49 #include "AliEMCALTriggerPatchInfo.h"
52 #include "AliEmcalTrackSelection.h"
55 #include "AliEmcalCutBase.h"
56 #include "AliEmcalVCutsWrapper.h"
58 #include "AliJetContainer.h"
59 #include "AliParticleContainer.h"
60 #include "AliPicoTrack.h"
61 
65 
66 namespace EMCalTriggerPtAnalysis {
67 
68  /*
69  * constants
70  */
71  const Int_t AliAnalysisTaskPtEMCalTrigger::kNJetRadii = 4;
72  const Double_t jetRadVals[AliAnalysisTaskPtEMCalTrigger::kNJetRadii] = {0.2, 0.3, 0.4, 0.5};
73  const Double_t *AliAnalysisTaskPtEMCalTrigger::kJetRadii = jetRadVals;
74 
78  AliAnalysisTaskPtEMCalTrigger::AliAnalysisTaskPtEMCalTrigger():
80  fHistos(NULL),
81  fListTrackCuts(NULL),
82  fEtaRange(),
83  fPtRange(),
84  fEnergyRange(),
85  fVertexRange(),
86  fJetContainersMC(),
87  fJetContainersData(),
88  fSelectAllTracks(kFALSE),
89  fSwapEta(kFALSE),
90  fUseTriggersFromTriggerMaker(kFALSE)
91  {
92  }
93 
99  AliAnalysisTaskEmcalJet(name, kTRUE),
100  fHistos(NULL),
101  fListTrackCuts(NULL),
102  fEtaRange(),
103  fPtRange(),
104  fEnergyRange(),
105  fVertexRange(),
108  fSelectAllTracks(kFALSE),
109  fSwapEta(kFALSE),
111  {
112 
113  fListTrackCuts = new TList;
114  fListTrackCuts->SetOwner(false);
115 
116  // Set default cuts
117  fEtaRange.SetLimits(-0.8, 0.8);
118  fPtRange.SetLimits(0.15, 100.);
119  fEnergyRange.SetLimits(0., 1000.);
120  fVertexRange.SetLimits(-10., 10.);
122  }
123 
128  //if(fTrackSelection) delete fTrackSelection;
129  if(fHistos) delete fHistos;
130  if(fListTrackCuts) delete fListTrackCuts;
131  }
132 
139  SetCaloTriggerPatchInfoName("EmcalTriggers");
140  fHistos = new THistManager("PtEMCalTriggerHistograms");
142 
143  if(fJetContainersMC.GetEntries()){
144  AliDebug(1,"Jet containers for MC truth:");
145  TObjString *contname(NULL);
146  TIter contMCIter(&fJetContainersMC);
147  while((contname = dynamic_cast<TObjString *>(contMCIter.Next())))
148  AliDebug(1, Form("Next container: %s", contname->String().Data()));
149  }
150  if(fJetContainersData.GetEntries()){
151  AliDebug(1, "Jet containers for Data:");
152  TObjString *contname(NULL);
153  TIter contDataIter(&fJetContainersData);
154  while((contname = dynamic_cast<TObjString *>(contDataIter.Next())))
155  AliDebug(1, Form("Next container: %s", contname->String().Data()));
156  }
157  if(fJetCollArray.GetEntries()){
158  AliDebug(1, "Jet containers attached to this task:");
159  AliJetContainer *cont(NULL);
160  TIter contIter(&fJetCollArray);
161  while((cont = dynamic_cast<AliJetContainer *>(contIter.Next())))
162  AliDebug(1, Form("Container: %s", cont->GetName()));
163  }
164 
165  std::map<std::string, std::string> triggerCombinations;
166  const char *triggernames[12] = {"MinBias", "EMCJHigh", "EMCJLow", "EMCGHigh", "EMCGLow", "NoEMCal", "EMCHighBoth", "EMCHighGammaOnly", "EMCHighJetOnly", "EMCLowBoth", "EMCLowGammaOnly", "EMCLowJetOnly"},
167  *bitnames[4] = {"CINT7", "EMC7", "kEMCEGA", "kEMCEJE"};
168  // Define axes for the trigger correlation histogram
169  const TAxis *triggeraxis[5]; memset(triggeraxis, 0, sizeof(const TAxis *) * 5);
170  const TAxis *bitaxes[4]; memset(bitaxes, 0, sizeof(TAxis *) * 4);
171  const char *binlabels[2] = {"OFF", "ON"};
172  TAxis mytrgaxis[5], mybitaxis[4];
173  for(int itrg = 0; itrg < 5; ++itrg){
174  DefineAxis(mytrgaxis[itrg], triggernames[itrg], triggernames[itrg], 2, -0.5, 1.5, binlabels);
175  triggeraxis[itrg] = mytrgaxis+itrg;
176  if(itrg < 4){
177  DefineAxis(mybitaxis[itrg], bitnames[itrg], bitnames[itrg], 2, -0.5, 1.5, binlabels);
178  bitaxes[itrg] = mybitaxis+itrg;
179  }
180  }
181  // Define names and titles for different triggers in the histogram container
182  triggerCombinations.insert(std::pair<std::string,std::string>(triggernames[0], "min. bias events"));
183  triggerCombinations.insert(std::pair<std::string,std::string>(triggernames[1], "jet-triggered events (high threshold)"));
184  triggerCombinations.insert(std::pair<std::string,std::string>(triggernames[2], "jet-triggered events (low threshold)"));
185  triggerCombinations.insert(std::pair<std::string,std::string>(triggernames[3], "gamma-triggered events (high threshold)"));
186  triggerCombinations.insert(std::pair<std::string,std::string>(triggernames[4], "gamma-triggered events (low threshold)"));
187  triggerCombinations.insert(std::pair<std::string,std::string>(triggernames[5], "non-EMCal-triggered events"));
188  triggerCombinations.insert(std::pair<std::string,std::string>(triggernames[6], "jet and gamma triggered events (high threshold)"));
189  triggerCombinations.insert(std::pair<std::string,std::string>(triggernames[7], "exclusively gamma-triggered events (high threshold)"));
190  triggerCombinations.insert(std::pair<std::string,std::string>(triggernames[8], "exclusively jet-triggered events (high threshold)"));
191  triggerCombinations.insert(std::pair<std::string,std::string>(triggernames[9], "jet and gamma triggered events (low threshold)"));
192  triggerCombinations.insert(std::pair<std::string,std::string>(triggernames[10], "exclusively gamma-triggered events (low threshold)"));
193  triggerCombinations.insert(std::pair<std::string,std::string>(triggernames[11], "exclusively-triggered events (low threshold)"));
194  // Define axes for the pt histogram
195  // Dimensions:
196  // 1. pt
197  // 2. eta
198  // 3. phi
199  // 4. vertex
200  // 5. pileup (0 = all events, 1 = after pileup rejection)
201  // 6. track cuts (0 = no cuts; 1 = after std cuts)
202  TArrayD ptbinning, zvertexBinning, etabinning, pileupaxis(3);
203  pileupaxis[0] = -0.5; pileupaxis[1] = 0.5; pileupaxis[2] = 1.5;
204  CreateDefaultPtBinning(ptbinning);
205  CreateDefaultZVertexBinning(zvertexBinning);
206  CreateDefaultEtaBinning(etabinning);
207  TAxis htrackaxes[7];
208  DefineAxis(htrackaxes[0], "pt", "p_{t} (GeV/c)", ptbinning);
209  DefineAxis(htrackaxes[1], "eta", "#eta", etabinning);
210  DefineAxis(htrackaxes[2], "phi", "#phi", 20, 0, 2 * TMath::Pi());
211  DefineAxis(htrackaxes[3], "zvertex", "z_{V} (cm)", zvertexBinning);
212  DefineAxis(htrackaxes[4], "pileup", "Pileup rejection", 2, -0.5, 1.5);
213  DefineAxis(htrackaxes[5], "trackcuts", "Track Cuts", (fListTrackCuts ? fListTrackCuts->GetEntries() : 0) + 1, -0.5, (fListTrackCuts ? fListTrackCuts->GetEntries() : 0) + 0.5);
214  DefineAxis(htrackaxes[6], "mbtrigger", "Has MB trigger", 2, -0.5, 1.5);
215  const TAxis *trackaxes[7];
216  for(int iaxis = 0; iaxis < 7; ++iaxis) trackaxes[iaxis] = htrackaxes + iaxis;
217  TAxis hclusteraxes[4];
218  DefineAxis(hclusteraxes[0], "energy", "E (GeV)", ptbinning);
219  DefineAxis(hclusteraxes[1], "zvertex", "z_{V} (cm)", zvertexBinning);
220  DefineAxis(hclusteraxes[2], "pileup", "Pileup rejection", 2,1 -0.5, 1.5);
221  DefineAxis(hclusteraxes[3], "mbtrigger", "Has MB trigger", 2, -0.5, 1.5);
222  const TAxis *clusteraxes[4];
223  for(int iaxis = 0; iaxis < 4; ++iaxis) clusteraxes[iaxis] = hclusteraxes + iaxis;
224  TAxis hpatchenergyaxes[5];
225  DefineAxis(hpatchenergyaxes[0], "energy", "Patch energy (GeV)", 100, 0., 100);
226  DefineAxis(hpatchenergyaxes[1], "eta", "#eta", etabinning);
227  DefineAxis(hpatchenergyaxes[2], "phi", "#phi", 20, 0, 2 * TMath::Pi());
228  DefineAxis(hpatchenergyaxes[3], "isMain", "Main trigger", 2, -0.5, 1.5);
229  DefineAxis(hpatchenergyaxes[4], "emcalgood", "EMCAL good event", 2, -0.5, 1.5);
230  const TAxis *patchenergyaxes[5];
231  for(int iaxis = 0; iaxis < 5; ++iaxis) patchenergyaxes[iaxis] = hpatchenergyaxes + iaxis;
232  TAxis hpatchampaxes[5];
233  DefineAxis(hpatchampaxes[0], "amplitude", "Patch energy (GeV)", 10000, 0., 10000.);
234  DefineAxis(hpatchampaxes[1], "eta", "#eta", etabinning);
235  DefineAxis(hpatchampaxes[2], "phi", "#phi", 20, 0, 2 * TMath::Pi());
236  DefineAxis(hpatchampaxes[3], "isMain", "Main trigger", 2, -0.5, 1.5);
237  DefineAxis(hpatchampaxes[4], "emcalgood", "EMCAL good event", 2, -0.5, 1.5);
238  const TAxis *patchampaxes[5];
239  for(int iaxis = 0; iaxis < 5; ++iaxis) patchampaxes[iaxis] = hpatchampaxes + iaxis;
240  std::string patchnames[] = {"Level0", "JetHigh", "JetLow", "GammaHigh", "GammaLow"};
241  for(std::string * triggerpatch = patchnames; triggerpatch < patchnames + sizeof(patchnames)/sizeof(std::string); ++triggerpatch){
242  fHistos->CreateTHnSparse(Form("Energy%s", triggerpatch->c_str()), Form("Patch energy for %s trigger patches", triggerpatch->c_str()), 5, patchenergyaxes, "s");
243  fHistos->CreateTHnSparse(Form("EnergyRough%s", triggerpatch->c_str()), Form("Rough patch energy for %s trigger patches", triggerpatch->c_str()), 5, patchenergyaxes, "s");
244  fHistos->CreateTHnSparse(Form("Amplitude%s", triggerpatch->c_str()), Form("Patch amplitude for %s trigger patches", triggerpatch->c_str()), 5, patchampaxes, "s");
245  }
246 
247  // Create histogram for MC-truth
248  fHistos->CreateTHnSparse("hMCtrueParticles", "Particle-based histogram for MC-true particles", 5, trackaxes, "s");
249  if(fJetCollArray.GetEntries()){
250  for(int irad = 0; irad < kNJetRadii; irad++){
251  fHistos->CreateTHnSparse(Form("hMCtrueParticlesRad%02d", int(kJetRadii[irad]*10)),
252  Form("Particle-based histogram for MC-true particles in Jets with radius %.1f", kJetRadii[irad]*10), 5, trackaxes, "s");
253  }
254  // histogram for isolated particles
255  fHistos->CreateTHnSparse("hMCtrueParticlesIsolated", "Particle-based histogram for isolated MC-true particles", 5, trackaxes, "s");
256  }
257  for(std::map<std::string,std::string>::iterator it = triggerCombinations.begin(); it != triggerCombinations.end(); ++it){
258  const std::string name = it->first, &title = it->second;
259  // Create event-based histogram
260  fHistos->CreateTH2(Form("hEventHist%s", name.c_str()), Form("Event-based data for %s events; pileup rejection; z_{V} (cm)", title.c_str()), pileupaxis, zvertexBinning);
261  // Create track-based histogram
262  fHistos->CreateTHnSparse(Form("hTrackHist%s", name.c_str()), Form("Track-based data for %s events", title.c_str()), 7, trackaxes, "s");
263  fHistos->CreateTHnSparse(Form("hTrackInAcceptanceHist%s", name.c_str()), Form("Track-based data for %s events for tracks matched to EMCal clusters", title.c_str()), 7, trackaxes, "s");
264  fHistos->CreateTHnSparse(Form("hMCTrackHist%s", name.c_str()), Form("Track-based data for %s events with MC kinematics", title.c_str()), 7, trackaxes, "s");
265  fHistos->CreateTHnSparse(Form("hMCTrackInAcceptanceHist%s", name.c_str()), Form("Track-based data for %s events with MC kinematics for tracks matched to EMCal clusters", title.c_str()), 7, trackaxes, "s");
266  // Create cluster-based histogram (Uncalibrated and calibrated clusters)
267  fHistos->CreateTHnSparse(Form("hClusterCalibHist%s", name.c_str()), Form("Calib. cluster-based histogram for %s events", title.c_str()), 4, clusteraxes, "s");
268  fHistos->CreateTHnSparse(Form("hClusterUncalibHist%s", name.c_str()), Form("Uncalib. cluster-based histogram for %s events", title.c_str()), 4, clusteraxes, "s");
269  if(fJetCollArray.GetEntries()){
270  // Create histograms for particles in different jetfinder radii, only track-based
271  for(int irad = 0; irad < kNJetRadii; irad++){
272  fHistos->CreateTHnSparse(Form("hTrackHist%sRad%02d", name.c_str(), int(kJetRadii[irad]*10)),
273  Form("Track-based data for %s events for tracks in jets with Radius %.1f", title.c_str(), kJetRadii[irad]), 7, trackaxes, "s");
274  fHistos->CreateTHnSparse(Form("hTrackInAcceptanceHist%sRad%02d", name.c_str(), int(kJetRadii[irad]*10)),
275  Form("Track-based data for %s events for tracks matched to EMCal clusters in jets with Radius %.1f", title.c_str(), kJetRadii[irad]),
276  7, trackaxes, "s");
277  fHistos->CreateTHnSparse(Form("hMCTrackHist%sRad%02d", name.c_str(), int(kJetRadii[irad]*10)),
278  Form("Track-based data for %s events with MC kinematics for tracks in jets with Radius %.1f", title.c_str(), kJetRadii[irad]),
279  7, trackaxes, "s");
280  fHistos->CreateTHnSparse(Form("hMCTrackInAcceptanceHist%sRad%02d", name.c_str(), int(kJetRadii[irad]*10)),
281  Form("Track-based data for %s events with MC kinematics for tracks matched to EMCal clusters in jets with Radius %.1f", title.c_str(), kJetRadii[irad]),
282  7, trackaxes, "s");
283  fHistos->CreateTHnSparse(Form("hClusterCalibHist%sRad%02d", name.c_str(), int(kJetRadii[irad]*10)),
284  Form("Calib. cluster-based histogram for %s events for clusters in Jets with radius %.1f", title.c_str(), kJetRadii[irad]), 4, clusteraxes, "s");
285  }
286  }
287  // Create also histograms for isolated particles
288  fHistos->CreateTHnSparse(Form("hTrackHist%sIsolated", name.c_str()), Form("Track-based data for %s events for isolated tracks", title.c_str()), 7, trackaxes, "s");
289  fHistos->CreateTHnSparse(Form("hTrackInAcceptanceHist%sIsolated", name.c_str()), Form("Track-based data for %s events for isolated tracks matched to EMCal clusters", title.c_str()), 7, trackaxes, "s");
290  fHistos->CreateTHnSparse(Form("hMCTrackHist%sIsolated", name.c_str()), Form("Track-based data for %s events with MC kinematics for isolated tracks", title.c_str()), 7, trackaxes, "s");
291  fHistos->CreateTHnSparse(Form("hMCTrackInAcceptanceHist%sIsolated", name.c_str()), Form("Track-based data for %s events with MC kinematics for isolated tracks matched to EMCal clusters", title.c_str()), 7, trackaxes, "s");
292  }
293  fHistos->CreateTHnSparse("hEventTriggers", "Trigger type per event", 5, triggeraxis);
294  fHistos->CreateTHnSparse("hEventsTriggerbit", "Trigger bits for the different events", 4, bitaxes);
296  if(fListTrackCuts && fListTrackCuts->GetEntries()){
297  TIter cutIter(fListTrackCuts);
298  AliEmcalTrackSelection *cutObject(NULL);
299  while((cutObject = dynamic_cast<AliEmcalTrackSelection *>(cutIter()))){
300  PWG::EMCAL::AliEmcalVCutsWrapper *trackcuts = dynamic_cast<PWG::EMCAL::AliEmcalVCutsWrapper *>(cutObject->GetTrackCuts(0));
301  if(trackcuts){
303  if(esdcuts) {
304  AliESDtrackCuts *mycuts = esdcuts->GetTrackCuts();
305  mycuts->DefineHistograms();
306  fOutput->Add(mycuts);
307  }
308  }
309  }
310  }
311  PostData(1, fOutput);
312  }
313 
320  // Common checks: Have SPD vertex and primary vertex from tracks, and both need to have at least one contributor
321  AliDebug(1,Form("Number of calibrated clusters: %d", fCaloClusters->GetEntries()));
322  AliDebug(1,Form("Number of matched tracks: %d", fTracks->GetEntries()));
323  if(fMCEvent){
324  // Build always trigger strig from the trigger maker in case of MC
326  }
327 
328  Bool_t emcalGood = fInputHandler->IsEventSelected() & AliEmcalPhysicsSelection::kEmcalOk;
329 
330  // Loop over trigger patches, fill patch energy
331  AliEMCALTriggerPatchInfo *triggerpatch(NULL);
332  TIter patchIter(this->fTriggerPatchInfo);
333  while((triggerpatch = dynamic_cast<AliEMCALTriggerPatchInfo *>(patchIter()))){
334  double triggerpatchinfo[5] = {triggerpatch->GetPatchE(), triggerpatch->GetEtaGeo(), triggerpatch->GetPhiGeo(), triggerpatch->IsMainTrigger() ? 1. : 0., emcalGood ? 1. : 0.};
335  double triggerpatchinfoamp[5] = {static_cast<double>(triggerpatch->GetADCAmp()), triggerpatch->GetEtaGeo(), triggerpatch->GetPhiGeo(), triggerpatch->IsMainTrigger() ? 1. : 0., emcalGood ? 1. : 0.};
336  double triggerpatchinfoer[5] = {triggerpatch->GetADCAmpGeVRough(), triggerpatch->GetEtaGeo(), triggerpatch->GetPhiGeo(), triggerpatch->IsMainTrigger() ? 1. : 0., emcalGood ? 1. : 0.};
337  if(triggerpatch->IsJetHigh()){
338  fHistos->FillTHnSparse("EnergyJetHigh", triggerpatchinfo);
339  fHistos->FillTHnSparse("AmplitudeJetHigh", triggerpatchinfoamp);
340  fHistos->FillTHnSparse("EnergyRoughJetHigh", triggerpatchinfoer);
341  }
342  if(triggerpatch->IsJetLow()){
343  fHistos->FillTHnSparse("EnergyJetLow", triggerpatchinfo);
344  fHistos->FillTHnSparse("AmplitudeJetLow", triggerpatchinfoamp);
345  fHistos->FillTHnSparse("EnergyRoughJetLow", triggerpatchinfoer);
346  }
347  if(triggerpatch->IsGammaHigh()){
348  fHistos->FillTHnSparse("EnergyGammaHigh", triggerpatchinfo);
349  fHistos->FillTHnSparse("AmplitudeGammaHigh", triggerpatchinfoamp);
350  fHistos->FillTHnSparse("EnergyRoughGammaHigh", triggerpatchinfoer);
351  }
352  if(triggerpatch->IsGammaLow()){
353  fHistos->FillTHnSparse("EnergyGammaLow", triggerpatchinfo);
354  fHistos->FillTHnSparse("AmplitudeGammaLow", triggerpatchinfoamp);
355  fHistos->FillTHnSparse("EnergyRoughGammaLow", triggerpatchinfoer);
356  }
357  if(triggerpatch->IsLevel0()){
358  fHistos->FillTHnSparse("EnergyLevel0", triggerpatchinfo);
359  fHistos->FillTHnSparse("AmplitudeLevel0", triggerpatchinfoamp);
360  fHistos->FillTHnSparse("EnergyRoughLevel0", triggerpatchinfoer);
361  }
362  }
363 
364  const AliVVertex *vtxTracks = fInputEvent->GetPrimaryVertex(),
365  *vtxSPD = GetSPDVertex();
366  if(!(vtxTracks && vtxSPD)) return false;
367  if(!fVertexRange.IsInRange(vtxTracks->GetZ())) return false;
368  if(vtxTracks->GetNContributors() < 1 || vtxSPD->GetNContributors() < 1) return false;
369 
370  double triggers[5]; memset(triggers, 0, sizeof(double) * 5);
371  double triggerbits[4]; memset(triggerbits, 0, sizeof(double) * 4);
372  if(fInputHandler->IsEventSelected() & AliVEvent::kINT7){
373  triggers[0] = 1.;
374  triggerbits[0] = 1.;
375  }
376 
377  // check triggerbits
378  if(fInputHandler->IsEventSelected() & AliVEvent::kEMC7){
379  triggerbits[1] = 1.;
380  }
381  if(fInputHandler->IsEventSelected() & AliVEvent::kEMCEGA){
382  triggerbits[2] = 1.;
383  }
384  if(fInputHandler->IsEventSelected() & AliVEvent::kEMCEJE){
385  triggerbits[3] = 1.;
386  }
387  fHistos->FillTHnSparse("hEventsTriggerbit", triggerbits);
388 
389  std::vector<std::string> triggerstrings;
390  // EMCal-triggered event, distinguish types
391  TString trgstr(fUseTriggersFromTriggerMaker ? BuildTriggerString() : fInputEvent->GetFiredTriggerClasses());
392  AliDebug(1, Form("Triggerstring: %s\n", trgstr.Data()));
393  if(trgstr.Contains("EJ1")){
394  triggerstrings.push_back("EMCJHigh");
395  triggers[1] = 1;
396  if(trgstr.Contains("EG1"))
397  triggerstrings.push_back("EMCHighBoth");
398  else
399  triggerstrings.push_back("EMCHighJetOnly");
400  }
401  if(trgstr.Contains("EJ2")){
402  triggerstrings.push_back("EMCJLow");
403  triggers[2] = 1;
404  if(trgstr.Contains("EG2"))
405  triggerstrings.push_back("EMCLowBoth");
406  else
407  triggerstrings.push_back("EMCLowJetOnly");
408  }
409  if(trgstr.Contains("EG1")){
410  triggerstrings.push_back("EMCGHigh");
411  triggers[3] = 1;
412  if(!trgstr.Contains("EJ1"))
413  triggerstrings.push_back("EMCHighGammaOnly");
414  }
415  if(trgstr.Contains("EG2")){
416  triggerstrings.push_back("EMCGLow");
417  triggers[4] = 1;
418  if(!trgstr.Contains("EJ2"))
419  triggerstrings.push_back("EMCLowGammaOnly");
420  }
421 
422  fHistos->FillTHnSparse("hEventTriggers", triggers);
423 
424  // apply event selection: Combine the Pileup cut from SPD with the other pA Vertex selection cuts.
425  bool isPileupEvent = fInputEvent->IsPileupFromSPD(3, 0.8, 3., 2., 5.);
426  isPileupEvent = isPileupEvent || (TMath::Abs(vtxTracks->GetZ() - vtxSPD->GetZ()) > 0.5);
427  double covSPD[6]; vtxSPD->GetCovarianceMatrix(covSPD);
428  isPileupEvent = isPileupEvent || (vtxSPD->IsFromVertexerZ() && TMath::Sqrt(covSPD[5]) > 0.25); // selection effectively inactive in old versions of the code
429 
430  // Fill event-based histogram
431  const double &zv = vtxTracks->GetZ();
432  if(triggers[0]) FillEventHist("MinBias", zv, isPileupEvent);
433  if(!triggerstrings.size()) // Non-EMCal-triggered
434  FillEventHist("NoEMCal", zv, isPileupEvent);
435  else{
436  // EMCal-triggered events
437  for(std::vector<std::string>::iterator it = triggerstrings.begin(); it != triggerstrings.end(); ++it)
438  FillEventHist(it->c_str(), zv, isPileupEvent);
439  }
440 
441  const AliEmcalJet *foundJet(NULL);
442  char histname[1024];
443  std::vector<double> coneradii;
444  AliJetContainer *jetContMC(NULL), *jetContData(NULL);
445 
446  // Fill MC truth
447  AliVParticle *part(NULL);
448  if(fMCEvent){
449  if(fJetCollArray.GetEntries() &&
450  (jetContMC = dynamic_cast<AliJetContainer *>(fJetCollArray.FindObject((static_cast<TObjString *>(fJetContainersMC.At(0)))->String().Data())))){
451  // In case we have a jet array we loop over all MC selected particles in the particle container of the jet array
452  TIter particles(jetContMC->GetParticleContainer()->GetArray());
453  while((part = dynamic_cast<AliVParticle *>(particles()))){
454  if(part->Charge() == 0) continue;
455  if(!fEtaRange.IsInRange(part->Eta())) continue;
456  if(!fPtRange.IsInRange(part->Pt())) continue;
457  FillMCParticleHist("hMCtrueParticles", part, zv, isPileupEvent);
458 
459  /*
460  * Jet part: Find track in jet container,
461  * check according to number of particles in jet, and
462  * check for different cone radii
463  */
464  foundJet = FoundTrackInJet(part, jetContMC);
465  if(foundJet && foundJet->GetNumberOfConstituents() > 1){
466  for(int irad = 0; irad < kNJetRadii; irad++){
467  if(IsInRadius(part, foundJet, kJetRadii[irad])){
468  sprintf(histname, "hMCtrueParticlesRad%02d", int(kJetRadii[irad]*10));
469  FillMCParticleHist(histname, part, zv, isPileupEvent);
470  }
471  }
472  } else {
473  // isolated track
474  FillMCParticleHist("hMCtrueParticlesIsolated", part, zv, isPileupEvent);
475  }
476  }
477  } else {
478  // Use MC Event
479  for(int ipart = 0; ipart < fMCEvent->GetNumberOfTracks(); ipart++){
480  // Select only physical primary particles
481  part = fMCEvent->GetTrack(ipart);
482  if(part->Charge() == 0) continue;
483  if(!fEtaRange.IsInRange(part->Eta())) continue;
484  if(!fPtRange.IsInRange(part->Pt())) continue;
485  if(!fMCEvent->IsPhysicalPrimary(ipart)) continue;
486  FillMCParticleHist("hMCtrueParticles", part, zv, isPileupEvent);
487  }
488  }
489  }
490 
491  AliVTrack *track(NULL);
492  AliPicoTrack *picoTrack(NULL);
493  TObject *containerObject(NULL);
494  // Loop over all tracks (No cuts applied)
495  if(fSelectAllTracks){
496  // loop over all tracks only if requested
497  TIter allTrackIter(fTracks);
498  while((containerObject = dynamic_cast<TObject *>(allTrackIter()))){
499  if((picoTrack = dynamic_cast<AliPicoTrack *>(containerObject))){
500  track = picoTrack->GetTrack();
501  } else
502  track = dynamic_cast<AliVTrack *>(containerObject);
503  if(!IsTrueTrack(track)) continue;
504  if(!fEtaRange.IsInRange(track->Eta())) continue;
505  if(!fPtRange.IsInRange(track->Pt())) continue;
506  if(triggers[0]) FillTrackHist("MinBias", track, zv, isPileupEvent, 0, triggers[0]);
507  if(!triggerstrings.size()) // Non-EMCal-triggered
508  FillTrackHist("NoEMCal", track, zv, isPileupEvent, 0, triggers[0]);
509  else {
510  // EMCal-triggered events
511  for(std::vector<std::string>::iterator it = triggerstrings.begin(); it != triggerstrings.end(); ++it)
512  FillTrackHist(it->c_str(), track, zv, isPileupEvent, 0, triggers[0]);
513  }
514  }
515  }
516 
517  // Now apply track selection cuts
518  // allow for several track selections to be tested at the same time
519  // each track selection gets a different cut ID starting from 1
520  // cut ID 0 is reserved for the case of no cuts
521  // In case we have a jet container attached we check whether the track is
522  // found in a jet, and check for different cone radii around a jet
523  if(fListTrackCuts && fListTrackCuts->GetEntries()){
524  for(int icut = 0; icut < fListTrackCuts->GetEntries(); icut++){
525  AliEmcalTrackSelection *trackSelection = static_cast<AliEmcalTrackSelection *>(fListTrackCuts->At(icut));
526  TIter trackIter(trackSelection->GetAcceptedTracks(fTracks));
527  while((track = dynamic_cast<AliVTrack *>(trackIter()))){
528  if(fMCEvent && !IsTrueTrack(track)) continue; // Reject fake tracks in case of MC
529  if(!fEtaRange.IsInRange(track->Eta())) continue;
530  if(!fPtRange.IsInRange(track->Pt())) continue;
531  coneradii.clear();
532  if(this->fJetCollArray.GetEntries() &&
533  (jetContData = dynamic_cast<AliJetContainer *>(this->fJetCollArray.FindObject((static_cast<TObjString *>(this->fJetContainersData.At(0)))->String().Data())))){
534  foundJet = FoundTrackInJet(track, jetContData);
535  if(foundJet){
536  for(int irad = 0; irad < kNJetRadii; irad++){
537  if(IsInRadius(track, foundJet, kJetRadii[irad])) coneradii.push_back(kJetRadii[irad]);
538  }
539  }
540  }
541  if(triggers[0]){
542  FillTrackHist("MinBias", track, zv, isPileupEvent, icut + 1, triggers[0]);
543  if(coneradii.size()){
544  for(std::vector<double>::iterator radIter = coneradii.begin(); radIter != coneradii.end(); radIter++)
545  FillTrackHist("MinBias", track, zv, isPileupEvent, icut + 1, triggers[0], *radIter);
546  }
547  }
548  if(!triggerstrings.size()){ // Non-EMCal-triggered
549  FillTrackHist("NoEMCal", track, zv, isPileupEvent, icut + 1, triggers[0]);
550  for(std::vector<double>::iterator radIter = coneradii.begin(); radIter != coneradii.end(); radIter++)
551  FillTrackHist("NoEMCal", track, zv, isPileupEvent, icut + 1, triggers[0], *radIter);
552  } else {
553  // EMCal-triggered events
554  for(std::vector<std::string>::iterator it = triggerstrings.begin(); it != triggerstrings.end(); ++it){
555  FillTrackHist(it->c_str(), track, zv, isPileupEvent, icut + 1, triggers[0]);
556  for(std::vector<double>::iterator radIter = coneradii.begin(); radIter != coneradii.end(); radIter++)
557  FillTrackHist(it->c_str(), track, zv, isPileupEvent, icut + 1, triggers[0], *radIter);
558  }
559  }
560  }
561  }
562  }
563 
564  // Next step we loop over the (uncalibrated) emcal clusters and fill histograms with the cluster energy
565  const AliVCluster *clust(NULL);
566  for(int icl = 0; icl < fInputEvent->GetNumberOfCaloClusters(); icl++){
567  clust = fInputEvent->GetCaloCluster(icl);
568  if(!clust->IsEMCAL()) continue;
569  if(!fEnergyRange.IsInRange(clust->E())) continue;
570  if(triggers[0]) FillClusterHist("hClusterUncalibHistMinBias", clust, zv, isPileupEvent, triggers[0]);
571  if(!triggerstrings.size()){ // Non-EMCal-triggered
572  FillClusterHist("hClusterUncalibHistNoEMCal", clust, zv, isPileupEvent, triggers[0]);
573  } else{
574  for(std::vector<std::string>::iterator it = triggerstrings.begin(); it != triggerstrings.end(); ++it){
575  sprintf(histname, "hClusterUncalibHist%s", it->c_str());
576  FillClusterHist(histname, clust, zv, isPileupEvent, triggers[0]);
577  }
578  }
579  }
580 
581  if(fCaloClusters){
582  TIter clustIter(fCaloClusters);
583  while((clust = dynamic_cast<const AliVCluster *>(clustIter()))){
584  if(!clust->IsEMCAL()) continue;
585  if(!fEnergyRange.IsInRange(clust->E())) continue;
586  if(triggers[0]) FillClusterHist("hClusterCalibHistMinBias", clust, zv, isPileupEvent, triggers[0]);
587  if(!triggerstrings.size()) // Non-EMCal-triggered
588  FillClusterHist("hClusterCalibHistNoEMCal", clust, zv, isPileupEvent, triggers[0]);
589  else{
590  for(std::vector<std::string>::iterator it = triggerstrings.begin(); it != triggerstrings.end(); ++it){
591  sprintf(histname, "hClusterCalibHist%s", it->c_str());
592  FillClusterHist(histname, clust, zv, isPileupEvent, triggers[0]);
593  }
594  }
595  }
596  }
597 
598  PostData(1, fOutput);
599  return true;
600  }
601 
608  std::vector<double> mybinning;
609  std::map<double,double> definitions;
610  definitions.insert(std::pair<double,double>(2.5, 0.1));
611  definitions.insert(std::pair<double,double>(7., 0.25));
612  definitions.insert(std::pair<double,double>(15., 0.5));
613  definitions.insert(std::pair<double,double>(25., 1.));
614  definitions.insert(std::pair<double,double>(40., 2.5));
615  definitions.insert(std::pair<double,double>(50., 5.));
616  definitions.insert(std::pair<double,double>(100., 10.));
617  double currentval = 0;
618  for(std::map<double,double>::iterator id = definitions.begin(); id != definitions.end(); ++id){
619  double limit = id->first, binwidth = id->second;
620  while(currentval < limit){
621  currentval += binwidth;
622  mybinning.push_back(currentval);
623  }
624  }
625  binning.Set(mybinning.size());
626  int ib = 0;
627  for(std::vector<double>::iterator it = mybinning.begin(); it != mybinning.end(); ++it)
628  binning[ib++] = *it;
629  }
630 
637  std::vector<double> mybinning;
638  double currentval = -10;
639  mybinning.push_back(currentval);
640  while(currentval <= 10.){
641  currentval += 5.;
642  mybinning.push_back(currentval);
643  }
644  binning.Set(mybinning.size());
645  int ib = 0;
646  for(std::vector<double>::iterator it = mybinning.begin(); it != mybinning.end(); ++it)
647  binning[ib++] = *it;
648  }
649 
656  std::vector<double> mybinning;
657  double currentval = -0.8;
658  mybinning.push_back(currentval);
659  while(currentval <= 0.8){
660  currentval += 0.1;
661  mybinning.push_back(currentval);
662  }
663  binning.Set(mybinning.size());
664  int ib = 0;
665  for(std::vector<double>::iterator it = mybinning.begin(); it != mybinning.end(); ++it)
666  binning[ib++] = *it;
667  }
668 
678  void AliAnalysisTaskPtEMCalTrigger::DefineAxis(TAxis& axis, const char* name,
679  const char* title, const TArrayD& binning, const char** labels) {
680  axis.Set(binning.GetSize()-1, binning.GetArray());
681  axis.SetName(name);
682  axis.SetTitle(title);
683  if(labels){
684  for(int ib = 1; ib <= axis.GetNbins(); ++ib)
685  axis.SetBinLabel(ib, labels[ib-1]);
686  }
687  }
688 
700  void AliAnalysisTaskPtEMCalTrigger::DefineAxis(TAxis& axis, const char* name,
701  const char* title, int nbins, double min, double max,
702  const char** labels) {
703  axis.Set(nbins, min, max);
704  axis.SetName(name);
705  axis.SetTitle(title);
706  if(labels){
707  for(int ib = 1; ib <= axis.GetNbins(); ++ib)
708  axis.SetBinLabel(ib, labels[ib-1]);
709  }
710  }
711 
720  double vz, bool isPileup) {
721  char histname[1024];
722  sprintf(histname, "hEventHist%s", trigger);
723  fHistos->FillTH2(histname, 0., vz);
724  if(!isPileup){
725  fHistos->FillTH2(histname, 1., vz);
726  }
727  }
728 
739  const AliVTrack* track, double vz, bool isPileup, int cut, bool isMinBias, double jetradius) {
740  double etasign = fSwapEta ? -1. : 1.;
741  double data[7] = {TMath::Abs(track->Pt()), etasign * track->Eta(), track->Phi(), vz, 0, static_cast<double>(cut), isMinBias ? 1. : 0.};
742  double dataMC[7] = {0., 0., 0., vz, 0, static_cast<double>(cut), isMinBias ? 1. : 0.};
743  AliVParticle *assocMC(NULL);
744  if(fMCEvent && (assocMC = fMCEvent->GetTrack(TMath::Abs(track->GetLabel())))){
745  // Select track onl
746  dataMC[0] = TMath::Abs(assocMC->Pt());
747  dataMC[1] = etasign * assocMC->Eta();
748  dataMC[2] = assocMC->Phi();
749  }
750  char histname[1024], histnameAcc[1024], histnameMC[1024], histnameMCAcc[1024];
751  sprintf(histname, "hTrackHist%s", trigger);
752  sprintf(histnameAcc, "hTrackInAcceptanceHist%s", trigger);
753  sprintf(histnameMC, "hMCTrackHist%s", trigger);
754  sprintf(histnameMCAcc, "hMCTrackInAcceptanceHist%s", trigger);
755  if(jetradius > 0.){
756  char *hnames[] = {histname, histnameAcc, histnameMC, histnameMCAcc};
757  for(unsigned int iname = 0; iname < sizeof(hnames)/sizeof(char *); iname++){
758  char *myhname = hnames[iname];
759  sprintf(myhname, "%sRad%02d", myhname, int(jetradius * 10.));
760  }
761  }
762  Bool_t isEMCAL = kFALSE;
763  if(track->IsEMCAL()){
764  // Check if the cluster is matched to only one track
765  AliVCluster *emcclust(NULL);
766  AliDebug(2, Form("cluster id: %d\n", track->GetEMCALcluster()));
767  if(fCaloClusters) {
768  AliDebug(2, "Using calibrated clusters");
769  emcclust = dynamic_cast<AliVCluster *>(fCaloClusters->At(track->GetEMCALcluster()));
770  } else {
771  AliDebug(2, "Using uncalibrated clusters");
772  emcclust = fInputEvent->GetCaloCluster(track->GetEMCALcluster());
773  }
774  if(!emcclust) AliError("Null pointer to EMCal cluster");
775  if(emcclust && emcclust->GetNTracksMatched() <= 1){
776  isEMCAL = kTRUE;
777  }
778  }
779  fHistos->FillTHnSparse(histname, data);
780  if(fMCEvent) fHistos->FillTHnSparse(histnameMC, dataMC);
781  if(isEMCAL){
782  fHistos->FillTHnSparse(histnameAcc, data);
783  if(fMCEvent) fHistos->FillTHnSparse(histnameMCAcc, dataMC);
784  }
785  if(!isPileup){
786  data[4] = 1;
787  dataMC[4] = 1;
788  fHistos->FillTHnSparse(histname, data);
789  if(fMCEvent) fHistos->FillTHnSparse(histnameMC, dataMC);
790  if(isEMCAL){
791  fHistos->FillTHnSparse(histnameAcc, data);
792  if(fMCEvent) fHistos->FillTHnSparse(histnameMCAcc, dataMC);
793  }
794  }
795  }
796 
806  const AliVCluster* clust, double vz, bool isPileup, bool isMinBias) {
807  double data[4] = {clust->E(), vz, 0, isMinBias ? 1. : 0.};
808  fHistos->FillTHnSparse(histname, data);
809  if(!isPileup){
810  data[2] = 1.;
811  fHistos->FillTHnSparse(histname, data);
812  }
813  }
814 
820  void AliAnalysisTaskPtEMCalTrigger::FillMCParticleHist(const char *histname, const AliVParticle * const track, double vz, bool isPileup){
821  double data[5] = {TMath::Abs(track->Pt()), track->Eta(), track->Phi(), vz, 0.};
822  fHistos->FillTHnSparse(histname, data);
823  if(!isPileup){
824  data[4] = 1.;
825  fHistos->FillTHnSparse(histname, data);
826  }
827  }
828 
836  bool AliAnalysisTaskPtEMCalTrigger::IsTrueTrack(const AliVTrack *const track) const{
837  if(!fMCEvent) return true;
838  AliVParticle *mcassociate = fMCEvent->GetTrack(TMath::Abs(track->GetLabel()));
839  if(!mcassociate) return false;
840  return fMCEvent->IsPhysicalPrimary(TMath::Abs(track->GetLabel()));
841  }
842 
848  void AliAnalysisTaskPtEMCalTrigger::AddESDTrackCuts(AliESDtrackCuts* trackCuts) {
849  fListTrackCuts->AddLast(new AliEmcalTrackSelectionESD(trackCuts));
850  }
851 
857  void AliAnalysisTaskPtEMCalTrigger::AddCutsForAOD(AliESDtrackCuts* trackCuts, UInt_t filterbits) {
858  fListTrackCuts->AddLast(new AliEmcalTrackSelectionAOD(trackCuts, filterbits));
859  }
860 
861 
868  AliDebug(1, "trigger checking");
869  TString result = "";
870  if(HasTriggerType(kJ1)) result += "EJ1 ";
871  if(HasTriggerType(kJ2)) result += "EJ2 ";
872  if(HasTriggerType(kG1)) result += "EG1 ";
873  if(HasTriggerType(kG2)) result += "EG2 ";
874  return result;
875  }
876 
883  AliESDEvent *esd = dynamic_cast<AliESDEvent *>(fInputEvent);
884  if(esd){
885  return esd->GetPrimaryVertexSPD();
886  } else {
887  AliAODEvent *aod = dynamic_cast<AliAODEvent *>(fInputEvent);
888  if(aod){
889  return aod->GetPrimaryVertexSPD();
890  }
891  }
892  return NULL;
893  }
894 
903  const AliVParticle * const track, AliJetContainer *const jets) const
904  {
905 
906  const AliEmcalJet *result = NULL;
907  jets->ResetCurrentID();
908  const AliEmcalJet *tmp = jets->GetNextAcceptJet();
909  while(tmp){
910  if(TrackInJet(track, tmp, jets->GetParticleContainer())){
911  result = tmp;
912  break;
913  }
914  tmp = jets->GetNextAcceptJet();
915  }
916  return result;
917  }
918 
927  bool AliAnalysisTaskPtEMCalTrigger::IsInRadius(const AliVParticle *const track, const AliEmcalJet *reconstructedJet, Double_t radius) const {
928  return reconstructedJet->DeltaR(track) < radius;
929  }
930 
939  bool AliAnalysisTaskPtEMCalTrigger::IsInRadius(const AliVCluster *const clust, const AliEmcalJet *reconstructedJet, Double_t radius) const {
940  double vertexPos[3];
941  fInputEvent->GetPrimaryVertex()->GetXYZ(vertexPos);
942  TLorentzVector clustVect;
943  clust->GetMomentum(clustVect, vertexPos);
944 
945  Double_t dPhi = reconstructedJet->Phi() - clustVect.Phi();
946  Double_t dEta = reconstructedJet->Eta() - clustVect.Eta();
947  dPhi = TVector2::Phi_mpi_pi ( dPhi );
948 
949  double deltaR = TMath::Sqrt ( dPhi * dPhi + dEta * dEta );
950  return deltaR < radius;
951  }
952 
961  bool AliAnalysisTaskPtEMCalTrigger::TrackInJet(const AliVParticle* const track,
962  const AliEmcalJet* reconstructedJet, const AliParticleContainer * const particles) const {
963  bool found = false;
964  const AliPicoTrack *picotmp(NULL);
965  const AliVParticle *tmp(NULL);
966  for(int ipart = 0; ipart < reconstructedJet->GetNumberOfTracks(); ipart++){
967  tmp = dynamic_cast<const AliVParticle *>(reconstructedJet->TrackAt(ipart, particles->GetArray()));
968  if((picotmp = dynamic_cast<const AliPicoTrack *>(tmp))) // handle pico tracks
969  tmp = picotmp->GetTrack();
970  if(!tmp->Compare(track)){
971  found = true;
972  break;
973  }
974  }
975  return found;
976  }
977 
985  const AliEmcalJet* AliAnalysisTaskPtEMCalTrigger::FoundClusterInJet(const AliVCluster* const clust, AliJetContainer* const jets) const {
986 
987  const AliEmcalJet *result = NULL;
988  jets->ResetCurrentID();
989  const AliEmcalJet *tmp = jets->GetNextAcceptJet();
990  while(tmp){
991  if(ClusterInJet(clust, tmp, jets->GetClusterContainer())){
992  result = tmp;
993  break;
994  }
995  tmp =jets->GetNextAcceptJet();
996  }
997  return result;
998  }
999 
1008  bool AliAnalysisTaskPtEMCalTrigger::ClusterInJet(const AliVCluster* const clust,
1009  const AliEmcalJet* reconstructedJet, const AliClusterContainer* const clusters) const {
1010  bool found = false;
1011  const AliVCluster *tmp(NULL);
1012  for(int ipart = 0; ipart < reconstructedJet->GetNumberOfTracks(); ipart++){
1013  tmp = dynamic_cast<const AliVCluster *>(reconstructedJet->ClusterAt(ipart, clusters->GetArray()));
1014  if(!tmp->Compare(clust)){
1015  found = true;
1016  break;
1017  }
1018  }
1019  return found;
1020  }
1021 
1029  TList &mycontainer = isMC ? fJetContainersMC : fJetContainersData;
1030  mycontainer.Add(new TObjString(contname));
1031  }
1032 }
Interface for virtual track selection.
double Double_t
Definition: External.C:58
EMCAL Level1 gamma trigger, low threshold.
const char * title
Definition: MakeQAPdf.C:27
AliCutValueRange< double > fEnergyRange
Cluster energy selection range.
EMCAL Level1 jet trigger, low threshold.
Bool_t HasTriggerType(TriggerType triggersel)
Check if event has a given trigger type.
Double_t Eta() const
Definition: AliEmcalJet.h:121
PWG::EMCAL::AliEmcalCutBase * GetTrackCuts(Int_t icut)
Access to track cuts at a given position.
Double_t Phi() const
Definition: AliEmcalJet.h:117
Wrapper class handling AliVCuts as AliEmcalCutBase.
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Fill a 2D histogram within the container.
void FillTrackHist(const char *trigger, const AliVTrack *track, double vz, bool isPileup, int cut, bool isMinBias, double jetradius=-1.)
char Char_t
Definition: External.C:18
Int_t ClusterAt(Int_t idx) const
Definition: AliEmcalJet.h:137
AliClusterContainer * GetClusterContainer() const
const AliEmcalJet * FoundClusterInJet(const AliVCluster *const clust, AliJetContainer *const jets) const
void AddCutsForAOD(AliESDtrackCuts *trackCuts, UInt_t filterBits)
THistManager * fHistos
Histogram container for the task.
void FillEventHist(const char *trigger, double vz, bool isPileup)
bool IsInRadius(const AliVParticle *const track, const AliEmcalJet *reconstructedJet, Double_t radius) const
UShort_t GetNumberOfConstituents() const
Definition: AliEmcalJet.h:140
Container for particles within the EMCAL framework.
void SetCaloTriggerPatchInfoName(const char *n)
void AddJetContainerName(const Char_t *contname, Bool_t isMC=kFALSE)
Int_t TrackAt(Int_t idx) const
Definition: AliEmcalJet.h:160
UShort_t GetNumberOfTracks() const
Definition: AliEmcalJet.h:139
AliParticleContainer * GetParticleContainer() const
void FillTHnSparse(const char *name, const double *x, double weight=1., Option_t *opt="")
TClonesArray * fCaloClusters
!clusters
TH2 * CreateTH2(const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, Option_t *opt="")
Create a new TH2 within the container.
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
THashList * GetListOfHistograms() const
Get the list of histograms.
Definition: THistManager.h:671
void FillClusterHist(const char *trigger, const AliVCluster *clust, double vz, bool isPileup, bool isMinBias)
void ReleaseOwner()
Definition: THistManager.h:254
Old charged hadron analysis in EMCAL-triggered events.
void DefineAxis(TAxis &axis, const char *name, const char *title, const TArrayD &binning, const char **labels=NULL)
Bool_t fSwapEta
Allow swapping of the eta sign in asymmetric collision systems.
void FillMCParticleHist(const char *histname, const AliVParticle *const part, double vz, bool isPileup)
const AliEmcalJet * FoundTrackInJet(const AliVParticle *const track, AliJetContainer *const jets) const
EMCAL Level1 jet trigger, high threshold.
const Double_t jetRadVals[AliAnalysisTaskPtEMCalTrigger::kNJetRadii]
Implement virtual track selection for AOD analysis.
AliEmcalJet * GetNextAcceptJet()
TObjArray fJetCollArray
jet collection array
Double_t DeltaR(const AliVParticle *part) const
AliVTrack * GetTrack() const
Definition: AliPicoTrack.h:60
Bool_t isMC
TObjArray * GetAcceptedTracks(const TClonesArray *const tracks)
Select tracks from a TClonesArray of input tracks.
AliEmcalList * fOutput
!output list
AliCutValueRange< double > fPtRange
Pt Selection Range.
TClonesArray * fTracks
!tracks
Analysis of high- tracks in triggered events.
bool TrackInJet(const AliVParticle *const track, const AliEmcalJet *reconstructedJet, const AliParticleContainer *const particles) const
bool ClusterInJet(const AliVCluster *const clust, const AliEmcalJet *reconstructedJet, const AliClusterContainer *const particles) const
void SetMakeGeneralHistograms(Bool_t g)
TClonesArray * fTriggerPatchInfo
!trigger patch info array
Base task in the EMCAL jet framework.
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
Container class for histograms.
Definition: THistManager.h:99
AliCutValueRange< double > fEtaRange
Eta Selection Range.
Bool_t fUseTriggersFromTriggerMaker
Use trigger classes from trigger maker.
EMCAL Level1 gamma trigger, high threshold.
void UserCreateOutputObjects()
Main initialization function on the worker.
const Int_t nbins
bool Bool_t
Definition: External.C:53
THnSparse * CreateTHnSparse(const char *name, const char *title, int ndim, const int *nbins, const double *min, const double *max, Option_t *opt="")
Create a new THnSparse within the container.
Implementation of virtual track selection for ESDs.
Container structure for EMCAL clusters.
Container for jet within the EMCAL jet framework.