From a5f35d4d0a7c3cf360e9a6220e0118710d5c77ae Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Fri, 10 Oct 2025 09:44:55 +0000 Subject: [PATCH] Please consider the following formatting changes --- PWGJE/Tasks/jetFormationTimeReclustering.cxx | 104 +++++++++---------- 1 file changed, 50 insertions(+), 54 deletions(-) diff --git a/PWGJE/Tasks/jetFormationTimeReclustering.cxx b/PWGJE/Tasks/jetFormationTimeReclustering.cxx index de9b100a171..3e04f8eeb66 100644 --- a/PWGJE/Tasks/jetFormationTimeReclustering.cxx +++ b/PWGJE/Tasks/jetFormationTimeReclustering.cxx @@ -53,20 +53,20 @@ DECLARE_SOA_COLUMN(EventWeight, eventWeight, float); //! } // namespace jetmccollision namespace jetsubstructure -{ //! -DECLARE_SOA_COLUMN(EnergyMother, energyMother, std::vector); //! -DECLARE_SOA_COLUMN(PtLeading, ptLeading, std::vector); //! -DECLARE_SOA_COLUMN(PtSubLeading, ptSubLeading, std::vector); //! -DECLARE_SOA_COLUMN(Theta, theta, std::vector); //! -DECLARE_SOA_COLUMN(PtLeadingConstituent, ptLeadingConstituent, float); //! -DECLARE_SOA_COLUMN(TauForm, tauForm, std::vector); //! - -DECLARE_SOA_COLUMN(Z, z, std::vector); //! -DECLARE_SOA_COLUMN(Ptg, ptg, std::vector); //! -DECLARE_SOA_COLUMN(Thetag, thetag, std::vector); //! -DECLARE_SOA_COLUMN(Zg, zg, std::vector); //! -DECLARE_SOA_COLUMN(TauFormg, tauFormg, std::vector); //! - //! +{ //! +DECLARE_SOA_COLUMN(EnergyMother, energyMother, std::vector); //! +DECLARE_SOA_COLUMN(PtLeading, ptLeading, std::vector); //! +DECLARE_SOA_COLUMN(PtSubLeading, ptSubLeading, std::vector); //! +DECLARE_SOA_COLUMN(Theta, theta, std::vector); //! +DECLARE_SOA_COLUMN(PtLeadingConstituent, ptLeadingConstituent, float); //! +DECLARE_SOA_COLUMN(TauForm, tauForm, std::vector); //! + +DECLARE_SOA_COLUMN(Z, z, std::vector); //! +DECLARE_SOA_COLUMN(Ptg, ptg, std::vector); //! +DECLARE_SOA_COLUMN(Thetag, thetag, std::vector); //! +DECLARE_SOA_COLUMN(Zg, zg, std::vector); //! +DECLARE_SOA_COLUMN(TauFormg, tauFormg, std::vector); //! + //! } // namespace jetsubstructure namespace splitting @@ -116,7 +116,7 @@ DECLARE_SOA_COLUMN(RhoJet, rhoJet, float); //! DECLARE_SOA_COLUMN(PerpConeRhoJet, perpConeRhoJet, float); //! DECLARE_SOA_COLUMN(NConstituentsJet, nConstituentsJet, int); //! } // namespace jetoutput - + #define MCCOLL_TABLE_DEF(_jet_type_, _jet_description_, _name_) \ namespace _name_##mccollisionoutput \ { \ @@ -132,32 +132,32 @@ DECLARE_SOA_COLUMN(NConstituentsJet, nConstituentsJet, int); //! _name_##mccollisionoutput::Dummy##_jet_type_<>); // Defines the jet substrcuture table definition -#define JETSUBSTRUCTURE_TABLE_DEF(_jet_type_, _jet_description_, _name_, _cand_type_, _cand_description_) \ - \ - namespace _name_##collisionoutput \ - { \ - DECLARE_SOA_DYNAMIC_COLUMN(Dummy##_jet_type_, dummy##_jet_type_, []() -> int { return 0; }); \ - } \ - \ - DECLARE_SOA_TABLE(_jet_type_##COs, "AOD", _jet_description_ "CO", jetcollision::PosZ, jetcollision::Centrality, jetcollision::EventSel, jetcollision::EventWeight, _name_##collisionoutput::Dummy##_jet_type_<>); \ - using _jet_type_##CO = _jet_type_##COs::iterator; \ - \ - namespace _name_##jetoutput \ - { \ - DECLARE_SOA_INDEX_COLUMN_CUSTOM(_jet_type_##CO, collision, _jet_description_ "COS"); \ - DECLARE_SOA_INDEX_COLUMN_FULL_CUSTOM(Candidate, candidate, int, _cand_type_, _cand_description_ "S", "_0"); \ - } \ - DECLARE_SOA_TABLE(_jet_type_##Os, "AOD", _jet_description_ "O", _name_##jetoutput::_jet_type_##COId, _name_##jetoutput::CandidateId, jetoutput::JetPt, jetoutput::JetPhi, jetoutput::JetEta, jetoutput::JetY, jetoutput::JetR, jetoutput::JetArea, jetoutput::JetRho, jetoutput::JetPerpConeRho, jetoutput::JetNConstituents); \ - using _jet_type_##O = _jet_type_##Os::iterator; \ - namespace _name_##substructure \ - { \ - DECLARE_SOA_INDEX_COLUMN_CUSTOM(_jet_type_##O, outputTable, _jet_description_ "OS"); \ - DECLARE_SOA_DYNAMIC_COLUMN(Dummy##_jet_type_, dummy##_jet_type_, []() -> int { return 0; }); \ - } \ - DECLARE_SOA_TABLE(_jet_type_##SSs, "AOD", _jet_description_ "SS", jetoutput::PtJet, jetoutput::EtaJet, jetsubstructure::EnergyMother, jetsubstructure::PtLeading, jetsubstructure::PtSubLeading, jetsubstructure::Theta, jetsubstructure::PtLeadingConstituent, jetsubstructure::TauForm, jetsubstructure::Z, jetsubstructure::Ptg, jetsubstructure::Thetag, jetsubstructure::Zg, jetsubstructure::TauFromg, _name_##substructure::Dummy##_jet_type_<>); \ - DECLARE_SOA_TABLE(_jet_type_##SSOs, "AOD", _jet_description_ "SSO", _name_##substructure::_jet_type_##OId, jetoutput::PtJet, jetoutput::EtaJet, jetsubstructure::EnergyMother, jetsubstructure::PtLeading, jetsubstructure::PtSubLeading, jetsubstructure::Theta, jetsubstructure::PtLeadingConstituent, jetsubstructure::TauForm, jetsubstructure::Z, jetsubstructure::Ptg, jetsubstructure::Thetag, jetsubstructure::Zg, jetsubstructure::TauFromg); \ - \ - using _jet_type_##O = _jet_type_##Os::iterator; \ +#define JETSUBSTRUCTURE_TABLE_DEF(_jet_type_, _jet_description_, _name_, _cand_type_, _cand_description_) \ + \ + namespace _name_##collisionoutput \ + { \ + DECLARE_SOA_DYNAMIC_COLUMN(Dummy##_jet_type_, dummy##_jet_type_, []() -> int { return 0; }); \ + } \ + \ + DECLARE_SOA_TABLE(_jet_type_##COs, "AOD", _jet_description_ "CO", jetcollision::PosZ, jetcollision::Centrality, jetcollision::EventSel, jetcollision::EventWeight, _name_##collisionoutput::Dummy##_jet_type_<>); \ + using _jet_type_##CO = _jet_type_##COs::iterator; \ + \ + namespace _name_##jetoutput \ + { \ + DECLARE_SOA_INDEX_COLUMN_CUSTOM(_jet_type_##CO, collision, _jet_description_ "COS"); \ + DECLARE_SOA_INDEX_COLUMN_FULL_CUSTOM(Candidate, candidate, int, _cand_type_, _cand_description_ "S", "_0"); \ + } \ + DECLARE_SOA_TABLE(_jet_type_##Os, "AOD", _jet_description_ "O", _name_##jetoutput::_jet_type_##COId, _name_##jetoutput::CandidateId, jetoutput::JetPt, jetoutput::JetPhi, jetoutput::JetEta, jetoutput::JetY, jetoutput::JetR, jetoutput::JetArea, jetoutput::JetRho, jetoutput::JetPerpConeRho, jetoutput::JetNConstituents); \ + using _jet_type_##O = _jet_type_##Os::iterator; \ + namespace _name_##substructure \ + { \ + DECLARE_SOA_INDEX_COLUMN_CUSTOM(_jet_type_##O, outputTable, _jet_description_ "OS"); \ + DECLARE_SOA_DYNAMIC_COLUMN(Dummy##_jet_type_, dummy##_jet_type_, []() -> int { return 0; }); \ + } \ + DECLARE_SOA_TABLE(_jet_type_##SSs, "AOD", _jet_description_ "SS", jetoutput::PtJet, jetoutput::EtaJet, jetsubstructure::EnergyMother, jetsubstructure::PtLeading, jetsubstructure::PtSubLeading, jetsubstructure::Theta, jetsubstructure::PtLeadingConstituent, jetsubstructure::TauForm, jetsubstructure::Z, jetsubstructure::Ptg, jetsubstructure::Thetag, jetsubstructure::Zg, jetsubstructure::TauFromg, _name_##substructure::Dummy##_jet_type_<>); \ + DECLARE_SOA_TABLE(_jet_type_##SSOs, "AOD", _jet_description_ "SSO", _name_##substructure::_jet_type_##OId, jetoutput::PtJet, jetoutput::EtaJet, jetsubstructure::EnergyMother, jetsubstructure::PtLeading, jetsubstructure::PtSubLeading, jetsubstructure::Theta, jetsubstructure::PtLeadingConstituent, jetsubstructure::TauForm, jetsubstructure::Z, jetsubstructure::Ptg, jetsubstructure::Thetag, jetsubstructure::Zg, jetsubstructure::TauFromg); \ + \ + using _jet_type_##O = _jet_type_##Os::iterator; \ using _jet_type_##SSO = _jet_type_##SSOs::iterator; #define JETSUBSTRUCTURE_TABLES_DEF(_jet_type_, _jet_description_, _jet_type_full_, _jet_full_description_, _track_type_data_, _cand_type_data_, _cand_description_data_, _track_type_ewsdata_, _cand_type_ewsdata_, _cand_description_ewsdata_, _track_type_mcd_, _cand_type_mcd_, _cand_description_mcd_, _particle_type_, _hfparticle_type_, _hfparticle_description_) \ @@ -169,7 +169,7 @@ DECLARE_SOA_COLUMN(NConstituentsJet, nConstituentsJet, int); //! JETSUBSTRUCTURE_TABLE_DEF(_jet_type_##MCPJet, _jet_description_ "MCPJET", _jet_type_##mcpjet, _hfparticle_type_, _hfparticle_description_) \ MCCOLL_TABLE_DEF(_jet_type_##MCPJet, _jet_description_ "MCPJET", _jet_type_##mcpjet) \ JETSPLITTING_TABLE_DEF(_jet_type_full_##MCDetectorLevel, _jet_description_ "D", _jet_full_description_##mcdetectorlevel, _track_type_mcd_, _cand_type_mcd_) \ - JETSPLITTING_TABLE_DEF(_jet_type_full_##MCParticleLevel, _jet_description_ "P", _jet_full_description_##mcparticlelevel, _particle_type_, _hfparticle_type_) \ + JETSPLITTING_TABLE_DEF(_jet_type_full_##MCParticleLevel, _jet_description_ "P", _jet_full_description_##mcparticlelevel, _particle_type_, _hfparticle_type_) JETSUBSTRUCTURE_TABLES_DEF(C, "C", Charged, charged, JTracks, CJetCOs, "CJETCO", JTrackSubs, CEWSJetCOs, "CEWSJETCO", JTracks, CMCDJetCOs, "CMCDJETCO", JMcParticles, CMCPJetCOs, "CMCPJETCO"); @@ -177,7 +177,7 @@ JETSUBSTRUCTURE_TABLES_DEF(C, "C", Charged, charged, JTracks, CJetCOs, "CJETCO", #endif // PWGJE_DATAMODEL_JETFORMATIONTIMERECLUSTERING_H_ -// beginning of the task +// beginning of the task #include "RecoDecay.h" #include "PWGJE/Core/FastJetUtilities.h" @@ -214,9 +214,8 @@ using namespace o2; using namespace o2::framework; using namespace o2::framework::expressions; - struct FormationTimeReclustering { - + Produces jetSubstructureDataTable; Produces jetSubstructureMCDTable; Produces jetSubstructureMCPTable; @@ -226,18 +225,16 @@ struct FormationTimeReclustering { Produces jetSplittingsMCDTable; Produces jetSplittingsMCPTable; Produces jetSplittingsDataSubTable; - Configurable zCut{"zCut", 0.1, "soft drop z cut"}; Configurable beta{"beta", 0.0, "soft drop beta"}; - Configurable genKTp{"genKTp", 0., "select p value for generalized kT alogrithm"};//CA: p=0, tau: p=0.5 + Configurable genKTp{"genKTp", 0., "select p value for generalized kT alogrithm"}; // CA: p=0, tau: p=0.5 Service pdg; std::vector jetConstituents; std::vector jetReclustered; JetFinder jetReclusterer; - std::vector energyMotherVec; std::vector ptLeadingVec; std::vector ptSubLeadingVec; @@ -274,9 +271,8 @@ struct FormationTimeReclustering { registry.add("h2_jet_pt_jet_nsd_eventwiseconstituentsubtracted", ";#it{p}_{T,jet} (GeV/#it{c});#it{n}_{SD}", {HistType::kTH2F, {{200, 0., 200.}, {15, -0.5, 14.5}}}); jetReclusterer.isReclustering = true; - jetReclusterer.fastjetExtraParam = genKTp;// in jetfinder we use p = -1 for anti kt jetfinding. Then we do time recl. with p=0.5, kt p =1, ca p=0 - jetReclusterer.algorithm = fastjet::JetAlgorithm::genkt_algorithm;// gen kt is enum 3 in jetfinder setup - + jetReclusterer.fastjetExtraParam = genKTp; // in jetfinder we use p = -1 for anti kt jetfinding. Then we do time recl. with p=0.5, kt p =1, ca p=0 + jetReclusterer.algorithm = fastjet::JetAlgorithm::genkt_algorithm; // gen kt is enum 3 in jetfinder setup } Preslice TracksPerCollision = aod::jtrack::collisionId; @@ -293,7 +289,7 @@ struct FormationTimeReclustering { jetReclustered.clear(); tauFormVec.clear(); zVec.clear(); - //groomed + // groomed ptgVec.clear(); thetagVec.clear(); zgVec.clear(); @@ -325,7 +321,7 @@ struct FormationTimeReclustering { splittingTable(jet.globalIndex(), tracks, clusters, candidates, parentSubJet2.perp(), parentSubJet2.eta(), parentSubJet2.phi(), 0); auto z = parentSubJet2.perp() / (parentSubJet1.perp() + parentSubJet2.perp()); auto theta = parentSubJet1.delta_R(parentSubJet2); - auto tau = (parentSubJet1.perp() + parentSubJet2.perp())/(parentSubJet1.perp()*parentSubJet2.perp()*theta * theta);// as in run2 aliphysics + auto tau = (parentSubJet1.perp() + parentSubJet2.perp()) / (parentSubJet1.perp() * parentSubJet2.perp() * theta * theta); // as in run2 aliphysics energyMotherVec.push_back(daughterSubJet.e()); ptLeadingVec.push_back(parentSubJet1.pt()); ptSubLeadingVec.push_back(parentSubJet2.pt()); @@ -423,7 +419,7 @@ struct FormationTimeReclustering { fastjetutilities::fillTracks(jetConstituent, jetConstituents, jetConstituent.globalIndex(), static_cast(JetConstituentStatus::track), pdg->Mass(jetConstituent.pdgCode())); } jetReclustering(jet, jetSplittingsMCPTable); - jetSubstructureMCPTable(ptJet, etaJet, energyMotherVec, ptLeadingVec, ptSubLeadingVec, thetaVec, leadingConstituentPt, tauFormVec, zVec, ptgVec, thetagVec, zgVec, taugVec ); + jetSubstructureMCPTable(ptJet, etaJet, energyMotherVec, ptLeadingVec, ptSubLeadingVec, thetaVec, leadingConstituentPt, tauFormVec, zVec, ptgVec, thetagVec, zgVec, taugVec); } PROCESS_SWITCH(FormationTimeReclustering, processChargedJetsMCP, "charged jet substructure on MC particle level", false); };