diff --git a/PWGJE/Tasks/neutralMesonInFullJets.cxx b/PWGJE/Tasks/neutralMesonInFullJets.cxx index 436282795f3..9cb1471d734 100644 --- a/PWGJE/Tasks/neutralMesonInFullJets.cxx +++ b/PWGJE/Tasks/neutralMesonInFullJets.cxx @@ -9,13 +9,12 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. // -/// \file neutralMesonsInFullJets.cxx +/// \file neutralMesonInFullJets.cxx /// \brief Task for neutral meson measurement in full jets /// \author Jan Scharf -/// TO DO : Add Neutral Mesons measurement to the current full jet measuremtn - #include "PWGJE/Core/JetDerivedDataUtilities.h" +#include "PWGJE/DataModel/EMCALClusters.h" #include "PWGJE/DataModel/Jet.h" #include "PWGJE/DataModel/JetReducedData.h" @@ -30,20 +29,79 @@ #include #include #include +#include + +#include +#include #include #include #include #include +#include #include +#include +#include #include +#include #include using namespace o2; using namespace o2::framework; using namespace o2::framework::expressions; -struct neutralMesonInFullJets { +struct Photon { + Photon(float eta_tmp, float phi_tmp, float energy_tmp, int clusid = 0, uint8_t sm_tmp = 0) + : eta(eta_tmp), + phi(phi_tmp), + energy(energy_tmp), + theta(2.f * std::atan2(std::exp(-eta), 1)), + px(energy * std::sin(theta) * std::cos(phi)), + py(energy * std::sin(theta) * std::sin(phi)), + pz(energy * std::cos(theta)), + pt(std::sqrt(px * px + py * py)), + photon(px, py, pz, energy), + id(clusid), + sm(sm_tmp) + // onDCal(phi < 6 && phi > 4) + { + } + + float eta; + float phi; + float energy; + float theta; + float px; + float py; + float pz; + float pt; + ROOT::Math::PxPyPzEVector photon; + int id; + uint8_t sm; + // bool onDCal{phi < 6 && phi > 4}; // Checks whether photon is in phi region of the DCal, otherwise: EMCal +}; +struct Meson { + Meson(Photon const& p1, Photon const& p2) : pgamma1(p1), pgamma2(p2), pMeson(p1.photon + p2.photon) + { + } + Photon pgamma1; + Photon pgamma2; + ROOT::Math::PxPyPzEVector pMeson; + + [[nodiscard]] float getMass() const { return pMeson.M(); } + [[nodiscard]] float getPt() const { return pMeson.Pt(); } + [[nodiscard]] float eta() const { return pMeson.Eta(); } + [[nodiscard]] float phi() const { return pMeson.Phi(); } + [[nodiscard]] float getOpeningAngle() const + { + float cosAngle = pgamma1.photon.Vect().Dot(pgamma2.photon.Vect()) / (pgamma1.photon.P() * pgamma2.photon.P()); + float angle = std::acos(std::clamp(cosAngle, -1.0f, 1.0f)); + return angle; + } + [[nodiscard]] ROOT::Math::PxPyPzEVector getMathVector() const { return pMeson; } +}; + +struct NeutralMesonInFullJets { HistogramRegistry registry; // define different enum classes to avoid "magic numbers" // DataType used in eventSelection and saving of histograms, and more @@ -65,17 +123,21 @@ struct neutralMesonInFullJets { Fake, Miss }; - enum class JetAccpetanceCut { + enum class JetAcceptanceCut { FullR, HalfR }; + enum class MesonReconstructionScheme { + JetClusters, // Photon candidates a reconstructed from the cluster signals that are associated to jet + AllClusters // Photon candidates a reconstructed from all cluster signals in the collision and then matched (using Geo matching) to a jet + }; // CONFIGURABLES // General event Configurables Configurable vertexZCut{"vertexZCut", 10.0f, "Accepted z-vertex range"}; Configurable pTHatMax{"pTHatMax", 2.5, "maximum fraction of hard scattering for jet acceptance in MC"}; Configurable pTHatExponent{"pTHatExponent", 4.0, "exponent of the event weight for the calculation of pTHeventSelectionBitsat"}; // 6 for MB MC and 4 for JJ MC - Configurable pTHatMin{"pTHatAbsoluteMin", 0.0, "minimum value of pTHat"}; + Configurable pTHatMin{"pTHatMin", 0.0, "minimum value of pTHat"}; Configurable doMBGapTrigger{"doMBGapTrigger", true, "set to true only when using MB-Gap Trigger JJ MC to reject MB events at the collision and track level"}; Configurable applyRCTSelections{"applyRCTSelections", true, "decide to apply RCT selections"}; Configurable eventSelections{"eventSelections", "selMC", "choose event selection"}; // selMC for MC and sel8 for data @@ -83,7 +145,7 @@ struct neutralMesonInFullJets { // Jet Configurables Configurable jetPtMin{"jetPtMin", 5.0, "minimum jet pT cut"}; - Configurable jetAccpetanceCut{"jetAcceptanceCut", 0, "Jet acceptance cut: 0 = FullR, 1 = HalfR"}; + Configurable jetAcceptanceCut{"jetAcceptanceCut", 0, "Jet acceptance cut: 0 = FullR, 1 = HalfR"}; Configurable jetEtaMax{"jetEtaMax", 0.7, "Min jet eta based on EMCAL acceptance"}; Configurable jetPhiMin{"jetPhiMin", 1.3962634, "Min jet phi based on EMCAL acceptance"}; Configurable jetPhiMax{"jetPhiMax", 3.2836100, "Max jet phi based on EMCAL acceptance"}; @@ -92,6 +154,12 @@ struct neutralMesonInFullJets { // Cluster or EMCAL Configurables + // Meson analysis Configurable + Configurable minOpenAngleCut{"minOpenAngleCut", 0.0202, "apply min opening angle cut"}; + Configurable mesonReconstructionScheme{"mesonReconstructionScheme", 0, "Meson reconstruction scheme: 0 = Jet clusters, 1 = All collision clusters"}; + Configurable maxMesonJetDeltaR{"maxMesonJetDeltaR", 0.4f, "Maximum delta R for meson-jet association"}; + Configurable mCneutralmesonParticleId{"mCneutralmesonParticleId", 111, "PDG code of the neutral meson that is measured, default is pi0 (111)"}; + std::vector eventSelectionBits; void init(InitContext const&) @@ -100,28 +168,28 @@ struct neutralMesonInFullJets { // processDataJets: registry.add("h_data_jet_pt", "data jet pT;#it{p}_{T,jet} (GeV/#it{c});entries", {HistType::kTH1F, {{300, 0., 300.}}}); registry.add("h_data_jet_eta", "data jet #eta; #eta; entries", {HistType::kTH1F, {{100, -0.8, 0.8}}}); - registry.add("h_data_jet_phi", "data jet #phi; #phi; entries", {HistType::kTH1F, {{100, 0, 2 * o2::constants::math::PI}}}); - registry.add("h_data_jet_eta_phi", "data jet #eta #phi; #eta; #phi; entries", {HistType::kTH2F, {{100, -0.8, 0.8}, {100, 0, 2 * o2::constants::math::PI}}}); + registry.add("h_data_jet_phi", "data jet #phi; #phi; entries", {HistType::kTH1F, {{100, 0, o2::constants::math::TwoPI}}}); + registry.add("h_data_jet_eta_phi", "data jet #eta #phi; #eta; #phi; entries", {HistType::kTH2F, {{100, -0.8, 0.8}, {100, 0, o2::constants::math::TwoPI}}}); // processMCPJets registry.add("h_mcp_jet_pt", "MCP jet pT;#it{p}_{T,jet} (GeV/#it{c});entries", {HistType::kTH1F, {{300, 0., 300.}}}); registry.add("h_mcp_jet_eta", "MCP jet #eta; #eta; entries", {HistType::kTH1F, {{100, -0.8, 0.8}}}); - registry.add("h_mcp_jet_phi", "MCP jet #phi; #phi; entries", {HistType::kTH1F, {{100, 0, 2 * o2::constants::math::PI}}}); - registry.add("h_mcp_jet_eta_phi", "MCP jet #eta #phi; #eta; #phi; entries", {HistType::kTH2F, {{100, -0.8, 0.8}, {100, 0, 2 * o2::constants::math::PI}}}); + registry.add("h_mcp_jet_phi", "MCP jet #phi; #phi; entries", {HistType::kTH1F, {{100, 0, o2::constants::math::TwoPI}}}); + registry.add("h_mcp_jet_eta_phi", "MCP jet #eta #phi; #eta; #phi; entries", {HistType::kTH2F, {{100, -0.8, 0.8}, {100, 0, o2::constants::math::TwoPI}}}); // processMCDJets registry.add("h_mcd_jet_pt", "MCD jet pT;#it{p}_{T,jet} (GeV/#it{c});entries", {HistType::kTH1F, {{300, 0., 300.}}}); registry.add("h_mcd_jet_eta", "MCD jet #eta; #eta; entries", {HistType::kTH1F, {{100, -0.8, 0.8}}}); - registry.add("h_mcd_jet_phi", "MCD jet #phi; #phi; entries", {HistType::kTH1F, {{100, 0, 2 * o2::constants::math::PI}}}); - registry.add("h_mcd_jet_eta_phi", "MCD jet #eta #phi; #eta; #phi; entries", {HistType::kTH2F, {{100, -0.8, 0.8}, {100, 0, 2 * o2::constants::math::PI}}}); + registry.add("h_mcd_jet_phi", "MCD jet #phi; #phi; entries", {HistType::kTH1F, {{100, 0, o2::constants::math::TwoPI}}}); + registry.add("h_mcd_jet_eta_phi", "MCD jet #eta #phi; #eta; #phi; entries", {HistType::kTH2F, {{100, -0.8, 0.8}, {100, 0, o2::constants::math::TwoPI}}}); // Matching histograms using Geo "0" matching registry.add("h_jet_response_pt_geomatching", "Matched jets using geometrical matching; #p_{T, MCD}; #p_{T, MCP}; entries", {HistType::kTH2F, {{300, 0., 300.}, {300, 0., 300.}}}); registry.add("h_jet_reponse_pt_fake_geomatching", "Fake jets using geometrical matching; #p_{T, MCP}; entries", {HistType::kTH1F, {{300, 0., 300.}}}); registry.add("h_jet_reponse_pt_miss_geomatching", "Miss jets using geometrical matching; #p_{T, MCD}; entries", {HistType::kTH1F, {{300, 0., 300.}}}); - registry.add("h_jet_response_phi_geomatching", "Matched jets using geometrical matching; #phi_{MCD}; #phi_{MCP}; entries", {HistType::kTH2F, {{100, 0, 2 * o2::constants::math::PI}, {100, 0, 2 * o2::constants::math::PI}}}); - registry.add("h_jet_reponse_phi_fake_geomatching", "Fake jets using geometrical matching; #phi_{MCP}; entries", {HistType::kTH1F, {{100, 0, 2 * o2::constants::math::PI}}}); - registry.add("h_jet_reponse_phi_miss_geomatching", "Miss jets using geometrical matching; #phi_{MCD}; entries", {HistType::kTH1F, {{100, 0, 2 * o2::constants::math::PI}}}); + registry.add("h_jet_response_phi_geomatching", "Matched jets using geometrical matching; #phi_{MCD}; #phi_{MCP}; entries", {HistType::kTH2F, {{100, 0, o2::constants::math::TwoPI}, {100, 0, o2::constants::math::TwoPI}}}); + registry.add("h_jet_reponse_phi_fake_geomatching", "Fake jets using geometrical matching; #phi_{MCP}; entries", {HistType::kTH1F, {{100, 0, o2::constants::math::TwoPI}}}); + registry.add("h_jet_reponse_phi_miss_geomatching", "Miss jets using geometrical matching; #phi_{MCD}; entries", {HistType::kTH1F, {{100, 0, o2::constants::math::TwoPI}}}); registry.add("h_jet_response_eta_geomatching", "Matched jets using geometrical matching; #eta_{MCD}; #eta_{MCP}; entries", {HistType::kTH2F, {{100, -0.8, 0.8}, {100, -0.8, 0.8}}}); registry.add("h_jet_reponse_eta_fake_geomatching", "Fake jets using geometrical matching; #eta_{MCP}; entries", {HistType::kTH1F, {{100, -0.8, 0.8}}}); registry.add("h_jet_reponse_eta_miss_geomatching", "Miss jets using geometrical matching; #eta_{MCD}; entries", {HistType::kTH1F, {{100, -0.8, 0.8}}}); @@ -130,9 +198,9 @@ struct neutralMesonInFullJets { registry.add("h_jet_response_pt_ptmatching", "Matched jets using pT-fraction matching; #p_{T, MCD}; #p_{T, MCP}; entries", {HistType::kTH2F, {{300, 0., 300.}, {300, 0., 300.}}}); registry.add("h_jet_reponse_pt_fake_ptmatching", "Fake jets using pT-fraction matching; #p_{T, MCP}; entries", {HistType::kTH1F, {{300, 0., 300.}}}); registry.add("h_jet_reponse_pt_miss_ptmatching", "Miss jets using pT-fraction matching; #p_{T, MCD}; entries", {HistType::kTH1F, {{300, 0., 300.}}}); - registry.add("h_jet_response_phi_ptmatching", "Matched jets using pT-fraction matching; #phi_{MCD}; #phi_{MCP}; entries", {HistType::kTH2F, {{100, 0, 2 * o2::constants::math::PI}, {100, 0, 2 * o2::constants::math::PI}}}); - registry.add("h_jet_reponse_phi_fake_ptmatching", "Fake jets using pT-fraction matching; #phi_{MCP}; entries", {HistType::kTH1F, {{100, 0, 2 * o2::constants::math::PI}}}); - registry.add("h_jet_reponse_phi_miss_ptmatching", "Miss jets using pT-fraction matching; #phi_{MCD}; entries", {HistType::kTH1F, {{100, 0, 2 * o2::constants::math::PI}}}); + registry.add("h_jet_response_phi_ptmatching", "Matched jets using pT-fraction matching; #phi_{MCD}; #phi_{MCP}; entries", {HistType::kTH2F, {{100, 0, o2::constants::math::TwoPI}, {100, 0, o2::constants::math::TwoPI}}}); + registry.add("h_jet_reponse_phi_fake_ptmatching", "Fake jets using pT-fraction matching; #phi_{MCP}; entries", {HistType::kTH1F, {{100, 0, o2::constants::math::TwoPI}}}); + registry.add("h_jet_reponse_phi_miss_ptmatching", "Miss jets using pT-fraction matching; #phi_{MCD}; entries", {HistType::kTH1F, {{100, 0, o2::constants::math::TwoPI}}}); registry.add("h_jet_response_eta_ptmatching", "Matched jets using pT-fraction matching; #eta_{MCD}; #eta_{MCP}; entries", {HistType::kTH2F, {{100, -0.8, 0.8}, {100, -0.8, 0.8}}}); registry.add("h_jet_reponse_eta_fake_ptmatching", "Fake jets using pT-fraction matching; #eta_{MCP}; entries", {HistType::kTH1F, {{100, -0.8, 0.8}}}); registry.add("h_jet_reponse_eta_miss_ptmatching", "Miss jets using pT-fraction matching; #eta_{MCD}; entries", {HistType::kTH1F, {{100, -0.8, 0.8}}}); @@ -141,9 +209,9 @@ struct neutralMesonInFullJets { registry.add("h_jet_response_pt_geoptmatching", "Matched jets using geometrical AND pT-fraction matching; #p_{T, MCD}; #p_{T, MCP}; entries", {HistType::kTH2F, {{300, 0., 300.}, {300, 0., 300.}}}); registry.add("h_jet_reponse_pt_fake_geoptmatching", "Fake jets using geometrical AND pT-fraction matching; #p_{T, MCP}; entries", {HistType::kTH1F, {{300, 0., 300.}}}); registry.add("h_jet_reponse_pt_miss_geoptmatching", "Miss jets using geometrical AND pT-fraction matching; #p_{T, MCD}; entries", {HistType::kTH1F, {{300, 0., 300.}}}); - registry.add("h_jet_response_phi_geoptmatching", "Matched jets using geometrical AND pT-fraction matching; #phi_{MCD}; #phi_{MCP}; entries", {HistType::kTH2F, {{100, 0, 2 * o2::constants::math::PI}, {100, 0, 2 * o2::constants::math::PI}}}); - registry.add("h_jet_reponse_phi_fake_geoptmatching", "Fake jets using geometrical AND pT-fraction matching; #phi_{MCP}; entries", {HistType::kTH1F, {{100, 0, 2 * o2::constants::math::PI}}}); - registry.add("h_jet_reponse_phi_miss_geoptmatching", "Miss jets using geometrical AND pT-fraction matching; #phi_{MCD}; entries", {HistType::kTH1F, {{100, 0, 2 * o2::constants::math::PI}}}); + registry.add("h_jet_response_phi_geoptmatching", "Matched jets using geometrical AND pT-fraction matching; #phi_{MCD}; #phi_{MCP}; entries", {HistType::kTH2F, {{100, 0, o2::constants::math::TwoPI}, {100, 0, o2::constants::math::TwoPI}}}); + registry.add("h_jet_reponse_phi_fake_geoptmatching", "Fake jets using geometrical AND pT-fraction matching; #phi_{MCP}; entries", {HistType::kTH1F, {{100, 0, o2::constants::math::TwoPI}}}); + registry.add("h_jet_reponse_phi_miss_geoptmatching", "Miss jets using geometrical AND pT-fraction matching; #phi_{MCD}; entries", {HistType::kTH1F, {{100, 0, o2::constants::math::TwoPI}}}); registry.add("h_jet_response_eta_geoptmatching", "Matched jets using geometrical AND pT-fraction matching; #eta_{MCD}; #eta_{MCP}; entries", {HistType::kTH2F, {{100, -0.8, 0.8}, {100, -0.8, 0.8}}}); registry.add("h_jet_reponse_eta_fake_geoptmatching", "Fake jets using geometrical AND pT-fraction matching; #eta_{MCP}; entries", {HistType::kTH1F, {{100, -0.8, 0.8}}}); registry.add("h_jet_reponse_eta_miss_geoptmatching", "Miss jets using geometrical AND pT-fraction matching; #eta_{MCD}; entries", {HistType::kTH1F, {{100, -0.8, 0.8}}}); @@ -154,6 +222,41 @@ struct neutralMesonInFullJets { registry.add("h_data_jet_acceptance_counter", "Data jet acceptance Counter; Data jets; jet status; entries", {HistType::kTH1F, {{2, 0.0, 2.0}}}); registry.add("h_mcd_jet_acceptance_counter", "MCD jet acceptance Counter; MCD jets; jet status; entries", {HistType::kTH1F, {{2, 0.0, 2.0}}}); registry.add("h_mcp_jet_acceptance_counter", "MCP jet acceptance Counter; MCP jets; jet status; entries", {HistType::kTH1F, {{2, 0.0, 2.0}}}); + + // Meson in jet measurements + registry.add("h_mc_meson_mass_JetClusters", "MC Mesons JetClusters; #m_{ClCl, meson}; entries", {HistType::kTH1F, {{300, 0.0, 3.0}}}); + registry.add("h_mc_meson_mass_pt_JetClusters", "MC Mesons JetClusters; #m_{ClCl, meson}; #p_{T, meson}; entries", {HistType::kTH2F, {{300, 0.0, 3.0}, {300, 0.0, 300.}}}); + registry.add("h_mc_meson_mass_pt_jetPt_JetClusters", "MC Mesons JetClusters; #m_{ClCl, meson}; #p_{T, meson}; #p_{T, Jet}; entries", {HistType::kTH3F, {{300, 0.0, 3.0}, {300, 0.0, 300.}, {300, 0.0, 300.}}}); + registry.add("h_mc_meson_z_JetClusters", "MC Mesons JetClusters; #z_{T, meson}; entries", {HistType::kTH1F, {{120, 0.0, 1.0}}}); + registry.add("h_mc_meson_mass_JetClusters_true", "MC true Mesons JetClusters; #m_{ClCl, meson}; entries", {HistType::kTH1F, {{300, 0.0, 3.0}}}); + registry.add("h_mc_meson_mass_pt_JetClusters_true", "MC true Mesons JetClusters; #m_{ClCl, meson}; #p_{T, meson}; entries", {HistType::kTH2F, {{300, 0.0, 3.0}, {300, 0.0, 300.}}}); + registry.add("h_mc_meson_mass_pt_jetPt_JetClusters_true", "MC true Mesons JetClusters; #m_{ClCl, meson}; #p_{T, meson}; #p_{T, Jet}; entries", {HistType::kTH3F, {{300, 0.0, 3.0}, {300, 0.0, 300.}, {300, 0.0, 300.}}}); + registry.add("h_mc_meson_z_JetClusters_true", "MC true Mesons JetClusters; #z_{T, meson}; entries", {HistType::kTH1F, {{120, 0.0, 1.0}}}); + registry.add("h_mc_meson_mass_JetClusters_background", "MC background Mesons JetClusters; #m_{ClCl, meson}; entries", {HistType::kTH1F, {{300, 0.0, 3.0}}}); + registry.add("h_mc_meson_mass_pt_JetClusters_background", "MC background Mesons JetClusters; #m_{ClCl, meson}; #p_{T, meson}; entries", {HistType::kTH2F, {{300, 0.0, 3.0}, {300, 0.0, 300.}}}); + registry.add("h_mc_meson_mass_pt_jetPt_JetClusters_background", "MC background Mesons JetClusters; #m_{ClCl, meson}; #p_{T, meson}; #p_{T, Jet}; entries", {HistType::kTH3F, {{300, 0.0, 3.0}, {300, 0.0, 300.}, {300, 0.0, 300.}}}); + registry.add("h_mc_meson_z_JetClusters_background", "MC background Mesons JetClusters; #z_{T, meson}; entries", {HistType::kTH1F, {{120, 0.0, 1.0}}}); + registry.add("h_mc_meson_mass_AllClusters", "MC Mesons AllClusters; #m_{ClCl, meson}; entries", {HistType::kTH1F, {{300, 0.0, 3.0}}}); + registry.add("h_mc_meson_mass_pt_AllClusters", "MC Mesons AllClusters; #m_{ClCl, meson}; #p_{T, meson}; entries", {HistType::kTH2F, {{300, 0.0, 3.0}, {300, 0.0, 300.}}}); + registry.add("h_mc_meson_mass_pt_jetPt_AllClusters", "MC Mesons AllClusters; #m_{ClCl, meson}; #p_{T, meson}; #p_{T, Jet}; entries", {HistType::kTH3F, {{300, 0.0, 3.0}, {300, 0.0, 300.}, {300, 0.0, 300.}}}); + registry.add("h_mc_meson_z_AllClusters", "MC Mesons AllClusters; #z_{T, meson}; entries", {HistType::kTH1F, {{120, 0.0, 1.0}}}); + registry.add("h_mc_meson_mass_AllClusters_true", "MC true Mesons AllClusters; #m_{ClCl, meson}; entries", {HistType::kTH1F, {{300, 0.0, 3.0}}}); + registry.add("h_mc_meson_mass_pt_AllClusters_true", "MC true Mesons AllClusters; #m_{ClCl, meson}; #p_{T, meson}; entries", {HistType::kTH2F, {{300, 0.0, 3.0}, {300, 0.0, 300.}}}); + registry.add("h_mc_meson_mass_pt_jetPt_AllClusters_true", "MC true Mesons AllClusters; #m_{ClCl, meson}; #p_{T, meson}; #p_{T, Jet}; entries", {HistType::kTH3F, {{300, 0.0, 3.0}, {300, 0.0, 300.}, {300, 0.0, 300.}}}); + registry.add("h_mc_meson_z_AllClusters_true", "MC true Mesons AllClusters; #z_{T, meson}; entries", {HistType::kTH1F, {{120, 0.0, 1.0}}}); + registry.add("h_mc_meson_mass_AllClusters_background", "MC background Mesons AllClusters; #m_{ClCl, meson}; entries", {HistType::kTH1F, {{300, 0.0, 3.0}}}); + registry.add("h_mc_meson_mass_pt_AllClusters_background", "MC background Mesons AllClusters; #m_{ClCl, meson}; #p_{T, meson}; entries", {HistType::kTH2F, {{300, 0.0, 3.0}, {300, 0.0, 300.}}}); + registry.add("h_mc_meson_mass_pt_jetPt_AllClusters_background", "MC background Mesons AllClusters; #m_{ClCl, meson}; #p_{T, meson}; #p_{T, Jet}; entries", {HistType::kTH3F, {{300, 0.0, 3.0}, {300, 0.0, 300.}, {300, 0.0, 300.}}}); + registry.add("h_mc_meson_z_AllClusters_background", "MC background Mesons AllClusters; #z_{T, meson}; entries", {HistType::kTH1F, {{120, 0.0, 1.0}}}); + + registry.add("h_data_meson_mass_JetClusters", "Data Mesons JetClusters; #m_{ClCl, meson}; entries", {HistType::kTH1F, {{300, 0.0, 3.0}}}); + registry.add("h_data_meson_mass_pt_JetClusters", "Data Mesons JetClusters; #m_{ClCl, meson}; #p_{T, meson}; entries", {HistType::kTH2F, {{300, 0.0, 3.0}, {300, 0.0, 300.}}}); + registry.add("h_data_meson_mass_pt_jetPt_JetClusters", "Data Mesons JetClusters; #m_{ClCl, meson}; #p_{T, meson}; #p_{T, Jet}; entries", {HistType::kTH3F, {{300, 0.0, 3.0}, {300, 0.0, 300.}, {300, 0.0, 300.}}}); + registry.add("h_data_meson_z_JetClusters", "Data Mesons JetClusters; #z_{T, meson}; entries", {HistType::kTH1F, {{120, 0.0, 1.0}}}); + registry.add("h_data_meson_mass_AllClusters", "Data Mesons AllClusters; #m_{ClCl, meson}; entries", {HistType::kTH1F, {{300, 0.0, 3.0}}}); + registry.add("h_data_meson_mass_pt_AllClusters", "Data Mesons AllClusters; #m_{ClCl, meson}; #p_{T, meson}; entries", {HistType::kTH2F, {{300, 0.0, 3.0}, {300, 0.0, 300.}}}); + registry.add("h_data_meson_mass_pt_jetPt_AllClusters", "Data Mesons AllClusters; #m_{ClCl, meson}; #p_{T, meson}; #p_{T, Jet}; entries", {HistType::kTH3F, {{300, 0.0, 3.0}, {300, 0.0, 300.}, {300, 0.0, 300.}}}); + registry.add("h_data_meson_z_AllClusters", "Data Mesons AllClusters; #z_{T, meson}; entries", {HistType::kTH1F, {{120, 0.0, 1.0}}}); } // TABLES @@ -163,13 +266,17 @@ struct neutralMesonInFullJets { // Tables with added EMCAL information, especially for acceptance using EMCCollisionsData = o2::soa::Join; // JetCollisions with EMCAL Collision Labels using EMCCollisionsMCD = o2::soa::Join; // where, JetCollisionsMCD = JetCollisions+JMcCollisionLbs + // For constituent information + using JetTableMCDWithConstituents = soa::Join; + using JetTableDataWithConstituents = soa::Join; // Filters Filter jetCuts = aod::jet::pt > jetPtMin; Filter collisionFilter = nabs(aod::jcollision::posZ) < vertexZCut; // Filter is not sufficient and is performed again manually in the event Selection - PresliceOptional JetMCPPerMcCollision = aod::jet::mcCollisionId; // used in MC matching - PresliceUnsortedOptional CollisionsPerMCPCollision = aod::jmccollisionlb::mcCollisionId; // ensure a for a MCP collision a matched MCD collision is accepted + PresliceOptional jetMCPPerMcCollision = aod::jet::mcCollisionId; // used in MC matching + PresliceUnsortedOptional collisionsPerMCPCollision = aod::jmccollisionlb::mcCollisionId; // ensure a for a MCP collision a matched MCD collision is accepted + PresliceOptional clusterPerCollision = aod::emcalcluster::collisionId; // EMCAL cluster per collision // HELPER FUNCTIONS // fill jet pt, eta and phi histograms for DataType Data, MCP and MCD @@ -211,47 +318,37 @@ struct neutralMesonInFullJets { template bool isJetInAcceptance(T const& jet) const { - const double R = static_cast(jet.r()) / 100.0; - double radiusFraction = 1.0; + const float r = static_cast(jet.r()) / 100.0; + float radiusFraction = 1.0; // Different cut types, could be customized furthur and more methods can be added - // radius Fraction sets the range in which jet is accepted, for FullR eta leads to -0.3 to 0.3 - switch (static_cast(jetAccpetanceCut.value)) { - case JetAccpetanceCut::FullR: + // radius Fraction sets the range in which jet is accepted, for Fullreta leads to -0.3 to 0.3 + switch (static_cast(jetAcceptanceCut.value)) { + case JetAcceptanceCut::FullR: radiusFraction = 1.0; break; - case JetAccpetanceCut::HalfR: + case JetAcceptanceCut::HalfR: radiusFraction = 0.5; break; default: - LOGF(fatal, "Invalud jet acceptance cut selection: %d", jetAccpetanceCut.value); + LOGF(fatal, "Invalid jet acceptance cut selection: %d", jetAcceptanceCut.value); } - const double margin = radiusFraction * R; + const float margin = radiusFraction * r; // Eta acceptance - const double jetFidEtaMax = jetEtaMax.value - margin; + const float jetFidEtaMax = jetEtaMax.value - margin; if (std::abs(jet.eta()) > jetFidEtaMax) { return false; } // Phi acceptance - double jetFidPhiMin = jetPhiMin.value + margin; - double jetFidPhiMax = jetPhiMax.value - margin; - - // Normalize phi to [0, 2pi) - auto norm = [&](double a) { - while (a < 0) { - a += o2::constants::math::TwoPI; - } - while (a >= o2::constants::math::TwoPI) { - a -= o2::constants::math::TwoPI; - } - return a; - }; + float jetFidPhiMin = jetPhiMin.value + margin; + float jetFidPhiMax = jetPhiMax.value - margin; // Normalize using the above function - const double phi = norm(jet.phi()); - jetFidPhiMin = norm(jetFidPhiMin); - jetFidPhiMax = norm(jetFidPhiMax); + float phi = jet.phi(); + o2::math_utils::bringTo02Pi(phi); + o2::math_utils::bringTo02Pi(jetFidPhiMin); + o2::math_utils::bringTo02Pi(jetFidPhiMax); // cut on Phi if (jetFidPhiMin <= jetFidPhiMax) { @@ -270,10 +367,10 @@ struct neutralMesonInFullJets { float weight) { // To select MCP collision, it is ensured that it can be matched to accepted MCD collision, otherwise this collision is not usefull for matching and further study - // In other words, the MCP collision needs to be measureable + // In other words, the MCP collision needs to be measurable // Find all matched MCD collision to the specific MCP collision (no direct matching between MCP->MCD, therefore more possible) - auto collisionspermcpjet = detcollisions.sliceBy(CollisionsPerMCPCollision, partcollisions.globalIndex()); + auto collisionspermcpjet = detcollisions.sliceBy(collisionsPerMCPCollision, partcollisions.globalIndex()); if (collisionspermcpjet.size() < 1) // at least one match is required { fillCollisionCounter(7.5f, weight); // collisions that are cut, because they have no matched MCD collisions @@ -358,7 +455,7 @@ struct neutralMesonInFullJets { // retrieve matching mcpjet for a mcdjet based on the selected MatchingScheme, Geo, Pt or Geo and Pt template - void forEachAcceptedMatch(MCDJet const& mcdjet, Callback&& callback) + void forEachAcceptedMatch(MCDJet const& mcdjet, Callback callback) { // Geo matching on the delta R closeness of the jets, Pt matching on the pt fraction of the matched constituents in the jet itself // Pt matching can be directional and needs to be accepted in both directions MCD->MCP and MCP->MCD (Geo is not directional MCD<->MCP) @@ -402,7 +499,7 @@ struct neutralMesonInFullJets { } if (mcdjet.has_matchedJetGeo()) { for (auto const& mcpjet : mcdjet.template matchedJetGeo_as()) { - if (ptMatchedMCPJetIds.find(mcpjet.globalIndex()) == ptMatchedMCPJetIds.end()) { + if (!ptMatchedMCPJetIds.contains(mcpjet.globalIndex())) { continue; } bool hasReversePtMatch = false; @@ -503,7 +600,7 @@ struct neutralMesonInFullJets { } // Retrieve MCP jets associated with this MC collision - auto mcpJetsPerMcCollision = mcpjets.sliceBy(JetMCPPerMcCollision, collision.mcCollisionId()); + auto mcpJetsPerMcCollision = mcpjets.sliceBy(jetMCPPerMcCollision, collision.mcCollisionId()); std::unordered_set matchedMCPJetIds; for (const auto& mcdjet : mcdjets) { @@ -536,19 +633,18 @@ struct neutralMesonInFullJets { if (!isJetInAcceptance(mcpjet)) { continue; } - if (matchedMCPJetIds.find(mcpjet.globalIndex()) == matchedMCPJetIds.end()) { + if (!matchedMCPJetIds.contains(mcpjet.globalIndex())) { fillMatchingResponse(mcpjet, weight); } } } - // PROCESSES // Dummy for testing void processDummy(aod::JetMcCollision const&) { } - PROCESS_SWITCH(neutralMesonInFullJets, processDummy, "dummy process", false) + PROCESS_SWITCH(NeutralMesonInFullJets, processDummy, "dummy process", false) // Measuring Jet pt, eta, phi for jets in data void processDataJets(soa::Filtered::iterator const& collision, @@ -567,7 +663,7 @@ struct neutralMesonInFullJets { fillJetHistograms(jet); } } - PROCESS_SWITCH(neutralMesonInFullJets, processDataJets, "Full jet measurement in data", false) + PROCESS_SWITCH(NeutralMesonInFullJets, processDataJets, "Full jet measurement in data", false) // Measuring Jet pt, eta, phi for jets in MC detector-level void processMCDJets(soa::Filtered::iterator const& collision, @@ -580,6 +676,7 @@ struct neutralMesonInFullJets { collision, jets, weight, pTHat)) { return; } + fillCollisionCounter(10.5f, weight); // accepted collisions for (auto const& jet : jets) { registry.fill(HIST("h_mcd_jet_acceptance_counter"), 0.5); // all jets in accepted collisions @@ -590,7 +687,7 @@ struct neutralMesonInFullJets { fillJetHistograms(jet, weight); } } - PROCESS_SWITCH(neutralMesonInFullJets, processMCDJets, "Full detector-level MC jet measurement", false) + PROCESS_SWITCH(NeutralMesonInFullJets, processMCDJets, "Full detector-level MC jet measurement", false) // Measuring Jet pt, eta, phi for jets in MC particle-level void processMCPJets(aod::JetMcCollisions::iterator const& collision, @@ -605,6 +702,7 @@ struct neutralMesonInFullJets { collision, jets, weight, pTHat, &detectorCollisions)) { return; } + fillCollisionCounter(10.5f, weight); // accepted collisions for (auto const& jet : jets) { registry.fill(HIST("h_mcp_jet_acceptance_counter"), 0.5); // all jets in accepted collisions @@ -615,7 +713,7 @@ struct neutralMesonInFullJets { fillJetHistograms(jet, weight); } } - PROCESS_SWITCH(neutralMesonInFullJets, processMCPJets, "Full particle-level MC jet measurement", false) + PROCESS_SWITCH(NeutralMesonInFullJets, processMCPJets, "Full particle-level MC jet measurement", false) // Matching MC detector and particle-level jets to calculate the response, fake and miss histogram for later use in unfolding void processJetMatching(EMCCollisionsMCD::iterator const& collision, // removed soa::Filtered here, was an issue in the matching @@ -637,14 +735,367 @@ struct neutralMesonInFullJets { collision, mcdjets, mcpjets); break; default: - LOGF(fatal, "Invalud matching scheme: %d", matchingScheme.value); + LOGF(fatal, "Invalid matching scheme: %d", matchingScheme.value); + } + } + PROCESS_SWITCH(NeutralMesonInFullJets, processJetMatching, "Jet matching for MC-based unfolding", false) + + // Meson measurement + /// Meson measurement helper functions + std::vector reconstructMesons(std::vector const& photons) + { + // Pair all combinations of photon candidates to meson candidates + std::vector mesons; + for (size_t i = 0; i < photons.size(); ++i) { + // protection against zero momentum in caclulations + auto const& p1 = photons[i].photon; + if (p1.P() <= 0.f) { + continue; + } + for (size_t j = i + 1; j < photons.size(); ++j) { + auto const& p2 = photons[j].photon; + if (p2.P() <= 0.f) { + continue; + } + Meson meson(photons[i], photons[j]); + // TO DO: Apply opening angle and other meson cuts + if (meson.pMeson.P() <= 0.f) { + continue; + } + if (meson.getOpeningAngle() >= minOpenAngleCut) { + continue; + } + mesons.push_back(meson); + } + } + return mesons; + } + + template + float getMesonJetDeltaR(Meson const& meson, Jet const& jet) + { + // Calculate geometrical distance between jet and meson canidate, for geometric matching + const float deltaEta = meson.eta() - jet.eta(); + const float deltaPhi = std::atan2(std::sin(meson.phi() - jet.phi()), std::cos(meson.phi() - jet.phi())); + return std::sqrt(deltaEta * deltaEta + deltaPhi * deltaPhi); + } + + template + auto findClosestJet(Meson const& meson, JetTable const& jets) + { + // Match closes jet to a meson canidate, with a threshold of a maxMesonJetDeltaR + using JetType = std::remove_reference_t; + float minDeltaR = maxMesonJetDeltaR; + JetType const* closestJet = nullptr; + for (const auto& jet : jets) { + if (!isJetInAcceptance(jet)) { + continue; + } + const float deltaR = getMesonJetDeltaR(meson, jet); + if (deltaR < minDeltaR) { + minDeltaR = deltaR; + closestJet = &jet; + } + } + return closestJet; + } + + template + void findMesonAncestors(McParticle const& particle, + aod::McParticles const& mcParticles, + std::vector& MesonAncestors, + std::unordered_set& visited) + { + // A recursive tree search to find all chosen neutral mesons in the ancestry of a photon canidate, full ancestry because of pi0->yy->ye-e+ (can also be identified by the clusters) + for (const auto& motherId : particle.mothersIds()) { + if (motherId < 0 || !visited.insert(motherId).second) { + continue; + } + + auto mother = mcParticles.iteratorAt(motherId); + + if (std::abs(mother.pdgCode()) == mCneutralmesonParticleId) { + MesonAncestors.push_back(motherId); + } + findMesonAncestors(mother, mcParticles, MesonAncestors, visited); + } + } + + template + Photon reconstructPhoton(Cluster const& cluster) + { + static_assert(T == DataType::Data); + return Photon(cluster.eta(), cluster.phi(), cluster.energy(), cluster.globalIndex()); + } + + template + Photon reconstructPhoton( + Cluster const& cluster, + aod::EMCALMCClusters const& mcClusterLabels, + aod::McParticles const& mcParticles, + std::unordered_map>& photonAncestors) + { + static_assert(T == DataType::MCD); + + Photon photon( + cluster.eta(), + cluster.phi(), + cluster.energy(), + cluster.globalIndex()); + auto mcCluster = mcClusterLabels.iteratorAt(cluster.globalIndex()); + auto const& particleIds = mcCluster.mcParticleIds(); + auto const& amplitudes = mcCluster.amplitudeA(); + if (particleIds.empty() || amplitudes.empty() || particleIds.size() != amplitudes.size()) { + return photon; + } + auto leadingIt = std::max_element(amplitudes.begin(), amplitudes.end()); + auto leadingIndex = std::distance(amplitudes.begin(), leadingIt); + const int leadingParticleId = particleIds[leadingIndex]; + if (leadingParticleId < 0) { + return photon; + } + auto particle = mcParticles.iteratorAt(leadingParticleId); + std::vector ancestors; + std::unordered_set visited; + visited.insert(leadingParticleId); + findMesonAncestors(particle, mcParticles, ancestors, visited); + photonAncestors.emplace(photon.id, std::move(ancestors)); + return photon; + } + + template + std::vector reconstructPhotonsFromAllClusters( + ClusterTable const& clusters, + Args&... args) + { + // Reconstruct all cluster singals in the collision into photon candidates + std::vector photons; + + for (const auto& cluster : clusters) { + // TO DO: cluster selection + photons.emplace_back(reconstructPhoton(cluster, args...)); + } + return photons; + } + + template + std::vector reconstructPhotonsFromJetClusters( + Jet const& jet, + Args&... args) + { + // Reconstruct all cluster singals that are part of a jet into photon candidates + std::vector photons; + for (const auto& cluster : jet.template clusters_as()) { + // TO DO: cluster selection + photons.emplace_back(reconstructPhoton(cluster, args...)); + } + return photons; + } + + template + bool isTrueMeson( + Photon const& photon1, + Photon const& photon2, + std::unordered_map> const& photonAncestors) + { + // test if the photon candidates of a meson candidates actually have a matching chosen meson in their ancestry + auto it1 = photonAncestors.find(photon1.id); + auto it2 = photonAncestors.find(photon2.id); + if (it1 == photonAncestors.end() || it2 == photonAncestors.end()) { + return false; + } + for (const auto& MesonId1 : it1->second) { + for (const auto& MesonId2 : it2->second) { + if (MesonId1 == MesonId2) { + return true; + } + } + } + return false; + } + + template + float momentumFraction(Meson const& meson, Jet const& jet) + { + ROOT::Math::XYZVector pMeson(meson.pMeson.Px(), meson.pMeson.Py(), meson.pMeson.Pz()); + ROOT::Math::XYZVector pJet(jet.px(), jet.py(), jet.pz()); + float jetP2 = pJet.Mag2(); + if (jetP2 <= 0.f) { + LOGF(warning, "Jet with a negative or 0 transverse mometum was measured"); + } + return pMeson.Dot(pJet) / jetP2; + } + + template + void fillMesonsInJet(Meson const& meson, + Jet const& jet, + std::unordered_map> const& photonAncestors, + float weight) + { + static_assert(T == DataType::MCD); + + double z = momentumFraction(meson, jet); + bool isMeson = isTrueMeson(meson.pgamma1, meson.pgamma2, photonAncestors); + if constexpr (Scheme == MesonReconstructionScheme::JetClusters) { + registry.fill(HIST("h_mc_meson_mass_JetClusters"), meson.getMass(), weight); + registry.fill(HIST("h_mc_meson_mass_pt_JetClusters"), meson.getMass(), meson.getPt(), weight); + registry.fill(HIST("h_mc_meson_mass_pt_jetPt_JetClusters"), meson.getMass(), meson.getPt(), jet.pt(), weight); + registry.fill(HIST("h_mc_meson_z_JetClusters"), z, weight); + // Add hists + if (isMeson) { + registry.fill(HIST("h_mc_meson_mass_JetClusters_true"), meson.getMass(), weight); + registry.fill(HIST("h_mc_meson_mass_pt_JetClusters_true"), meson.getMass(), meson.getPt(), weight); + registry.fill(HIST("h_mc_meson_mass_pt_jetPt_JetClusters_true"), meson.getMass(), meson.getPt(), jet.pt(), weight); + registry.fill(HIST("h_mc_meson_z_JetClusters_true"), z, weight); + } else { + registry.fill(HIST("h_mc_meson_mass_JetClusters_background"), meson.getMass(), weight); + registry.fill(HIST("h_mc_meson_mass_pt_JetClusters_background"), meson.getMass(), meson.getPt(), weight); + registry.fill(HIST("h_mc_meson_mass_pt_jetPt_JetClusters_background"), meson.getMass(), meson.getPt(), jet.pt(), weight); + registry.fill(HIST("h_mc_meson_z_JetClusters_background"), z, weight); + } + } else if constexpr (Scheme == MesonReconstructionScheme::AllClusters) { + registry.fill(HIST("h_mc_meson_mass_AllClusters"), meson.getMass(), weight); + registry.fill(HIST("h_mc_meson_mass_pt_AllClusters"), meson.getMass(), meson.getPt(), weight); + registry.fill(HIST("h_mc_meson_mass_pt_jetPt_AllClusters"), meson.getMass(), meson.getPt(), jet.pt(), weight); + registry.fill(HIST("h_mc_meson_z_AllClusters"), z, weight); + // Add hists + if (isMeson) { + registry.fill(HIST("h_mc_meson_mass_AllClusters_true"), meson.getMass(), weight); + registry.fill(HIST("h_mc_meson_mass_pt_AllClusters_true"), meson.getMass(), meson.getPt(), weight); + registry.fill(HIST("h_mc_meson_mass_pt_jetPt_AllClusters_true"), meson.getMass(), meson.getPt(), jet.pt(), weight); + registry.fill(HIST("h_mc_meson_z_AllClusters_true"), z, weight); + } else { + registry.fill(HIST("h_mc_meson_mass_AllClusters_background"), meson.getMass(), weight); + registry.fill(HIST("h_mc_meson_mass_pt_AllClusters_background"), meson.getMass(), meson.getPt(), weight); + registry.fill(HIST("h_mc_meson_mass_pt_jetPt_AllClusters_background"), meson.getMass(), meson.getPt(), jet.pt(), weight); + registry.fill(HIST("h_mc_meson_z_AllClusters_background"), z, weight); + } + } else { + LOGF(fatal, "Invalid meson reconstruction scheme: %d", mesonReconstructionScheme.value); + } + } + + template + void fillMesonsInJet(Meson const& meson, + Jet const& jet) + { + static_assert(T == DataType::Data); + + double z = momentumFraction(meson, jet); + if constexpr (Scheme == MesonReconstructionScheme::JetClusters) { + registry.fill(HIST("h_data_meson_mass_JetClusters"), meson.getMass()); + registry.fill(HIST("h_data_meson_mass_pt_JetClusters"), meson.getMass(), meson.getPt()); + registry.fill(HIST("h_data_meson_mass_pt_jetPt_JetClusters"), meson.getMass(), meson.getPt(), jet.pt()); + registry.fill(HIST("h_data_meson_z_JetClusters"), z); + + } else if constexpr (Scheme == MesonReconstructionScheme::AllClusters) { + registry.fill(HIST("h_data_meson_mass_AllClusters"), meson.getMass()); + registry.fill(HIST("h_data_meson_mass_pt_AllClusters"), meson.getMass(), meson.getPt()); + registry.fill(HIST("h_data_meson_mass_pt_jetPt_AllClusters"), meson.getMass(), meson.getPt(), jet.pt()); + registry.fill(HIST("h_data_meson_z_AllClusters"), z); + + } else { + LOGF(fatal, "Invalid meson reconstruction scheme: %d", mesonReconstructionScheme.value); + } + } + + void processDataMesonsInFullJets( + soa::Filtered::iterator const& collision, + soa::Filtered const& jets, + aod::EMCALClusters const& clusters) + { + if (!eventSelection(collision, jets)) { + return; + } + + switch (static_cast(mesonReconstructionScheme.value)) { + case MesonReconstructionScheme::JetClusters: { + for (const auto& jet : jets) { + auto photons = reconstructPhotonsFromJetClusters(jet); + auto mesons = reconstructMesons(photons); + for (const auto& meson : mesons) { + fillMesonsInJet(meson, jet); + } + } + break; + } + case MesonReconstructionScheme::AllClusters: { + auto clustersPerCollision = clusters.sliceBy(clusterPerCollision, collision.globalIndex()); + auto photons = reconstructPhotonsFromAllClusters(clustersPerCollision); + auto mesons = reconstructMesons(photons); + for (const auto& meson : mesons) { + auto associatedJet = findClosestJet(meson, jets); + if (associatedJet == nullptr) { + continue; + } + fillMesonsInJet(meson, *associatedJet); + } + break; + } + default: + LOGF(fatal, "Invalid meson reconstruction scheme: %d", mesonReconstructionScheme.value); + } + } + PROCESS_SWITCH(NeutralMesonInFullJets, processDataMesonsInFullJets, "Measuring mesons in full jets in data", false) + + void processMCMesonsInFullJets( + EMCCollisionsMCD::iterator const& collision, + soa::Filtered const& jets, + aod::EMCALClusters const& clusters, + aod::JetClustersMCD const&, + aod::EMCALMCClusters const& mcClusterLabels, + aod::McParticles const& mcParticles) + { + const float weight = collision.weight(); + const float pTHat = 10. / (std::pow(weight, 1.0 / pTHatExponent)); + + if (!eventSelection( + collision, jets, weight, pTHat)) { + return; + } + + std::unordered_map> photonAncestors; + + switch (static_cast(mesonReconstructionScheme.value)) { + case MesonReconstructionScheme::JetClusters: { + + for (const auto& jet : jets) { + if (!isJetInAcceptance(jet)) { + continue; + } + auto photons = reconstructPhotonsFromJetClusters(jet, mcClusterLabels, mcParticles, photonAncestors); + auto mesons = reconstructMesons(photons); + for (const auto& meson : mesons) { + fillMesonsInJet(meson, jet, photonAncestors, weight); + } + } + break; + } + + case MesonReconstructionScheme::AllClusters: { + + auto clustersPerCollision = clusters.sliceBy(clusterPerCollision, collision.globalIndex()); + auto photons = reconstructPhotonsFromAllClusters(clustersPerCollision, mcClusterLabels, mcParticles, photonAncestors); + auto mesons = reconstructMesons(photons); + for (const auto& meson : mesons) { + auto associatedJet = findClosestJet(meson, jets); + if (associatedJet == nullptr) { + continue; + } + fillMesonsInJet(meson, *associatedJet, photonAncestors, weight); + } + break; + } + + default: + LOGF(fatal, "Invalid meson reconstruction scheme: %d", mesonReconstructionScheme.value); } } - PROCESS_SWITCH(neutralMesonInFullJets, processJetMatching, "Jet matching for MC-based unfolding", false) + PROCESS_SWITCH(NeutralMesonInFullJets, processMCMesonsInFullJets, "Measuring mesons in full jets in MCD", false) }; -WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +WorkflowSpec defineDataProcessing(ConfigContext const& context) { return WorkflowSpec{ - adaptAnalysisTask(cfgc)}; + adaptAnalysisTask(context)}; }