AliPhysics  32e057f (32e057f)
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 <array>
28 #include <iostream>
29 #include <string>
30 #include <set>
31 #include <sstream>
32 #include <vector>
33 
34 #include <fastjet/ClusterSequence.hh>
35 #include <fastjet/contrib/Nsubjettiness.hh>
36 #include <fastjet/contrib/SoftDrop.hh>
37 
38 #include <THistManager.h>
39 #include <TLinearBinning.h>
40 #include <TLorentzVector.h>
41 #include <TMath.h>
42 #include <TObjString.h>
43 #include <TString.h>
44 #include <TVector3.h>
45 
46 #include "AliAODEvent.h"
47 #include "AliAODInputHandler.h"
48 #include "AliAnalysisManager.h"
49 #include "AliAnalysisDataSlot.h"
50 #include "AliAnalysisDataContainer.h"
52 #include "AliCDBEntry.h"
53 #include "AliCDBManager.h"
54 #include "AliClusterContainer.h"
55 #include "AliJetContainer.h"
58 #include "AliEmcalJet.h"
59 #include "AliEmcalList.h"
61 #include "AliLog.h"
62 #include "AliParticleContainer.h"
63 #include "AliRhoParameter.h"
64 #include "AliTrackContainer.h"
65 #include "AliTriggerCluster.h"
66 #include "AliTriggerConfiguration.h"
67 #include "AliVCluster.h"
68 #include "AliVParticle.h"
69 
70 #ifdef EXPERIMENTAL_JETCONSTITUENTS
73 #endif
74 
75 
79 
80 namespace EmcalTriggerJets {
81 
84  fJetSubstructureTree(nullptr),
85  fQAHistos(nullptr),
86  fLumiMonitor(nullptr),
87  fSDZCut(0.1),
88  fSDBetaCut(0),
89  fReclusterizer(kCAAlgo),
90  fTriggerSelectionBits(AliVEvent::kAny),
91  fTriggerSelectionString(""),
92  fUseDownscaleWeight(false),
93  fFillPart(true),
94  fFillAcceptance(true),
95  fFillRho(true),
96  fFillMass(true),
97  fFillSoftDrop(true),
98  fFillNSub(true),
99  fFillStructGlob(true)
100 {
101  memset(fJetTreeData, 0, sizeof(Double_t) * kTNVar);
102 }
103 
105  AliAnalysisTaskEmcalJet(name, kTRUE),
109  fSDZCut(0.1),
110  fSDBetaCut(0),
112  fTriggerSelectionBits(AliVEvent::kAny),
114  fUseDownscaleWeight(false),
115  fFillPart(true),
116  fFillAcceptance(true),
117  fFillRho(true),
118  fFillMass(true),
119  fFillSoftDrop(true),
120  fFillNSub(true),
121  fFillStructGlob(true)
122 {
123  memset(fJetTreeData, 0, sizeof(Double_t) * kTNVar);
124  DefineOutput(2, TTree::Class());
125 }
126 
128 
129 }
130 
133 
134  // Make QA for constituent clusters
135  TLinearBinning jetptbinning(9, 20, 200),
136  clusterenergybinning(200, 0., 200),
137  timebinning(1000, -500., 500.),
138  m02binning(100, 0., 1.),
139  ncellbinning(101, -0.5, 100.5);
140  fQAHistos = new THistManager("QAhistos");
141  fQAHistos->CreateTH1("hEventCounter", "Event counter", 1, 0.5, 1.5);
142  fQAHistos->CreateTH2("hClusterConstE", "EMCAL cluster energy vs jet pt; p_{t, jet} (GeV/c); E_{cl} (GeV)", jetptbinning, clusterenergybinning);
143  fQAHistos->CreateTH2("hClusterConstTime", "EMCAL cluster time vs. jet pt; p_{t, jet} (GeV/c); t_{cl} (ns)", jetptbinning, timebinning);
144  fQAHistos->CreateTH2("hClusterConstM02", "EMCAL cluster M02 vs. jet pt; p{t, jet} (GeV/c); M02", jetptbinning, m02binning);
145  fQAHistos->CreateTH2("hClusterConstNcell", "EMCAL cluster ncell vs. jet pt; p{t, jet} (GeV/c); Number of cells", jetptbinning, ncellbinning);
146 
147  // Test of constituent QA
148 #ifdef EXPERIMENTAL_JETCONSTITUENTS
149  fQAHistos->CreateTH2("hChargedConstituentPt", "charged constituent pt vs jet pt (via constituent map); p_{t,jet} (GeV/c); p_{t,ch} (GeV/c)", jetptbinning, clusterenergybinning);
150  fQAHistos->CreateTH2("hChargedIndexPt", "charged constituent pt vs jet pt (via index map); p_{t, jet} (GeV/c); p_{t, ch} (GeV/c)", jetptbinning, clusterenergybinning);
151 
152  fQAHistos->CreateTH2("hClusterConstituentEDefault", "cluster constituent default energy vs. jet pt (va constituent map); p_{t, jet} (GeV/c); E_{cl} (GeV)", jetptbinning, clusterenergybinning);
153  fQAHistos->CreateTH2("hClusterConstituentENLC", "cluster constituent non-linearity-corrected energy vs. jet pt (va constituent map); p_{t, jet} (GeV/c); E_{cl} (GeV)", jetptbinning, clusterenergybinning);
154  fQAHistos->CreateTH2("hClusterConstituentEHC", "cluster constituent hadronic-corrected energy vs. jet pt (va constituent map); p_{t, jet} (GeV/c); E_{cl} (GeV)", jetptbinning, clusterenergybinning);
155  fQAHistos->CreateTH2("hClusterIndexENLC", "cluster constituent non-linearity-corrected energy vs. jet pt (via index map); p_{t, jet} (GeV/c); E_{cl} (GeV)", jetptbinning, clusterenergybinning);
156  fQAHistos->CreateTH2("hClusterIndexEHC", "cluster constituent hadronic-corrected energy vs. jet pt (via index map); p_{t, jet} (GeV/c); E_{cl} (GeV)", jetptbinning, clusterenergybinning);
157 #endif
158  for(auto h : *(fQAHistos->GetListOfHistograms())) fOutput->Add(h);
159 
160  OpenFile(2);
161  std::string treename = this->GetOutputSlot(2)->GetContainer()->GetName();
162  fJetSubstructureTree = new TTree(treename.data(), "Tree with jet substructure information");
163  std::vector<std::string> varnames = {
164  "Radius", "EventWeight", "PtJetRec", "PtJetSim", "EJetRec",
165  "EJetSim", "EtaRec", "EtaSim", "PhiRec", "PhiSim",
166  "RhoPtRec", "RhoPtSim", "RhoMassRec", "RhoMassSim", "AreaRec",
167  "AreaSim", "NEFRec", "NEFSim", "MassRec", "MassSim",
168  "ZgMeasured", "ZgTrue", "RgMeasured", "RgTrue", "MgMeasured",
169  "MgTrue", "PtgMeasured", "PtgTrue", "MugMeasured", "MugTrue",
170  "OneSubjettinessMeasured", "OneSubjettinessTrue", "TwoSubjettinessMeasured", "TwoSubjettinessTrue", "AngularityMeasured",
171  "AngularityTrue", "PtDMeasured", "PtDTrue", "NCharged", "NNeutral",
172  "NConstTrue", "NDroppedMeasured", "NDroppedTrue" };
173 
174  for(int ib = 0; ib < kTNVar; ib++){
175  LinkOutputBranch(varnames[ib], fJetTreeData + ib);
176  }
177  PostData(1, fOutput);
178  PostData(2, fJetSubstructureTree);
179 }
180 
181 void AliAnalysisTaskEmcalJetSubstructureTree::LinkOutputBranch(const std::string &branchname, Double_t *datalocation) {
182  // Check whether branch is rejected
183  if(!fFillPart && IsPartBranch(branchname)) return;
184  if(!fFillAcceptance && IsAcceptanceBranch(branchname)) return;
185  if(!fFillRho && IsRhoBranch(branchname)) return;
186  if(!fFillMass && IsMassBranch(branchname)) return;
187  if(!fFillSoftDrop && IsSoftdropBranch(branchname)) return;
188  if(!fFillNSub && IsNSubjettinessBranch(branchname)) return;
189  if(!fFillStructGlob && IsStructbranch(branchname)) return;
190 
191  std::cout << "Adding branch " << branchname << std::endl;
192  fJetSubstructureTree->Branch(branchname.data(), datalocation, Form("%s/D", branchname.data()));
193 }
194 
198  }
199 }
200 
204  AliParticleContainer *particles = GetParticleContainer("mcparticles");
205 
206  AliJetContainer *mcjets = GetJetContainer("mcjets");
207  AliJetContainer *datajets = GetJetContainer("datajets");
208 
209  FillLuminosity(); // Makes only sense in data
210 
211  // for(auto e : *(fInputEvent->GetList())) std::cout << e->GetName() << std::endl;
212 
213  std::stringstream rhoTagData, rhoTagMC;
214  if(datajets) rhoTagData << "R" << std::setw(2) << std::setfill('0') << static_cast<Int_t>(datajets->GetJetRadius() * 10.);
215  if(mcjets) rhoTagMC << "R" << std::setw(2) << std::setfill('0') << static_cast<Int_t>(mcjets->GetJetRadius() * 10.);
216 
217  std::string rhoSparseData = "RhoSparse_Full_" + rhoTagData.str(), rhoSparseMC = "RhoSparse_Full_" + rhoTagMC.str(),
218  rhoMassData = "RhoMassSparse_Full_" + rhoTagData.str(), rhoMassMC = "RhoMassSparse_Full_" + rhoTagMC.str();
219  AliRhoParameter *rhoPtRec = GetRhoFromEvent(rhoSparseData.data()),
220  *rhoMassRec = GetRhoFromEvent(rhoMassData.data()),
221  *rhoPtSim = GetRhoFromEvent(rhoSparseMC.data()),
222  *rhoMassSim = GetRhoFromEvent(rhoMassMC.data());
223  AliDebugStream(2) << "Found rho parameter for reconstructed pt: " << (rhoPtRec ? "yes" : "no") << ", value: " << (rhoPtRec ? rhoPtRec->GetVal() : 0.) << std::endl;
224  AliDebugStream(2) << "Found rho parameter for sim pt: " << (rhoPtSim ? "yes" : "no") << ", value: " << (rhoPtSim ? rhoPtSim->GetVal() : 0.) << std::endl;
225  AliDebugStream(2) << "Found rho parameter for reconstructed Mass: " << (rhoMassRec ? "yes" : "no") << ", value: " << (rhoMassRec ? rhoMassRec->GetVal() : 0.) << std::endl;
226  AliDebugStream(2) << "Found rho parameter for sim Mass: " << (rhoMassSim ? "yes" : "no") << ", value: " << (rhoMassSim ? rhoMassSim->GetVal() : 0.) << std::endl;
227 
228  AliDebugStream(1) << "Inspecting jet radius " << (datajets ? datajets->GetJetRadius() : mcjets->GetJetRadius()) << std::endl;
229 
230  double weight = 1.;
233  }
234 
235  // Run trigger selection (not on pure MCgen train)
236  if(datajets){
237  if(!(fInputHandler->IsEventSelected() & fTriggerSelectionBits)) return false;
238  if(!mcjets){
239  // Pure data - do EMCAL trigger selection from selection string
240  if(fTriggerSelectionString.Length()) {
241  if(!fInputEvent->GetFiredTriggerClasses().Contains(fTriggerSelectionString)) return false;
242  }
243  } else {
245  // Simulation - do EMCAL trigger selection from trigger selection object
246  PWG::EMCAL::AliEmcalTriggerDecisionContainer *mctrigger = static_cast<PWG::EMCAL::AliEmcalTriggerDecisionContainer *>(fInputEvent->FindListObject("EmcalTriggerDecision"));
247  AliDebugStream(1) << "Found trigger decision object: " << (mctrigger ? "yes" : "no") << std::endl;
248  if(fTriggerSelectionString.Length()){
249  if(!mctrigger){
250  AliErrorStream() << "Trigger decision container not found in event - not possible to select EMCAL triggers" << std::endl;
251  return false;
252  }
253  if(!mctrigger->IsEventSelected(fTriggerSelectionString)) return false;
254  }
255  }
256  }
257  }
258 
259  // Count events (for spectrum analysis)
260  fQAHistos->FillTH1("hEventCounter", 1);
261 
262  Double_t rhoparameters[4]; memset(rhoparameters, 0, sizeof(Double_t) * 4);
263  if(rhoPtRec) rhoparameters[0] = rhoPtRec->GetVal();
264  if(rhoPtSim) rhoparameters[1] = rhoPtSim->GetVal();
265  if(rhoMassRec) rhoparameters[2] = rhoMassRec->GetVal();
266  if(rhoMassSim) rhoparameters[3] = rhoMassSim->GetVal();
267 
268  AliSoftdropDefinition softdropSettings;
269  softdropSettings.fBeta = fSDBetaCut;
270  softdropSettings.fZ = fSDZCut;
271  switch(fReclusterizer) {
272  case kCAAlgo: softdropSettings.fRecluserAlgo = fastjet::cambridge_aachen_algorithm; break;
273  case kKTAlgo: softdropSettings.fRecluserAlgo = fastjet::kt_algorithm; break;
274  case kAKTAlgo: softdropSettings.fRecluserAlgo = fastjet::antikt_algorithm; break;
275  };
276 
277  AliNSubjettinessDefinition nsubjettinessSettings;
278  nsubjettinessSettings.fBeta = 1.;
279  nsubjettinessSettings.fRadius = 0.4;
280 
281  if(datajets) {
282  AliDebugStream(1) << "In data jets branch: found " << datajets->GetNJets() << " jets, " << datajets->GetNAcceptedJets() << " were accepted\n";
283  AliDebugStream(1) << "Having MC information: " << (mcjets ? TString::Format("yes, with %d jets", mcjets->GetNJets()) : "no") << std::endl;
284  if(mcjets) {
285  AliDebugStream(1) << "In MC jets branch: found " << mcjets->GetNJets() << " jets, " << mcjets->GetNAcceptedJets() << " were accepted\n";
286  }
287  for(auto jet : datajets->accepted()) {
288  double pt = jet->Pt(), pz = jet->Pz(), E = jet->E(), M = TMath::Sqrt(E*E - pt*pt - pz*pz);
289  AliDebugStream(2) << "Next jet: pt:" << jet->Pt() << ", E: " << E << ", pz: " << pz << ", M(self): " << M << "M(fj)" << jet->M() << std::endl;
290  AliEmcalJet *associatedJet = jet->ClosestJet();
291 
292  if(mcjets) {
293  if(!associatedJet) {
294  AliDebugStream(2) << "Not found associated jet" << std::endl;
295  continue;
296  }
297  try {
298  DoConstituentQA(jet, tracks, clusters);
299  AliJetSubstructureData structureData = MakeJetSubstructure(*jet, datajets->GetJetRadius() * 2., tracks, clusters, {softdropSettings, nsubjettinessSettings}),
300  structureMC = fFillPart ? MakeJetSubstructure(*associatedJet, mcjets->GetJetRadius() * 2, particles, nullptr, {softdropSettings, nsubjettinessSettings}) : AliJetSubstructureData();
301  Double_t angularity[2] = {fFillStructGlob ? MakeAngularity(*jet, tracks, clusters) : 0., (fFillStructGlob && fFillPart) ? MakeAngularity(*associatedJet, particles, nullptr) : 0.},
302  ptd[2] = {fFillStructGlob ? MakePtD(*jet, tracks, clusters) : 0., (fFillStructGlob && fFillPart) ? MakePtD(*associatedJet, particles, nullptr) : 0};
303  FillTree(datajets->GetJetRadius(), weight, jet, associatedJet, &(structureData.fSoftDrop), &(structureMC.fSoftDrop), &(structureData.fNsubjettiness), &(structureMC.fNsubjettiness), angularity, ptd, rhoparameters);
304  } catch(ReclusterizerException &e) {
305  AliErrorStream() << "Error in reclusterization - skipping jet" << std::endl;
306  } catch(SubstructureException &e) {
307  AliErrorStream() << "Error in substructure observable - skipping jet" << std::endl;
308  }
309  } else {
310  try {
311  DoConstituentQA(jet, tracks, clusters);
312  AliJetSubstructureData structure = MakeJetSubstructure(*jet, 0.4, tracks, clusters, {softdropSettings, nsubjettinessSettings});
313  Double_t angularity[2] = {fFillStructGlob ? MakeAngularity(*jet, tracks, clusters): 0., 0.},
314  ptd[2] = {fFillStructGlob ? MakePtD(*jet, tracks, clusters) : 0., 0.};
315  FillTree(datajets->GetJetRadius(), weight, jet, nullptr, &(structure.fSoftDrop), nullptr, &(structure.fNsubjettiness), nullptr, angularity, ptd, rhoparameters);
316  } catch(ReclusterizerException &e) {
317  AliErrorStream() << "Error in reclusterization - skipping jet" << std::endl;
318  } catch(SubstructureException &e) {
319  AliErrorStream() << "Error in substructure observable - skipping jet" << std::endl;
320  }
321  }
322  }
323  } else {
324  if(mcjets) {
325  // for MCgen train
326  AliDebugStream(1) << "In MC pure jet branch: found " << mcjets->GetNJets() << " jets, " << mcjets->GetNAcceptedJets() << " were accepted\n";
327  for(auto j : mcjets->accepted()){
328  AliEmcalJet *mcjet = static_cast<AliEmcalJet *>(j);
329  try {
330  AliJetSubstructureData structure = MakeJetSubstructure(*mcjet, mcjets->GetJetRadius() * 2., particles, nullptr,{softdropSettings, nsubjettinessSettings});
331  Double_t angularity[2] = {0., MakeAngularity(*mcjet, particles, nullptr)},
332  ptd[2] = {0., MakePtD(*mcjet, particles, nullptr)};
333  FillTree(mcjets->GetJetRadius(), weight, nullptr, mcjet, nullptr, &(structure.fSoftDrop), nullptr, &(structure.fNsubjettiness), angularity, ptd, rhoparameters);
334  } catch (ReclusterizerException &e) {
335  AliErrorStream() << "Error in reclusterization - skipping jet" << std::endl;
336  } catch (SubstructureException &e) {
337  AliErrorStream() << "Error in substructure observable - skipping jet" << std::endl;
338  }
339  }
340  }
341  }
342 
343  return true;
344 }
345 
347  AliCDBManager * cdb = AliCDBManager::Instance();
348  if(!fMCEvent && cdb){
349  // Get List of trigger clusters
350  AliCDBEntry *en = cdb->Get("GRP/CTP/Config");
351  AliTriggerConfiguration *trg = static_cast<AliTriggerConfiguration *>(en->GetObject());
352  std::vector<std::string> clusternames;
353  for(auto c : trg->GetClusters()) {
354  AliTriggerCluster *clust = static_cast<AliTriggerCluster *>(c);
355  std::string clustname = clust->GetName();
356  auto iscent = clustname.find("CENT") != std::string::npos, iscalo = clustname.find("CALO") != std::string::npos;
357  if(!(iscalo || iscent)) continue;
358  clusternames.emplace_back(clustname);
359  }
360 
361  // Set the x-axis of the luminosity monitor histogram
362  fLumiMonitor = new TH1F("hLumiMonitor", "Luminosity monitor", clusternames.size(), 0, clusternames.size());
363  int currentbin(1);
364  for(auto c : clusternames) {
365  fLumiMonitor->GetXaxis()->SetBinLabel(currentbin++, c.data());
366  }
367  fOutput->Add(fLumiMonitor);
368  }
369 }
370 
372  const AliEmcalJet *datajet, const AliEmcalJet *mcjet,
373  AliSoftDropParameters *dataSoftdrop, AliSoftDropParameters *mcSoftdrop,
374  AliNSubjettinessParameters *dataSubjettiness, AliNSubjettinessParameters *mcSubjettiness,
375  Double_t *angularity, Double_t *ptd, Double_t *rhoparameters){
376 
377  memset(fJetTreeData,0, sizeof(Double_t) * kTNVar);
378  fJetTreeData[kTRadius] = r;
379  fJetTreeData[kTWeight] = weight;
380  if(fFillRho){
381  fJetTreeData[kTRhoPtRec] = rhoparameters[0];
382  if(fFillMass) fJetTreeData[kTRhoMassRec] = rhoparameters[2];
383  if(fFillPart){
384  fJetTreeData[kTRhoPtSim] = rhoparameters[1];
385  if(fFillMass) fJetTreeData[kTRhoMassSim] = rhoparameters[3];
386  }
387  }
388  if(datajet) {
389  fJetTreeData[kTPtJetRec] = TMath::Abs(datajet->Pt());
391  fJetTreeData[kTNNeutral] = datajet->GetNumberOfClusters();
392  fJetTreeData[kTAreaRec] = datajet->Area();
393  fJetTreeData[kTNEFRec] = datajet->NEF();
394  if(fFillMass) fJetTreeData[kTMassRec] = datajet->M();
395  fJetTreeData[kTEJetRec] = datajet->E();
396  if(fFillAcceptance) {
397  fJetTreeData[kTEtaRec] = datajet->Eta();
398  fJetTreeData[kTPhiRec] = datajet->Phi();
399  }
400  }
401 
402  if(fFillPart && mcjet){
403  fJetTreeData[kTPtJetSim] = TMath::Abs(mcjet->Pt());
405  fJetTreeData[kTAreaSim] = mcjet->Area();
406  fJetTreeData[kTNEFSim] = mcjet->NEF();
407  if(fFillMass) fJetTreeData[kTMassSim] = mcjet->M();
408  fJetTreeData[kTEJetSim] = mcjet->E();
409  if(fFillAcceptance){
410  fJetTreeData[kTEtaSim] = mcjet->Eta();
411  fJetTreeData[kTPhiSim] = mcjet->Phi();
412  }
413  }
414 
415  if(fFillSoftDrop){
416  if(dataSoftdrop) {
417  fJetTreeData[kTZgMeasured] = dataSoftdrop->fZg;
418  fJetTreeData[kTRgMeasured] = dataSoftdrop->fRg;
419  fJetTreeData[kTMgMeasured] = dataSoftdrop->fMg;
420  fJetTreeData[kTPtgMeasured] = dataSoftdrop->fPtg;
421  fJetTreeData[kTMugMeasured] = dataSoftdrop->fMug;
422  fJetTreeData[kTNDroppedMeasured] = dataSoftdrop->fNDropped;
423  }
424 
425  if(fFillPart && mcSoftdrop) {
426  fJetTreeData[kTZgTrue] = mcSoftdrop->fZg;
427  fJetTreeData[kTRgTrue] = mcSoftdrop->fRg;
428  fJetTreeData[kTMgTrue] = mcSoftdrop->fMg;
429  fJetTreeData[kTPtgTrue] = mcSoftdrop->fPtg;
430  fJetTreeData[kTMugTrue] = mcSoftdrop->fMug;
431  fJetTreeData[kTNDroppedTrue] = mcSoftdrop->fNDropped;
432  }
433  }
434 
435  if(fFillNSub){
436  if(dataSubjettiness) {
439  }
440 
441  if(fFillPart && mcSubjettiness) {
444  }
445  }
446 
447  if(fFillStructGlob){
448  fJetTreeData[kTAngularityMeasured] = angularity[0];
449  fJetTreeData[kTPtDMeasured] = ptd[0];
450 
451  if(fFillPart){
452  fJetTreeData[kTAngularityTrue] = angularity[1];
453  fJetTreeData[kTPtDTrue] = ptd[1];
454  }
455  }
456 
457  fJetSubstructureTree->Fill();
458 }
459 
463  if(fInputEvent->GetFiredTriggerClasses().Contains("INT7")) {
464  for(auto trigger : DecodeTriggerString(fInputEvent->GetFiredTriggerClasses().Data())){
465  auto int7trigger = trigger.IsTriggerClass("INT7");
466  auto bunchcrossing = trigger.fBunchCrossing == "B";
467  auto nopf = trigger.fPastFutureProtection == "NOPF";
468  AliDebugStream(4) << "Full name: " << trigger.ExpandClassName() << ", INT7 trigger: " << (int7trigger ? "Yes" : "No") << ", bunch crossing: " << (bunchcrossing ? "Yes" : "No") << ", no past-future protection: " << (nopf ? "Yes" : "No") << ", Cluster: " << trigger.fTriggerCluster << std::endl;
469  if(int7trigger && bunchcrossing && nopf) {
470  double downscale = downscalefactors->GetDownscaleFactorForTriggerClass(trigger.ExpandClassName());
471  AliDebugStream(5) << "Using downscale " << downscale << std::endl;
472  fLumiMonitor->Fill(trigger.fTriggerCluster.data(), 1./downscale);
473  }
474  }
475  }
476  }
477 }
478 
480  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
481  std::vector<fastjet::PseudoJet> constituents;
482  bool isMC = dynamic_cast<const AliTrackContainer *>(tracks);
483  AliDebugStream(2) << "Make new jet substrucutre for " << (isMC ? "MC" : "data") << " jet: Number of tracks " << jet.GetNumberOfTracks() << ", clusters " << jet.GetNumberOfClusters() << std::endl;
484  for(int itrk = 0; itrk < jet.GetNumberOfTracks(); itrk++){
485  auto track = jet.TrackAt(itrk, tracks->GetArray());
486  fastjet::PseudoJet constituentTrack(track->Px(), track->Py(), track->Pz(), track->E());
487  constituentTrack.set_user_index(jet.TrackAt(itrk));
488  constituents.push_back(constituentTrack);
489  }
490 
491  if(clusters){
492  for(int icl = 0; icl < jet.GetNumberOfClusters(); icl++) {
493  auto cluster = jet.ClusterAt(icl, clusters->GetArray());
494  TLorentzVector clustervec;
495  cluster->GetMomentum(clustervec, fVertex, (AliVCluster::VCluUserDefEnergy_t)clusters->GetDefaultClusterEnergy());
496  fastjet::PseudoJet constituentCluster(clustervec.Px(), clustervec.Py(), clustervec.Pz(), cluster->GetHadCorrEnergy());
497  constituentCluster.set_user_index(jet.ClusterAt(icl) + kClusterOffset);
498  constituents.push_back(constituentCluster);
499  }
500  }
501 
502  AliDebugStream(3) << "Found " << constituents.size() << " constituents for jet with pt=" << jet.Pt() << " GeV/c" << std::endl;
503  if(!constituents.size())
504  throw ReclusterizerException();
505  // Redo jet finding on constituents with a
506  fastjet::JetDefinition jetdef(fastjet::antikt_algorithm, jetradius*2, static_cast<fastjet::RecombinationScheme>(0), fastjet::BestFJ30 );
507  std::vector<fastjet::PseudoJet> outputjets;
508  try {
509  fastjet::ClusterSequence jetfinder(constituents, jetdef);
510  outputjets = jetfinder.inclusive_jets(0);
512  return result;
513  } catch (fastjet::Error &e) {
514  AliErrorStream() << " FJ Exception caught: " << e.message() << std::endl;
515  throw ReclusterizerException();
516  } catch (SoftDropException &e) {
517  AliErrorStream() << "Softdrop exception caught: " << e.what() << std::endl;
518  throw ReclusterizerException();
519  }
520 }
521 
523  fastjet::contrib::SoftDrop softdropAlgorithm(cutparameters.fBeta, cutparameters.fZ);
524  softdropAlgorithm.set_verbose_structure(kTRUE);
525  std::unique_ptr<fastjet::contrib::Recluster> reclusterizer(new fastjet::contrib::Recluster(cutparameters.fRecluserAlgo, 1, true));
526  softdropAlgorithm.set_reclustering(kTRUE, reclusterizer.get());
527  AliDebugStream(4) << "Jet has " << jet.constituents().size() << " constituents" << std::endl;
528  auto groomed = softdropAlgorithm(jet);
529  try {
530  auto softdropstruct = groomed.structure_of<fastjet::contrib::SoftDrop>();
531 
532  AliSoftDropParameters result({softdropstruct.symmetry(),
533  groomed.m(),
534  softdropstruct.delta_R(),
535  groomed.perp(),
536  softdropstruct.mu(),
537  softdropstruct.dropped_count()});
538  return result;
539  } catch(std::bad_cast &e) {
540  throw SoftDropException();
541  }
542 }
543 
546  fastjet::contrib::Nsubjettiness (1,fastjet::contrib::KT_Axes(),fastjet::contrib::NormalizedCutoffMeasure(cut.fBeta, cut.fRadius, 1e100)).result(jet),
547  fastjet::contrib::Nsubjettiness (2,fastjet::contrib::KT_Axes(),fastjet::contrib::NormalizedCutoffMeasure(cut.fBeta, cut.fRadius, 1e100)).result(jet)
548  });
549  return result;
550 }
551 
553  if(!(jet.GetNumberOfTracks() || jet.GetNumberOfClusters()))
554  throw SubstructureException();
555  TVector3 jetvec(jet.Px(), jet.Py(), jet.Pz());
556  Double_t den(0.), num(0.);
557  if(tracks){
558  for(UInt_t itrk = 0; itrk < jet.GetNumberOfTracks(); itrk++) {
559  auto track = jet.TrackAt(itrk, tracks->GetArray());
560  if(!track){
561  AliErrorStream() << "Associated constituent particle / track not found\n";
562  continue;
563  }
564  TVector3 trackvec(track->Px(), track->Py(), track->Pz());
565 
566  num += track->Pt() * trackvec.DrEtaPhi(jetvec);
567  den += +track->Pt();
568  }
569  }
570  if(clusters) {
571  for(UInt_t icl = 0; icl < jet.GetNumberOfClusters(); icl++){
572  auto clust = jet.ClusterAt(icl, clusters->GetArray());
573  if(!clust) {
574  AliErrorStream() << "Associated constituent cluster not found\n";
575  continue;
576  }
577  TLorentzVector clusterp;
578  clust->GetMomentum(clusterp, fVertex, (AliVCluster::VCluUserDefEnergy_t)clusters->GetDefaultClusterEnergy());
579 
580  num += clusterp.Pt() * clusterp.Vect().DrEtaPhi(jetvec);
581  den += clusterp.Pt();
582  }
583  }
584  return num/den;
585 }
586 
588  if (!(jet.GetNumberOfTracks() || jet.GetNumberOfClusters()))
589  throw SubstructureException();
590  Double_t den(0.), num(0.);
591  if(particles){
592  for(UInt_t itrk = 0; itrk < jet.GetNumberOfTracks(); itrk++) {
593  auto trk = jet.TrackAt(itrk, particles->GetArray());
594  if(!trk){
595  AliErrorStream() << "Associated constituent particle / track not found\n";
596  continue;
597  }
598  num += trk->Pt() * trk->Pt();
599  den += trk->Pt();
600  }
601  }
602  if(clusters){
603  for(UInt_t icl = 0; icl < jet.GetNumberOfClusters(); icl++){
604  auto clust = jet.ClusterAt(icl, clusters->GetArray());
605  if(!clust) {
606  AliErrorStream() << "Associated constituent cluster not found\n";
607  continue;
608  }
609  TLorentzVector clusterp;
610  clust->GetMomentum(clusterp, fVertex, (AliVCluster::VCluUserDefEnergy_t)clusters->GetDefaultClusterEnergy());
611  num += clusterp.Pt() * clusterp.Pt();
612  den += clusterp.Pt();
613  }
614  }
615  return TMath::Sqrt(num)/den;
616 }
617 
619  for(int icl = 0; icl < jet->GetNumberOfClusters(); icl++){
620  auto clust = jet->ClusterAt(icl, clusters->GetArray());
621  AliDebugStream(3) << "cluster time " << clust->GetTOF() << std::endl;
622  fQAHistos->FillTH2("hClusterConstE", jet->Pt(),clust->GetUserDefEnergy(clusters->GetDefaultClusterEnergy()));
623  fQAHistos->FillTH2("hClusterConstTime", jet->Pt(), clust->GetTOF());
624  fQAHistos->FillTH2("hClusterConstM02", jet->Pt(), clust->GetM02());
625  fQAHistos->FillTH2("hClusterConstNcell", jet->Pt(), clust->GetNCells());
626 
627 #ifdef EXPERIMENTAL_JETCONSTITUENTS
628  fQAHistos->FillTH2("hClusterIndexENLC", jet->Pt(), clust->GetNonLinCorrEnergy());
629  fQAHistos->FillTH2("hClusterIndexEHC", jet->Pt(), clust->GetHadCorrEnergy());
630 #endif
631  }
632 
633 #ifdef EXPERIMENTAL_JETCONSTITUENTS
634  // Loop over charged particles - fill test histogram
635  for(int itrk = 0; itrk < jet->GetNumberOfTracks(); itrk++){
636  auto part = jet->TrackAt(itrk, cont->GetArray());
637  fQAHistos->FillTH2("hChargedIndexPt", jet->Pt(), part->Pt());
638  }
639 
640  // Look over charged constituents
641  AliDebugStream(2) << "Jet: Number of particle constituents: " << jet->GetParticleConstituents().GetEntriesFast() << std::endl;
642  for(auto pconst : jet->GetParticleConstituents()) {
643  auto part = static_cast<PWG::JETFW::AliEmcalParticleJetConstituent *>(pconst);
644  AliDebugStream(3) << "Found particle constituent with pt " << part->Pt() << ", from VParticle " << part->GetParticle()->Pt() << std::endl;
645  fQAHistos->FillTH2("hChargedConstituentPt", jet->Pt(), part->Pt());
646  }
647 
648  // Loop over neutral constituents
649  AliDebugStream(2) << "Jet: Number of cluster constituents: " << jet->GetClusterConstituents().GetEntriesFast() << std::endl;
650  for(auto cconst : jet->GetClusterConstituents()){
651  auto clust = static_cast<PWG::JETFW::AliEmcalClusterJetConstituent *>(cconst);
652  AliDebugStream(3) << "Found cluster constituent with energy " << clust->E() << " using energy definition " << static_cast<int>(clust->GetDefaultEnergyType()) << std::endl;
653  fQAHistos->FillTH2("hClusterConstituentEDefault", jet->Pt(), clust->E());
654  fQAHistos->FillTH2("hClusterConstituentENLC", jet->Pt(), clust->GetCluster()->GetNonLinCorrEnergy());
655  fQAHistos->FillTH2("hClusterConstituentEHC", jet->Pt(), clust->GetCluster()->GetHadCorrEnergy());
656  }
657 #endif
658 }
659 
660 std::vector<Triggerinfo> AliAnalysisTaskEmcalJetSubstructureTree::DecodeTriggerString(const std::string &triggerstring) const {
661  std::vector<Triggerinfo> result;
662  std::stringstream triggerparser(triggerstring);
663  std::string currenttrigger;
664  while(std::getline(triggerparser, currenttrigger, ' ')){
665  if(!currenttrigger.length()) continue;
666  std::vector<std::string> tokens;
667  std::stringstream triggerdecoder(currenttrigger);
668  std::string token;
669  while(std::getline(triggerdecoder, token, '-')) tokens.emplace_back(token);
670  result.emplace_back(Triggerinfo({tokens[0], tokens[1], tokens[2], tokens[3]}));
671  }
672  return result;
673 }
674 
675 std::string AliAnalysisTaskEmcalJetSubstructureTree::MatchTrigger(const std::string &triggertoken) const {
676  std::vector<std::string> tokens;
677  std::string result;
678  std::stringstream decoder(fInputEvent->GetFiredTriggerClasses().Data());
679  while(std::getline(decoder, result, ',')) tokens.emplace_back(result);
680  result.clear();
681  for(auto t : tokens) {
682  if(t.find(triggertoken) != std::string::npos) {
683  // take first occurrence - downscale factor should normally be the same
684  result = t;
685  break;
686  }
687  }
688  return result;
689 }
690 
691 bool AliAnalysisTaskEmcalJetSubstructureTree::IsSelectEmcalTriggers(const std::string &triggerstring) const {
692  const std::array<std::string, 8> kEMCALTriggers = {
693  "EJ1", "EJ2", "DJ1", "DJ2", "EG1", "EG2", "DG1", "DG2"
694  };
695  bool isEMCAL = false;
696  for(auto emcaltrg : kEMCALTriggers) {
697  if(triggerstring.find(emcaltrg) != std::string::npos) {
698  isEMCAL = true;
699  break;
700  }
701  }
702  return isEMCAL;
703 }
704 
705 bool AliAnalysisTaskEmcalJetSubstructureTree::IsPartBranch(const std::string &branchname) const{
706  return (branchname.find("Sim") != std::string::npos) || (branchname.find("True") != std::string::npos);
707 }
708 
709 bool AliAnalysisTaskEmcalJetSubstructureTree::IsAcceptanceBranch(const std::string &branchname) const {
710  return (branchname.find("Eta") != std::string::npos) || (branchname.find("Phi") != std::string::npos);
711 }
712 
713 bool AliAnalysisTaskEmcalJetSubstructureTree::IsRhoBranch(const std::string &branchname) const{
714  return (branchname.find("Rho") != std::string::npos);
715 }
716 
717 bool AliAnalysisTaskEmcalJetSubstructureTree::IsMassBranch(const std::string &branchname) const{
718  return (branchname.find("Mass") != std::string::npos); // also disable rho mass branch
719 }
720 
721 bool AliAnalysisTaskEmcalJetSubstructureTree::IsSoftdropBranch(const std::string &branchname) const{
722  return (branchname.find("gMeasured") != std::string::npos) || (branchname.find("gTrue") != std::string::npos) || (branchname.find("NDropped") != std::string::npos);
723 }
724 
725 bool AliAnalysisTaskEmcalJetSubstructureTree::IsNSubjettinessBranch(const std::string &branchname) const{
726  return (branchname.find("Subjettiness") != std::string::npos);
727 }
728 
729 bool AliAnalysisTaskEmcalJetSubstructureTree::IsStructbranch(const std::string &branchname) const{
730  return (branchname.find("Angularity") != std::string::npos) || (branchname.find("PtD") != std::string::npos);
731 }
732 
734  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
735 
736  Bool_t isAOD(kFALSE);
737  AliInputEventHandler *inputhandler = static_cast<AliInputEventHandler *>(mgr->GetInputEventHandler());
738  if(inputhandler) {
739  if(inputhandler->IsA() == AliAODInputHandler::Class()){
740  std::cout << "Analysing AOD events\n";
741  isAOD = kTRUE;
742  } else {
743  std::cout << "Analysing ESD events\n";
744  }
745  }
746 
747  std::stringstream taskname;
748  taskname << "JetSubstructureTreemaker_R" << std::setw(2) << std::setfill('0') << int(jetradius*10) << trigger;
750  mgr->AddTask(treemaker);
751  treemaker->SetMakeGeneralHistograms(kTRUE);
752 
753  // Adding containers
754  if(isMC) {
755  AliParticleContainer *particles = treemaker->AddMCParticleContainer("mcparticles");
756  particles->SetMinPt(0.);
757 
758  AliJetContainer *mcjets = treemaker->AddJetContainer(
759  jettype,
761  recombinationScheme,
762  jetradius,
764  particles, nullptr);
765  mcjets->SetName("mcjets");
766  mcjets->SetJetPtCut(20.);
767  }
768 
769  if(isData) {
770  AliTrackContainer *tracks(nullptr);
771  if((jettype == AliJetContainer::kChargedJet) || (jettype == AliJetContainer::kFullJet)){
773  std::cout << "Track container name: " << tracks->GetName() << std::endl;
774  tracks->SetMinPt(0.15);
775  }
776  AliClusterContainer *clusters(nullptr);
778  std::cout << "Using full or neutral jets ..." << std::endl;
780  std::cout << "Cluster container name: " << clusters->GetName() << std::endl;
781  clusters->SetClusHadCorrEnergyCut(0.3); // 300 MeV E-cut
782  clusters->SetDefaultClusterEnergy(AliVCluster::kHadCorr);
783  } else {
784  std::cout << "Using charged jets ... " << std::endl;
785  }
786 
787  AliJetContainer *datajets = treemaker->AddJetContainer(
788  jettype,
790  recombinationScheme,
791  jetradius,
793  tracks, clusters);
794  datajets->SetName("datajets");
795  datajets->SetJetPtCut(20.);
796 
797  treemaker->SetUseAliAnaUtils(true, true);
798  treemaker->SetVzRange(-10., 10);
799 
800  // configure trigger selection
801  std::string triggerstring(trigger);
802  if(triggerstring.find("INT7") != std::string::npos) {
803  treemaker->SetTriggerBits(AliVEvent::kINT7);
804  } else if(triggerstring.find("EJ1") != std::string::npos) {
805  treemaker->SetTriggerBits(AliVEvent::kEMCEJE);
806  treemaker->SetTriggerString("EJ1");
807  } else if(triggerstring.find("EJ2") != std::string::npos) {
808  treemaker->SetTriggerBits(AliVEvent::kEMCEJE);
809  treemaker->SetTriggerString("EJ2");
810  }
811  }
812 
813  // Connecting containers
814  std::stringstream outputfile, histname, treename;
815  outputfile << mgr->GetCommonFileName() << ":JetSubstructure_R" << std::setw(2) << std::setfill('0') << int(jetradius * 10.) << "_" << trigger;
816  histname << "JetSubstructureHistos_R" << std::setw(2) << std::setfill('0') << int(jetradius * 10.) << "_" << trigger;
817  treename << "JetSubstructureTree_R" << std::setw(2) << std::setfill('0') << int(jetradius * 10.) << "_" << trigger;
818  mgr->ConnectInput(treemaker, 0, mgr->GetCommonInputContainer());
819  mgr->ConnectOutput(treemaker, 1, mgr->CreateContainer(histname.str().data(), AliEmcalList::Class(), AliAnalysisManager::kOutputContainer, outputfile.str().data()));
820  mgr->ConnectOutput(treemaker, 2, mgr->CreateContainer(treename.str().data(), TTree::Class(), AliAnalysisManager::kOutputContainer, mgr->GetCommonFileName()));
821 
822  return treemaker;
823 }
824 
825 std::string Triggerinfo::ExpandClassName() const {
826  std::string result = fTriggerClass + "-" + fBunchCrossing + "-" + fPastFutureProtection + "-" + fTriggerCluster;
827  return result;
828 }
829 
830 bool Triggerinfo::IsTriggerClass(const std::string &triggerclass) const {
831  return fTriggerClass.substr(1) == triggerclass; // remove C from trigger class part
832 }
833 
834 } /* namespace EmcalTriggerJets */
Double_t Area() const
Definition: AliEmcalJet.h:130
bool IsEventSelected(const char *name) const
Checks whether the events is selected for a given trigger type.
double Double_t
Definition: External.C:58
static AliAnalysisTaskEmcalJetSubstructureTree * AddEmcalJetSubstructureTreeMaker(Bool_t isMC, Bool_t isData, Double_t jetradius, AliJetContainer::EJetType_t jettype, AliJetContainer::ERecoScheme_t recombinationScheme, const char *name)
Class creating a linear binning, used in the histogram manager.
Double_t MakePtD(const AliEmcalJet &jet, const AliParticleContainer *const particles, const AliClusterContainer *const clusters) const
AliEmcalJet * ClosestJet() const
Definition: AliEmcalJet.h:327
AliJetContainer * GetJetContainer(Int_t i=0) const
virtual double E() const
Access to constituent energy.
Double_t Eta() const
Definition: AliEmcalJet.h:121
static AliEmcalDownscaleFactorsOCDB * Instance()
Double_t Py() const
Definition: AliEmcalJet.h:107
Double_t Phi() const
Definition: AliEmcalJet.h:117
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
void FillTH2(const char *hname, double x, double y, double weight=1., Option_t *opt="")
Fill a 2D histogram within the container.
Int_t ClusterAt(Int_t idx) const
Definition: AliEmcalJet.h:137
std::vector< Triggerinfo > DecodeTriggerString(const std::string &triggerstring) const
TCanvas * c
Definition: TestFitELoss.C:172
AliJetContainer * AddJetContainer(const char *n, TString defaultCutType, Float_t jetRadius=0.4)
const std::vector< PWG::JETFW::AliEmcalParticleJetConstituent > & GetParticleConstituents() const
Get container with particle (track / MC particle) constituents.
Definition: AliEmcalJet.h:184
Structure for results from the soft drop algorithm.
virtual void UserExecOnce()
Task initializations handled in user tasks.
Double_t E() const
Definition: AliEmcalJet.h:119
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.
Double_t GetDownscaleFactorForTriggerClass(const TString &trigger) const
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:140
Container for particles within the EMCAL framework.
Int_t GetDefaultClusterEnergy() const
Int_t TrackAt(Int_t idx) const
Definition: AliEmcalJet.h:160
UShort_t GetNumberOfTracks() const
Definition: AliEmcalJet.h:139
Double_t Px() const
Definition: AliEmcalJet.h:106
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
TPC fiducial acceptance (each eta edge narrowed by jet R)
Definition: AliEmcalJet.h:68
AliRhoParameter * GetRhoFromEvent(const char *name)
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
UShort_t GetNumberOfClusters() const
Definition: AliEmcalJet.h:138
void SetJetPtCut(Float_t cut)
TPC acceptance.
Definition: AliEmcalJet.h:67
unsigned int UInt_t
Definition: External.C:33
THashList * GetListOfHistograms() const
Get the list of histograms.
Definition: THistManager.h:671
Int_t GetNJets() const
AliNSubjettinessParameters MakeNsubjettinessParameters(const fastjet::PseudoJet &jet, const AliNSubjettinessDefinition &cut) const
TH1 * CreateTH1(const char *name, const char *title, int nbins, double xmin, double xmax, Option_t *opt="")
Create a new TH1 within the container.
Definition for the algorithm obtaining the softdrop parameters.
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
virtual void RunChanged(Int_t newrun)
Process tasks relevant when a file with a different run number is processed.
AliMCParticleContainer * AddMCParticleContainer(const char *n)
Create new container for MC particles and attach it to the task.
void FillTH1(const char *hname, double x, double weight=1., Option_t *opt="")
Fill a 1D histogram within the container.
Double_t MakeAngularity(const AliEmcalJet &jet, const AliParticleContainer *tracks, const AliClusterContainer *clusters) const
Implementation of a jet constituent for constituent clusters.
bool IsTriggerClass(const std::string &triggerclass) const
Double_t Pt() const
Definition: AliEmcalJet.h:109
Bool_t isMC
void DoConstituentQA(const AliEmcalJet *jet, const AliParticleContainer *tracks, const AliClusterContainer *clusters)
Float_t GetJetRadius() const
const std::vector< PWG::JETFW::AliEmcalClusterJetConstituent > & GetClusterConstituents() const
Get container with cluster constituents.
Definition: AliEmcalJet.h:190
virtual double Pt() const
Access to transverse momentum.
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.
Handler for downscale factors for various triggers obtained from the OCDB.
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)
Represent a jet reconstructed using the EMCal jet framework.
Definition: AliEmcalJet.h:51
Container class for histograms.
Definition: THistManager.h:99
Double_t Pz() const
Definition: AliEmcalJet.h:108
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
void LinkOutputBranch(const std::string &branchname, Double_t *datalocation)
Double_t NEF() const
Definition: AliEmcalJet.h:148
void SetDefaultClusterEnergy(Int_t d)
Container structure for EMCAL clusters.
Double_t M() const
Definition: AliEmcalJet.h:120
EMCal fiducial acceptance (each eta, phi edge narrowed by jet R)
Definition: AliEmcalJet.h:70
Container for jet within the EMCAL jet framework.
TList * OpenFile(const char *fname)
Definition: DrawAnaELoss.C:65
void SetClusHadCorrEnergyCut(Double_t cut)
static TString TrackContainerNameFactory(Bool_t isAOD)
Get name of the default track container.
static TString ClusterContainerNameFactory(Bool_t isAOD)
Get name of the default cluster container.