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")) {}
67 unsigned int tested = 1;
68 for (reco::VertexCollection::const_iterator
it = vtxs.begin(), ed = vtxs.end();
it != ed; ++
it) {
77 return ((
std::abs(
t.vertex().z()) < 15.9) && (
t.vertex().Rho() < 0.2));
83 const auto &
t = *tref;
87 unsigned int tested = 1;
88 for (reco::VertexCollection::const_iterator
it = vtxs.begin(), ed = vtxs.end();
it != ed; ++
it) {
89 const bool useTime = timeAvailable &&
it->t() != 0.;
90 float time = useTime ? (*timescoll_)[tref] : -1.f;
91 float timeReso = useTime ? (*timeresoscoll_)[tref] : -1.f;
92 timeReso = (timeReso > 1
e-6 ? timeReso : fakeBeamSpotTimeWidth);
96 timeReso = 2.0 * fakeBeamSpotTimeWidth;
99 const double vtxSigmaT2 =
it->tError() *
it->tError();
100 const double vtxTrackErr =
std::sqrt(vtxSigmaT2 + timeReso * timeReso);
111 return ((
std::abs(
t.vertex().z()) < 15.9) && (
t.vertex().Rho() < 0.2));
constexpr bool isNotFinite(T x)
reco::VertexCollection const * vcoll_
T const * product() const
std::vector< Vertex > VertexCollection
collection of Vertex objects
uint32_t numberOfValidHits_
bool testVertices(const reco::Track &t, const reco::VertexCollection &vtxs) const
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
std::vector< Vertex > VertexCollection
void init(const edm::Event &event, const edm::EventSetup &)
~TrackWithVertexSelector()
edm::EDGetTokenT< edm::ValueMap< float > > timesToken_
edm::EDGetTokenT< edm::ValueMap< float > > timeResosToken_
bool testTrack(const reco::Track &t) const
Abs< T >::type abs(const T &t)
uint32_t numberOfValidPixelHits_
bool operator()(const reco::Track &t) const
edm::ValueMap< float > const * timeresoscoll_
uint32_t numberOfLostHits_
TrackWithVertexSelector(const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC)
edm::ValueMap< float > const * timescoll_