46 : electronToken_(consumes<
edm::
View<
reco::GsfElectron> >(iConfig.getParameter<
edm::
InputTag>(
"electronSource"))),
50 produces<std::vector<Conversion> >();
68 std::vector<Conversion> *patConversions =
new std::vector<Conversion>();
70 for (reco::ConversionCollection::const_iterator
conv = hConversions->begin();
conv != hConversions->end(); ++
conv) {
78 double vtxProb = TMath::Prob(vtx.
chi2(), vtx.
ndof());
80 double dbsx = vtx.
x() - beamspot.
position().x();
81 double dbsy = vtx.
y() - beamspot.
position().y();
82 double lxy = (mom.x() * dbsx + mom.y() * dbsy) / mom.rho();
85 for (std::vector<uint8_t>::const_iterator it =
conv->nHitsBeforeVtx().begin();
86 it !=
conv->nHitsBeforeVtx().end();
97 patConversions->push_back(anConversion);
105 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_
#define DEFINE_FWK_MODULE(type)
double chi2() const
chi-squares
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
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