Skip to content

Commit

Permalink
Make the inclusion of fourth hit of pixel track in seeds configurable…
Browse files Browse the repository at this point in the history
… for HLT
  • Loading branch information
makortel committed Nov 12, 2019
1 parent a08bcc4 commit 70ad5a9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions RecoTracker/MkFit/python/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions RecoTracker/MkFit/test/hlt_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ void SeedGeneratorFromProtoTracksEDProducer::fillDescriptions(edm::Configuration
desc.add<bool>("useEventsWithNoVertex", true);
desc.add<std::string>("TTRHBuilder", "TTRHBuilderWithoutAngle4PixelTriplets");
desc.add<bool>("usePV", false);
desc.add<bool>("includeFourthHit", false);

edm::ParameterSetDescription psd0;
psd0.add<std::string>("ComponentName",std::string("SeedFromConsecutiveHitsCreator"));
Expand All @@ -67,6 +68,7 @@ SeedGeneratorFromProtoTracksEDProducer::SeedGeneratorFromProtoTracksEDProducer(c
, useEventsWithNoVertex ( cfg.getParameter<bool>("useEventsWithNoVertex") )
, builderName ( cfg.getParameter<std::string>("TTRHBuilder") )
, usePV_ ( cfg.getParameter<bool>( "usePV" ) )
, includeFourthHit_ ( cfg.getParameter<bool>( "includeFourthHit" ) )
, theInputCollectionTag ( consumes<reco::TrackCollection> (cfg.getParameter<InputTag>("InputCollection")) )
, theInputVertexCollectionTag ( consumes<reco::VertexCollection>(cfg.getParameter<InputTag>("InputVertexCollection")) )
{
Expand Down Expand Up @@ -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() ));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<reco::TrackCollection> theInputCollectionTag;
const edm::EDGetTokenT<reco::VertexCollection> theInputVertexCollectionTag;

Expand Down

0 comments on commit 70ad5a9

Please sign in to comment.