From 948afa0055f466dcd4c934b9a15924f05d3c6b1a Mon Sep 17 00:00:00 2001 From: Archita-Dash Date: Mon, 10 Nov 2025 17:05:17 +0100 Subject: [PATCH 1/3] added kTVXinEMC to the BCs + fixed the process function for the Trigger Data --- PWGJE/Tasks/fullJetSpectra.cxx | 165 ++++++++++++++++++--------------- 1 file changed, 91 insertions(+), 74 deletions(-) diff --git a/PWGJE/Tasks/fullJetSpectra.cxx b/PWGJE/Tasks/fullJetSpectra.cxx index 6500cea42eb..0c6f13ce34b 100644 --- a/PWGJE/Tasks/fullJetSpectra.cxx +++ b/PWGJE/Tasks/fullJetSpectra.cxx @@ -182,14 +182,14 @@ struct FullJetSpectra { if (doprocessBCs) { auto hBCCounter = registry.get(HIST("hBCCounter")); hBCCounter->GetXaxis()->SetBinLabel(1, "AllBC"); - hBCCounter->GetXaxis()->SetBinLabel(2, "BC+TVX"); - hBCCounter->GetXaxis()->SetBinLabel(3, "BC+TVX+NoTFB"); - hBCCounter->GetXaxis()->SetBinLabel(4, "BC+TVX+NoTFB+NoITSROFB"); - hBCCounter->GetXaxis()->SetBinLabel(5, "CollinBC"); - hBCCounter->GetXaxis()->SetBinLabel(6, "CollinBC+Sel8"); - hBCCounter->GetXaxis()->SetBinLabel(7, "CollinBC+Sel8Full"); - hBCCounter->GetXaxis()->SetBinLabel(8, "CollinBC+Sel8Full+GoodZvtx"); - hBCCounter->GetXaxis()->SetBinLabel(9, "CollinBC+Sel8Full+VtxZ+GoodZvtx"); + hBCCounter->GetXaxis()->SetBinLabel(2, "BC+kTVXinEMC"); + hBCCounter->GetXaxis()->SetBinLabel(3, "BC+kTVXinEMC+NoTFB"); + hBCCounter->GetXaxis()->SetBinLabel(4, "BC+kTVXinEMC+NoTFB+NoITSROFB"); + hBCCounter->GetXaxis()->SetBinLabel(5, "kTVXinEMC+CollinBC"); + hBCCounter->GetXaxis()->SetBinLabel(6, "kTVXinEMC+CollinBC+Sel8"); + hBCCounter->GetXaxis()->SetBinLabel(7, "kTVXinEMC+CollinBC+Sel8Full"); + hBCCounter->GetXaxis()->SetBinLabel(8, "kTVXinEMC+CollinBC+Sel8Full+GoodZvtx"); + hBCCounter->GetXaxis()->SetBinLabel(9, "kTVXinEMC+CollinBC+Sel8Full+VtxZ+GoodZvtx"); } if (doprocessDataTracks || doprocessMCTracks) { @@ -233,17 +233,22 @@ struct FullJetSpectra { hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(1, "allDetTrigColl"); hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(2, "DetTrigCollAfterZorroSelection"); hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(3, "DetTrigCollWithVertexZ"); - hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(4, "EventsNotSatisfyingEventSelection"); - hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(5, "EMCreadoutDetTrigEventsWithkTVXinEMC"); - hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(6, "OnlyHighPt+NoLowPt+NoMB"); - hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(7, "OnlyLowPt+NoMB"); - hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(8, "OnlyMB"); - hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(9, "FullJetHighPt+FullJetLowPt"); - // hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(9, "EMCAcceptedDetTrigCollWithLow+HighFullJetTriggers"); - hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(10, "FullJetHighPt+MB"); - hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(11, "FullJetLowPt+MB"); - hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(12, "AllRejectedTrigOverlaps"); + hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(4, "EventsNotSatisfyingEvent+TriggerSelection"); + hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(5, "OnlyFullJetHighPt+NoFullJetLowPt"); + hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(6, "OnlyFullJetLowPt"); + // hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(7, "OnlyLowPt+NoMB"); + // hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(8, "OnlyMB"); + hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(7, "FullJetHighPt+FullJetLowPt"); + hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(8, "FullJetHighPt+MB"); + hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(9, "FullJetLowPt+MB"); + hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(10, "AllRejectedTrigOverlaps"); + hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(11, "EMCAcceptedDetTrigCollAfterTrigOverlapChecks"); + hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(12, "AllRejectedDetTrigEventsAfterEMCEventSelection"); hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(13, "EMCAcceptedDetTrigColl"); + hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(14, "EMCAcceptedDetTrigCollWithLowChargedJetTriggers"); + hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(15, "EMCAcceptedDetTrigCollWithHighChargedJetTriggers"); + hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(16, "EMCAcceptedDetTrigCollWithLow+HighFullJetTriggers"); + } if (doprocessJetsMCP || doprocessJetsMCPWeighted) { @@ -419,7 +424,7 @@ struct FullJetSpectra { } // Jet QA histograms - if (doprocessJetsData || doprocessJetsMCD || doprocessJetsMCDWeighted) { + if (doprocessJetsData || doprocessJetsMCD || doprocessJetsMCDWeighted || doprocessJetsTriggeredData) { registry.add("hDetcollisionCounter", "event status;event status;entries", {HistType::kTH1F, {{10, 0.0, 10.}}}, doSumw2); @@ -471,7 +476,8 @@ struct FullJetSpectra { registry.add("h2_full_jet_nef_corr_allTracks70", "Jet pT vs NEF (corr, alltracks70); p_{T,jet}; NEF", {HistType::kTH2F, {{350, 0., 350.}, {100, 0., 1.}}}, doSumw2); } if (doprocessJetsTriggeredData) { - registry.add("hDetTrigcollisionCounter", "event status;;entries", {HistType::kTH1F, {{14, 0.0, 14.}}}, doSumw2); + registry.add("hDetTrigcollisionCounter", "event status;;entries", {HistType::kTH1F, {{17, 0.0, 17.}}}, doSumw2); + // registry.add("h2_full_jet_nef_rejected", "#it{p}_{T,jet} vs nef at Det Level for rejected events; #it{p}_{T,jet} (GeV/#it{c});nef", {HistType::kTH2F, {{350, 0., 350.}, {105, 0., 1.05}}}, doSumw2); } if (doprocessJetsMCP || doprocessJetsMCPWeighted) { registry.add("hPartcollisionCounter", "event status;event status;entries", {HistType::kTH1F, {{10, 0.0, 10.0}}}, doSumw2); @@ -1123,10 +1129,10 @@ struct FullJetSpectra { } PROCESS_SWITCH(FullJetSpectra, processJetsData, "Full Jets Data", false); - void processJetsTriggeredData(soa::Filtered::iterator const& collision, FullJetTableDataJoined const& /*jets*/, + void processJetsTriggeredData(soa::Filtered::iterator const& collision, FullJetTableDataJoined const& jets, aod::JetTracks const&, ClusterWithCorrections const&, aod::JBCs const&) { - // bool eventAccepted = false; + bool eventAccepted = false; registry.fill(HIST("hDetTrigcollisionCounter"), 0.5); // allDetTrigColl @@ -1149,11 +1155,11 @@ struct FullJetSpectra { registry.fill(HIST("hDetTrigcollisionCounter"), 3.5); // EventsNotSatisfyingEvent+TriggerSelection return; } - //- should this kTVX HW trigger be still in place?? - if (!collision.isAmbiguous() && jetderiveddatautilities::eventEMCAL(collision) && collision.alias_bit(kTVXinEMC)) { + //- should this kTVX HW trigger be still in place? - Removing it for now; probably not needed if we are only interested in SW triggers + /*if (!collision.isAmbiguous() && jetderiveddatautilities::eventEMCAL(collision) && collision.alias_bit(kTVXinEMC)) { // eventAccepted = true; registry.fill(HIST("hDetTrigcollisionCounter"), 4.5); // EMCreadoutDetTrigEventsWithkTVXinEMC - } + }*/ // split event selections based on selected triggers - // make sure there're no trigger overlaps: when analysing JetFullHighPt-> check no JetFullLowPt and kTVXinEMC are fired // when analysing JetFullLowPt, check kTVXinEMC isn't fired! @@ -1171,75 +1177,86 @@ struct FullJetSpectra { // Case 1: hasFullJetHighPt && !hasFullJetLowPt && !hasMB : Pure FullJetHighPt // i.e. for every JetFullHighPt trig that was fired, check the low triggers weren't fired - if (hasFullJetHighPt && !hasFullJetLowPt && !hasMB) { - registry.fill(HIST("hDetTrigcollisionCounter"), 5.5); // OnlyHighPt+NoLowPt+NoMB + if (hasFullJetHighPt && !hasFullJetLowPt) { + registry.fill(HIST("hDetTrigcollisionCounter"), 4.5); // FullJetHighPt+FullJetLowPt + eventAccepted = true; } // Case 2: hasFullJetLowPt && !hasMB : Pure FullJetLowPt // i.e. for every hasFullJetLowPt trig that was fired, check the MB trig wasn't fired - if (hasFullJetLowPt && !hasMB) { - registry.fill(HIST("hDetTrigcollisionCounter"), 6.5); // OnlyLowPt+NoMB - } - // Case 3: hasMB && !hasFullJetLowPt && !hasFullJetHighPt : Pure MB - // i.e. for every MB trig that was fired, check the higher trigs weren't fired - if (hasMB && !hasFullJetLowPt && !hasFullJetHighPt) { - registry.fill(HIST("hDetTrigcollisionCounter"), 7.5); // OnlyMB - } + if (hasFullJetLowPt) { + registry.fill(HIST("hDetTrigcollisionCounter"), 5.5); // FullJetLowPt + eventAccepted = true; + } + // // Case 3: hasMB && !hasFullJetLowPt && !hasFullJetHighPt : Pure MB + // // i.e. for every MB trig that was fired, check the higher trigs weren't fired + // if (hasMB && !hasFullJetLowPt && !hasFullJetHighPt) { + // registry.fill(HIST("hDetTrigcollisionCounter"), 7.5); // OnlyMB + // } //*****Step 2: Check for trigger overlap cases (for QA):***** if (hasFullJetHighPt && hasFullJetLowPt) { - registry.fill(HIST("hDetTrigcollisionCounter"), 8.5); // FullJetHighPt+FullJetLowPt + registry.fill(HIST("hDetTrigcollisionCounter"), 6.5); // FullJetHighPt+FullJetLowPt + eventAccepted = true; } if (hasFullJetHighPt && hasMB) { - registry.fill(HIST("hDetTrigcollisionCounter"), 9.5); // FullJetHighPt+MB + registry.fill(HIST("hDetTrigcollisionCounter"), 7.5); // FullJetHighPt+MB + eventAccepted = true; } if (hasFullJetLowPt && hasMB) { - registry.fill(HIST("hDetTrigcollisionCounter"), 10.5); // FullJetLowPt+MB + registry.fill(HIST("hDetTrigcollisionCounter"), 8.5); // FullJetLowPt+MB + eventAccepted = true; } //*****Step 3: Reject ALL overlapping events by applying EXCLUSIVE Trigger Selections ***** // Skip further processing if ANY overlaps exist - if ((hasFullJetHighPt && (hasFullJetLowPt || hasMB)) || (hasFullJetLowPt && hasMB)) { - registry.fill(HIST("hDetTrigcollisionCounter"), 11.5); // AllRejectedTrigOverlaps + // if ((hasFullJetHighPt && (hasFullJetLowPt || hasMB)) || (hasFullJetLowPt && hasMB)) { + // registry.fill(HIST("hDetTrigcollisionCounter"), 11.5); // AllRejectedTrigOverlaps + // return; + // } + if ((hasFullJetHighPt && hasFullJetLowPt )) { + registry.fill(HIST("hDetTrigcollisionCounter"), 9.5); // AllRejectedTrigOverlaps + return; + } + registry.fill(HIST("hDetTrigcollisionCounter"), 10.5); // EMCAcceptedDetTrigCollAfterTrigOverlapChecks + + if (!eventAccepted) { + for (auto const& jet : jets) { + if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax) || !isAcceptedRecoJet(jet)) { + fillRejectedJetHistograms(jet, 1.0); + } + } + registry.fill(HIST("hDetTrigcollisionCounter"), 11.5); // AllRejectedDetTrigEventsAfterEMCEventSelection return; } registry.fill(HIST("hDetTrigcollisionCounter"), 12.5); // EMCAcceptedDetTrigColl - // if (!eventAccepted) { - // // for (auto const& jet : jets) { - // // if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax) || !isAcceptedRecoJet(jet)) { - // // fillRejectedJetHistograms(jet, 1.0); - // // } - // // } - // registry.fill(HIST("hDetTrigcollisionCounter"), 4.5); // AllRejectedDetTrigEventsAfterEMCEventSelection - // return; - // } - // registry.fill(HIST("hDetTrigcollisionCounter"), 5.5); // EMCAcceptedDetTrigCollWithkTVXinEMC - // - // if (jetderiveddatautilities::selectTrigger(collision, jetderiveddatautilities::JTrigSel::JetChLowPt)) { - // registry.fill(HIST("hDetTrigcollisionCounter"), 8.5); // EMCAcceptedDetTrigCollWithLowChargedJetTriggers - // eventAccepted = true; - // } - // if (jetderiveddatautilities::selectTrigger(collision, jetderiveddatautilities::JTrigSel::JetChHighPt)) { - // registry.fill(HIST("hDetTrigcollisionCounter"), 9.5); // EMCAcceptedDetTrigCollWithHighChargedJetTriggers - // eventAccepted = true; - // } - // if (jetderiveddatautilities::selectTrigger(collision, jetderiveddatautilities::JTrigSel::JetFullLowPt) && jetderiveddatautilities::selectTrigger(collision, jetderiveddatautilities::JTrigSel::JetFullHighPt)) { - // registry.fill(HIST("hDetTrigcollisionCounter"), 8.5); // EMCAcceptedDetTrigCollWithLow+HighFullJetTriggers - // } - // for (auto const& jet : jets) { - // if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) { - // continue; - // } - // if (jet.phi() < jetPhiMin || jet.phi() > jetPhiMax) { - // continue; - // } - // if (!isAcceptedRecoJet(jet)) { - // continue; - // } - // fillJetHistograms(jet); - // } + if (jetderiveddatautilities::selectTrigger(collision, jetderiveddatautilities::JTrigSel::JetChLowPt)) { + registry.fill(HIST("hDetTrigcollisionCounter"), 13.5); // EMCAcceptedDetTrigCollWithLowChargedJetTriggers + eventAccepted = true; + } + if (jetderiveddatautilities::selectTrigger(collision, jetderiveddatautilities::JTrigSel::JetChHighPt)) { + registry.fill(HIST("hDetTrigcollisionCounter"), 14.5); // EMCAcceptedDetTrigCollWithHighChargedJetTriggers + eventAccepted = true; + } + + if (jetderiveddatautilities::selectTrigger(collision, jetderiveddatautilities::JTrigSel::JetFullLowPt) && jetderiveddatautilities::selectTrigger(collision, jetderiveddatautilities::JTrigSel::JetFullHighPt)) { + registry.fill(HIST("hDetTrigcollisionCounter"), 15.5); // EMCAcceptedDetTrigCollWithLow+HighFullJetTriggers + eventAccepted = true; + } + for (auto const& jet : jets) { + if (!jetfindingutilities::isInEtaAcceptance(jet, jetEtaMin, jetEtaMax, trackEtaMin, trackEtaMax)) { + continue; + } + if (jet.phi() < jetPhiMin || jet.phi() > jetPhiMax) { + continue; + } + if (!isAcceptedRecoJet(jet)) { + continue; + } + fillJetHistograms(jet); + } } PROCESS_SWITCH(FullJetSpectra, processJetsTriggeredData, "Full Jets Triggered Data", false); From 3d2e5e9bfc56d98ff219d7838e333f162e1c01ca Mon Sep 17 00:00:00 2001 From: Archita-Dash Date: Mon, 10 Nov 2025 17:30:59 +0100 Subject: [PATCH 2/3] fixing Megalinter errors --- PWGJE/Tasks/fullJetSpectra.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/PWGJE/Tasks/fullJetSpectra.cxx b/PWGJE/Tasks/fullJetSpectra.cxx index 0c6f13ce34b..b9a167f42ca 100644 --- a/PWGJE/Tasks/fullJetSpectra.cxx +++ b/PWGJE/Tasks/fullJetSpectra.cxx @@ -46,6 +46,7 @@ #include #include #include +#include #include From 37c3a0531eaed4bfdabc28c1e5d3de962fe16901 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 10 Nov 2025 16:38:01 +0000 Subject: [PATCH 3/3] Please consider the following formatting changes --- PWGJE/Tasks/fullJetSpectra.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/PWGJE/Tasks/fullJetSpectra.cxx b/PWGJE/Tasks/fullJetSpectra.cxx index b9a167f42ca..dc831567a0e 100644 --- a/PWGJE/Tasks/fullJetSpectra.cxx +++ b/PWGJE/Tasks/fullJetSpectra.cxx @@ -41,12 +41,12 @@ #include +#include #include #include #include #include #include -#include #include @@ -249,7 +249,6 @@ struct FullJetSpectra { hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(14, "EMCAcceptedDetTrigCollWithLowChargedJetTriggers"); hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(15, "EMCAcceptedDetTrigCollWithHighChargedJetTriggers"); hDetTrigcollisionCounter->GetXaxis()->SetBinLabel(16, "EMCAcceptedDetTrigCollWithLow+HighFullJetTriggers"); - } if (doprocessJetsMCP || doprocessJetsMCPWeighted) { @@ -1215,7 +1214,7 @@ struct FullJetSpectra { // registry.fill(HIST("hDetTrigcollisionCounter"), 11.5); // AllRejectedTrigOverlaps // return; // } - if ((hasFullJetHighPt && hasFullJetLowPt )) { + if ((hasFullJetHighPt && hasFullJetLowPt)) { registry.fill(HIST("hDetTrigcollisionCounter"), 9.5); // AllRejectedTrigOverlaps return; } @@ -1232,7 +1231,6 @@ struct FullJetSpectra { } registry.fill(HIST("hDetTrigcollisionCounter"), 12.5); // EMCAcceptedDetTrigColl - if (jetderiveddatautilities::selectTrigger(collision, jetderiveddatautilities::JTrigSel::JetChLowPt)) { registry.fill(HIST("hDetTrigcollisionCounter"), 13.5); // EMCAcceptedDetTrigCollWithLowChargedJetTriggers eventAccepted = true;