76 : useTrajectory(conf.getParameter<bool>(
"useTrajectory")),
77 setTrackerOnly(conf.getParameter<bool>(
"setTrackerOnly")),
78 setIsGsfTrackOpen(conf.getParameter<bool>(
"setIsGsfTrackOpen")),
79 setArbitratedEcalSeeded(conf.getParameter<bool>(
"setArbitratedEcalSeeded")),
80 setArbitratedMerged(conf.getParameter<bool>(
"setArbitratedMerged")),
81 setArbitratedMergedEcalGeneral(conf.getParameter<bool>(
"setArbitratedMergedEcalGeneral")),
82 beamSpotInputTag(consumes<
reco::
BeamSpot>(conf.getParameter<edm::
InputTag>(
"beamSpotInputTag"))),
83 filterOnConvTrackHyp(conf.getParameter<bool>(
"filterOnConvTrackHyp")),
84 minConvRadius(conf.getParameter<double>(
"minConvRadius")) {
92 produces<reco::ConversionTrackCollection>();
104 std::map<reco::TrackRef, edm::Ref<std::vector<Trajectory> > > tracktrajmap;
105 std::map<reco::GsfTrackRef, edm::Ref<std::vector<Trajectory> > > gsftracktrajmap;
109 if (dynamic_cast<const reco::GsfTrack*>(&trks.
at(0))) {
112 gsftracktrajmap[pair.val] = pair.key;
117 tracktrajmap[pair.val] = pair.key;
124 auto outputTrks = std::make_unique<reco::ConversionTrackCollection>();
138 for (
size_t i = 0;
i < trks.
size(); ++
i) {
159 if (!gsftracktrajmap.empty()) {
166 outputTrks->push_back(convTrack);
value_type const * get() const
void setIsGsfTrackOpen(bool b)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::EventSetup & c
void setIsArbitratedMergedEcalGeneral(bool b)
void setMagnField(const MagneticField *magnField)
edm::EDGetTokenT< edm::View< reco::Track > > genericTracks
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< TrajTrackAssociationCollection > kfTrajectories
ConversionTrackProducer(const edm::ParameterSet &conf)
bool setArbitratedMergedEcalGeneral
edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::GsfTrackCollection, unsigned short > > TrajGsfTrackAssociationCollection
void setTrajRef(edm::Ref< std::vector< Trajectory > > tr)
RefToBase< value_type > refAt(size_type i) const
bool getData(T &iHolder) const
void setIsArbitratedEcalSeeded(bool b)
std::vector< GsfTrack > GsfTrackCollection
collection of GsfTracks
bool get(ProductID const &oid, Handle< PROD > &result) const
~ConversionTrackProducer() override
bool setArbitratedEcalSeeded
IdealHelixParameters ConvTrackPreSelector
void setIsTrackerOnly(bool b)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
edm::EDGetTokenT< reco::BeamSpot > beamSpotInputTag
T getParameter(std::string const &) const
edm::EDGetTokenT< TrajGsfTrackAssociationCollection > gsfTrajectories
bool filterOnConvTrackHyp
bool isTangentPointDistanceLessThan(float rmax, const reco::Track *track, const math::XYZVector &refPoint)
const_reference at(size_type pos) const
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken
void produce(edm::Event &e, const edm::EventSetup &c) override
void setIsArbitratedMerged(bool b)