20 unsigned int nHitsBeforeVtxMax) {
37 double lxy = (mom.x() * dbsx + mom.y() * dbsy) / mom.rho();
44 for (std::vector<uint8_t>::const_iterator it =
conv.nHitsBeforeVtx().begin(); it !=
conv.nHitsBeforeVtx().end();
46 if ((*it) > nHitsBeforeVtxMax)
57 bool allowAmbiguousGsfMatch) {
62 const std::vector<edm::RefToBase<reco::Track> > &convTracks =
conv.tracks();
65 if (ele.reco::GsfElectron::gsfTrack().isNonnull() && ele.reco::GsfElectron::gsfTrack().id() == it->id() &&
66 ele.reco::GsfElectron::gsfTrack().key() == it->key())
68 else if (allowCkfMatch && ele.reco::GsfElectron::closestCtfTrackRef().isNonnull() &&
69 ele.reco::GsfElectron::closestCtfTrackRef().id() == it->id() &&
70 ele.reco::GsfElectron::closestCtfTrackRef().key() == it->key())
72 if (allowAmbiguousGsfMatch) {
76 if (tk->isNonnull() && tk->id() == it->id() && tk->key() == it->key())
93 for (
const auto &trkRef :
conv.tracks()) {
119 float dEta = mom.eta() - cscvector.eta();
139 const std::vector<edm::RefToBase<reco::Track> > &convTracks =
conv.tracks();
142 if (trk.
id() == it->
id() && trk.
key() == it->key())
156 const std::vector<edm::RefToBase<reco::Track> > &convTracks =
conv.tracks();
159 if (trk.
id() == it->
id() && trk.
key() == it->key())
173 const std::vector<edm::RefToBase<reco::Track> > &convTracks =
conv.tracks();
176 if (trk.
id() == it->
id() && trk.
key() == it->key())
190 unsigned int nHitsBeforeVtxMax) {
195 for (
auto const &it : convCol) {
196 if (!matchesConversion(ele, it, allowCkfMatch))
198 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
213 unsigned int nHitsBeforeVtxMax) {
220 for (
auto const &it : convCol) {
221 if (!matchesConversion(trk, it))
223 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
241 unsigned int nHitsBeforeVtxMax) {
245 for (
auto const &it : convCol) {
246 if (!matchesConversion(sc, it))
248 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
264 unsigned int nHitsBeforeVtxMax) {
273 double minRho = 999.;
274 for (
auto const &it : convCol) {
275 float rho = it.conversionVertex().position().rho();
278 if (!matchesConversion(ele, it, allowCkfMatch))
280 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
297 unsigned int nHitsBeforeVtxMax) {
306 double minRho = 999.;
307 for (
auto const &it : convCol) {
308 float rho = it.conversionVertex().position().rho();
311 if (!matchesConversion(eleCore, it, allowCkfMatch))
313 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
329 unsigned int nHitsBeforeVtxMax) {
340 double minRho = 999.;
341 for (
auto const &it : convCol) {
342 float rho = it.conversionVertex().position().rho();
345 if (!matchesConversion(trk, it))
347 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
366 unsigned int nHitsBeforeVtxMax) {
374 double minRho = 999.;
375 for (
auto const &it : convCol) {
376 float rho = it.conversionVertex().position().rho();
381 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
399 unsigned int nHitsBeforeVtxMax) {
400 return !(matchedPromptElectron(sc, eleCol, convCol,
beamspot, allowCkfMatch, lxyMin,
probMin, nHitsBeforeVtxMax) ==
412 unsigned int nHitsBeforeVtxMax) {
421 for (
auto const &it : eleCol) {
423 if (it.superCluster() != sc)
431 if (hasMatchedConversion(it, convCol,
beamspot, allowCkfMatch, lxyMin,
probMin, nHitsBeforeVtxMax))
442 if (
conv !=
nullptr) {
445 return TMath::Prob(
vtx.chi2(),
vtx.ndof());