8 constexpr float fakeBeamSpotTimeWidth = 0.175f;
12 numberOfValidHits_(iConfig.getParameter<uint32_t>(
"numberOfValidHits")),
13 numberOfValidPixelHits_(iConfig.getParameter<uint32_t>(
"numberOfValidPixelHits")),
14 numberOfLostHits_(iConfig.getParameter<uint32_t>(
"numberOfLostHits")),
15 normalizedChi2_(iConfig.getParameter<double>(
"normalizedChi2")),
16 ptMin_(iConfig.getParameter<double>(
"ptMin")),
17 ptMax_(iConfig.getParameter<double>(
"ptMax")),
18 etaMin_(iConfig.getParameter<double>(
"etaMin")),
19 etaMax_(iConfig.getParameter<double>(
"etaMax")),
20 dzMax_(iConfig.getParameter<double>(
"dzMax")),
21 d0Max_(iConfig.getParameter<double>(
"d0Max")),
22 ptErrorCut_(iConfig.getParameter<double>(
"ptErrorCut")),
23 quality_(iConfig.getParameter<std::
string>(
"quality")),
24 nVertices_(iConfig.getParameter<bool>(
"useVtx") ? iConfig.getParameter<uint32_t>(
"nVertices") : 0),
26 timesToken_(iC.consumes<edm::ValueMap<float> >(iConfig.getParameter<edm::
InputTag>(
"timesTag"))),
27 timeResosToken_(iC.consumes<edm::ValueMap<float> >(iConfig.getParameter<edm::
InputTag>(
"timeResosTag"))),
28 vtxFallback_(iConfig.getParameter<bool>(
"vtxFallback")),
29 zetaVtx_(iConfig.getParameter<double>(
"zetaVtx")),
30 rhoVtx_(iConfig.getParameter<double>(
"rhoVtx")),
31 nSigmaDtVertex_(iConfig.getParameter<double>(
"nSigmaDtVertex")) {
76 if (vtxs.size() > 0) {
77 unsigned int tested = 1;
78 for (reco::VertexCollection::const_iterator it = vtxs.begin(), ed = vtxs.end();
93 const auto&
t = *tref;
96 if (vtxs.size() > 0) {
97 unsigned int tested = 1;
98 for (reco::VertexCollection::const_iterator it = vtxs.begin(), ed = vtxs.end();
100 const bool useTime = timeAvailable && it->t() != 0.;
101 float time = useTime ? (*timescoll_)[tref] : -1.f;
102 float timeReso = useTime ? (*timeresoscoll_)[tref] : -1.f;
103 timeReso = ( timeReso > 1
e-6 ? timeReso : fakeBeamSpotTimeWidth );
107 timeReso = 2.0*fakeBeamSpotTimeWidth;
110 const double vtxSigmaT2 = it->tError() * it->tError();
111 const double vtxTrackErr =
std::sqrt( vtxSigmaT2 + timeReso*timeReso );
121 return ( (
std::abs(
t.vertex().z()) < 15.9) && (
t.vertex().Rho() < 0.2) );
bool testTrack(const reco::Track &t) const
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
vertexToken_(consumes< reco::VertexCollection >(iConfig.getUntrackedParameter< edm::InputTag >("vertices")))
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
bool testVertices(const reco::Track &t, const reco::VertexCollection &vtxs) const
reco::VertexCollection const * vcoll_
unsigned short numberOfLostHits() const
number of cases where track crossed a layer without getting a hit.
std::vector< Vertex > VertexCollection
collection of Vertex objects
uint32_t numberOfValidHits_
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
void init(const edm::Event &event, const edm::EventSetup &)
bool operator()(const reco::Track &t) const
~TrackWithVertexSelector()
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead ...
edm::EDGetTokenT< edm::ValueMap< float > > timesToken_
double eta() const
pseudorapidity of momentum vector
edm::EDGetTokenT< edm::ValueMap< float > > timeResosToken_
double pt() const
track transverse momentum
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
Abs< T >::type abs(const T &t)
unsigned short numberOfValidHits() const
number of valid hits found
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
uint32_t numberOfValidPixelHits_
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
static TrackQuality qualityByName(const std::string &name)
T const * product() const
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
edm::ValueMap< float > const * timeresoscoll_
bool quality(const TrackQuality) const
Track quality.
uint32_t numberOfLostHits_
int numberOfValidPixelHits() const
TrackWithVertexSelector(const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC)
edm::ValueMap< float > const * timescoll_
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...