73 std::vector<Conversion> * patConversions =
new std::vector<Conversion>();
75 for (reco::ConversionCollection::const_iterator
conv = hConversions->begin();
conv!= hConversions->end(); ++
conv) {
85 double vtxProb = TMath::Prob( vtx.
chi2(), vtx.
ndof());
87 double dbsx = vtx.
x() - beamspot.
position().x();
88 double dbsy = vtx.
y() - beamspot.
position().y();
89 double lxy = (mom.x()*dbsx + mom.y()*dbsy)/mom.rho();
92 for (std::vector<uint8_t>::const_iterator it =
conv->nHitsBeforeVtx().begin(); it!=
conv->nHitsBeforeVtx().end(); ++it) {
93 if ((*it) > nHitsMax) nHitsMax = (*it);
97 anConversion.setVtxProb( vtxProb );
98 anConversion.setLxy( lxy );
99 anConversion.setNHitsMax( nHitsMax );
101 patConversions->push_back(anConversion);
110 std::unique_ptr<std::vector<Conversion> > ptr(patConversions);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::EDGetTokenT< reco::ConversionCollection > conversionsToken_
static HepMC::IO_HEPEVT conv
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double y() const
y coordinate
const edm::EDGetTokenT< edm::View< reco::GsfElectron > > electronToken_
const edm::EDGetTokenT< reco::BeamSpot > bsToken_
double chi2() const
chi-squares
double x() const
x coordinate
T const * product() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
const Point & position() const
position