12 template <
typename VMType,
typename HandleType>
15 std::vector<VMType>
values,
17 auto vMap = std::make_unique<edm::ValueMap<VMType>>();
45 produces<reco::PreIdCollection>(idLabel);
46 produces<edm::ValueMap<reco::PreIdRef>>(idLabel);
53 for (
const auto& idTag :
idsTag_) {
54 idsToken_.emplace_back(consumes<reco::PreIdCollection>(idTag));
70 auto oSeeds = std::make_unique<reco::ElectronSeedCollection>();
71 for (
unsigned int s = 0;
s < iSeeds->size(); ++
s) {
72 oSeeds->push_back(iSeeds->at(
s));
73 reco::TrackRef newTrackRef(newTracks, oSeeds->back().ctfTrack().index());
74 oSeeds->back().setCtfTrack(newTrackRef);
78 for (
size_t idNr = 0; idNr <
idsTag_.size(); idNr++) {
80 auto oIds = std::make_unique<reco::PreIdCollection>();
81 for (
unsigned int i = 0;
i < iIds->size(); ++
i) {
82 oIds->push_back(iIds->at(
i));
83 reco::TrackRef newTrackRef(newTracks, oIds->back().trackRef().index());
84 oIds->back().setTrack(newTrackRef);
89 std::vector<reco::PreIdRef>
values;
90 for (
size_t trkNr = 0; trkNr < newTracks->size(); ++trkNr) {
92 if (trkNr < oldTracks->
size() && iIdMap.isValid()) {
T getParameter(std::string const &) const
void produce(edm::Event &, const edm::EventSetup &) override
edm::InputTag newTracksTag_
edm::EDGetTokenT< reco::TrackCollection > newTracksToken_
std::vector< std::string > preidLabel_
edm::EDGetTokenT< reco::ElectronSeedCollection > seedsToken_
edm::InputTag oldTracksTag_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ElectronSeedTrackRefFix(const edm::ParameterSet &)
void addDefault(ParameterSetDescription const &psetDescription)
std::string preidgsfLabel_
~ElectronSeedTrackRefFix() override
#define DEFINE_FWK_MODULE(type)
std::vector< edm::EDGetTokenT< reco::PreIdCollection > > idsToken_
std::vector< edm::EDGetTokenT< edm::ValueMap< reco::PreIdRef > > > idMapToken_
std::vector< edm::InputTag > idsTag_
edm::EDGetTokenT< reco::TrackCollection > oldTracksToken_