Skip to content

Commit 1ec1f8f

Browse files
authored
[PWGEM/Dilepton] update skimmerPrimaryMuon.cxx (#15905)
1 parent 3c0365b commit 1ec1f8f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

PWGEM/Dilepton/TableProducer/skimmerPrimaryMuon.cxx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ struct skimmerPrimaryMuon {
106106
Configurable<float> maxDEta{"maxDEta", 1e+10f, "max. deta between MFT-MCH-MID and MCH-MID"};
107107
Configurable<float> maxDPhi{"maxDPhi", 1e+10f, "max. dphi between MFT-MCH-MID and MCH-MID"};
108108
Configurable<bool> cfgApplyPreselectionInBestMatch{"cfgApplyPreselectionInBestMatch", false, "flag to apply preselection in find best match function"};
109+
Configurable<bool> cfgRequireSameSign{"cfgRequireSameSign", false, "flag to require same sign between MFT and MCH-MID"};
109110

110111
// for z shift for propagation
111112
Configurable<bool> cfgApplyZShiftFromCCDB{"cfgApplyZShiftFromCCDB", false, "flag to apply z shift"};
@@ -343,6 +344,10 @@ struct skimmerPrimaryMuon {
343344
return false;
344345
}
345346

347+
if (cfgRequireSameSign && (mfttrack.sign() != mchtrack.sign())) {
348+
return false;
349+
}
350+
346351
xMFT = mfttrack.x();
347352
yMFT = mfttrack.y();
348353

@@ -629,6 +634,9 @@ struct skimmerPrimaryMuon {
629634
if (muon_tmp.chi2MatchMCHMFT() > maxMatchingChi2MCHMFT) {
630635
continue;
631636
}
637+
if (cfgRequireSameSign && (mfttrack.sign() != mchtrack.sign())) {
638+
continue;
639+
}
632640
}
633641

634642
if (0.f < muon_tmp.chi2MatchMCHMFT() && muon_tmp.chi2MatchMCHMFT() < min_chi2MatchMCHMFT) {

0 commit comments

Comments
 (0)