65 : electronToken_(consumes<edm::
View<
reco::GsfElectron> >(iConfig.getParameter<edm::
InputTag>(
"electronSource"))),
69 produces<std::vector<Conversion> >();
87 std::vector<Conversion> *patConversions =
new std::vector<Conversion>();
89 for (reco::ConversionCollection::const_iterator
conv = hConversions->begin();
conv != hConversions->end(); ++
conv) {
97 double vtxProb = TMath::Prob(vtx.
chi2(), vtx.
ndof());
99 double dbsx = vtx.
x() - beamspot.
position().x();
100 double dbsy = vtx.
y() - beamspot.
position().y();
101 double lxy = (mom.x() * dbsx + mom.y() * dbsy) / mom.rho();
104 for (std::vector<uint8_t>::const_iterator it =
conv->nHitsBeforeVtx().begin();
105 it !=
conv->nHitsBeforeVtx().end();
107 if ((*it) > nHitsMax)
116 patConversions->push_back(anConversion);
124 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_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
double y() const
y coordinate
const edm::EDGetTokenT< edm::View< reco::GsfElectron > > electronToken_
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
const edm::EDGetTokenT< reco::BeamSpot > bsToken_
double chi2() const
chi-squares
std::vector< Conversion > ConversionCollection
double x() const
x coordinate
PATConversionProducer(const edm::ParameterSet &iConfig)
void setNHitsMax(int nHitsMax)
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
void setVtxProb(double vtxProb)
~PATConversionProducer() override