25 if (!vtx.
isValid())
return false;
28 if (TMath::Prob( vtx.
chi2(), vtx.
ndof() )<probMin)
return false;
32 double dbsx = vtx.
x() - beamspot.x();
33 double dbsy = vtx.
y() - beamspot.y();
34 double lxy = (mom.x()*dbsx + mom.y()*dbsy)/mom.rho();
42 if ( (*it)>nHitsBeforeVtxMax )
return false;
56 const std::vector<edm::RefToBase<reco::Track> > &convTracks = conv.
tracks();
58 if ( ele.reco::GsfElectron::gsfTrack().isNonnull() && ele.reco::GsfElectron::gsfTrack().id()==it->id() && ele.reco::GsfElectron::gsfTrack().key()==it->key())
return true;
59 else if ( allowCkfMatch && ele.reco::GsfElectron::closestCtfTrackRef().isNonnull() && ele.reco::GsfElectron::closestCtfTrackRef().id()==it->id() && ele.reco::GsfElectron::closestCtfTrackRef().key()==it->key() )
return true;
60 if (allowAmbiguousGsfMatch) {
62 if (tk->isNonnull() && tk->id()==it->id() && tk->key()==it->key())
return true;
86 float dEta = mom.eta() - cscvector.eta();
89 if (dR>dRMax)
return false;
90 if (dEta>dEtaMax)
return false;
91 if (dPhi>dPhiMax)
return false;
104 if (trk.
isNull())
return false;
106 const std::vector<edm::RefToBase<reco::Track> > &convTracks = conv.
tracks();
108 if (trk.
id()==it->
id() && trk.
key()==it->key())
return true;
120 if (trk.
isNull())
return false;
122 const std::vector<edm::RefToBase<reco::Track> > &convTracks = conv.
tracks();
124 if (trk.
id()==it->
id() && trk.
key()==it->key())
return true;
136 if (trk.
isNull())
return false;
138 const std::vector<edm::RefToBase<reco::Track> > &convTracks = conv.
tracks();
140 if (trk.
id()==it->
id() && trk.
key()==it->key())
return true;
150 const math::XYZPoint &
beamspot,
bool allowCkfMatch,
float lxyMin,
float probMin,
unsigned int nHitsBeforeVtxMax)
156 for(
auto const& it : convCol) {
157 if (!matchesConversion(ele, it, allowCkfMatch))
continue;
158 if (!isGoodConversion(it,beamspot,lxyMin,probMin,nHitsBeforeVtxMax))
continue;
175 if (trk.
isNull())
return false;
177 for(
auto const& it : convCol) {
178 if (!matchesConversion(trk, it))
continue;
179 if (!isGoodConversion(it,beamspot,lxyMin,probMin,nHitsBeforeVtxMax))
continue;
197 for(
auto const& it : convCol) {
198 if (!matchesConversion(sc, it))
continue;
199 if (!isGoodConversion(it,beamspot,lxyMin,probMin,nHitsBeforeVtxMax))
continue;
212 const math::XYZPoint &
beamspot,
bool allowCkfMatch,
float lxyMin,
float probMin,
unsigned int nHitsBeforeVtxMax)
222 double minRho = 999.;
223 for(
auto const& it : convCol) {
224 float rho = it.conversionVertex().position().rho();
225 if (rho>minRho)
continue;
226 if (!matchesConversion(ele, it, allowCkfMatch))
continue;
227 if (!isGoodConversion(it,beamspot,lxyMin,probMin,nHitsBeforeVtxMax))
continue;
249 if (trk.
isNull())
return match;
251 double minRho = 999.;
252 for(
auto const& it : convCol) {
253 float rho = it.conversionVertex().position().rho();
254 if (rho>minRho)
continue;
255 if (!matchesConversion(trk, it))
continue;
256 if (!isGoodConversion(it,beamspot,lxyMin,probMin,nHitsBeforeVtxMax))
continue;
279 double minRho = 999.;
280 for(
auto const& it : convCol) {
281 float rho = it.conversionVertex().position().rho();
282 if (rho>minRho)
continue;
283 if (!matchesConversion(sc, it, dRMax,dEtaMax,dPhiMax))
continue;
284 if (!isGoodConversion(it,beamspot,lxyMin,probMin,nHitsBeforeVtxMax))
continue;
299 return !(matchedPromptElectron(sc, eleCol, convCol, beamspot,
300 allowCkfMatch, lxyMin, probMin, nHitsBeforeVtxMax) ==
nullptr);
314 if (sc.
isNull())
return match;
316 for(
auto const& it : eleCol) {
318 if (it.superCluster()!=
sc)
continue;
324 if (hasMatchedConversion(it,convCol,beamspot,allowCkfMatch,lxyMin,probMin,nHitsBeforeVtxMax))
continue;
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
GsfTrackRefVector::const_iterator ambiguousGsfTracksBegin() const
static HepMC::IO_HEPEVT conv
double y() const
y coordinate
bool isValid() const
Tells whether the vertex is valid.
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.
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)