From 70ad5a9c58aba7255d421a19181f2bcaae97ed30 Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Tue, 12 Nov 2019 11:56:53 -0800 Subject: [PATCH] Make the inclusion of fourth hit of pixel track in seeds configurable for HLT --- RecoTracker/MkFit/python/input.py | 5 +++++ RecoTracker/MkFit/test/hlt_cfg.py | 4 ++++ .../plugins/SeedGeneratorFromProtoTracksEDProducer.cc | 4 +++- .../plugins/SeedGeneratorFromProtoTracksEDProducer.h | 1 + 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/RecoTracker/MkFit/python/input.py b/RecoTracker/MkFit/python/input.py index d179be5674173..6123aa87f5af1 100644 --- a/RecoTracker/MkFit/python/input.py +++ b/RecoTracker/MkFit/python/input.py @@ -22,6 +22,11 @@ def apply(process): VarParsing.multiplicity.singleton, VarParsing.varType.int, "Run HLT strip local reco fully (0) or on-demand (1) (on-demand won't work for mkfit)") + options.register("hltIncludeFourthHit", + 0, + VarParsing.multiplicity.singleton, + VarParsing.varType.int, + "Include fourth hit of pixel track in iter0 seeds (default 0)") options.register("maxEvents", 0, VarParsing.multiplicity.singleton, diff --git a/RecoTracker/MkFit/test/hlt_cfg.py b/RecoTracker/MkFit/test/hlt_cfg.py index 9813ee2e9488d..a49ba2a23f668 100644 --- a/RecoTracker/MkFit/test/hlt_cfg.py +++ b/RecoTracker/MkFit/test/hlt_cfg.py @@ -8796,6 +8796,7 @@ if options.hltOnDemand == 0: process.hltSiStripRawToClustersFacility.onDemand = False +process.hltIter0PFLowPixelSeedsFromPixelTracks.includeFourthHit = cms.bool(options.hltIncludeFourthHit == 1) process.MessageLogger.cerr.FwkReport.limit = 1000000 @@ -8828,6 +8829,9 @@ process.hltIter0PFlowCkfTrackCandidatesMkFit = mkFitProducer_cfi.mkFitProducer.clone( hitsSeeds = "hltIter0PFlowCkfTrackCandidatesMkFitInput", ) + # Disable seed cleaning for triplet seeds + if options.hltIncludeFourthHit == 0: + process.hltIter0PFlowCkfTrackCandidatesMkFit.seedCleaning = "none" process.hltIter0PFlowCkfTrackCandidates = mkFitOutputConverter_cfi.mkFitOutputConverter.clone( seeds = "hltIter0PFLowPixelSeedsFromPixelTracks", hitsSeeds = "hltIter0PFlowCkfTrackCandidatesMkFitInput", diff --git a/RecoTracker/TkSeedGenerator/plugins/SeedGeneratorFromProtoTracksEDProducer.cc b/RecoTracker/TkSeedGenerator/plugins/SeedGeneratorFromProtoTracksEDProducer.cc index a85cf0ea3e2cc..a455882b9ca9b 100644 --- a/RecoTracker/TkSeedGenerator/plugins/SeedGeneratorFromProtoTracksEDProducer.cc +++ b/RecoTracker/TkSeedGenerator/plugins/SeedGeneratorFromProtoTracksEDProducer.cc @@ -43,6 +43,7 @@ void SeedGeneratorFromProtoTracksEDProducer::fillDescriptions(edm::Configuration desc.add("useEventsWithNoVertex", true); desc.add("TTRHBuilder", "TTRHBuilderWithoutAngle4PixelTriplets"); desc.add("usePV", false); + desc.add("includeFourthHit", false); edm::ParameterSetDescription psd0; psd0.add("ComponentName",std::string("SeedFromConsecutiveHitsCreator")); @@ -67,6 +68,7 @@ SeedGeneratorFromProtoTracksEDProducer::SeedGeneratorFromProtoTracksEDProducer(c , useEventsWithNoVertex ( cfg.getParameter("useEventsWithNoVertex") ) , builderName ( cfg.getParameter("TTRHBuilder") ) , usePV_ ( cfg.getParameter( "usePV" ) ) + , includeFourthHit_ ( cfg.getParameter( "includeFourthHit" ) ) , theInputCollectionTag ( consumes (cfg.getParameter("InputCollection")) ) , theInputVertexCollectionTag ( consumes(cfg.getParameter("InputVertexCollection")) ) { @@ -145,7 +147,7 @@ void SeedGeneratorFromProtoTracksEDProducer::produce(edm::Event& ev, const edm:: seedCreator.init(region, es, nullptr); seedCreator.makeSeed(*result, SeedingHitSet(hits[0], hits[1], hits.size() >2 ? hits[2] : SeedingHitSet::nullPtr(), - hits.size() >3 ? hits[3] : SeedingHitSet::nullPtr() )); + (includeFourthHit_ && hits.size() >3) ? hits[3] : SeedingHitSet::nullPtr() )); } } } diff --git a/RecoTracker/TkSeedGenerator/plugins/SeedGeneratorFromProtoTracksEDProducer.h b/RecoTracker/TkSeedGenerator/plugins/SeedGeneratorFromProtoTracksEDProducer.h index e50a5047ec01a..cf97e4f4f62de 100644 --- a/RecoTracker/TkSeedGenerator/plugins/SeedGeneratorFromProtoTracksEDProducer.h +++ b/RecoTracker/TkSeedGenerator/plugins/SeedGeneratorFromProtoTracksEDProducer.h @@ -24,6 +24,7 @@ class dso_hidden SeedGeneratorFromProtoTracksEDProducer : public edm::stream::ED const bool useEventsWithNoVertex; const std::string builderName; const bool usePV_; + const bool includeFourthHit_; const edm::EDGetTokenT theInputCollectionTag; const edm::EDGetTokenT theInputVertexCollectionTag;