Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ AnalyticalTrackSelector::AnalyticalTrackSelector(const edm::ParameterSet& cfg) :
beamspot_ = consumes<reco::BeamSpot>(cfg.getParameter<edm::InputTag>("beamspot"));
useVertices_ = cfg.getParameter<bool>("useVertices");
useVtxError_ = cfg.getParameter<bool>("useVtxError");
passThroughForAll_ = cfg.getParameter<bool>("passThroughForAll");
passThroughForDisplaced_ = cfg.getParameter<bool>("passThroughForDisplaced");
minLayersForDisplaced_ = cfg.getParameter<uint32_t>("minLayersForDisplaced");
if (useVertices_)
vertices_ = consumes<reco::VertexCollection>(cfg.getParameter<edm::InputTag>("vertices"));
copyExtras_ = cfg.getUntrackedParameter<bool>("copyExtras", false);
Expand Down Expand Up @@ -402,6 +405,11 @@ void AnalyticalTrackSelector::fillDescriptions(edm::ConfigurationDescriptions& d
desc.add<int32_t>("vtxNumber", -1);
desc.add<std::string>("vertexCut", "ndof>=2&!isFake");

// pass-through options
desc.add<bool>("passThroughForAll", false);
desc.add<bool>("passThroughForDisplaced", false);
desc.add<uint32_t>("minLayersForDisplaced", 4);

desc.addUntracked<bool>("copyExtras", false);
desc.addUntracked<bool>("copyTrajectories", false);
desc.add<std::string>("qualityBit", std::string(""))->setComment("set to ''if you don't want to set the bit");
Expand Down
15 changes: 13 additions & 2 deletions RecoTracker/FinalTrackSelectors/plugins/MultiTrackSelector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ MultiTrackSelector::MultiTrackSelector(const edm::ParameterSet& cfg)
hSrc_(consumes<TrackingRecHitCollection>(cfg.getParameter<edm::InputTag>("src"))),
beamspot_(consumes<reco::BeamSpot>(cfg.getParameter<edm::InputTag>("beamspot"))),
useVertices_(cfg.getParameter<bool>("useVertices")),
useVtxError_(cfg.getParameter<bool>("useVtxError"))
useVtxError_(cfg.getParameter<bool>("useVtxError")),
passThroughForAll_(cfg.getParameter<bool>("passThroughForAll")),
passThroughForDisplaced_(cfg.getParameter<bool>("passThroughForDisplaced")),
minLayersForDisplaced_(cfg.getParameter<uint32_t>("minLayersForDisplaced"))
// now get the pset for each selector
{
if (useVertices_)
Expand Down Expand Up @@ -344,6 +347,15 @@ bool MultiTrackSelector::select(unsigned int tsNum,

using namespace std;

if (passThroughForAll_)
return true;
uint32_t nlayers = tk.hitPattern().trackerLayersWithMeasurement();
uint32_t npixhits = tk.hitPattern().numberOfValidPixelHits();
if (passThroughForDisplaced_) {
if (npixhits == 0 && nlayers >= minLayersForDisplaced_)
return true;
}

//cuts on number of valid hits
auto nhits = tk.numberOfValidHits();
if ((nhits >= min_hits_bypass_[tsNum]) || (nhits == 0))
Expand All @@ -368,7 +380,6 @@ bool MultiTrackSelector::select(unsigned int tsNum,
///////////////////////////////

// Cuts on numbers of layers with hits/3D hits/lost hits.
uint32_t nlayers = tk.hitPattern().trackerLayersWithMeasurement();
uint32_t nlayers3D =
tk.hitPattern().pixelLayersWithMeasurement() + tk.hitPattern().numberOfValidStripLayersWithMonoAndStereo();
uint32_t nlayersLost = tk.hitPattern().trackerLayersWithoutMeasurement(reco::HitPattern::TRACK_HITS);
Expand Down
3 changes: 3 additions & 0 deletions RecoTracker/FinalTrackSelectors/plugins/MultiTrackSelector.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ class dso_hidden MultiTrackSelector : public edm::stream::EDProducer<> {
edm::EDGetTokenT<reco::BeamSpot> beamspot_;
bool useVertices_;
bool useVtxError_;
bool passThroughForAll_;
bool passThroughForDisplaced_;
uint32_t minLayersForDisplaced_;
bool useAnyMVA_;
edm::EDGetTokenT<reco::VertexCollection> vertices_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
useVertices = cms.bool(True),
useVtxError = cms.bool(False),
vertices = cms.InputTag("firstStepPrimaryVertices"),
passThroughForAll = cms.bool(False),
passThroughForDisplaced = cms.bool(False),
minLayersForDisplaced = cms.uint32(4),
trackSelectors = cms.VPSet( looseMTS,
tightMTS,
highpurityMTS)
Expand Down
5 changes: 5 additions & 0 deletions RecoTracker/IterativeTracking/python/HighPtTripletStep_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@
phase2clustersToSkip = 'highPtTripletStepClusters'
)

from Configuration.ProcessModifiers.seedingLST_cff import seedingLST
from Configuration.ProcessModifiers.trackingLST_cff import trackingLST
from RecoTracker.LST.lstOutputConverter_cfi import lstOutputConverter as _lstOutputConverter
(trackingPhase2PU140 & trackingLST).toReplaceWith(highPtTripletStepTrackCandidates, _lstOutputConverter.clone())
Expand Down Expand Up @@ -381,9 +382,13 @@
vectorHits.toModify(highPtTripletStepSelector.trackSelectors[2], minNumberLayers = 3, minNumber3DLayers = 3, d0_par1 = ( 0.5, 4.0 ), dz_par1 = ( 0.6, 4.0 ))

(trackingPhase2PU140 & trackingLST).toModify(highPtTripletStepSelector, src = 'highPtTripletStepLSTpTracks')

from Configuration.ProcessModifiers.seedingLST_cff import seedingLST
(trackingPhase2PU140 & (trackingLST | seedingLST)).toModify(highPtTripletStepSelector, passThroughForAll = True)
# Passthrough selector to satisfy the TrackListMerger requirement for selector values
highPtTripletStepSelectorLSTT4T5 = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
src = 'highPtTripletStepLSTT4T5Tracks',
passThroughForDisplaced = True,
Comment on lines +387 to +391
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which of these is making a change in plots_building_highPtTripletStep ?

Now that the selector functionality allows to select T4/T5 from the same collection, can we already use a merged collection?

trackSelectors = [
RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
name = 'highPtTripletStepLSTT4T5Loose',
Expand Down