From 1480d7a5a936c059d35b39b329d250617cde878d Mon Sep 17 00:00:00 2001 From: dajones2 <140733426+dajones2@users.noreply.github.com> Date: Thu, 30 Jan 2025 13:48:28 +0000 Subject: [PATCH] [PWGJE] Adding option to skip MB events when running the Jet-Jet MC (#9609) --- PWGJE/Tasks/jetHadronRecoil.cxx | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/PWGJE/Tasks/jetHadronRecoil.cxx b/PWGJE/Tasks/jetHadronRecoil.cxx index 9591309504c..2792951069f 100644 --- a/PWGJE/Tasks/jetHadronRecoil.cxx +++ b/PWGJE/Tasks/jetHadronRecoil.cxx @@ -64,6 +64,7 @@ struct JetHadronRecoil { Configurable pTHatMaxMCD{"pTHatMaxMCD", 999.0, "maximum fraction of hard scattering for jet acceptance in detector MC"}; Configurable pTHatMaxMCP{"pTHatMaxMCP", 999.0, "maximum fraction of hard scattering for jet acceptance in particle MC"}; Configurable triggerMasks{"triggerMasks", "", "possible JE Trigger masks: fJetChLowPt,fJetChHighPt,fTrackLowPt,fTrackHighPt,fJetD0ChLowPt,fJetD0ChHighPt,fJetLcChLowPt,fJetLcChHighPt,fEMCALReadout,fJetFullHighPt,fJetFullLowPt,fJetNeutralHighPt,fJetNeutralLowPt,fGammaVeryHighPtEMCAL,fGammaVeryHighPtDCAL,fGammaHighPtEMCAL,fGammaHighPtDCAL,fGammaLowPtEMCAL,fGammaLowPtDCAL,fGammaVeryLowPtEMCAL,fGammaVeryLowPtDCAL"}; + Configurable skipMBGapEvents{"skipMBGapEvents", false, "flag to choose to reject min. bias gap events; jet-level rejection applied at the jet finder level, here rejection is applied for collision and track process functions"}; Preslice> partJetsPerCollision = aod::jet::mcCollisionId; @@ -499,7 +500,7 @@ struct JetHadronRecoil { registry.fill(HIST("hZvtxSelected"), collision.posZ()); fillHistograms(jets, jetsWTA, tracks, 1.0, collision.rho()); } - PROCESS_SWITCH(JetHadronRecoil, processDataWithRhoSubtraction, "process data with rho subtraction", true); + PROCESS_SWITCH(JetHadronRecoil, processDataWithRhoSubtraction, "process data with rho subtraction", false); void processMCD(soa::Filtered::iterator const& collision, soa::Filtered> const& jets, @@ -509,6 +510,9 @@ struct JetHadronRecoil { if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) { return; } + if (skipMBGapEvents && collision.subGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) { + return; + } if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) { return; } @@ -525,6 +529,9 @@ struct JetHadronRecoil { if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) { return; } + if (skipMBGapEvents && collision.subGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) { + return; + } if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) { return; } @@ -542,6 +549,9 @@ struct JetHadronRecoil { if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) { return; } + if (skipMBGapEvents && collision.subGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) { + return; + } if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) { return; } @@ -559,6 +569,9 @@ struct JetHadronRecoil { if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) { return; } + if (skipMBGapEvents && collision.subGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) { + return; + } if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) { return; } @@ -575,6 +588,9 @@ struct JetHadronRecoil { if (std::abs(collision.posZ()) > vertexZCut) { return; } + if (skipMBGapEvents && collision.subGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) { + return; + } registry.fill(HIST("hZvtxSelected"), collision.posZ()); fillMCPHistograms(jets, jetsWTA, particles); } @@ -588,6 +604,9 @@ struct JetHadronRecoil { if (std::abs(collision.posZ()) > vertexZCut) { return; } + if (skipMBGapEvents && collision.subGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) { + return; + } registry.fill(HIST("hZvtxSelected"), collision.posZ(), collision.weight()); fillMCPHistograms(jets, jetsWTA, particles, collision.weight()); }