Skip to content

Commit

Permalink
[PWGJE] Adding option to skip MB events when running the Jet-Jet MC (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dajones2 authored Jan 30, 2025
1 parent 6da4285 commit 1480d7a
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion PWGJE/Tasks/jetHadronRecoil.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ struct JetHadronRecoil {
Configurable<float> pTHatMaxMCD{"pTHatMaxMCD", 999.0, "maximum fraction of hard scattering for jet acceptance in detector MC"};
Configurable<float> pTHatMaxMCP{"pTHatMaxMCP", 999.0, "maximum fraction of hard scattering for jet acceptance in particle MC"};
Configurable<std::string> 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<bool> 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<soa::Join<aod::Charged1MCParticleLevelJets, aod::Charged1MCParticleLevelJetConstituents>> partJetsPerCollision = aod::jet::mcCollisionId;

Expand Down Expand Up @@ -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<aod::JetCollisions>::iterator const& collision,
soa::Filtered<soa::Join<aod::ChargedMCDetectorLevelJets, aod::ChargedMCDetectorLevelJetConstituents, aod::ChargedMCDetectorLevelJetsMatchedToCharged1MCDetectorLevelJets>> const& jets,
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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);
}
Expand All @@ -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());
}
Expand Down

0 comments on commit 1480d7a

Please sign in to comment.