39 preid_{consumes<std::vector<reco::PreId> >(iConfig.getParameter<
edm::InputTag>(
"gsfPreID"))},
41 produces< edm::Association<reco::TrackCollection> > ();
57 const size_t ngsf = gsftracks->size();
60 std::vector<int> gsf2track(ngsf, -1);
63 for(
unsigned int igsf=0; igsf < ngsf; ++igsf) {
69 if(trk.
id() != tracks.
id()) {
70 throw cms::Exception(
"WrongCollection",
"The reco::Track collection used to match against the GSF Tracks was not used to produce such tracks");
73 size_t trkid = trk.
index();
74 gsf2track[igsf] = trkid;
78 auto assoc = std::make_unique< edm::Association<reco::TrackCollection> >(
tracks);
80 filler.insert(gsftracks, gsf2track.begin(), gsf2track.end());
90 descriptions.
add(
"lowPtGsfToTrackLinksDefault", desc);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
LowPtGSFToTrackLinker(const edm::ParameterSet &)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
static void fillDescriptions(edm::ConfigurationDescriptions &)
ProductID id() const
Accessor for product ID.
#define DEFINE_FWK_MODULE(type)
const edm::EDGetTokenT< std::vector< reco::PreId > > preid_
~LowPtGSFToTrackLinker() override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::EDGetTokenT< std::vector< reco::GsfTrack > > gsftracks_
const edm::EDGetTokenT< reco::TrackCollection > tracks_