56 GsfPFRecTrackCollection::const_iterator gsfPfRecTrack;
57 for (gsfPfRecTrack = gsfPfRecTrackCollection->begin(); gsfPfRecTrack != gsfPfRecTrackCollection->end();
59 const GsfTrackRef gsfTrackRef = gsfPfRecTrack->gsfTrackRef();
64 for (
unsigned int i = 0;
i < gsfTrackCollection->size(); ++
i) {
72 GsfElectronCoreCollection::const_iterator edCoreIter;
73 for (edCoreIter = edCoresCollection->begin(); edCoreIter != edCoresCollection->end(); edCoreIter++) {
74 electrons.push_back(edCoreIter->clone());
79 GsfElectronCoreCollection::const_iterator pfCoreIter;
80 std::list<GsfElectronCore *>::iterator eleCore;
82 for (eleCore = electrons.begin(); eleCore != electrons.end(); eleCore++) {
85 for (pfCoreIter = pfCoresCollection->begin(); pfCoreIter != pfCoresCollection->end(); pfCoreIter++) {
86 if (pfCoreIter->gsfTrack() == (*eleCore)->gsfTrack()) {
88 edm::LogWarning(
"GsfElectronCoreProducer") <<
"associated pfGsfElectronCore already found";
91 (*eleCore)->setParentSuperCluster(pfCoreIter->parentSuperCluster());
98 auto collection = std::make_unique<GsfElectronCoreCollection>();
99 for (eleCore = electrons.begin(); eleCore != electrons.end(); eleCore++) {
100 if ((*eleCore)->superCluster().isNull()) {
101 LogDebug(
"GsfElectronCoreProducer") <<
"GsfTrack with no associated SuperCluster at all.";
void initEvent(edm::Event &event, const edm::EventSetup &setup)
edm::Handle< reco::GsfElectronCoreCollection > edCoresH_
void produceTrackerDrivenCore(const reco::GsfTrackRef &gsfTrackRef, std::list< reco::GsfElectronCore * > &electrons)
edm::Handle< reco::GsfTrackCollection > gsfTracksH_
std::vector< GsfPFRecTrack > GsfPFRecTrackCollection
collection of GsfPFRecTrack objects
std::vector< GsfElectronCore > GsfElectronCoreCollection
std::vector< GsfTrack > GsfTrackCollection
collection of GsfTracks
edm::EDGetTokenT< reco::GsfElectronCoreCollection > pfCoresTag_
T const * product() const
edm::EDGetTokenT< reco::GsfElectronCoreCollection > edCoresTag_
edm::Handle< reco::GsfPFRecTrackCollection > gsfPfRecTracksH_
edm::Handle< reco::GsfElectronCoreCollection > pfCoresH_