1 #ifndef CommonTools_ParticleFlow_IPCutPFCandidateSelectorDefinition 2 #define CommonTools_ParticleFlow_IPCutPFCandidateSelectorDefinition 27 d0Cut_(
cfg.getParameter<double>(
"d0Cut")),
28 dzCut_(
cfg.getParameter<double>(
"dzCut")),
29 dtCut_(
cfg.getParameter<double>(
"dtCut")),
43 double vte =
vtx.tError();
46 for (collection::const_iterator pfc = hc->begin(); pfc != hc->end(); ++pfc, ++
key) {
49 if (pfc->gsfTrackRef().isNonnull())
50 tk = pfc->gsfTrackRef().get();
51 else if (pfc->trackRef().isNonnull())
52 tk = pfc->trackRef().get();
55 double d0 = fabs(tk->
dxy(
vtx.position()));
56 double dz = fabs(tk->
dz(
vtx.position()));
57 double d0e = hypot(tk->
dxyError(), hypot(
vtx.xError(),
vtx.yError()));
58 double dze = hypot(tk->
dzError(),
vtx.zError());
68 double pfct = pfc->time();
69 double pfcte = pfc->timeError();
70 double dt = fabs(pfct - vt);
71 double dte =
std::sqrt(pfcte * pfcte + vte * vte);
81 if (pfc->numberOfSourceCandidatePtrs() > 0) {
84 selected_.back().setSourceCandidatePtr(ptrToMother);
Selects PFCandidates basing on their compatibility with vertex.
void select(const HandleToCollection &hc, const edm::Event &e, const edm::EventSetup &s)
std::vector< Vertex > VertexCollection
IPCutPFCandidateSelectorDefinition(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
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...
edm::EDGetTokenT< reco::VertexCollection > verticesToken_
double dxyError() const
error on dxy
double dzError() const
error on dz
static constexpr float d0
Particle reconstructed by the particle flow algorithm.
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...