19 unsigned int nHitsBeforeVtxMax) {
29 if (TMath::Prob(vtx.
chi2(), vtx.
ndof()) < probMin)
34 double dbsx = vtx.
x() - beamspot.x();
35 double dbsy = vtx.
y() - beamspot.y();
36 double lxy = (mom.x() * dbsx + mom.y() * dbsy) / mom.rho();
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();
376 if (!matchesConversion(sc, it, dRMax, dEtaMax, dPhiMax))
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());
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.
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
auto const & ambiguousGsfTracks() const
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.
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)