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) {
73 if (tk.isNonnull() && tk.id() == it->id() && tk.key() == it->key())
90 for (
const auto &trkRef :
conv.tracks()) {
116 float dEta = mom.eta() - cscvector.eta();
136 const std::vector<edm::RefToBase<reco::Track> > &convTracks =
conv.tracks();
139 if (trk.
id() == it->
id() && trk.
key() == it->key())
153 const std::vector<edm::RefToBase<reco::Track> > &convTracks =
conv.tracks();
156 if (trk.
id() == it->
id() && trk.
key() == it->key())
170 const std::vector<edm::RefToBase<reco::Track> > &convTracks =
conv.tracks();
173 if (trk.
id() == it->
id() && trk.
key() == it->key())
187 unsigned int nHitsBeforeVtxMax) {
192 for (
auto const &it : convCol) {
193 if (!matchesConversion(ele, it, allowCkfMatch))
195 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
210 unsigned int nHitsBeforeVtxMax) {
217 for (
auto const &it : convCol) {
218 if (!matchesConversion(trk, it))
220 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
238 unsigned int nHitsBeforeVtxMax) {
242 for (
auto const &it : convCol) {
243 if (!matchesConversion(sc, it))
245 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
261 unsigned int nHitsBeforeVtxMax) {
270 double minRho = 999.;
271 for (
auto const &it : convCol) {
272 float rho = it.conversionVertex().position().rho();
275 if (!matchesConversion(ele, it, allowCkfMatch))
277 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
294 unsigned int nHitsBeforeVtxMax) {
303 double minRho = 999.;
304 for (
auto const &it : convCol) {
305 float rho = it.conversionVertex().position().rho();
308 if (!matchesConversion(eleCore, it, allowCkfMatch))
310 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
326 unsigned int nHitsBeforeVtxMax) {
337 double minRho = 999.;
338 for (
auto const &it : convCol) {
339 float rho = it.conversionVertex().position().rho();
342 if (!matchesConversion(trk, it))
344 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
363 unsigned int nHitsBeforeVtxMax) {
371 double minRho = 999.;
372 for (
auto const &it : convCol) {
373 float rho = it.conversionVertex().position().rho();
378 if (!isGoodConversion(it,
beamspot, lxyMin,
probMin, nHitsBeforeVtxMax))
396 unsigned int nHitsBeforeVtxMax) {
397 return !(matchedPromptElectron(sc, eleCol, convCol,
beamspot, allowCkfMatch, lxyMin,
probMin, nHitsBeforeVtxMax) ==
409 unsigned int nHitsBeforeVtxMax) {
418 for (
auto const &it : eleCol) {
420 if (it.superCluster() != sc)
428 if (hasMatchedConversion(it, convCol,
beamspot, allowCkfMatch, lxyMin,
probMin, nHitsBeforeVtxMax))
439 if (
conv !=
nullptr) {
442 return TMath::Prob(
vtx.chi2(),
vtx.ndof());