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());
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);
const edm::EDGetTokenT< reco::ConversionCollection > conversionsToken_
#define DEFINE_FWK_MODULE(type)
const edm::EDGetTokenT< edm::View< reco::GsfElectron > > electronToken_
T const * product() const
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
const edm::EDGetTokenT< reco::BeamSpot > bsToken_
std::vector< Conversion > ConversionCollection
PATConversionProducer(const edm::ParameterSet &iConfig)
void setNHitsMax(int nHitsMax)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
void setVtxProb(double vtxProb)
~PATConversionProducer() override