26 if (!vtx.
isValid())
return false;
29 if (TMath::Prob( vtx.
chi2(), vtx.
ndof() )<probMin)
return false;
33 double dbsx = vtx.
x() - beamspot.x();
34 double dbsy = vtx.
y() - beamspot.y();
35 double lxy = (mom.x()*dbsx + mom.y()*dbsy)/mom.rho();
43 if ( (*it)>nHitsBeforeVtxMax )
return false;
82 float dEta = mom.eta() - cscvector.eta();
85 if (dR>dRMax)
return false;
86 if (dEta>dEtaMax)
return false;
87 if (dPhi>dPhiMax)
return false;
100 if (trk.
isNull())
return false;
102 const std::vector<edm::RefToBase<reco::Track> > &
convTracks = conv.
tracks();
104 if (trk.
id()==it->
id() && trk.
key()==it->key())
return true;
116 if (trk.
isNull())
return false;
118 const std::vector<edm::RefToBase<reco::Track> > &
convTracks = conv.
tracks();
120 if (trk.
id()==it->
id() && trk.
key()==it->key())
return true;
132 if (trk.
isNull())
return false;
134 const std::vector<edm::RefToBase<reco::Track> > &
convTracks = conv.
tracks();
136 if (trk.
id()==it->
id() && trk.
key()==it->key())
return true;
146 const math::XYZPoint &beamspot,
bool allowCkfMatch,
float lxyMin,
float probMin,
unsigned int nHitsBeforeVtxMax)
152 for (ConversionCollection::const_iterator it = convCol->begin(); it!=convCol->end(); ++it) {
153 if (!matchesConversion(ele, *it, allowCkfMatch))
continue;
154 if (!isGoodConversion(*it,beamspot,lxyMin,probMin,nHitsBeforeVtxMax))
continue;
166 const math::XYZPoint &beamspot,
float lxyMin,
float probMin,
unsigned int nHitsBeforeVtxMax)
171 if (trk.
isNull())
return false;
173 for (ConversionCollection::const_iterator it = convCol->begin(); it!=convCol->end(); ++it) {
174 if (!matchesConversion(trk, *it))
continue;
175 if (!isGoodConversion(*it,beamspot,lxyMin,probMin,nHitsBeforeVtxMax))
continue;
187 const math::XYZPoint &beamspot,
float dRMax,
float dEtaMax,
float dPhiMax,
float lxyMin,
float probMin,
unsigned int nHitsBeforeVtxMax)
193 for (ConversionCollection::const_iterator it = convCol->begin(); it!=convCol->end(); ++it) {
194 if (!matchesConversion(sc, *it))
continue;
195 if (!isGoodConversion(*it,beamspot,lxyMin,probMin,nHitsBeforeVtxMax))
continue;
208 const math::XYZPoint &beamspot,
bool allowCkfMatch,
float lxyMin,
float probMin,
unsigned int nHitsBeforeVtxMax)
218 double minRho = 999.;
219 for (ConversionCollection::const_iterator it = convCol->begin(); it!=convCol->end(); ++it) {
220 float rho = it->conversionVertex().position().rho();
221 if (rho>minRho)
continue;
222 if (!matchesConversion(ele, *it, allowCkfMatch))
continue;
223 if (!isGoodConversion(*it,beamspot,lxyMin,probMin,nHitsBeforeVtxMax))
continue;
236 const math::XYZPoint &beamspot,
float lxyMin,
float probMin,
unsigned int nHitsBeforeVtxMax)
245 if (trk.
isNull())
return match;
247 double minRho = 999.;
248 for (ConversionCollection::const_iterator it = convCol->begin(); it!=convCol->end(); ++it) {
249 float rho = it->conversionVertex().position().rho();
250 if (rho>minRho)
continue;
251 if (!matchesConversion(trk, *it))
continue;
252 if (!isGoodConversion(*it,beamspot,lxyMin,probMin,nHitsBeforeVtxMax))
continue;
265 const math::XYZPoint &beamspot,
float dRMax,
float dEtaMax,
float dPhiMax,
float lxyMin,
float probMin,
unsigned int nHitsBeforeVtxMax)
275 double minRho = 999.;
276 for (ConversionCollection::const_iterator it = convCol->begin(); it!=convCol->end(); ++it) {
277 float rho = it->conversionVertex().position().rho();
278 if (rho>minRho)
continue;
279 if (!matchesConversion(sc, *it, dRMax,dEtaMax,dPhiMax))
continue;
280 if (!isGoodConversion(*it,beamspot,lxyMin,probMin,nHitsBeforeVtxMax))
continue;
298 if (sc.
isNull())
return false;
300 for (GsfElectronCollection::const_iterator it = eleCol->begin(); it!=eleCol->end(); ++it) {
302 if (it->superCluster()!=sc)
continue;
305 if (it->gsfTrack()->trackerExpectedHitsInner().numberOfHits()>0)
continue;
308 if (hasMatchedConversion(*it,convCol,beamspot,lxyMin,probMin,nHitsBeforeVtxMax))
continue;
330 if (sc.
isNull())
return match;
332 for (GsfElectronCollection::const_iterator it = eleCol->begin(); it!=eleCol->end(); ++it) {
334 if (it->superCluster()!=sc)
continue;
337 if (it->gsfTrack()->trackerExpectedHitsInner().numberOfHits()>0)
continue;
340 if (hasMatchedConversion(*it,convCol,beamspot,lxyMin,probMin,nHitsBeforeVtxMax))
continue;
const reco::Vertex & conversionVertex() const
returns the reco conversion vertex
const math::XYZPoint & position() const
cluster centroid position
static HepMC::IO_HEPEVT conv
double y() const
y coordinate
bool isValid() const
Tells whether the vertex is valid.
bool isNull() const
Checks for null.
const Point & position() const
position
math::XYZVectorF refittedPairMomentum() const
Conversion tracks momentum from the tracks refitted with vertex constraint.
TrackRef closestCtfTrackRef() const
bool isNonnull() const
Checks for non-null.
bool isNull() const
Checks for null.
double dPhi(double phi1, double phi2)
double chi2() const
chi-squares
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
edm::Ref< GsfElectronCollection > GsfElectronRef
reference to an object in a collection of GsfElectron objects
double deltaPhi(double phi1, double phi2)
double x() const
x coordinate
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
key_type key() const
Accessor for product key.
const std::vector< uint8_t > & nHitsBeforeVtx() const
Vector of the number of hits before the vertex along each track trajector.
edm::Ref< ConversionCollection > ConversionRef
reference to an object in a collection of Conversion objects
ProductID id() const
Accessor for product ID.
std::vector< edm::RefToBase< reco::Track > > const & tracks() const
vector of track to base references
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack
std::string match(BranchDescription const &a, BranchDescription const &b, std::string const &fileName)