AliPhysics  ebc57ae (ebc57ae)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliAnalysisTaskEmcalJetSubstructureTree.cxx
Go to the documentation of this file.
1 /************************************************************************************
2  * Copyright (C) 2017, Copyright Holders of the ALICE Collaboration *
3  * All rights reserved. *
4  * *
5  * Redistribution and use in source and binary forms, with or without *
6  * modification, are permitted provided that the following conditions are met: *
7  * * Redistributions of source code must retain the above copyright *
8  * notice, this list of conditions and the following disclaimer. *
9  * * Redistributions in binary form must reproduce the above copyright *
10  * notice, this list of conditions and the following disclaimer in the *
11  * documentation and/or other materials provided with the distribution. *
12  * * Neither the name of the <organization> nor the *
13  * names of its contributors may be used to endorse or promote products *
14  * derived from this software without specific prior written permission. *
15  * *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND *
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
19  * DISCLAIMED. IN NO EVENT SHALL ALICE COLLABORATION BE LIABLE FOR ANY *
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND *
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
26  ************************************************************************************/
27 #include <iostream>
28 #include <string>
29 #include <sstream>
30 #include <vector>
31 
32 #include <fastjet/ClusterSequence.hh>
33 #include <fastjet/contrib/Nsubjettiness.hh>
34 #include <fastjet/contrib/SoftDrop.hh>
35 
36 #include <TLorentzVector.h>
37 #include <TMath.h>
38 #include <TString.h>
39 #include <TVector3.h>
40 
41 #include "AliAODInputHandler.h"
42 #include "AliAnalysisManager.h"
44 #include "AliClusterContainer.h"
45 #include "AliJetContainer.h"
47 #include "AliEmcalJet.h"
48 #include "AliEmcalList.h"
49 #include "AliLog.h"
50 #include "AliParticleContainer.h"
51 #include "AliTrackContainer.h"
52 #include "AliRhoParameter.h"
53 #include "AliVCluster.h"
54 #include "AliVParticle.h"
55 
59 
60 namespace EmcalTriggerJets {
61 
64  fJetSubstructureTree(nullptr),
65  fSDZCut(0.1),
66  fSDBetaCut(0),
67  fReclusterizer(kCAAlgo),
68  fTriggerSelectionBits(AliVEvent::kAny),
69  fTriggerSelectionString(""),
70  fRhoNamePtRec("RhoSparse_Full_R04"),
71  fRhoNameMassRec("RhoMassSparse_Full_R04"),
72  fRhoNamePtSim("RhoSparse_Part_R04"),
73  fRhoNameMassSim("RhoMassSparse_Part_R04")
74 {
75  memset(fJetTreeData, 0, sizeof(Double_t) * kTNVar);
76 }
77 
79  AliAnalysisTaskEmcalJet(name, kTRUE),
80  fJetSubstructureTree(nullptr),
81  fSDZCut(0.1),
82  fSDBetaCut(0),
83  fReclusterizer(kCAAlgo),
84  fTriggerSelectionBits(AliVEvent::kAny),
85  fTriggerSelectionString(""),
86  fRhoNamePtRec("RhoSparse_Full_R04"),
87  fRhoNameMassRec("RhoMassSparse_Full_R04"),
88  fRhoNamePtSim("RhoSparse_Part_R04"),
89  fRhoNameMassSim("RhoMassSparse_Part_R04")
90 {
91  memset(fJetTreeData, 0, sizeof(Double_t) * kTNVar);
92  DefineOutput(2, TTree::Class());
93 }
94 
96 
97 }
98 
101 
102  OpenFile(2);
103  fJetSubstructureTree = new TTree("jetSubstructure", "Tree with jet substructure information");
104  TString varnames[kTNVar];
105  varnames[0] = "Radius";
106  varnames[1] = "EventWeight";
107  varnames[2] = "PtJetRec";
108  varnames[3] = "PtJetSim";
109  varnames[4] = "RhoPtRec";
110  varnames[5] = "RhoPtSim";
111  varnames[6] = "RhoMassRec";
112  varnames[7] = "RhoMassSim";
113  varnames[8] = "AreaRec";
114  varnames[9] = "AreaSim";
115  varnames[10] = "NEFRec";
116  varnames[11] = "NEFSim";
117  varnames[12] = "MassRec";
118  varnames[13] = "MassSim";
119  varnames[14] = "ZgMeasured";
120  varnames[15] = "ZgTrue";
121  varnames[16] = "RgMeasured";
122  varnames[17] = "RgTrue";
123  varnames[18] = "MgMeasured";
124  varnames[19] = "MgTrue";
125  varnames[20] = "PtgMeasured";
126  varnames[21] = "PtgTrue";
127  varnames[22] = "OneSubjettinessMeasured";
128  varnames[23] = "OneSubjettinessTrue";
129  varnames[24] = "TwoSubjettinessMeasured";
130  varnames[25] = "TwoSubjettinessTrue";
131  varnames[26] = "AngularityMeasured";
132  varnames[27] = "AngularityTrue";
133  varnames[28] = "PtDMeasured";
134  varnames[29] = "PtDTrue";
135  varnames[30] = "NCharged";
136  varnames[31] = "NNeutral";
137  varnames[32] = "NConstTrue";
138  varnames[33] = "NDroppedMeasured";
139  varnames[34] = "NDroppedTrue";
140 
141  for(int ib = 0; ib < kTNVar; ib++){
142  fJetSubstructureTree->Branch(varnames[ib], fJetTreeData + ib, Form("%s/D", varnames[ib].Data()));
143  }
144  PostData(1, fOutput);
145  PostData(2, fJetSubstructureTree);
146 }
147 
149  AliClusterContainer *clusters = GetClusterContainer("caloClusters");
150  AliTrackContainer *tracks = GetTrackContainer("tracks");
151  AliParticleContainer *particles = GetParticleContainer("mcparticles");
152 
153  AliJetContainer *mcjets = GetJetContainer("mcjets");
154  AliJetContainer *datajets = GetJetContainer("datajets");
155 
157  *rhoMassRec = GetRhoFromEvent(fRhoNameMassRec),
158  *rhoPtSim = GetRhoFromEvent(fRhoNamePtSim),
159  *rhoMassSim = GetRhoFromEvent(fRhoNameMassSim);
160 
161  // Run trigger selection (not on pure MCgen train)
162  if(datajets){
163  if(!(fInputHandler->IsEventSelected() & fTriggerSelectionBits)) return false;
164  if(fTriggerSelectionString.Length()) {
165  if(!fInputEvent->GetFiredTriggerClasses().Contains(fTriggerSelectionString)) return false;
166  }
167  }
168 
169  Double_t weight = 1;
170  Double_t rhoparameters[4]; memset(rhoparameters, 0, sizeof(Double_t) * 4);
171  if(rhoPtRec) rhoparameters[0] = rhoPtRec->GetVal();
172  if(rhoPtSim) rhoparameters[1] = rhoPtSim->GetVal();
173  if(rhoMassRec) rhoparameters[2] = rhoMassRec->GetVal();
174  if(rhoMassSim) rhoparameters[3] = rhoMassSim->GetVal();
175 
176  AliSoftdropDefinition softdropSettings;
177  softdropSettings.fBeta = fSDBetaCut;
178  softdropSettings.fZ = fSDZCut;
179  switch(fReclusterizer) {
180  case kCAAlgo: softdropSettings.fRecluserAlgo = fastjet::cambridge_aachen_algorithm; break;
181  case kKTAlgo: softdropSettings.fRecluserAlgo = fastjet::kt_algorithm; break;
182  case kAKTAlgo: softdropSettings.fRecluserAlgo = fastjet::antikt_algorithm; break;
183  };
184 
185  AliNSubjettinessDefinition nsubjettinessSettings;
186  nsubjettinessSettings.fBeta = 1.;
187  nsubjettinessSettings.fRadius = 0.4;
188 
189  if(mcjets && !datajets) {
190  // pure MC (gen) train - run over MC jets
191  for(auto jet : mcjets->accepted()) {
192  try {
193  AliJetSubstructureData structure = MakeJetSubstructure(*jet, mcjets->GetJetRadius() * 2., particles, nullptr,{softdropSettings, nsubjettinessSettings});
194  Double_t angularity[2] = {0., MakeAngularity(*jet, particles, nullptr)},
195  ptd[2] = {0., MakePtD(*jet, particles, nullptr)};
196  FillTree(mcjets->GetJetRadius(), weight, nullptr, jet, nullptr, &(structure.fSoftDrop), nullptr, &(structure.fNsubjettiness), angularity, ptd, rhoparameters);
197  } catch (ReclusterizerException &e) {
198  AliErrorStream() << "Error in reclusterization - skipping jet" << std::endl;
199  }
200  }
201  }
202 
203  if(datajets) {
204  for(auto jet : datajets->accepted()) {
205  AliEmcalJet *associatedJet = jet->MatchedJet();
206  if(mcjets) {
207  if(!associatedJet) continue;
208  try {
209  AliJetSubstructureData structureData = MakeJetSubstructure(*jet, datajets->GetJetRadius() * 2., tracks, clusters, {softdropSettings, nsubjettinessSettings}),
210  structureMC = MakeJetSubstructure(*associatedJet, mcjets->GetJetRadius() * 2, particles, nullptr, {softdropSettings, nsubjettinessSettings});
211  Double_t angularity[2] = {MakeAngularity(*jet, tracks, clusters), MakeAngularity(*associatedJet, particles, nullptr)},
212  ptd[2] = {MakePtD(*jet, tracks, clusters), MakePtD(*associatedJet, particles, nullptr)};
213  FillTree(datajets->GetJetRadius(), weight, jet, associatedJet, &(structureData.fSoftDrop), &(structureMC.fSoftDrop), &(structureData.fNsubjettiness), &(structureMC.fNsubjettiness), angularity, ptd, rhoparameters);
214  } catch(ReclusterizerException &e) {
215  AliErrorStream() << "Error in reclusterization - skipping jet" << std::endl;
216  }
217  } else {
218  try {
219  AliJetSubstructureData structure = MakeJetSubstructure(*jet, 0.4, tracks, clusters, {softdropSettings, nsubjettinessSettings});
220  Double_t angularity[2] = {MakeAngularity(*jet, tracks, clusters), 0.},
221  ptd[2] = {MakePtD(*jet, tracks, clusters), 0.};
222  FillTree(datajets->GetJetRadius(), weight, jet, nullptr, &(structure.fSoftDrop), nullptr, &(structure.fNsubjettiness), nullptr, angularity, ptd, rhoparameters);
223  } catch(ReclusterizerException &e) {
224  AliErrorStream() << "Error in reclusterization - skipping jet" << std::endl;
225  }
226  }
227  }
228  }
229 
230  return true;
231 }
232 
234  const AliEmcalJet *datajet, const AliEmcalJet *mcjet,
235  AliSoftDropParameters *dataSoftdrop, AliSoftDropParameters *mcSoftdrop,
236  AliNSubjettinessParameters *dataSubjettiness, AliNSubjettinessParameters *mcSubjettiness,
237  Double_t *angularity, Double_t *ptd, Double_t *rhoparameters){
238  fJetTreeData[kTRadius] = r;
239  fJetTreeData[kTWeight] = weight;
240  fJetTreeData[kTRhoPtRec] = rhoparameters[0];
241  fJetTreeData[kTRhoPtSim] = rhoparameters[1];
242  fJetTreeData[kTRhoMassRec] = rhoparameters[2];
243  fJetTreeData[kTRhoMassSim] = rhoparameters[3];
244  if(datajet) {
245  fJetTreeData[kTPtJetRec] = TMath::Abs(datajet->Pt());
247  fJetTreeData[kTNNeutral] = datajet->GetNumberOfClusters();
248  fJetTreeData[kTAreaRec] = datajet->Area();
249  fJetTreeData[kTNEFRec] = datajet->NEF();
250  fJetTreeData[kTMassRec] = datajet->M();
251  } else {
252  fJetTreeData[kTPtJetRec] = 0.;
255  fJetTreeData[kTAreaRec] = 0.;
256  fJetTreeData[kTNEFRec] = 0.;
257  fJetTreeData[kTMassRec] = 0.;
258  }
259 
260  if(mcjet) {
261  fJetTreeData[kTPtJetSim] = TMath::Abs(mcjet->Pt());
263  fJetTreeData[kTAreaSim] = mcjet->Area();
264  fJetTreeData[kTNEFSim] = mcjet->NEF();
265  fJetTreeData[kTMassSim] = mcjet->M();
266  } else {
267  fJetTreeData[kTPtJetSim] = 0.;
269  fJetTreeData[kTAreaSim] = 0.;
270  fJetTreeData[kTNEFSim] = 0.;
271  fJetTreeData[kTMassSim] = 0;
272  }
273 
274  if(dataSoftdrop) {
275  fJetTreeData[kTZgMeasured] = dataSoftdrop->fZg;
276  fJetTreeData[kTRgMeasured] = dataSoftdrop->fRg;
277  fJetTreeData[kTMgMeasured] = dataSoftdrop->fMg;
278  fJetTreeData[kTPtgMeasured] = dataSoftdrop->fPtg;
279  fJetTreeData[kTNDroppedMeasured] = dataSoftdrop->fNDropped;
280  } else {
286  }
287 
288  if(mcSoftdrop) {
289  fJetTreeData[kTZgTrue] = mcSoftdrop->fZg;
290  fJetTreeData[kTRgTrue] = mcSoftdrop->fRg;
291  fJetTreeData[kTMgTrue] = mcSoftdrop->fMg;
292  fJetTreeData[kTPtgTrue] = mcSoftdrop->fPtg;
293  fJetTreeData[kTNDroppedTrue] = mcSoftdrop->fNDropped;
294  } else {
295  fJetTreeData[kTZgTrue] = 0.;
296  fJetTreeData[kTRgTrue] = 0.;
297  fJetTreeData[kTMgTrue] = 0.;
298  fJetTreeData[kTPtgTrue] = 0.;
300  }
301 
302  if(dataSubjettiness) {
305  } else {
308  }
309 
310  if(mcSubjettiness) {
313  } else {
316  }
317 
318  fJetTreeData[kTAngularityMeasured] = angularity[0];
319  fJetTreeData[kTAngularityTrue] = angularity[1];
320  fJetTreeData[kTPtDMeasured] = ptd[0];
321  fJetTreeData[kTPtDTrue] = ptd[1];
322 
323  fJetSubstructureTree->Fill();
324 }
325 
326 
328  const int kClusterOffset = 30000; // In order to handle tracks and clusters in the same index space the cluster index needs and offset, large enough so that there is no overlap with track indices
329  std::vector<fastjet::PseudoJet> constituents;
330  for(int itrk = 0; itrk < jet.GetNumberOfTracks(); itrk++){
331  AliVTrack *track = static_cast<AliVTrack *>(jet.TrackAt(itrk, tracks->GetArray()));
332  fastjet::PseudoJet constituentTrack(track->Px(), track->Py(), track->Pz(), track->E());
333  constituentTrack.set_user_index(jet.TrackAt(itrk));
334  constituents.push_back(constituentTrack);
335  }
336 
337  for(int icl = 0; icl < jet.GetNumberOfClusters(); icl++) {
338  AliVCluster *cluster = jet.ClusterAt(icl, clusters->GetArray());
339  TLorentzVector clustervec;
340  cluster->GetMomentum(clustervec, fVertex);
341  fastjet::PseudoJet constituentCluster(clustervec.Px(), clustervec.Py(), clustervec.Pz(), cluster->GetHadCorrEnergy());
342  constituentCluster.set_user_index(jet.ClusterAt(icl) + kClusterOffset);
343  constituents.push_back(constituentCluster);
344  }
345 
346  // Redo jet finding on constituents with a
347  fastjet::JetDefinition jetdef(fastjet::antikt_algorithm, jetradius*2, static_cast<fastjet::RecombinationScheme>(0), fastjet::BestFJ30 );
348  std::vector<fastjet::PseudoJet> outputjets;
349  try {
350  fastjet::ClusterSequence jetfinder(constituents, jetdef);
351  outputjets = jetfinder.inclusive_jets(0);
352  AliJetSubstructureData result({MakeSoftDropParameters(outputjets[0], settings.fSoftdropSettings), MakeNsubjettinessParameters(outputjets[0], settings.fSubjettinessSettings)});
353  return result;
354  } catch (fastjet::Error &e) {
355  AliErrorStream() << " FJ Exception caught: " << e.message() << std::endl;
356  throw ReclusterizerException();
357  }
358 }
359 
361  fastjet::contrib::SoftDrop softdropAlgorithm(cutparameters.fBeta, cutparameters.fZ);
362  softdropAlgorithm.set_verbose_structure(kTRUE);
363  std::unique_ptr<fastjet::contrib::Recluster> reclusterizer(new fastjet::contrib::Recluster(cutparameters.fRecluserAlgo, 1, true));
364  softdropAlgorithm.set_reclustering(kTRUE, reclusterizer.get());
365  fastjet::PseudoJet groomed = softdropAlgorithm(jet);
366 
367  AliSoftDropParameters result({groomed.structure_of<fastjet::contrib::SoftDrop>().symmetry(),
368  groomed.structure_of<fastjet::contrib::SoftDrop>().delta_R(),
369  groomed.structure_of<fastjet::contrib::SoftDrop>().mu(),
370  groomed.perp(),
371  groomed.structure_of<fastjet::contrib::SoftDrop>().dropped_count()});
372  return result;
373 }
374 
377  fastjet::contrib::Nsubjettiness (1,fastjet::contrib::KT_Axes(),fastjet::contrib::NormalizedMeasure(cut.fBeta,cut.fRadius)).result(jet),
378  fastjet::contrib::Nsubjettiness (2,fastjet::contrib::KT_Axes(),fastjet::contrib::NormalizedMeasure(cut.fBeta,cut.fRadius)).result(jet)
379  });
380  return result;
381 }
382 
384  if(!jet.GetNumberOfTracks()) return 0;
385  TVector3 jetvec(jet.Px(), jet.Py(), jet.Pz());
386  Double_t den(0.), num(0.);
387  if(tracks){
388  for(UInt_t itrk = 0; itrk < jet.GetNumberOfTracks(); itrk++) {
389  AliVParticle *track = jet.TrackAt(itrk, tracks->GetArray());
390  if(!track){
391  AliErrorStream() << "Associated constituent particle / track not found\n";
392  continue;
393  }
394  TVector3 trackvec(track->Px(), track->Py(), track->Pz());
395 
396  num += track->Pt() * trackvec.DrEtaPhi(jetvec);
397  den += +track->Pt();
398  }
399  }
400  if(clusters) {
401  for(UInt_t icl = 0; icl < jet.GetNumberOfClusters(); icl++){
402  AliVCluster *clust = jet.ClusterAt(icl, clusters->GetArray());
403  if(!clust) {
404  AliErrorStream() << "Associated constituent cluster not found\n";
405  continue;
406  }
407  TLorentzVector clusterp;
408  clust->GetMomentum(clusterp, fVertex);
409 
410  num += clusterp.Pt() * clusterp.Vect().DrEtaPhi(jetvec);
411  den += clusterp.Pt();
412  }
413  }
414  return num/den;
415 }
416 
418  if (!jet.GetNumberOfTracks()) return 0;
419  Double_t den(0.), num(0.);
420  if(particles){
421  for(UInt_t itrk = 0; itrk < jet.GetNumberOfTracks(); itrk++) {
422  AliVParticle *trk = jet.TrackAt(itrk, particles->GetArray());
423  if(!trk){
424  AliErrorStream() << "Associated constituent particle / track not found\n";
425  continue;
426  }
427  num += trk->Pt() * trk->Pt();
428  den += trk->Pt();
429  }
430  }
431  if(clusters){
432  for(UInt_t icl = 0; icl < jet.GetNumberOfClusters(); icl++){
433  AliVCluster *clust = jet.ClusterAt(icl, clusters->GetArray());
434  if(!clust) {
435  AliErrorStream() << "Associated constituent cluster not found\n";
436  continue;
437  }
438  TLorentzVector clusterp;
439  clust->GetMomentum(clusterp, fVertex);
440  num += clusterp.Pt() * clusterp.Pt();
441  den += clusterp.Pt();
442  }
443  }
444  return TMath::Sqrt(num)/den;
445 }
446 
448  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
449 
450  Bool_t isAOD(kFALSE);
451  AliInputEventHandler *inputhandler = static_cast<AliInputEventHandler *>(mgr->GetInputEventHandler());
452  if(inputhandler) {
453  if(inputhandler->IsA() == AliAODInputHandler::Class()) isAOD = kTRUE;
454  }
455 
456  AliAnalysisTaskEmcalJetSubstructureTree *treemaker = new AliAnalysisTaskEmcalJetSubstructureTree("JetSubstructureTreemaker_" + TString::Format("R%02d_", int(jetradius * 10.)) + trigger);
457  mgr->AddTask(treemaker);
458  treemaker->SetMakeGeneralHistograms(kTRUE);
459  treemaker->SetVzRange(-10., 10);
460 
461  // Adding containers
462  if(isMC) {
463  AliParticleContainer *particles = treemaker->AddMCParticleContainer("mcparticles");
464 
465  AliJetContainer *mcjets = treemaker->AddJetContainer(
469  jetradius,
471  particles, nullptr);
472  mcjets->SetName("mcjets");
473  mcjets->SetJetPtCut(20.);
474  }
475 
476  if(isData) {
478  tracks->SetMinPt(0.15);
480  clusters->SetMinE(0.3); // 300 MeV E-cut
481 
482  AliJetContainer *datajets = treemaker->AddJetContainer(
486  jetradius,
488  tracks, clusters);
489  datajets->SetName("datajets");
490  datajets->SetJetPtCut(20.);
491 
492  treemaker->SetUseAliAnaUtils(true, true);
493 
494  // configure trigger selection
495  TString triggerstring(trigger);
496  if(triggerstring.Contains("INT7")) {
497  treemaker->SetTriggerBits(AliVEvent::kINT7);
498  } else if(triggerstring.Contains("EJ1")) {
499  treemaker->SetTriggerBits(AliVEvent::kEMCEJE);
500  treemaker->SetTriggerString("EJ1");
501  } else if(triggerstring.Contains("EJ2")) {
502  treemaker->SetTriggerBits(AliVEvent::kEMCEJE);
503  treemaker->SetTriggerString("EJ2");
504  }
505  }
506 
507  // Connecting containers
508  TString outputfile = mgr->GetCommonFileName();
509  outputfile += TString::Format(":JetSubstructure_R%02d_%s", int(jetradius * 10.), trigger);
510  mgr->ConnectInput(treemaker, 0, mgr->GetCommonInputContainer());
511  mgr->ConnectOutput(treemaker, 1, mgr->CreateContainer("JetSubstructureHistos_" + TString::Format("R%0d_", int(jetradius * 10.)) + trigger, AliEmcalList::Class(), AliAnalysisManager::kOutputContainer, outputfile));
512  mgr->ConnectOutput(treemaker, 2, mgr->CreateContainer("JetSubstuctureTree_" + TString::Format("R%0d_", int(jetradius * 10.)) + trigger, TTree::Class(), AliAnalysisManager::kOutputContainer, Form("JetSubstructureTree_%s.root", trigger)));
513 
514  return treemaker;
515 }
516 
517 } /* namespace EmcalTriggerJets */
TString fRhoNameMassSim
Name of the rho parameter coming from the rho task for mc-level jet (mass)
Double_t Area() const
Definition: AliEmcalJet.h:123
double Double_t
Definition: External.C:58
Double_t MakePtD(const AliEmcalJet &jet, const AliParticleContainer *const particles, const AliClusterContainer *const clusters) const
AliJetContainer * GetJetContainer(Int_t i=0) const
Double_t Py() const
Definition: AliEmcalJet.h:100
Container with name, TClonesArray and cuts for particles.
void SetUseAliAnaUtils(Bool_t b, Bool_t bRejPilup=kTRUE)
AliJetSubstructureData MakeJetSubstructure(const AliEmcalJet &jet, double jetradius, const AliParticleContainer *tracks, const AliClusterContainer *clusters, const AliJetSubstructureSettings &settings) const
AliEmcalJet * MatchedJet() const
Definition: AliEmcalJet.h:226
Int_t ClusterAt(Int_t idx) const
Definition: AliEmcalJet.h:130
AliJetContainer * AddJetContainer(const char *n, TString defaultCutType, Float_t jetRadius=0.4)
TString fRhoNamePtSim
Name of the rho parameter coming from the rho task for mc-level jet (pt)
Structure for results from the soft drop algorithm.
virtual bool Run()
Run function. This is the core function of the analysis and contains the user code. Therefore users have to implement this function.
void SetVzRange(Double_t min, Double_t max)
AliClusterContainer * AddClusterContainer(const char *n)
Create new cluster container and attach it to the task.
fastjet::JetAlgorithm fRecluserAlgo
Reclusterization algorithm.
UShort_t GetNumberOfConstituents() const
Definition: AliEmcalJet.h:133
Container for particles within the EMCAL framework.
Int_t TrackAt(Int_t idx) const
Definition: AliEmcalJet.h:153
UShort_t GetNumberOfTracks() const
Definition: AliEmcalJet.h:132
Double_t Px() const
Definition: AliEmcalJet.h:99
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
AliRhoParameter * GetRhoFromEvent(const char *name)
UShort_t GetNumberOfClusters() const
Definition: AliEmcalJet.h:131
void SetJetPtCut(Float_t cut)
TPC acceptance.
Definition: AliEmcalJet.h:60
unsigned int UInt_t
Definition: External.C:33
AliNSubjettinessParameters MakeNsubjettinessParameters(const fastjet::PseudoJet &jet, const AliNSubjettinessDefinition &cut) const
Definition for the algorithm obtaining the softdrop parameters.
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
AliMCParticleContainer * AddMCParticleContainer(const char *n)
Create new container for MC particles and attach it to the task.
Double_t MakeAngularity(const AliEmcalJet &jet, const AliParticleContainer *tracks, const AliClusterContainer *clusters) const
TString fRhoNamePtRec
Name of the rho parameter coming from the rho task for rec jet (pt)
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
Double_t Pt() const
Definition: AliEmcalJet.h:102
ClassImp(AliAnalysisTaskDeltaPt) AliAnalysisTaskDeltaPt
Bool_t isMC
Float_t GetJetRadius() const
AliEmcalList * fOutput
!output list
Double_t fVertex[3]
!event vertex
AliTrackContainer * AddTrackContainer(const char *n)
Create new track container and attach it to the task.
AliTrackContainer * GetTrackContainer(Int_t i=0) const
void SetMakeGeneralHistograms(Bool_t g)
Base task in the EMCAL jet framework.
void FillTree(double r, double weight, const AliEmcalJet *datajet, const AliEmcalJet *mcjet, AliSoftDropParameters *dataSoftdrop, AliSoftDropParameters *mcsoftdrop, AliNSubjettinessParameters *dataSubjettiness, AliNSubjettinessParameters *mcSubjettiness, Double_t *angularity, Double_t *ptd, Double_t *rhoparameters)
static AliAnalysisTaskEmcalJetSubstructureTree * AddEmcalJetSubstructureTreeMaker(Bool_t isMC, Bool_t isData, Double_t jetradius, const char *name)
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:44
Double_t Pz() const
Definition: AliEmcalJet.h:101
AliSoftDropParameters MakeSoftDropParameters(const fastjet::PseudoJet &jet, const AliSoftdropDefinition &cut) const
void UserCreateOutputObjects()
Main initialization function on the worker.
const AliJetIterableContainer accepted() const
bool Bool_t
Definition: External.C:53
Double_t NEF() const
Definition: AliEmcalJet.h:141
TString fRhoNameMassRec
Name of the rho parameter coming from the rho task for rec jet (mass)
Container structure for EMCAL clusters.
Double_t M() const
Definition: AliEmcalJet.h:113
EMCal fiducial acceptance (each eta, phi edge narrowed by jet R)
Definition: AliEmcalJet.h:63
Container for jet within the EMCAL jet framework.
TList * OpenFile(const char *fname)
Definition: DrawAnaELoss.C:65
static TString ClusterContainerNameFactory(Bool_t isAOD)
Get name of the default cluster container.
static TString TrackContainerNameFactory(Bool_t isAOD)
Get name of the default track container.