20 unsigned int nHitsBeforeVtxMax) {
30 if (TMath::Prob(vtx.
chi2(), vtx.
ndof()) < probMin)
35 double dbsx = vtx.
x() - beamspot.x();
36 double dbsy = vtx.
y() - beamspot.y();
37 double lxy = (mom.x() * dbsx + mom.y() * dbsy) / mom.rho();
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();
379 if (!matchesConversion(sc, it, dRMax, dEtaMax, dPhiMax))
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());
const reco::Vertex & conversionVertex() const
returns the reco conversion vertex
constexpr double deltaPhi(double phi1, double phi2)
const math::XYZPoint & position() const
cluster centroid position
bool isNonnull() const
Checks for non-null.
GsfTrackRefVector::const_iterator ambiguousGsfTracksBegin() const
static HepMC::IO_HEPEVT conv
double y() const
y coordinate
bool isValid() const
Tells whether the vertex is valid.
const GsfTrackRef & gsfTrack() const
key_type key() const
Accessor for product key.
const Point & position() const
position
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
math::XYZVectorF refittedPairMomentum() const
Conversion tracks momentum from the tracks refitted with vertex constraint.
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
ProductID id() const
Accessor for product ID.
GsfTrackRefVector::const_iterator ambiguousGsfTracksEnd() const
double chi2() const
chi-squares
bool isNull() const
Checks for null.
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
double x() const
x coordinate
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
bool isNull() const
Checks for null.
TrackRef ctfTrack() const
const std::vector< uint8_t > & nHitsBeforeVtx() const
Vector of the number of hits before the vertex along each track trajector.
std::vector< edm::RefToBase< reco::Track > > const & tracks() const
vector of track to base references
std::string match(BranchDescription const &a, BranchDescription const &b, std::string const &fileName)