Skip to content

Commit 1480d7a

Browse files
authored
[PWGJE] Adding option to skip MB events when running the Jet-Jet MC (AliceO2Group#9609)
1 parent 6da4285 commit 1480d7a

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

PWGJE/Tasks/jetHadronRecoil.cxx

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ struct JetHadronRecoil {
6464
Configurable<float> pTHatMaxMCD{"pTHatMaxMCD", 999.0, "maximum fraction of hard scattering for jet acceptance in detector MC"};
6565
Configurable<float> pTHatMaxMCP{"pTHatMaxMCP", 999.0, "maximum fraction of hard scattering for jet acceptance in particle MC"};
6666
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"};
67+
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"};
6768

6869
Preslice<soa::Join<aod::Charged1MCParticleLevelJets, aod::Charged1MCParticleLevelJetConstituents>> partJetsPerCollision = aod::jet::mcCollisionId;
6970

@@ -499,7 +500,7 @@ struct JetHadronRecoil {
499500
registry.fill(HIST("hZvtxSelected"), collision.posZ());
500501
fillHistograms(jets, jetsWTA, tracks, 1.0, collision.rho());
501502
}
502-
PROCESS_SWITCH(JetHadronRecoil, processDataWithRhoSubtraction, "process data with rho subtraction", true);
503+
PROCESS_SWITCH(JetHadronRecoil, processDataWithRhoSubtraction, "process data with rho subtraction", false);
503504

504505
void processMCD(soa::Filtered<aod::JetCollisions>::iterator const& collision,
505506
soa::Filtered<soa::Join<aod::ChargedMCDetectorLevelJets, aod::ChargedMCDetectorLevelJetConstituents, aod::ChargedMCDetectorLevelJetsMatchedToCharged1MCDetectorLevelJets>> const& jets,
@@ -509,6 +510,9 @@ struct JetHadronRecoil {
509510
if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) {
510511
return;
511512
}
513+
if (skipMBGapEvents && collision.subGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) {
514+
return;
515+
}
512516
if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
513517
return;
514518
}
@@ -525,6 +529,9 @@ struct JetHadronRecoil {
525529
if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) {
526530
return;
527531
}
532+
if (skipMBGapEvents && collision.subGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) {
533+
return;
534+
}
528535
if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
529536
return;
530537
}
@@ -542,6 +549,9 @@ struct JetHadronRecoil {
542549
if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) {
543550
return;
544551
}
552+
if (skipMBGapEvents && collision.subGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) {
553+
return;
554+
}
545555
if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
546556
return;
547557
}
@@ -559,6 +569,9 @@ struct JetHadronRecoil {
559569
if (!jetderiveddatautilities::selectCollision(collision, eventSelection)) {
560570
return;
561571
}
572+
if (skipMBGapEvents && collision.subGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) {
573+
return;
574+
}
562575
if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
563576
return;
564577
}
@@ -575,6 +588,9 @@ struct JetHadronRecoil {
575588
if (std::abs(collision.posZ()) > vertexZCut) {
576589
return;
577590
}
591+
if (skipMBGapEvents && collision.subGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) {
592+
return;
593+
}
578594
registry.fill(HIST("hZvtxSelected"), collision.posZ());
579595
fillMCPHistograms(jets, jetsWTA, particles);
580596
}
@@ -588,6 +604,9 @@ struct JetHadronRecoil {
588604
if (std::abs(collision.posZ()) > vertexZCut) {
589605
return;
590606
}
607+
if (skipMBGapEvents && collision.subGeneratorId() == jetderiveddatautilities::JCollisionSubGeneratorId::mbGap) {
608+
return;
609+
}
591610
registry.fill(HIST("hZvtxSelected"), collision.posZ(), collision.weight());
592611
fillMCPHistograms(jets, jetsWTA, particles, collision.weight());
593612
}

0 commit comments

Comments
 (0)