Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require highPurity for isolated tracks in heavy-ion workflows #31727

Merged
merged 3 commits into from Oct 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions PhysicsTools/PatAlgos/plugins/PATIsolatedTrackProducer.cc
Expand Up @@ -102,6 +102,7 @@ namespace pat {
const float pcRefNearest_DR_; // radius for nearest charged packed candidate
const float pcRefNearest_pTmin_; // min pT for nearest charged packed candidate
const float pfneutralsum_DR_; // pf lepton overlap radius
const bool useHighPurity_;
const bool saveDeDxHitInfo_;
StringCutObjectSelector<pat::IsolatedTrack> saveDeDxHitInfoCut_;

Expand Down Expand Up @@ -146,6 +147,7 @@ pat::PATIsolatedTrackProducer::PATIsolatedTrackProducer(const edm::ParameterSet&
pcRefNearest_DR_(iConfig.getParameter<double>("pcRefNearest_DR")),
pcRefNearest_pTmin_(iConfig.getParameter<double>("pcRefNearest_pTmin")),
pfneutralsum_DR_(iConfig.getParameter<double>("pfneutralsum_DR")),
useHighPurity_(iConfig.getParameter<bool>("useHighPurity")),
saveDeDxHitInfo_(iConfig.getParameter<bool>("saveDeDxHitInfo")),
saveDeDxHitInfoCut_(iConfig.getParameter<std::string>("saveDeDxHitInfoCut")) {
// TrackAssociator parameters
Expand Down Expand Up @@ -237,6 +239,9 @@ void pat::PATIsolatedTrackProducer::produce(edm::Event& iEvent, const edm::Event
//add general tracks
for (unsigned int igt = 0; igt < generalTracks->size(); igt++) {
const reco::Track& gentk = (*gt_h)[igt];
if (useHighPurity_)
if (!(gentk.quality(reco::TrackBase::qualityByName("highPurity"))))
continue;
reco::TrackRef tkref = reco::TrackRef(gt_h, igt);
pat::PackedCandidateRef pcref = (*gt2pc)[tkref];
pat::PackedCandidateRef ltref = (*gt2lt)[tkref];
Expand Down
6 changes: 6 additions & 0 deletions PhysicsTools/PatAlgos/python/slimming/isolatedTracks_cfi.py
Expand Up @@ -58,10 +58,16 @@

pfneutralsum_DR = cms.double(0.05),

useHighPurity = cms.bool(False),

saveDeDxHitInfo = cms.bool(True),
saveDeDxHitInfoCut = cms.string("(%s) || (%s)" % (_susySoftDisappearingTrackCut,_exoHighPtTrackCut)),
)

from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
from Configuration.Eras.Modifier_pp_on_PbPb_run3_cff import pp_on_PbPb_run3
(pp_on_AA_2018 | pp_on_PbPb_run3).toModify(isolatedTracks, useHighPurity = True)

def miniAOD_customizeIsolatedTracksFastSim(process):
"""Switch off dE/dx hit info on fast sim, as it's not available"""
process.isolatedTracks.saveDeDxHitInfo = False
Expand Down