34 #include <fastjet/ClusterSequence.hh> 35 #include <fastjet/contrib/Nsubjettiness.hh> 36 #include <fastjet/contrib/SoftDrop.hh> 40 #include <TLorentzVector.h> 42 #include <TObjString.h> 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" 65 #include "AliTriggerCluster.h" 66 #include "AliTriggerConfiguration.h" 67 #include "AliVCluster.h" 68 #include "AliVParticle.h" 70 #ifdef EXPERIMENTAL_JETCONSTITUENTS 89 fReclusterizer(kCAAlgo),
90 fTriggerSelectionBits(AliVEvent::kAny),
91 fTriggerSelectionString(
""),
92 fNameTriggerDecisionContainer(
"EmcalTriggerDecision"),
93 fUseTriggerSelectionForData(false),
94 fUseDownscaleWeight(false),
95 fUseChargedConstituents(true),
96 fUseNeutralConstituents(true),
98 fFillAcceptance(true),
103 fFillStructGlob(true)
132 DefineOutput(2, TTree::Class());
144 clusterenergybinning(200, 0., 200),
145 timebinning(1000, -500., 500.),
146 m02binning(100, 0., 1.),
147 ncellbinning(101, -0.5, 100.5);
150 fQAHistos->
CreateTH2(
"hClusterConstE",
"EMCAL cluster energy vs jet pt; p_{t, jet} (GeV/c); E_{cl} (GeV)", jetptbinning, clusterenergybinning);
151 fQAHistos->
CreateTH2(
"hClusterConstTime",
"EMCAL cluster time vs. jet pt; p_{t, jet} (GeV/c); t_{cl} (ns)", jetptbinning, timebinning);
152 fQAHistos->
CreateTH2(
"hClusterConstM02",
"EMCAL cluster M02 vs. jet pt; p{t, jet} (GeV/c); M02", jetptbinning, m02binning);
153 fQAHistos->
CreateTH2(
"hClusterConstNcell",
"EMCAL cluster ncell vs. jet pt; p{t, jet} (GeV/c); Number of cells", jetptbinning, ncellbinning);
156 #ifdef EXPERIMENTAL_JETCONSTITUENTS 157 fQAHistos->
CreateTH2(
"hChargedConstituentPt",
"charged constituent pt vs jet pt (via constituent map); p_{t,jet} (GeV/c); p_{t,ch} (GeV/c)", jetptbinning, clusterenergybinning);
158 fQAHistos->
CreateTH2(
"hChargedIndexPt",
"charged constituent pt vs jet pt (via index map); p_{t, jet} (GeV/c); p_{t, ch} (GeV/c)", jetptbinning, clusterenergybinning);
160 fQAHistos->
CreateTH2(
"hClusterConstituentEDefault",
"cluster constituent default energy vs. jet pt (va constituent map); p_{t, jet} (GeV/c); E_{cl} (GeV)", jetptbinning, clusterenergybinning);
161 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);
162 fQAHistos->
CreateTH2(
"hClusterConstituentEHC",
"cluster constituent hadronic-corrected energy vs. jet pt (va constituent map); p_{t, jet} (GeV/c); E_{cl} (GeV)", jetptbinning, clusterenergybinning);
163 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);
164 fQAHistos->
CreateTH2(
"hClusterIndexEHC",
"cluster constituent hadronic-corrected energy vs. jet pt (via index map); p_{t, jet} (GeV/c); E_{cl} (GeV)", jetptbinning, clusterenergybinning);
169 std::string treename = this->GetOutputSlot(2)->GetContainer()->GetName();
171 std::vector<std::string> varnames = {
172 "Radius",
"EventWeight",
"PtJetRec",
"PtJetSim",
"EJetRec",
173 "EJetSim",
"EtaRec",
"EtaSim",
"PhiRec",
"PhiSim",
174 "RhoPtRec",
"RhoPtSim",
"RhoMassRec",
"RhoMassSim",
"AreaRec",
175 "AreaSim",
"NEFRec",
"NEFSim",
"MassRec",
"MassSim",
176 "ZgMeasured",
"ZgTrue",
"RgMeasured",
"RgTrue",
"MgMeasured",
177 "MgTrue",
"PtgMeasured",
"PtgTrue",
"MugMeasured",
"MugTrue",
178 "OneSubjettinessMeasured",
"OneSubjettinessTrue",
"TwoSubjettinessMeasured",
"TwoSubjettinessTrue",
"AngularityMeasured",
179 "AngularityTrue",
"PtDMeasured",
"PtDTrue",
"NCharged",
"NNeutral",
180 "NConstTrue",
"NDroppedMeasured",
"NDroppedTrue" };
182 for(
int ib = 0; ib <
kTNVar; ib++){
199 std::cout <<
"Adding branch " << branchname << std::endl;
221 std::stringstream rhoTagData, rhoTagMC;
222 if(datajets) rhoTagData <<
"R" << std::setw(2) << std::setfill(
'0') <<
static_cast<Int_t>(datajets->
GetJetRadius() * 10.);
223 if(mcjets) rhoTagMC <<
"R" << std::setw(2) << std::setfill(
'0') <<
static_cast<Int_t>(mcjets->
GetJetRadius() * 10.);
225 std::string rhoSparseData =
"RhoSparse_Full_" + rhoTagData.str(), rhoSparseMC =
"RhoSparse_Full_" + rhoTagMC.str(),
226 rhoMassData =
"RhoMassSparse_Full_" + rhoTagData.str(), rhoMassMC =
"RhoMassSparse_Full_" + rhoTagMC.str();
231 AliDebugStream(2) <<
"Found rho parameter for reconstructed pt: " << (rhoPtRec ?
"yes" :
"no") <<
", value: " << (rhoPtRec ? rhoPtRec->GetVal() : 0.) << std::endl;
232 AliDebugStream(2) <<
"Found rho parameter for sim pt: " << (rhoPtSim ?
"yes" :
"no") <<
", value: " << (rhoPtSim ? rhoPtSim->GetVal() : 0.) << std::endl;
233 AliDebugStream(2) <<
"Found rho parameter for reconstructed Mass: " << (rhoMassRec ?
"yes" :
"no") <<
", value: " << (rhoMassRec ? rhoMassRec->GetVal() : 0.) << std::endl;
234 AliDebugStream(2) <<
"Found rho parameter for sim Mass: " << (rhoMassSim ?
"yes" :
"no") <<
", value: " << (rhoMassSim ? rhoMassSim->GetVal() : 0.) << std::endl;
236 AliDebugStream(1) <<
"Inspecting jet radius " << (datajets ? datajets->
GetJetRadius() : mcjets->
GetJetRadius()) << std::endl;
247 AliDebugStream(1) <<
"Found trigger decision object: " << (trgselresult ?
"yes" :
"no") << std::endl;
249 AliErrorStream() <<
"Trigger decision container with name " <<
fNameTriggerDecisionContainer <<
" not found in event - not possible to select EMCAL triggers" << std::endl;
259 AliDebugStream(1) <<
"Found trigger decision object: " << (mctrigger ?
"yes" :
"no") << std::endl;
261 AliErrorStream() <<
"Trigger decision container with name " <<
fNameTriggerDecisionContainer <<
" not found in event - not possible to select EMCAL triggers" << std::endl;
273 auto triggerstring =
MatchTrigger(selectionString.Data());
274 AliDebugStream(2) <<
"Getting downscale correction factor for trigger string " << triggerstring << std::endl;
277 AliDebugStream(1) <<
"Using downscale weight " << weight << std::endl;
284 if(rhoPtRec) rhoparameters[0] = rhoPtRec->GetVal();
285 if(rhoPtSim) rhoparameters[1] = rhoPtSim->GetVal();
286 if(rhoMassRec) rhoparameters[2] = rhoMassRec->GetVal();
287 if(rhoMassSim) rhoparameters[3] = rhoMassSim->GetVal();
299 nsubjettinessSettings.
fBeta = 1.;
300 nsubjettinessSettings.
fRadius = 0.4;
303 AliDebugStream(1) <<
"In data jets branch: found " << datajets->
GetNJets() <<
" jets, " << datajets->
GetNAcceptedJets() <<
" were accepted\n";
304 AliDebugStream(1) <<
"Having MC information: " << (mcjets ? TString::Format(
"yes, with %d jets", mcjets->
GetNJets()) :
"no") << std::endl;
306 AliDebugStream(1) <<
"In MC jets branch: found " << mcjets->
GetNJets() <<
" jets, " << mcjets->
GetNAcceptedJets() <<
" were accepted\n";
308 for(
auto jet : datajets->
accepted()) {
309 double pt = jet->Pt(), pz = jet->Pz(), E = jet->E(), M = TMath::Sqrt(E*E - pt*pt - pz*pz);
310 AliDebugStream(2) <<
"Next jet: pt:" << jet->Pt() <<
", E: " << E <<
", pz: " << pz <<
", M(self): " << M <<
"M(fj)" << jet->M() << std::endl;
315 AliDebugStream(2) <<
"Not found associated jet" << std::endl;
325 FillTree(datajets->
GetJetRadius(), weight, jet, associatedJet, &(structureData.
fSoftDrop), &(structureMC.fSoftDrop), &(structureData.
fNsubjettiness), &(structureMC.fNsubjettiness), angularity, ptd, rhoparameters);
327 AliErrorStream() <<
"Error in reclusterization - skipping jet" << std::endl;
329 AliErrorStream() <<
"Error in substructure observable - skipping jet" << std::endl;
338 FillTree(datajets->
GetJetRadius(), weight, jet,
nullptr, &(structure.
fSoftDrop),
nullptr, &(structure.
fNsubjettiness),
nullptr, angularity, ptd, rhoparameters);
340 AliErrorStream() <<
"Error in reclusterization - skipping jet" << std::endl;
342 AliErrorStream() <<
"Error in substructure observable - skipping jet" << std::endl;
349 AliDebugStream(1) <<
"In MC pure jet branch: found " << mcjets->
GetNJets() <<
" jets, " << mcjets->
GetNAcceptedJets() <<
" were accepted\n";
355 ptd[2] = {0.,
MakePtD(*mcjet, particles,
nullptr)};
356 FillTree(mcjets->
GetJetRadius(), weight,
nullptr, mcjet,
nullptr, &(structure.
fSoftDrop),
nullptr, &(structure.
fNsubjettiness), angularity, ptd, rhoparameters);
358 AliErrorStream() <<
"Error in reclusterization - skipping jet" << std::endl;
360 AliErrorStream() <<
"Error in substructure observable - skipping jet" << std::endl;
370 AliCDBManager * cdb = AliCDBManager::Instance();
371 if(!fMCEvent && cdb){
373 AliCDBEntry *en = cdb->Get(
"GRP/CTP/Config");
374 AliTriggerConfiguration *trg =
static_cast<AliTriggerConfiguration *
>(en->GetObject());
375 std::vector<std::string> clusternames;
376 for(
auto c : trg->GetClusters()) {
377 AliTriggerCluster *clust =
static_cast<AliTriggerCluster *
>(
c);
378 std::string clustname = clust->GetName();
379 auto iscent = clustname.find(
"CENT") != std::string::npos, iscalo = clustname.find(
"CALO") != std::string::npos;
380 if(!(iscalo || iscent))
continue;
381 clusternames.emplace_back(clustname);
385 fLumiMonitor =
new TH1F(
"hLumiMonitor",
"Luminosity monitor", clusternames.size(), 0, clusternames.size());
387 for(
auto c : clusternames) {
388 fLumiMonitor->GetXaxis()->SetBinLabel(currentbin++,
c.data());
459 if(dataSubjettiness) {
486 if(fInputEvent->GetFiredTriggerClasses().Contains(
"INT7")) {
488 auto int7trigger = trigger.IsTriggerClass(
"INT7");
489 auto bunchcrossing = trigger.fBunchCrossing ==
"B";
490 auto nopf = trigger.fPastFutureProtection ==
"NOPF";
491 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;
492 if(int7trigger && bunchcrossing && nopf) {
494 AliDebugStream(5) <<
"Using downscale " << downscale << std::endl;
495 fLumiMonitor->Fill(trigger.fTriggerCluster.data(), 1./downscale);
503 const int kClusterOffset = 30000;
504 std::vector<fastjet::PseudoJet> constituents;
506 AliDebugStream(2) <<
"Make new jet substrucutre for " << (isMC ?
"MC" :
"data") <<
" jet: Number of tracks " << jet.
GetNumberOfTracks() <<
", clusters " << jet.
GetNumberOfClusters() << std::endl;
509 auto track = jet.
TrackAt(itrk, tracks->GetArray());
512 fastjet::PseudoJet constituentTrack(track->Px(), track->Py(), track->Pz(), track->E());
513 constituentTrack.set_user_index(jet.
TrackAt(itrk));
514 constituents.push_back(constituentTrack);
520 auto cluster = jet.
ClusterAt(icl, clusters->GetArray());
521 TLorentzVector clustervec;
523 fastjet::PseudoJet constituentCluster(clustervec.Px(), clustervec.Py(), clustervec.Pz(), cluster->GetHadCorrEnergy());
524 constituentCluster.set_user_index(jet.
ClusterAt(icl) + kClusterOffset);
525 constituents.push_back(constituentCluster);
529 AliDebugStream(3) <<
"Found " << constituents.size() <<
" constituents for jet with pt=" << jet.
Pt() <<
" GeV/c" << std::endl;
530 if(!constituents.size()){
531 AliErrorStream() <<
"Jet has 0 constituents." << std::endl;
535 fastjet::JetDefinition jetdef(fastjet::antikt_algorithm, jetradius*2, static_cast<fastjet::RecombinationScheme>(0), fastjet::BestFJ30 );
536 std::vector<fastjet::PseudoJet> outputjets;
538 fastjet::ClusterSequence jetfinder(constituents, jetdef);
539 outputjets = jetfinder.inclusive_jets(0);
542 }
catch (fastjet::Error &e) {
543 AliErrorStream() <<
" FJ Exception caught: " << e.message() << std::endl;
546 AliErrorStream() <<
"Softdrop exception caught: " << e.
what() << std::endl;
552 fastjet::contrib::SoftDrop softdropAlgorithm(cutparameters.
fBeta, cutparameters.
fZ);
553 softdropAlgorithm.set_verbose_structure(kTRUE);
554 std::unique_ptr<fastjet::contrib::Recluster> reclusterizer(
new fastjet::contrib::Recluster(cutparameters.
fRecluserAlgo, 1,
true));
555 softdropAlgorithm.set_reclustering(kTRUE, reclusterizer.get());
556 AliDebugStream(4) <<
"Jet has " << jet.constituents().size() <<
" constituents" << std::endl;
557 auto groomed = softdropAlgorithm(jet);
559 auto softdropstruct = groomed.structure_of<fastjet::contrib::SoftDrop>();
563 softdropstruct.delta_R(),
566 softdropstruct.dropped_count()});
568 }
catch(std::bad_cast &e) {
575 fastjet::contrib::Nsubjettiness (1,fastjet::contrib::KT_Axes(),fastjet::contrib::NormalizedCutoffMeasure(cut.
fBeta, cut.
fRadius, 1e100)).result(jet),
576 fastjet::contrib::Nsubjettiness (2,fastjet::contrib::KT_Axes(),fastjet::contrib::NormalizedCutoffMeasure(cut.
fBeta, cut.
fRadius, 1e100)).result(jet)
584 TVector3 jetvec(jet.
Px(), jet.
Py(), jet.
Pz());
589 auto track = jet.
TrackAt(itrk, tracks->GetArray());
591 AliErrorStream() <<
"Associated constituent particle / track not found\n";
596 TVector3 trackvec(track->Px(), track->Py(), track->Pz());
598 num += track->Pt() * trackvec.DrEtaPhi(jetvec);
604 auto clust = jet.
ClusterAt(icl, clusters->GetArray());
606 AliErrorStream() <<
"Associated constituent cluster not found\n";
609 TLorentzVector clusterp;
612 num += clusterp.Pt() * clusterp.Vect().DrEtaPhi(jetvec);
613 den += clusterp.Pt();
626 auto trk = jet.
TrackAt(itrk, particles->GetArray());
628 AliErrorStream() <<
"Associated constituent particle / track not found\n";
633 num += trk->Pt() * trk->Pt();
639 auto clust = jet.
ClusterAt(icl, clusters->GetArray());
641 AliErrorStream() <<
"Associated constituent cluster not found\n";
644 TLorentzVector clusterp;
646 num += clusterp.Pt() * clusterp.Pt();
647 den += clusterp.Pt();
650 return TMath::Sqrt(num)/den;
655 auto clust = jet->
ClusterAt(icl, clusters->GetArray());
656 AliDebugStream(3) <<
"cluster time " << clust->GetTOF() << std::endl;
662 #ifdef EXPERIMENTAL_JETCONSTITUENTS 668 #ifdef EXPERIMENTAL_JETCONSTITUENTS 676 AliDebugStream(2) <<
"Jet: Number of particle constituents: " << jet->
GetParticleConstituents().GetEntriesFast() << std::endl;
679 AliDebugStream(3) <<
"Found particle constituent with pt " <<
part->Pt() <<
", from VParticle " <<
part->GetParticle()->Pt() << std::endl;
684 AliDebugStream(2) <<
"Jet: Number of cluster constituents: " << jet->
GetClusterConstituents().GetEntriesFast() << std::endl;
687 AliDebugStream(3) <<
"Found cluster constituent with energy " << clust->
E() <<
" using energy definition " <<
static_cast<int>(clust->GetDefaultEnergyType()) << std::endl;
689 fQAHistos->
FillTH2(
"hClusterConstituentENLC", jet->
Pt(), clust->GetCluster()->GetNonLinCorrEnergy());
690 fQAHistos->
FillTH2(
"hClusterConstituentEHC", jet->
Pt(), clust->GetCluster()->GetHadCorrEnergy());
699 auto part = jet.
TrackAt(ipart, particles->GetArray());
701 if(
part->Charge()) ncharged++;
713 std::vector<Triggerinfo> result;
714 std::stringstream triggerparser(triggerstring);
715 std::string currenttrigger;
716 while(std::getline(triggerparser, currenttrigger,
' ')){
717 if(!currenttrigger.length())
continue;
718 std::vector<std::string> tokens;
719 std::stringstream triggerdecoder(currenttrigger);
721 while(std::getline(triggerdecoder, token,
'-')) tokens.emplace_back(token);
722 result.emplace_back(
Triggerinfo({tokens[0], tokens[1], tokens[2], tokens[3]}));
728 std::vector<std::string> tokens;
730 std::stringstream decoder(fInputEvent->GetFiredTriggerClasses().Data());
731 while(std::getline(decoder, result,
' ')) tokens.emplace_back(result);
733 for(
auto t : tokens) {
734 if(t.find(triggertoken) != std::string::npos) {
744 const std::array<std::string, 8> kEMCALTriggers = {
745 "EJ1",
"EJ2",
"DJ1",
"DJ2",
"EG1",
"EG2",
"DG1",
"DG2" 747 bool isEMCAL =
false;
748 for(
auto emcaltrg : kEMCALTriggers) {
749 if(triggerstring.find(emcaltrg) != std::string::npos) {
758 return (branchname.find(
"Sim") != std::string::npos) || (branchname.find(
"True") != std::string::npos);
762 return (branchname.find(
"Eta") != std::string::npos) || (branchname.find(
"Phi") != std::string::npos);
766 return (branchname.find(
"Rho") != std::string::npos);
770 return (branchname.find(
"Mass") != std::string::npos);
774 return (branchname.find(
"gMeasured") != std::string::npos) || (branchname.find(
"gTrue") != std::string::npos) || (branchname.find(
"NDropped") != std::string::npos);
778 return (branchname.find(
"Subjettiness") != std::string::npos);
782 return (branchname.find(
"Angularity") != std::string::npos) || (branchname.find(
"PtD") != std::string::npos);
789 AliInputEventHandler *inputhandler =
static_cast<AliInputEventHandler *
>(mgr->GetInputEventHandler());
791 if(inputhandler->IsA() == AliAODInputHandler::Class()){
792 std::cout <<
"Analysing AOD events\n";
795 std::cout <<
"Analysing ESD events\n";
799 std::stringstream taskname;
800 taskname <<
"JetSubstructureTreemaker_R" << std::setw(2) << std::setfill(
'0') << int(jetradius*10) << trigger;
802 mgr->AddTask(treemaker);
808 particles->SetMinPt(0.);
817 mcjets->SetName(
"mcjets");
825 std::cout <<
"Track container name: " << tracks->GetName() << std::endl;
826 tracks->SetMinPt(0.15);
830 std::cout <<
"Using full or neutral jets ..." << std::endl;
832 std::cout <<
"Cluster container name: " << clusters->GetName() << std::endl;
836 std::cout <<
"Using charged jets ... " << std::endl;
846 datajets->SetName(
"datajets");
853 std::string triggerstring(trigger);
854 if(triggerstring.find(
"INT7") != std::string::npos) {
856 }
else if(triggerstring.find(
"EJ1") != std::string::npos) {
859 }
else if(triggerstring.find(
"EJ2") != std::string::npos) {
865 std::string jettypestring;
870 default: jettypestring =
"Undef";
874 std::stringstream outputfile, histname, treename;
875 outputfile << mgr->GetCommonFileName() <<
":JetSubstructure_" << jettypestring <<
"_R" << std::setw(2) << std::setfill(
'0') << int(jetradius * 10.) <<
"_" << trigger;
876 histname <<
"JetSubstructureHistos_" << jettypestring <<
"_R" << std::setw(2) << std::setfill(
'0') << int(jetradius * 10.) <<
"_" << trigger;
877 treename <<
"JetSubstructureTree_" << jettypestring <<
"_R" << std::setw(2) << std::setfill(
'0') << int(jetradius * 10.) <<
"_" << trigger;
878 mgr->ConnectInput(treemaker, 0, mgr->GetCommonInputContainer());
879 mgr->ConnectOutput(treemaker, 1, mgr->CreateContainer(histname.str().data(), AliEmcalList::Class(), AliAnalysisManager::kOutputContainer, outputfile.str().data()));
880 mgr->ConnectOutput(treemaker, 2, mgr->CreateContainer(treename.str().data(), TTree::Class(), AliAnalysisManager::kOutputContainer, mgr->GetCommonFileName()));
886 std::string result = fTriggerClass +
"-" + fBunchCrossing +
"-" + fPastFutureProtection +
"-" + fTriggerCluster;
891 return fTriggerClass.substr(1) == triggerclass;
TTree * fJetSubstructureTree
! Tree with jet substructure information
Bool_t fFillStructGlob
Fill other substructure variables.
Bool_t fFillSoftDrop
Fill soft drop parameters.
Double_t fBeta
Cut on Beta.
bool IsMassBranch(const std::string &branchname) const
Bool_t fFillPart
Fill particle level information.
static AliAnalysisTaskEmcalJetSubstructureTree * AddEmcalJetSubstructureTreeMaker(Bool_t isMC, Bool_t isData, Double_t jetradius, AliJetContainer::EJetType_t jettype, AliJetContainer::ERecoScheme_t recombinationScheme, const char *name)
bool IsSoftdropBranch(const std::string &branchname) const
void SetTriggerString(TString triggerstring)
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
AliJetContainer * GetJetContainer(Int_t i=0) const
Double_t fRg
Groomed jet radius.
virtual double E() const
Access to constituent energy.
static AliEmcalDownscaleFactorsOCDB * Instance()
virtual void UserCreateOutputObjects()
AliNSubjettinessDefinition fSubjettinessSettings
TH1 * fLumiMonitor
! Luminosity monitor
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.
void SetRun(int runnumber)
Double_t fMug
Mass Drop parameter.
Int_t ClusterAt(Int_t idx) const
TString fTriggerSelectionString
Trigger selection string.
Tree with jet substructure information.
Bool_t fFillNSub
Fill N-subjettiness.
std::vector< Triggerinfo > DecodeTriggerString(const std::string &triggerstring) const
AliSoftDropParameters fSoftDrop
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.
Structure for results from the soft drop algorithm.
virtual void UserExecOnce()
Task initializations handled in user tasks.
Double_t fZg
Groomed jet z.
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)
Double_t fPtg
Groomed jet pt.
Double_t fMg
Groomed jet mass.
AliClusterContainer * AddClusterContainer(const char *n)
Create new cluster container and attach it to the task.
Double_t fJetTreeData[kTNVar]
Variable storage for the jet tree.
TString part
use mixed event to constrain combinatorial background
fastjet::JetAlgorithm fRecluserAlgo
Reclusterization algorithm.
UShort_t GetNumberOfConstituents() const
Container for particles within the EMCAL framework.
Int_t GetDefaultClusterEnergy() const
bool IsNSubjettinessBranch(const std::string &branchname) const
Int_t TrackAt(Int_t idx) const
UShort_t GetNumberOfTracks() const
AliParticleContainer * GetParticleContainer(Int_t i=0) const
Get particle container attached to this task.
TPC fiducial acceptance (each eta edge narrowed by jet R)
Double_t fTwoSubjettiness
2-subjettiness
AliRhoParameter * GetRhoFromEvent(const char *name)
AliSoftdropDefinition fSoftdropSettings
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.
UShort_t GetNumberOfClusters() const
void SetJetPtCut(Float_t cut)
THashList * GetListOfHistograms() const
Get the list of histograms.
Bool_t fFillMass
Fill jet mass.
Bool_t fFillRho
Fill rho parameters.
Int_t fNDropped
Number of dropped subjets.
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.
Double_t fOneSubjettiness
1-subjettiness
Definition for the algorithm obtaining the softdrop parameters.
AliClusterContainer * GetClusterContainer(Int_t i=0) const
Get cluster container attached to this task.
virtual const char * what() const
virtual ~AliAnalysisTaskEmcalJetSubstructureTree()
Bool_t fUseChargedConstituents
Use charged constituents.
Bool_t fUseDownscaleWeight
Use 1/downscale as weight.
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.
bool IsPartBranch(const std::string &branchname) const
Double_t MakeAngularity(const AliEmcalJet &jet, const AliParticleContainer *tracks, const AliClusterContainer *clusters) const
Implementation of a jet constituent for constituent clusters.
std::string MatchTrigger(const std::string &triggerclass) const
Container for trigger decision object.
bool IsTriggerClass(const std::string &triggerclass) const
THistManager * fQAHistos
! QA histos
bool IsSelectEmcalTriggers(const std::string &triggerstring) const
bool IsRhoBranch(const std::string &branchname) const
Double_t fSDZCut
Soft drop z-cut.
void SetTriggerBits(UInt_t triggersel)
Double_t fSDBetaCut
Soft drop beta cut.
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.
AliEmcalList * fOutput
!output list
bool IsAcceptanceBranch(const std::string &branchname) const
Reclusterizer_t fReclusterizer
Reclusterizer method.
Double_t fVertex[3]
!event vertex
AliTrackContainer * AddTrackContainer(const char *n)
Create new track container and attach it to the task.
Bool_t fFillAcceptance
Fill acceptance (eta-phi)
Handler for downscale factors for various triggers obtained from the OCDB.
AliTrackContainer * GetTrackContainer(Int_t i=0) const
void SetMakeGeneralHistograms(Bool_t g)
std::string ExpandClassName() const
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.
bool IsStructbranch(const std::string &branchname) const
Container class for histograms.
AliSoftDropParameters MakeSoftDropParameters(const fastjet::PseudoJet &jet, const AliSoftdropDefinition &cut) const
void UserCreateOutputObjects()
Main initialization function on the worker.
AliAnalysisTaskEmcalJetSubstructureTree()
const AliJetIterableContainer accepted() const
void LinkOutputBranch(const std::string &branchname, Double_t *datalocation)
void SetDefaultClusterEnergy(Int_t d)
TString fNameTriggerDecisionContainer
Global trigger decision container.
bool SelectJet(const AliEmcalJet &jet, const AliParticleContainer *particles) const
Container structure for EMCAL clusters.
Container for MC-true particles within the EMCAL framework.
EMCal fiducial acceptance (each eta, phi edge narrowed by jet R)
Container for jet within the EMCAL jet framework.
AliNSubjettinessParameters fNsubjettiness
Bool_t fUseNeutralConstituents
Use neutral constituents.
Bool_t fUseTriggerSelectionForData
Use trigger selection on data (require trigger patch in addition to trigger selection string) ...
TList * OpenFile(const char *fname)
void SetClusHadCorrEnergyCut(Double_t cut)
UInt_t fTriggerSelectionBits
Trigger selection bits.
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.