19 unsigned int nHitsBeforeVtxMax) {
36 double lxy = (mom.x() * dbsx + mom.y() * dbsy) / mom.rho();
43 for (std::vector<uint8_t>::const_iterator it =
conv.nHitsBeforeVtx().begin(); it !=
conv.nHitsBeforeVtx().end();
45 if ((*it) > nHitsBeforeVtxMax)
56 bool allowAmbiguousGsfMatch) {
61 const std::vector<edm::RefToBase<reco::Track> > &convTracks =
conv.tracks();
64 if (ele.reco::GsfElectron::gsfTrack().isNonnull() && ele.reco::GsfElectron::gsfTrack().id() == it->id() &&
65 ele.reco::GsfElectron::gsfTrack().key() == it->key())
67 else if (allowCkfMatch && ele.reco::GsfElectron::closestCtfTrackRef().isNonnull() &&
68 ele.reco::GsfElectron::closestCtfTrackRef().id() == it->id() &&
69 ele.reco::GsfElectron::closestCtfTrackRef().key() == it->key())
71 if (allowAmbiguousGsfMatch) {
75 if (tk->isNonnull() && tk->id() == it->id() && tk->key() == it->key())
92 for (
const auto &trkRef :
conv.tracks()) {
118 float dEta = mom.eta() - cscvector.eta();
138 const std::vector<edm::RefToBase<reco::Track> > &convTracks =
conv.tracks();
141 if (trk.
id() == it->
id() && trk.
key() == it->key())
155 const std::vector<edm::RefToBase<reco::Track> > &convTracks =
conv.tracks();
158 if (trk.
id() == it->
id() && trk.
key() == it->key())
172 const std::vector<edm::RefToBase<reco::Track> > &convTracks =
conv.tracks();
175 if (trk.
id() == it->
id() && trk.
key() == it->key())
189 unsigned int nHitsBeforeVtxMax) {
194 for (
auto const &it : convCol) {
195 if (!matchesConversion(ele, it, allowCkfMatch))
197 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
212 unsigned int nHitsBeforeVtxMax) {
219 for (
auto const &it : convCol) {
220 if (!matchesConversion(trk, it))
222 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
240 unsigned int nHitsBeforeVtxMax) {
244 for (
auto const &it : convCol) {
245 if (!matchesConversion(sc, it))
247 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
263 unsigned int nHitsBeforeVtxMax) {
272 double minRho = 999.;
273 for (
auto const &it : convCol) {
274 float rho = it.conversionVertex().position().rho();
277 if (!matchesConversion(ele, it, allowCkfMatch))
279 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
296 unsigned int nHitsBeforeVtxMax) {
305 double minRho = 999.;
306 for (
auto const &it : convCol) {
307 float rho = it.conversionVertex().position().rho();
310 if (!matchesConversion(eleCore, it, allowCkfMatch))
312 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
328 unsigned int nHitsBeforeVtxMax) {
339 double minRho = 999.;
340 for (
auto const &it : convCol) {
341 float rho = it.conversionVertex().position().rho();
344 if (!matchesConversion(trk, it))
346 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
365 unsigned int nHitsBeforeVtxMax) {
373 double minRho = 999.;
374 for (
auto const &it : convCol) {
375 float rho = it.conversionVertex().position().rho();
380 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
398 unsigned int nHitsBeforeVtxMax) {
399 return !(matchedPromptElectron(sc, eleCol, convCol,
beamspot, allowCkfMatch, lxyMin,
probMin, nHitsBeforeVtxMax) ==
411 unsigned int nHitsBeforeVtxMax) {
420 for (
auto const &it : eleCol) {
422 if (it.superCluster() != sc)
430 if (hasMatchedConversion(it, convCol,
beamspot, allowCkfMatch, lxyMin,
probMin, nHitsBeforeVtxMax))
441 if (
conv !=
nullptr) {
444 return TMath::Prob(
vtx.chi2(),
vtx.ndof());