diff --git a/PWGJE/DataModel/GammaJetAnalysisTree.h b/PWGJE/DataModel/GammaJetAnalysisTree.h index f5119bbf5b0..5e0a5ef0043 100644 --- a/PWGJE/DataModel/GammaJetAnalysisTree.h +++ b/PWGJE/DataModel/GammaJetAnalysisTree.h @@ -143,11 +143,11 @@ using GjChargedJet = GjChargedJets::iterator; // Jet substructure information (vectors stored per jet) namespace gjjetsubstructure { -DECLARE_SOA_INDEX_COLUMN(GjChargedJet, gjchargedjet); //! jet index -DECLARE_SOA_COLUMN(EnergyMother, energyMother, std::vector); //! energy of mother subjet at each splitting -DECLARE_SOA_COLUMN(PtLeading, ptLeading, std::vector); //! pt of leading subjet at each splitting -DECLARE_SOA_COLUMN(PtSubLeading, ptSubLeading, std::vector); //! pt of subleading subjet at each splitting -DECLARE_SOA_COLUMN(Theta, theta, std::vector); //! opening angle theta at each splitting +DECLARE_SOA_INDEX_COLUMN(GjChargedJet, gjchargedjet); //! jet index +DECLARE_SOA_COLUMN(EnergyMother, energyMother, std::vector); //! energy of mother subjet at each splitting +DECLARE_SOA_COLUMN(PtLeading, ptLeading, std::vector); //! pt of leading subjet at each splitting +DECLARE_SOA_COLUMN(PtSubLeading, ptSubLeading, std::vector); //! pt of subleading subjet at each splitting +DECLARE_SOA_COLUMN(Theta, theta, std::vector); //! opening angle theta at each splitting } // namespace gjjetsubstructure DECLARE_SOA_TABLE(GjJetSubstructures, "AOD", "GJJETSUBSTR", gjjetsubstructure::GjChargedJetId, diff --git a/PWGJE/Tasks/gammaJetTreeProducer.cxx b/PWGJE/Tasks/gammaJetTreeProducer.cxx index 268d6f3cf3f..f7da475a740 100644 --- a/PWGJE/Tasks/gammaJetTreeProducer.cxx +++ b/PWGJE/Tasks/gammaJetTreeProducer.cxx @@ -24,13 +24,13 @@ // Framework and other headers after #include "PWGJE/Core/FastJetUtilities.h" #include "PWGJE/Core/JetDerivedDataUtilities.h" +#include "PWGJE/Core/JetFinder.h" +#include "PWGJE/Core/JetFindingUtilities.h" +#include "PWGJE/Core/JetSubstructureUtilities.h" #include "PWGJE/Core/JetUtilities.h" #include "PWGJE/DataModel/EMCALClusters.h" #include "PWGJE/DataModel/GammaJetAnalysisTree.h" #include "PWGJE/DataModel/Jet.h" -#include "PWGJE/Core/JetFinder.h" -#include "PWGJE/Core/JetFindingUtilities.h" -#include "PWGJE/Core/JetSubstructureUtilities.h" #include "Common/Core/RecoDecay.h" #include "Common/Core/TrackSelection.h" @@ -71,14 +71,14 @@ struct GammaJetTreeProducer { // analysis tree // charged jets // photon candidates - Produces chargedJetsTable; // detector level jets - Produces eventsTable; // rec events - Produces gammasTable; // detector level clusters - Produces mcEventsTable; // mc collisions information - Produces mcParticlesTable; // gen level particles (photons and pi0) - Produces gammaMCInfosTable; // detector level clusters MC information - Produces chJetMCInfosTable; // detector level charged jets MC information - Produces mcJetsTable; // gen level jets + Produces chargedJetsTable; // detector level jets + Produces eventsTable; // rec events + Produces gammasTable; // detector level clusters + Produces mcEventsTable; // mc collisions information + Produces mcParticlesTable; // gen level particles (photons and pi0) + Produces gammaMCInfosTable; // detector level clusters MC information + Produces chJetMCInfosTable; // detector level charged jets MC information + Produces mcJetsTable; // gen level jets Produces jetSubstructuresTable; // jet substructure observables HistogramRegistry mHistograms{"GammaJetTreeProducerHisto"}; @@ -932,7 +932,7 @@ struct GammaJetTreeProducer { if (collision.posZ() > mVertexCut) { continue; } - if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits,true,true,rctLabel)) { + if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits, true, true, rctLabel)) { continue; } if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) { @@ -1208,11 +1208,11 @@ struct GammaJetTreeProducer { fastjet::ClusterSequenceArea clusterSeq(jetReclusterer.findJets(jetConstituents, jetReclustered)); jetReclustered = sorted_by_pt(jetReclustered); - + if (jetReclustered.size() == 0) { return; } - + fastjet::PseudoJet daughterSubJet = jetReclustered[0]; fastjet::PseudoJet parentSubJet1; fastjet::PseudoJet parentSubJet2; @@ -1231,7 +1231,7 @@ struct GammaJetTreeProducer { // Continue with harder parent daughterSubJet = parentSubJet1; } - + // Fill one row per jet with all splittings stored as vectors // Pass the jet's global index to associate this substructure entry with the jet jetSubstructuresTable(jetGlobalIndex, energyMotherVec, ptLeadingVec, ptSubLeadingVec, thetaVec); @@ -1248,15 +1248,15 @@ struct GammaJetTreeProducer { int32_t storedColIndex = getStoredColIndex(collision); if (storedColIndex == -1) return; - + // build kd tree for tracks (needed for perpendicular cone rho calculation) buildKdTree(collision, tracks); - + // loop over charged jets for (const auto& jet : chargedJets) { // Fill jet table and get the stored jet's global index int64_t jetGlobalIndex = fillChargedJetTable(storedColIndex, jet, tracks); - + // Fill substructure table if enabled and jet was stored if (calculateJetSubstructure && jetGlobalIndex >= 0) { fillSubstructureTable(jetGlobalIndex, jet, tracks); @@ -1265,9 +1265,6 @@ struct GammaJetTreeProducer { } PROCESS_SWITCH(GammaJetTreeProducer, processChargedJetsData, "Process charged jets", true); - - - Preslice ParticlesPerMCCollisions = aod::jmcparticle::mcCollisionId; /// \brief Processes MC particles and fills MC particle table /// \param collision The collision to process @@ -1362,11 +1359,11 @@ struct GammaJetTreeProducer { if (!collision.has_mcCollision()) { return; } - + // build kd tree for mc particles (needed for perpendicular cone rho calculation) auto particlesPerMcCollision = mcgenparticles.sliceBy(ParticlesPerMCCollisions, collision.mcCollisionId()); buildKdTree(collision, particlesPerMcCollision); - + int localIndex = 0; auto pjetsPerMcCollision = chargedJets.sliceBy(PJetsPerMCCollisions, collision.mcCollisionId()); for (const auto& pjet : pjetsPerMcCollision) { @@ -1394,10 +1391,10 @@ struct GammaJetTreeProducer { int32_t storedColIndex = getStoredColIndex(collision); if (storedColIndex == -1) return; - + // build kd tree for tracks (needed for perpendicular cone rho calculation) buildKdTree(collision, tracks); - + // loop over charged jets for (const auto& jet : chargedJets) { // Fill jet table and get the stored jet's global index