Skip to content

Commit

Permalink
impose realistic acceptance cuts for track timing maps by default
Browse files Browse the repository at this point in the history
  • Loading branch information
bendavid committed Sep 18, 2017
1 parent e4e879e commit ee49778
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class TrackTimeValueMapProducer : public edm::global::EDProducer<> {
// tracking particle associators by order of preference
const std::vector<edm::EDGetTokenT<reco::TrackToTrackingParticleAssociator> > associators_;
// eta bounds
const float etaMin_, etaMax_;
const float etaMin_, etaMax_, ptMin_, pMin_, etaMaxForPtThreshold_;
// options
std::vector<std::unique_ptr<const ResolutionModel> > resolutions_;
// functions
Expand Down Expand Up @@ -91,7 +91,10 @@ TrackTimeValueMapProducer::TrackTimeValueMapProducer(const edm::ParameterSet& co
trackingVertices_(consumes<TrackingVertexCollection>( conf.getParameter<edm::InputTag>("trackingVertexSrc") ) ),
associators_( edm::vector_transform( conf.getParameter<std::vector<edm::InputTag> >("associators"), [this](const edm::InputTag& tag){ return this->consumes<reco::TrackToTrackingParticleAssociator>(tag); } ) ),
etaMin_( conf.getParameter<double>("etaMin") ),
etaMax_( conf.getParameter<double>("etaMax") )
etaMax_( conf.getParameter<double>("etaMax") ),
ptMin_( conf.getParameter<double>("ptMin") ),
pMin_( conf.getParameter<double>("pMin") ),
etaMaxForPtThreshold_( conf.getParameter<double>("etaMaxForPtThreshold") )
{
// setup resolution models
const std::vector<edm::ParameterSet>& resos = conf.getParameterSetVector("resolutionModels");
Expand Down Expand Up @@ -181,7 +184,7 @@ void TrackTimeValueMapProducer::calculateTrackTimes( const edm::View<reco::Track
const auto tkref = tkcoll.refAt(itk);
reco::RecoToSimCollection::const_iterator track_tps = assocs.back().end();
const float absEta = std::abs(tkref->eta());
if( absEta < etaMax_ && absEta >= etaMin_ ) {
if( absEta < etaMax_ && absEta >= etaMin_ && tkref->p()>pMin_ && (absEta>etaMaxForPtThreshold_ || tkref->pt()>ptMin_) ) {
for( const auto& association : assocs ) {
track_tps = association.find(tkref);
if( track_tps != association.end() ) break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@
resolutionInNs = cms.double(0.030) ),
cms.PSet( modelName = cms.string('PerfectResolutionModel') ) ),
etaMin = cms.double(-1.0),
etaMax = cms.double(10.0)
etaMax = cms.double(3.0),
ptMin = cms.double(0.7),
pMin = cms.double(0.7),
etaMaxForPtThreshold = cms.double(1.5),
)

0 comments on commit ee49778

Please sign in to comment.