CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ReducedEGProducer Class Reference

#include <ReducedEGProducer.h>

Inheritance diagram for ReducedEGProducer:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

virtual void produce (edm::Event &evt, const edm::EventSetup &es) override final
 
 ReducedEGProducer (const edm::ParameterSet &ps)
 
 ~ReducedEGProducer ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

const edm::EDGetTokenT< EcalRecHitCollectionbarrelEcalHits_
 
const edm::EDGetTokenT< reco::ConversionCollectionconversionT_
 
const bool doPreshowerEcalHits_
 
const edm::EDGetTokenT< EcalRecHitCollectionendcapEcalHits_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronIdTs_
 
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > gsfElectronPfCandMapT_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronPFClusterIsoTs_
 
const edm::EDGetTokenT< reco::GsfElectronCollectiongsfElectronT_
 
const StringCutObjectSelector< reco::GsfElectronkeepGsfElectronSel_
 
const StringCutObjectSelector< reco::PhotonkeepPhotonSel_
 
const std::string outConversions_
 
const std::string outEBEEClusters_
 
const std::string outEBRecHits_
 
const std::string outEERecHits_
 
const std::string outESClusters_
 
const std::string outESRecHits_
 
const std::string outGsfElectronCores_
 
const std::vector< std::string > outGsfElectronIds_
 
const std::string outGsfElectronPfCandMap_
 
const std::vector< std::string > outGsfElectronPFClusterIsos_
 
const std::string outGsfElectrons_
 
const std::string outPhotonCores_
 
const std::vector< std::string > outPhotonIds_
 
const std::string outPhotonPfCandMap_
 
const std::vector< std::string > outPhotonPFClusterIsos_
 
const std::string outPhotons_
 
const std::string outSingleConversions_
 
const std::string outSuperClusters_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< bool > > > photonIdTs_
 
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > photonPfCandMapT_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > photonPFClusterIsoTs_
 
const edm::EDGetTokenT< reco::PhotonCollectionphotonT_
 
const edm::EDGetTokenT< EcalRecHitCollectionpreshowerEcalHits_
 
const StringCutObjectSelector< reco::GsfElectronrelinkGsfElectronSel_
 
const StringCutObjectSelector< reco::PhotonrelinkPhotonSel_
 
const edm::EDGetTokenT< reco::ConversionCollectionsingleConversionT_
 
const StringCutObjectSelector< reco::GsfElectronslimRelinkGsfElectronSel_
 
const StringCutObjectSelector< reco::PhotonslimRelinkPhotonSel_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Select subset of electrons and photons from input collections and produced consistently relinked output collections including associated SuperClusters, CaloClusters and ecal RecHits

Author
J.Bendavid (CERN)

Definition at line 47 of file ReducedEGProducer.h.

Constructor & Destructor Documentation

ReducedEGProducer::ReducedEGProducer ( const edm::ParameterSet ps)

Definition at line 56 of file ReducedEGProducer.cc.

References edm::EDConsumerBase::consumes(), doPreshowerEcalHits_, edm::ParameterSet::getParameter(), gsfElectronIdTs_, gsfElectronPFClusterIsoTs_, outConversions_, outEBEEClusters_, outEBRecHits_, outEERecHits_, outESClusters_, outESRecHits_, outGsfElectronCores_, outGsfElectronIds_, outGsfElectronPfCandMap_, outGsfElectronPFClusterIsos_, outGsfElectrons_, outPhotonCores_, outPhotonIds_, outPhotonPfCandMap_, outPhotonPFClusterIsos_, outPhotons_, outSingleConversions_, outSuperClusters_, photonIdTs_, photonPFClusterIsoTs_, AlCaHLTBitMon_QueryRunRegistry::string, and GlobalPosition_Frontier_DevDB_cff::tag.

56  :
57  photonT_(consumes<reco::PhotonCollection>(config.getParameter<edm::InputTag>("photons"))),
58  gsfElectronT_(consumes<reco::GsfElectronCollection>(config.getParameter<edm::InputTag>("gsfElectrons"))),
59  conversionT_(consumes<reco::ConversionCollection>(config.getParameter<edm::InputTag>("conversions"))),
60  singleConversionT_(consumes<reco::ConversionCollection>(config.getParameter<edm::InputTag>("singleConversions"))),
61  barrelEcalHits_(consumes<EcalRecHitCollection>(config.getParameter<edm::InputTag>("barrelEcalHits"))),
62  endcapEcalHits_(consumes<EcalRecHitCollection>(config.getParameter<edm::InputTag>("endcapEcalHits"))),
63  doPreshowerEcalHits_(!config.getParameter<edm::InputTag>("preshowerEcalHits").label().empty()),
64  preshowerEcalHits_(doPreshowerEcalHits_ ? consumes<EcalRecHitCollection>(config.getParameter<edm::InputTag>("preshowerEcalHits")) : edm::EDGetTokenT<EcalRecHitCollection>()),
65  photonPfCandMapT_(consumes<edm::ValueMap<std::vector<reco::PFCandidateRef> > >(config.getParameter<edm::InputTag>("photonsPFValMap"))),
66  gsfElectronPfCandMapT_(consumes<edm::ValueMap<std::vector<reco::PFCandidateRef> > >(config.getParameter<edm::InputTag>("gsfElectronsPFValMap"))),
67  //output collections
68  outPhotons_("reducedGedPhotons"),
69  outPhotonCores_("reducedGedPhotonCores"),
70  outGsfElectrons_("reducedGedGsfElectrons"),
71  outGsfElectronCores_("reducedGedGsfElectronCores"),
72  outConversions_("reducedConversions"),
73  outSingleConversions_("reducedSingleLegConversions"),
74  outSuperClusters_("reducedSuperClusters"),
75  outEBEEClusters_("reducedEBEEClusters"),
76  outESClusters_("reducedESClusters"),
77  outEBRecHits_("reducedEBRecHits"),
78  outEERecHits_("reducedEERecHits"),
79  outESRecHits_("reducedESRecHits"),
80  outPhotonPfCandMap_("reducedPhotonPfCandMap"),
81  outGsfElectronPfCandMap_("reducedGsfElectronPfCandMap"),
82  outPhotonIds_(config.getParameter<std::vector<std::string> >("photonIDOutput")),
83  outGsfElectronIds_(config.getParameter<std::vector<std::string> >("gsfElectronIDOutput")),
84  outPhotonPFClusterIsos_(config.getParameter<std::vector<std::string> >("photonPFClusterIsoOutput")),
85  outGsfElectronPFClusterIsos_(config.getParameter<std::vector<std::string> >("gsfElectronPFClusterIsoOutput")),
86  keepPhotonSel_(config.getParameter<std::string>("keepPhotons")),
87  slimRelinkPhotonSel_(config.getParameter<std::string>("slimRelinkPhotons")),
88  relinkPhotonSel_(config.getParameter<std::string>("relinkPhotons")),
89  keepGsfElectronSel_(config.getParameter<std::string>("keepGsfElectrons")),
90  slimRelinkGsfElectronSel_(config.getParameter<std::string>("slimRelinkGsfElectrons")),
91  relinkGsfElectronSel_(config.getParameter<std::string>("relinkGsfElectrons"))
92 {
93  const std::vector<edm::InputTag>& photonidinputs =
94  config.getParameter<std::vector<edm::InputTag> >("photonIDSources");
95  for (const edm::InputTag &tag : photonidinputs) {
97  }
98 
99  const std::vector<edm::InputTag>& gsfelectronidinputs =
100  config.getParameter<std::vector<edm::InputTag> >("gsfElectronIDSources");
101  for (const edm::InputTag &tag : gsfelectronidinputs) {
103  }
104 
105  const std::vector<edm::InputTag>& photonpfclusterisoinputs =
106  config.getParameter<std::vector<edm::InputTag> >("photonPFClusterIsoSources");
107  for (const edm::InputTag &tag : photonpfclusterisoinputs) {
109  }
110 
111  const std::vector<edm::InputTag>& gsfelectronpfclusterisoinputs =
112  config.getParameter<std::vector<edm::InputTag> >("gsfElectronPFClusterIsoSources");
113  for (const edm::InputTag &tag : gsfelectronpfclusterisoinputs) {
115  }
116 
117  produces< reco::PhotonCollection >(outPhotons_);
118  produces< reco::PhotonCoreCollection >(outPhotonCores_);
119  produces< reco::GsfElectronCollection >(outGsfElectrons_);
120  produces< reco::GsfElectronCoreCollection >(outGsfElectronCores_);
121  produces< reco::ConversionCollection >(outConversions_);
122  produces< reco::ConversionCollection >(outSingleConversions_);
123  produces< reco::SuperClusterCollection >(outSuperClusters_);
124  produces< reco::CaloClusterCollection >(outEBEEClusters_);
125  produces< reco::CaloClusterCollection >(outESClusters_);
126  produces< EcalRecHitCollection >(outEBRecHits_);
127  produces< EcalRecHitCollection >(outEERecHits_);
128  if (doPreshowerEcalHits_) produces< EcalRecHitCollection >(outESRecHits_);
129  produces< edm::ValueMap<std::vector<reco::PFCandidateRef> > >(outPhotonPfCandMap_);
130  produces< edm::ValueMap<std::vector<reco::PFCandidateRef> > >(outGsfElectronPfCandMap_);
131  for (const std::string &outid : outPhotonIds_) {
132  produces< edm::ValueMap<bool> >(outid);
133  }
134  for (const std::string &outid : outGsfElectronIds_) {
135  produces< edm::ValueMap<float> >(outid);
136  }
137  for (const std::string &outid : outPhotonPFClusterIsos_) {
138  produces< edm::ValueMap<float> >(outid);
139  }
140  for (const std::string &outid : outGsfElectronPFClusterIsos_) {
141  produces< edm::ValueMap<float> >(outid);
142  }
143 }
const bool doPreshowerEcalHits_
const edm::EDGetTokenT< reco::GsfElectronCollection > gsfElectronT_
const StringCutObjectSelector< reco::Photon > slimRelinkPhotonSel_
const edm::EDGetTokenT< reco::ConversionCollection > singleConversionT_
const std::vector< std::string > outPhotonIds_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > photonPFClusterIsoTs_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronPFClusterIsoTs_
const StringCutObjectSelector< reco::GsfElectron > keepGsfElectronSel_
Definition: config.py:1
const std::string outEBEEClusters_
const StringCutObjectSelector< reco::Photon > keepPhotonSel_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > photonPfCandMapT_
const StringCutObjectSelector< reco::GsfElectron > relinkGsfElectronSel_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > gsfElectronPfCandMapT_
const std::string outEBRecHits_
const std::string outESRecHits_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const edm::EDGetTokenT< EcalRecHitCollection > preshowerEcalHits_
const std::vector< std::string > outGsfElectronIds_
const std::string outSingleConversions_
const std::string outESClusters_
const std::vector< std::string > outPhotonPFClusterIsos_
const StringCutObjectSelector< reco::Photon > relinkPhotonSel_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronIdTs_
edm::Ref< PFCandidateCollection > PFCandidateRef
persistent reference to a PFCandidate
const std::string outPhotons_
const std::string outGsfElectronPfCandMap_
const std::string outGsfElectronCores_
const edm::EDGetTokenT< reco::PhotonCollection > photonT_
const std::vector< std::string > outGsfElectronPFClusterIsos_
const std::string outSuperClusters_
const std::string outConversions_
const std::string outGsfElectrons_
const StringCutObjectSelector< reco::GsfElectron > slimRelinkGsfElectronSel_
std::string const & label() const
Definition: InputTag.h:36
const std::string outPhotonCores_
fixed size matrix
HLT enums.
const std::string outEERecHits_
const std::string outPhotonPfCandMap_
const edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
std::vector< edm::EDGetTokenT< edm::ValueMap< bool > > > photonIdTs_
const edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
const edm::EDGetTokenT< reco::ConversionCollection > conversionT_
ReducedEGProducer::~ReducedEGProducer ( )

Definition at line 145 of file ReducedEGProducer.cc.

146 {
147 }

Member Function Documentation

void ReducedEGProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
finaloverridevirtual

Definition at line 152 of file ReducedEGProducer.cc.

References Reference_intrackfit_cff::barrel, barrelEcalHits_, begin, edm::PtrVectorBase::clear(), edm::RefVector< C, T, F >::clear(), reco::SuperCluster::clearHitsAndFractions(), fastPrimaryVertexProducer_cfi::clusters, reco::SuperCluster::clusters(), edm::conversion(), printConversionInfo::conversionHandle, conversions_cfi::conversions, reco::Photon::conversions(), reco::Photon::conversionsOneLeg(), conversionT_, reco::GsfElectron::core(), doPreshowerEcalHits_, DetId::Ecal, EcalBarrel, EcalEndcap, end, endcapEcalHits_, edm::helper::Filler< Map >::fill(), edm::EventSetup::get(), edm::Event::getByToken(), CaloTopology::getSubdetectorTopology(), CaloSubdetectorTopology::getWindow(), gsfElectronCores_cfi::gsfElectronCores, gsfElectronIdTs_, gsfElectronPfCandMapT_, gsfElectronPFClusterIsoTs_, gsfElectrons_cfi::gsfElectrons, gsfElectronT_, edm::helper::Filler< Map >::insert(), keep, keepGsfElectronSel_, keepPhotonSel_, electronMatch_cfi::matched, ConversionTools::matchesConversion(), eostools::move(), outConversions_, outEBEEClusters_, outEBRecHits_, outEERecHits_, outESClusters_, outESRecHits_, outGsfElectronCores_, outGsfElectronIds_, outGsfElectronPfCandMap_, outGsfElectronPFClusterIsos_, outGsfElectrons_, outPhotonCores_, outPhotonIds_, outPhotonPfCandMap_, outPhotonPFClusterIsos_, outPhotons_, outSingleConversions_, outSuperClusters_, muons2muons_cfi::photon, photonCore_cfi::photonCore, reco::Photon::photonCore(), photonIdTs_, photonPfCandMapT_, photonPFClusterIsoTs_, jetCleaner_cfi::photons, photonT_, reco::SuperCluster::preshowerClusters(), preshowerEcalHits_, edm::Handle< T >::product(), edm::RefVector< C, T, F >::push_back(), edm::PtrVector< T >::push_back(), edm::Event::put(), relinkGsfElectronSel_, relinkPhotonSel_, reco::SuperCluster::seed(), SurveyInfoScenario_cff::seed, reducedEgamma_cfi::singleConversions, singleConversionT_, edm::PtrVectorBase::size(), edm::RefVector< C, T, F >::size(), reco::CaloCluster::size(), slimRelinkGsfElectronSel_, slimRelinkPhotonSel_, reco::Photon::superCluster(), and reco::GsfElectron::superCluster().

152  {
153 
154  //get input collections
155 
156 
158  theEvent.getByToken(photonT_, photonHandle);
159 
161  theEvent.getByToken(gsfElectronT_, gsfElectronHandle);
162 
164  theEvent.getByToken(conversionT_, conversionHandle);
165 
166  edm::Handle<reco::ConversionCollection> singleConversionHandle;
167  theEvent.getByToken(singleConversionT_, singleConversionHandle);
168 
169  edm::Handle<EcalRecHitCollection> barrelHitHandle;
170  theEvent.getByToken(barrelEcalHits_, barrelHitHandle);
171 
172  edm::Handle<EcalRecHitCollection> endcapHitHandle;
173  theEvent.getByToken(endcapEcalHits_, endcapHitHandle);
174 
175  edm::Handle<EcalRecHitCollection> preshowerHitHandle;
176  if (doPreshowerEcalHits_) theEvent.getByToken(preshowerEcalHits_, preshowerHitHandle);
177 
179  theEvent.getByToken(photonPfCandMapT_, photonPfCandMapHandle);
180 
182  theEvent.getByToken(gsfElectronPfCandMapT_, gsfElectronPfCandMapHandle);
183 
184  std::vector<edm::Handle<edm::ValueMap<bool> > > photonIdHandles(photonIdTs_.size());
185  for (unsigned int itok=0; itok<photonIdTs_.size(); ++itok) {
186  theEvent.getByToken(photonIdTs_[itok],photonIdHandles[itok]);
187  }
188 
189  std::vector<edm::Handle<edm::ValueMap<float> > > gsfElectronIdHandles(gsfElectronIdTs_.size());
190  for (unsigned int itok=0; itok<gsfElectronIdTs_.size(); ++itok) {
191  theEvent.getByToken(gsfElectronIdTs_[itok],gsfElectronIdHandles[itok]);
192  }
193 
194  std::vector<edm::Handle<edm::ValueMap<float> > > gsfElectronPFClusterIsoHandles(gsfElectronPFClusterIsoTs_.size());
195  for (unsigned int itok=0; itok<gsfElectronPFClusterIsoTs_.size(); ++itok) {
196  theEvent.getByToken(gsfElectronPFClusterIsoTs_[itok],gsfElectronPFClusterIsoHandles[itok]);
197  }
198 
199  std::vector<edm::Handle<edm::ValueMap<float> > > photonPFClusterIsoHandles(photonPFClusterIsoTs_.size());
200  for (unsigned int itok=0; itok<photonPFClusterIsoTs_.size(); ++itok) {
201  theEvent.getByToken(photonPFClusterIsoTs_[itok],photonPFClusterIsoHandles[itok]);
202  }
203 
204  edm::ESHandle<CaloTopology> theCaloTopology;
205  theEventSetup.get<CaloTopologyRecord>().get(theCaloTopology);
206  const CaloTopology *caloTopology = & (*theCaloTopology);
207 
208  //initialize output collections
209  auto photons = std::make_unique<reco::PhotonCollection>();
210  auto photonCores = std::make_unique<reco::PhotonCoreCollection>();
211  auto gsfElectrons = std::make_unique<reco::GsfElectronCollection>();
212  auto gsfElectronCores = std::make_unique<reco::GsfElectronCoreCollection>();
213  auto conversions = std::make_unique<reco::ConversionCollection>();
214  auto singleConversions = std::make_unique<reco::ConversionCollection>();
215  auto superClusters = std::make_unique<reco::SuperClusterCollection>();
216  auto ebeeClusters = std::make_unique<reco::CaloClusterCollection>();
217  auto esClusters = std::make_unique<reco::CaloClusterCollection>();
218  auto ebRecHits = std::make_unique<EcalRecHitCollection>();
219  auto eeRecHits = std::make_unique<EcalRecHitCollection>();
220  auto esRecHits = std::make_unique<EcalRecHitCollection>();
221  auto photonPfCandMap = std::make_unique<edm::ValueMap<std::vector<reco::PFCandidateRef>>>();
222  auto gsfElectronPfCandMap = std::make_unique<edm::ValueMap<std::vector<reco::PFCandidateRef>>>();
223 
224  std::vector<std::unique_ptr<edm::ValueMap<bool> > > photonIds;
225  for (unsigned int iid=0; iid<photonIdHandles.size(); ++iid) {
226  photonIds.emplace_back(new edm::ValueMap<bool>);
227  }
228 
229  std::vector<std::unique_ptr<edm::ValueMap<float> > > gsfElectronIds;
230  for (unsigned int iid=0; iid<gsfElectronIdHandles.size(); ++iid) {
231  gsfElectronIds.emplace_back(new edm::ValueMap<float>);
232  }
233 
234  std::vector<std::unique_ptr<edm::ValueMap<float> > > photonPFClusterIsos;
235  for (unsigned int iid=0; iid<photonPFClusterIsoHandles.size(); ++iid) {
236  photonPFClusterIsos.emplace_back(new edm::ValueMap<float>);
237  }
238 
239  std::vector<std::unique_ptr<edm::ValueMap<float> > > gsfElectronPFClusterIsos;
240  for (unsigned int iid=0; iid<gsfElectronPFClusterIsoHandles.size(); ++iid) {
241  gsfElectronPFClusterIsos.emplace_back(new edm::ValueMap<float>);
242  }
243 
244  //maps to collection indices of output objects
245  std::map<reco::PhotonCoreRef, unsigned int> photonCoreMap;
246  std::map<reco::GsfElectronCoreRef, unsigned int> gsfElectronCoreMap;
247  std::map<reco::ConversionRef, unsigned int> conversionMap;
248  std::map<reco::ConversionRef, unsigned int> singleConversionMap;
249  std::map<reco::SuperClusterRef, unsigned int> superClusterMap;
250  std::map<reco::CaloClusterPtr, unsigned int> ebeeClusterMap;
251  std::map<reco::CaloClusterPtr, unsigned int> esClusterMap;
252  std::unordered_set<DetId> rechitMap;
253 
254  std::unordered_set<unsigned int> superClusterFullRelinkMap;
255 
256  //vectors for pfcandidate valuemaps
257  std::vector<std::vector<reco::PFCandidateRef> > pfCandIsoPairVecPho;
258  std::vector<std::vector<reco::PFCandidateRef> > pfCandIsoPairVecEle;
259 
260  //vectors for id valuemaps
261  std::vector<std::vector<bool> > photonIdVals(photonIds.size());
262  std::vector<std::vector<float> > gsfElectronIdVals(gsfElectronIds.size());
263  std::vector<std::vector<float> > photonPFClusterIsoVals(photonPFClusterIsos.size());
264  std::vector<std::vector<float> > gsfElectronPFClusterIsoVals(gsfElectronPFClusterIsos.size());
265 
266  //loop over photons and fill maps
267  for (unsigned int ipho=0; ipho<photonHandle->size(); ++ipho) {
268  const reco::Photon &photon = (*photonHandle)[ipho];
269 
270  bool keep = keepPhotonSel_(photon);
271  if (!keep) continue;
272 
273  reco::PhotonRef photonref(photonHandle,ipho);
274 
275  photons->push_back(photon);
276 
277  //fill pf candidate value map vector
278  pfCandIsoPairVecPho.push_back((*photonPfCandMapHandle)[photonref]);
279 
280  //fill photon id valuemap vectors
281  for (unsigned int iid=0; iid<photonIds.size(); ++iid) {
282  photonIdVals[iid].push_back( (*photonIdHandles[iid])[photonref] );
283  }
284 
285  for (unsigned int iid=0; iid<photonPFClusterIsos.size(); ++iid) {
286  photonPFClusterIsoVals[iid].push_back( (*photonPFClusterIsoHandles[iid])[photonref] );
287  }
288 
289  const reco::PhotonCoreRef &photonCore = photon.photonCore();
290  if (!photonCoreMap.count(photonCore)) {
291  photonCores->push_back(*photonCore);
292  photonCoreMap[photonCore] = photonCores->size() - 1;
293  }
294 
295  bool slimRelink = slimRelinkPhotonSel_(photon);
296  //no supercluster relinking unless slimRelink selection is satisfied
297  if (!slimRelink) continue;
298 
299  bool relink = relinkPhotonSel_(photon);
300 
301  const reco::SuperClusterRef &superCluster = photon.superCluster();
302  const auto &mappedsc = superClusterMap.find(superCluster);
303  //get index in output collection in order to keep track whether superCluster
304  //will be subject to full relinking
305  unsigned int mappedscidx = 0;
306  if (mappedsc==superClusterMap.end()) {
307  superClusters->push_back(*superCluster);
308  mappedscidx = superClusters->size() - 1;
309  superClusterMap[superCluster] = mappedscidx;
310  }
311  else {
312  mappedscidx = mappedsc->second;
313  }
314 
315  //additionally mark supercluster for full relinking
316  if (relink) superClusterFullRelinkMap.insert(mappedscidx);
317 
318  //conversions only for full relinking
319  if (!relink) continue;
320 
321  const reco::ConversionRefVector &convrefs = photon.conversions();
322  for (const reco::ConversionRef &convref : convrefs) {
323  if (!conversionMap.count(convref)) {
324  conversions->push_back(*convref);
325  conversionMap[convref] = conversions->size() - 1;
326  }
327  }
328 
329  //explicitly references conversions
330  const reco::ConversionRefVector &singleconvrefs = photon.conversionsOneLeg();
331  for (const reco::ConversionRef &convref : singleconvrefs) {
332  if (!singleConversionMap.count(convref)) {
333  singleConversions->push_back(*convref);
334  singleConversionMap[convref] = singleConversions->size() - 1;
335  }
336  }
337 
338  }
339 
340  //loop over electrons and fill maps
341  for (unsigned int iele = 0; iele<gsfElectronHandle->size(); ++iele) {
342  const reco::GsfElectron &gsfElectron = (*gsfElectronHandle)[iele];
343 
344  bool keep = keepGsfElectronSel_(gsfElectron);
345  if (!keep) continue;
346 
347  reco::GsfElectronRef gsfElectronref(gsfElectronHandle,iele);
348 
349  gsfElectrons->push_back(gsfElectron);
350  pfCandIsoPairVecEle.push_back((*gsfElectronPfCandMapHandle)[gsfElectronref]);
351 
352  //fill electron id valuemap vectors
353  for (unsigned int iid=0; iid<gsfElectronIds.size(); ++iid) {
354  gsfElectronIdVals[iid].push_back( (*gsfElectronIdHandles[iid])[gsfElectronref] );
355  }
356 
357  for (unsigned int iid=0; iid<gsfElectronPFClusterIsos.size(); ++iid) {
358  gsfElectronPFClusterIsoVals[iid].push_back( (*gsfElectronPFClusterIsoHandles[iid])[gsfElectronref] );
359  }
360 
361  const reco::GsfElectronCoreRef &gsfElectronCore = gsfElectron.core();
362  if (!gsfElectronCoreMap.count(gsfElectronCore)) {
363  gsfElectronCores->push_back(*gsfElectronCore);
364  gsfElectronCoreMap[gsfElectronCore] = gsfElectronCores->size() - 1;
365  }
366 
367  bool slimRelink = slimRelinkGsfElectronSel_(gsfElectron);
368  //no supercluster relinking unless slimRelink selection is satisfied
369  if (!slimRelink) continue;
370 
371  bool relink = relinkGsfElectronSel_(gsfElectron);
372 
373  const reco::SuperClusterRef &superCluster = gsfElectron.superCluster();
374  const auto &mappedsc = superClusterMap.find(superCluster);
375  //get index in output collection in order to keep track whether superCluster
376  //will be subject to full relinking
377  unsigned int mappedscidx = 0;
378  if (mappedsc==superClusterMap.end()) {
379  superClusters->push_back(*superCluster);
380  mappedscidx = superClusters->size() - 1;
381  superClusterMap[superCluster] = mappedscidx;
382  }
383  else {
384  mappedscidx = mappedsc->second;
385  }
386 
387  //additionally mark supercluster for full relinking
388  if (relink) superClusterFullRelinkMap.insert(mappedscidx);
389 
390  //conversions only for full relinking
391  if (!relink) continue;
392 
393  const reco::ConversionRefVector &convrefs = gsfElectron.core()->conversions();
394  for (const reco::ConversionRef &convref : convrefs) {
395  if (!conversionMap.count(convref)) {
396  conversions->push_back(*convref);
397  conversionMap[convref] = conversions->size() - 1;
398  }
399  }
400 
401  //explicitly references conversions
402  const reco::ConversionRefVector &singleconvrefs = gsfElectron.core()->conversionsOneLeg();
403  for (const reco::ConversionRef &convref : singleconvrefs) {
404  if (!singleConversionMap.count(convref)) {
405  singleConversions->push_back(*convref);
406  singleConversionMap[convref] = singleConversions->size() - 1;
407  }
408  }
409 
410  //conversions matched by trackrefs
411  for (unsigned int iconv = 0; iconv<conversionHandle->size(); ++iconv) {
412  const reco::Conversion &conversion = (*conversionHandle)[iconv];
413  reco::ConversionRef convref(conversionHandle,iconv);
414 
415  bool matched = ConversionTools::matchesConversion(gsfElectron,conversion,true,true);
416  if (!matched) continue;
417 
418  if (!conversionMap.count(convref)) {
419  conversions->push_back(conversion);
420  conversionMap[convref] = conversions->size() - 1;
421  }
422 
423  }
424 
425  //single leg conversions matched by trackrefs
426  for (unsigned int iconv = 0; iconv<singleConversionHandle->size(); ++iconv) {
427  const reco::Conversion &conversion = (*singleConversionHandle)[iconv];
428  reco::ConversionRef convref(singleConversionHandle,iconv);
429 
430  bool matched = ConversionTools::matchesConversion(gsfElectron,conversion,true,true);
431  if (!matched) continue;
432 
433  if (!singleConversionMap.count(convref)) {
434  singleConversions->push_back(conversion);
435  singleConversionMap[convref] = singleConversions->size() - 1;
436  }
437 
438  }
439 
440  }
441 
442  //loop over output SuperClusters and fill maps
443  for (unsigned int isc = 0; isc<superClusters->size(); ++isc) {
444  reco::SuperCluster &superCluster = (*superClusters)[isc];
445 
446  //link seed cluster no matter what
447  if (!ebeeClusterMap.count(superCluster.seed())) {
448  ebeeClusters->push_back(*superCluster.seed());
449  ebeeClusterMap[superCluster.seed()] = ebeeClusters->size() - 1;
450  }
451 
452  //only proceed if superCluster is marked for full relinking
453  bool fullrelink = superClusterFullRelinkMap.count(isc);
454  if (!fullrelink) {
455  //zero detid vector which is anyways not useful without stored rechits
456  superCluster.clearHitsAndFractions();
457  continue;
458  }
459 
460  for (const reco::CaloClusterPtr &cluster : superCluster.clusters()) {
461  if (!ebeeClusterMap.count(cluster)) {
462  ebeeClusters->push_back(*cluster);
463  ebeeClusterMap[cluster] = ebeeClusters->size() - 1;
464  }
465  for (std::pair<DetId,float> hitfrac : cluster->hitsAndFractions()) {
466  rechitMap.insert(hitfrac.first);
467  }
468  //make sure to also take all hits in the 5x5 around the max energy xtal
469  bool barrel = cluster->hitsAndFractions().front().first.subdetId()==EcalBarrel;
470  const EcalRecHitCollection *rhcol = barrel ? barrelHitHandle.product() : endcapHitHandle.product();
471  DetId seed = EcalClusterTools::getMaximum(*cluster, rhcol).first;
472 
473  std::vector<DetId> dets5x5 = (barrel) ? caloTopology->getSubdetectorTopology(DetId::Ecal,EcalBarrel)->getWindow(seed,5,5) : caloTopology->getSubdetectorTopology(DetId::Ecal,EcalEndcap)->getWindow(seed,5,5);
474  for (const DetId &detid : dets5x5) {
475  rechitMap.insert(detid);
476  }
477  }
478  for (const reco::CaloClusterPtr &cluster : superCluster.preshowerClusters()) {
479  if (!esClusterMap.count(cluster)) {
480  esClusters->push_back(*cluster);
481  esClusterMap[cluster] = esClusters->size() - 1;
482  }
483  for (std::pair<DetId,float> hitfrac : cluster->hitsAndFractions()) {
484  rechitMap.insert(hitfrac.first);
485  }
486  }
487 
488  //conversions matched geometrically
489  for (unsigned int iconv = 0; iconv<conversionHandle->size(); ++iconv) {
490  const reco::Conversion &conversion = (*conversionHandle)[iconv];
491  reco::ConversionRef convref(conversionHandle,iconv);
492 
493  bool matched = ConversionTools::matchesConversion(superCluster,conversion,0.2);
494  if (!matched) continue;
495 
496  if (!conversionMap.count(convref)) {
497  conversions->push_back(conversion);
498  conversionMap[convref] = conversions->size() - 1;
499  }
500 
501  }
502 
503  //single leg conversions matched by trackrefs
504  for (unsigned int iconv = 0; iconv<singleConversionHandle->size(); ++iconv) {
505  const reco::Conversion &conversion = (*singleConversionHandle)[iconv];
506  reco::ConversionRef convref(singleConversionHandle,iconv);
507 
508  bool matched = ConversionTools::matchesConversion(superCluster,conversion,0.2);
509  if (!matched) continue;
510 
511  if (!singleConversionMap.count(convref)) {
512  singleConversions->push_back(conversion);
513  singleConversionMap[convref] = singleConversions->size() - 1;
514  }
515 
516  }
517 
518  }
519 
520  //now finalize and add to the event collections in "reverse" order
521 
522  //rechits (fill output collections of rechits to be stored)
523  for (const EcalRecHit &rechit : *barrelHitHandle) {
524  if (rechitMap.count(rechit.detid())) {
525  ebRecHits->push_back(rechit);
526  }
527  }
528 
529  for (const EcalRecHit &rechit : *endcapHitHandle) {
530  if (rechitMap.count(rechit.detid())) {
531  eeRecHits->push_back(rechit);
532  }
533  }
534 
535  theEvent.put(std::move(ebRecHits),outEBRecHits_);
536  theEvent.put(std::move(eeRecHits),outEERecHits_);
537 
538  if (doPreshowerEcalHits_) {
539  for (const EcalRecHit &rechit : *preshowerHitHandle) {
540  if (rechitMap.count(rechit.detid())) {
541  esRecHits->push_back(rechit);
542  }
543  }
544  theEvent.put(std::move(esRecHits),outESRecHits_);
545  }
546 
547  //CaloClusters
548  //put calocluster output collections in event and get orphan handles to create ptrs
549  const edm::OrphanHandle<reco::CaloClusterCollection> &outEBEEClusterHandle = theEvent.put(std::move(ebeeClusters),outEBEEClusters_);
550  const edm::OrphanHandle<reco::CaloClusterCollection> &outESClusterHandle = theEvent.put(std::move(esClusters),outESClusters_);;
551 
552  //loop over output superclusters and relink to output caloclusters
553  for (reco::SuperCluster &superCluster : *superClusters) {
554  //remap seed cluster
555  const auto &seedmapped = ebeeClusterMap.find(superCluster.seed());
556  if (seedmapped != ebeeClusterMap.end()) {
557  //make new ptr
558  reco::CaloClusterPtr clusptr(outEBEEClusterHandle,seedmapped->second);
559  superCluster.setSeed(clusptr);
560  }
561 
562  //remap all clusters
564  for (const reco::CaloClusterPtr &cluster : superCluster.clusters()) {
565  const auto &clustermapped = ebeeClusterMap.find(cluster);
566  if (clustermapped != ebeeClusterMap.end()) {
567  //make new ptr
568  reco::CaloClusterPtr clusptr(outEBEEClusterHandle,clustermapped->second);
569  clusters.push_back(clusptr);
570  }
571  else {
572  //can only relink if all clusters are being relinked, so if one is missing, then skip the relinking completely
573  clusters.clear();
574  break;
575  }
576  }
577  if (clusters.size()) {
578  superCluster.setClusters(clusters);
579  }
580 
581  //remap preshower clusters
582  reco::CaloClusterPtrVector esclusters;
583  for (const reco::CaloClusterPtr &cluster : superCluster.preshowerClusters()) {
584  const auto &clustermapped = esClusterMap.find(cluster);
585  if (clustermapped != esClusterMap.end()) {
586  //make new ptr
587  reco::CaloClusterPtr clusptr(outESClusterHandle,clustermapped->second);
588  esclusters.push_back(clusptr);
589  }
590  else {
591  //can only relink if all clusters are being relinked, so if one is missing, then skip the relinking completely
592  esclusters.clear();
593  break;
594  }
595  }
596  if (esclusters.size()) {
597  superCluster.setPreshowerClusters(esclusters);
598  }
599 
600  }
601 
602  //put superclusters and conversions in the event
603  const edm::OrphanHandle<reco::SuperClusterCollection> &outSuperClusterHandle = theEvent.put(std::move(superClusters),outSuperClusters_);
604  const edm::OrphanHandle<reco::ConversionCollection> &outConversionHandle = theEvent.put(std::move(conversions),outConversions_);
605  const edm::OrphanHandle<reco::ConversionCollection> &outSingleConversionHandle = theEvent.put(std::move(singleConversions),outSingleConversions_);
606 
607  //loop over photoncores and relink superclusters (and conversions)
608  for (reco::PhotonCore &photonCore : *photonCores) {
609  const auto &scmapped = superClusterMap.find(photonCore.superCluster());
610  if (scmapped != superClusterMap.end()) {
611  //make new ref
612  reco::SuperClusterRef scref(outSuperClusterHandle,scmapped->second);
613  photonCore.setSuperCluster(scref);
614  }
615 
616  //conversions
617  const reco::ConversionRefVector &convrefs = photonCore.conversions();
618  reco::ConversionRefVector outconvrefs;
619  for (const reco::ConversionRef &convref : convrefs) {
620  const auto &convmapped = conversionMap.find(convref);
621  if (convmapped != conversionMap.end()) {
622  //make new ref
623  reco::ConversionRef outref(outConversionHandle,convmapped->second);
624  }
625  else {
626  //can only relink if all conversions are being relinked, so if one is missing, then skip the relinking completely
627  outconvrefs.clear();
628  break;
629  }
630  }
631  if (outconvrefs.size()) {
632  photonCore.setConversions(outconvrefs);
633  }
634 
635  //single leg conversions
636  const reco::ConversionRefVector &singleconvrefs = photonCore.conversionsOneLeg();
637  reco::ConversionRefVector outsingleconvrefs;
638  for (const reco::ConversionRef &convref : singleconvrefs) {
639  const auto &convmapped = singleConversionMap.find(convref);
640  if (convmapped != singleConversionMap.end()) {
641  //make new ref
642  reco::ConversionRef outref(outSingleConversionHandle,convmapped->second);
643  }
644  else {
645  //can only relink if all conversions are being relinked, so if one is missing, then skip the relinking completely
646  outsingleconvrefs.clear();
647  break;
648  }
649  }
650  if (outsingleconvrefs.size()) {
651  photonCore.setConversionsOneLeg(outsingleconvrefs);
652  }
653 
654  }
655 
656  //loop over gsfelectroncores and relink superclusters
657  for (reco::GsfElectronCore &gsfElectronCore : *gsfElectronCores) {
658  const auto &scmapped = superClusterMap.find(gsfElectronCore.superCluster());
659  if (scmapped != superClusterMap.end()) {
660  //make new ref
661  reco::SuperClusterRef scref(outSuperClusterHandle,scmapped->second);
662  gsfElectronCore.setSuperCluster(scref);
663  }
664  }
665 
666  //put photon and gsfelectroncores into the event
667  const edm::OrphanHandle<reco::PhotonCoreCollection> &outPhotonCoreHandle = theEvent.put(std::move(photonCores),outPhotonCores_);
668  const edm::OrphanHandle<reco::GsfElectronCoreCollection> &outgsfElectronCoreHandle = theEvent.put(std::move(gsfElectronCores),outGsfElectronCores_);
669 
670  //loop over photons and electrons and relink the cores
671  for (reco::Photon &photon : *photons) {
672  const auto &coremapped = photonCoreMap.find(photon.photonCore());
673  if (coremapped != photonCoreMap.end()) {
674  //make new ref
675  reco::PhotonCoreRef coreref(outPhotonCoreHandle,coremapped->second);
676  photon.setPhotonCore(coreref);
677  }
678  }
679 
680  for (reco::GsfElectron &gsfElectron : *gsfElectrons) {
681  const auto &coremapped = gsfElectronCoreMap.find(gsfElectron.core());
682  if (coremapped != gsfElectronCoreMap.end()) {
683  //make new ref
684  reco::GsfElectronCoreRef coreref(outgsfElectronCoreHandle,coremapped->second);
685  gsfElectron.setCore(coreref);
686  }
687  }
688 
689  //(finally) store the output photon and electron collections
690  const edm::OrphanHandle<reco::PhotonCollection> &outPhotonHandle = theEvent.put(std::move(photons),outPhotons_);
691  const edm::OrphanHandle<reco::GsfElectronCollection> &outGsfElectronHandle = theEvent.put(std::move(gsfElectrons),outGsfElectrons_);
692 
693  //still need to output relinked valuemaps
694 
695  //photon pfcand isolation valuemap
696  edm::ValueMap<std::vector<reco::PFCandidateRef>>::Filler fillerPhotons(*photonPfCandMap);
697  fillerPhotons.insert(outPhotonHandle,pfCandIsoPairVecPho.begin(),pfCandIsoPairVecPho.end());
698  fillerPhotons.fill();
699 
700  //electron pfcand isolation valuemap
701  edm::ValueMap<std::vector<reco::PFCandidateRef>>::Filler fillerGsfElectrons(*gsfElectronPfCandMap);
702  fillerGsfElectrons.insert(outGsfElectronHandle,pfCandIsoPairVecEle.begin(),pfCandIsoPairVecEle.end());
703  fillerGsfElectrons.fill();
704 
705  theEvent.put(std::move(photonPfCandMap),outPhotonPfCandMap_);
706  theEvent.put(std::move(gsfElectronPfCandMap),outGsfElectronPfCandMap_);
707 
708  //photon id value maps
709  for (unsigned int iid=0; iid<photonIds.size(); ++iid) {
710  edm::ValueMap<bool>::Filler fillerPhotonId(*photonIds[iid]);
711  fillerPhotonId.insert(outPhotonHandle,photonIdVals[iid].begin(),photonIdVals[iid].end());
712  fillerPhotonId.fill();
713  theEvent.put(std::move(photonIds[iid]),outPhotonIds_[iid]);
714  }
715 
716  //electron id value maps
717  for (unsigned int iid=0; iid<gsfElectronIds.size(); ++iid) {
718  edm::ValueMap<float>::Filler fillerGsfElectronId(*gsfElectronIds[iid]);
719  fillerGsfElectronId.insert(outGsfElectronHandle,gsfElectronIdVals[iid].begin(),gsfElectronIdVals[iid].end());
720  fillerGsfElectronId.fill();
721  theEvent.put(std::move(gsfElectronIds[iid]),outGsfElectronIds_[iid]);
722  }
723 
724  //photon iso value maps
725  for (unsigned int iid=0; iid<photonPFClusterIsos.size(); ++iid) {
726  edm::ValueMap<float>::Filler fillerPhotonPFClusterIso(*photonPFClusterIsos[iid]);
727  fillerPhotonPFClusterIso.insert(outPhotonHandle,photonPFClusterIsoVals[iid].begin(),photonPFClusterIsoVals[iid].end());
728  fillerPhotonPFClusterIso.fill();
729  theEvent.put(std::move(photonPFClusterIsos[iid]),outPhotonPFClusterIsos_[iid]);
730  }
731  //electron iso value maps
732  for (unsigned int iid=0; iid<gsfElectronPFClusterIsos.size(); ++iid) {
733  edm::ValueMap<float>::Filler fillerGsfElectronPFClusterIso(*gsfElectronPFClusterIsos[iid]);
734  fillerGsfElectronPFClusterIso.insert(outGsfElectronHandle,gsfElectronPFClusterIsoVals[iid].begin(),gsfElectronPFClusterIsoVals[iid].end());
735  fillerGsfElectronPFClusterIso.fill();
736  theEvent.put(std::move(gsfElectronPFClusterIsos[iid]),outGsfElectronPFClusterIsos_[iid]);
737  }
738 }
const bool doPreshowerEcalHits_
void setPreshowerClusters(const CaloClusterPtrVector &clusters)
Definition: SuperCluster.h:105
static bool matchesConversion(const reco::GsfElectron &ele, const reco::Conversion &conv, bool allowCkfMatch=true, bool allowAmbiguousGsfMatch=false)
const edm::EDGetTokenT< reco::GsfElectronCollection > gsfElectronT_
size_type size() const
Size of the RefVector.
Definition: PtrVectorBase.h:74
void setCore(const reco::GsfElectronCoreRef &core)
Definition: GsfElectron.h:181
const StringCutObjectSelector< reco::Photon > slimRelinkPhotonSel_
const edm::EDGetTokenT< reco::ConversionCollection > singleConversionT_
const std::vector< std::string > outPhotonIds_
reco::SuperClusterRef superCluster() const
Ref to SuperCluster.
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > photonPFClusterIsoTs_
reco::ConversionRefVector conversionsOneLeg() const
vector of references to one leg Conversion&#39;s
Definition: Photon.h:70
void push_back(Ptr< T > const &iPtr)
Definition: PtrVector.h:141
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronPFClusterIsoTs_
const StringCutObjectSelector< reco::GsfElectron > keepGsfElectronSel_
const std::string outEBEEClusters_
void setSeed(const CaloClusterPtr &r)
list of used xtals by DetId // now inherited by CaloCluster
Definition: SuperCluster.h:96
const StringCutObjectSelector< reco::Photon > keepPhotonSel_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > photonPfCandMapT_
const CaloClusterPtrVector & clusters() const
const access to the cluster list itself
Definition: SuperCluster.h:69
const StringCutObjectSelector< reco::GsfElectron > relinkGsfElectronSel_
void setClusters(const CaloClusterPtrVector &clusters)
Definition: SuperCluster.h:99
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > gsfElectronPfCandMapT_
const std::string outEBRecHits_
const std::string outESRecHits_
const edm::EDGetTokenT< EcalRecHitCollection > preshowerEcalHits_
reco::PhotonCoreRef photonCore() const
returns a reference to the core photon object
Definition: Photon.h:50
const int keep
const std::vector< std::string > outGsfElectronIds_
void setPhotonCore(const reco::PhotonCoreRef &photonCore)
Definition: Photon.h:51
const std::string outSingleConversions_
const std::string outESClusters_
reco::ConversionRefVector conversions() const
vector of references to Conversion&#39;s
Definition: Photon.h:64
virtual SuperClusterRef superCluster() const
reference to a SuperCluster
Definition: GsfElectron.h:184
const std::vector< std::string > outPhotonPFClusterIsos_
#define end
Definition: vmac.h:37
const StringCutObjectSelector< reco::Photon > relinkPhotonSel_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronIdTs_
const CaloClusterPtrVector & preshowerClusters() const
const access to the preshower cluster list itself
Definition: SuperCluster.h:72
const std::string outPhotons_
const std::string outGsfElectronPfCandMap_
const std::string outGsfElectronCores_
Definition: DetId.h:18
const edm::EDGetTokenT< reco::PhotonCollection > photonT_
void clearHitsAndFractions()
Definition: SuperCluster.h:108
void conversion(EventAux const &from, EventAuxiliary &to)
Definition: EventAux.cc:9
const std::vector< std::string > outGsfElectronPFClusterIsos_
const std::string outSuperClusters_
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
const std::string outConversions_
T const * product() const
Definition: Handle.h:81
void clear()
Clear the vector.
Definition: RefVector.h:147
const std::string outGsfElectrons_
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
Definition: CaloTopology.cc:26
const StringCutObjectSelector< reco::GsfElectron > slimRelinkGsfElectronSel_
virtual GsfElectronCoreRef core() const
Definition: GsfElectron.cc:8
const std::string outPhotonCores_
void clear()
Clear the PtrVector.
Definition: PtrVectorBase.h:80
#define begin
Definition: vmac.h:30
const std::string outEERecHits_
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
Definition: RefVector.h:69
size_type size() const
Size of the RefVector.
Definition: RefVector.h:107
const std::string outPhotonPfCandMap_
const edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:66
std::vector< edm::EDGetTokenT< edm::ValueMap< bool > > > photonIdTs_
const edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
def move(src, dest)
Definition: eostools.py:510
const edm::EDGetTokenT< reco::ConversionCollection > conversionT_

Member Data Documentation

const edm::EDGetTokenT<EcalRecHitCollection> ReducedEGProducer::barrelEcalHits_
private

Definition at line 64 of file ReducedEGProducer.h.

Referenced by produce().

const edm::EDGetTokenT<reco::ConversionCollection> ReducedEGProducer::conversionT_
private

Definition at line 61 of file ReducedEGProducer.h.

Referenced by produce().

const bool ReducedEGProducer::doPreshowerEcalHits_
private

Definition at line 66 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const edm::EDGetTokenT<EcalRecHitCollection> ReducedEGProducer::endcapEcalHits_
private

Definition at line 65 of file ReducedEGProducer.h.

Referenced by produce().

std::vector<edm::EDGetTokenT<edm::ValueMap<float> > > ReducedEGProducer::gsfElectronIdTs_
private

Definition at line 73 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const edm::EDGetTokenT<edm::ValueMap<std::vector<reco::PFCandidateRef> > > ReducedEGProducer::gsfElectronPfCandMapT_
private

Definition at line 70 of file ReducedEGProducer.h.

Referenced by produce().

std::vector<edm::EDGetTokenT<edm::ValueMap<float> > > ReducedEGProducer::gsfElectronPFClusterIsoTs_
private

Definition at line 76 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const edm::EDGetTokenT<reco::GsfElectronCollection> ReducedEGProducer::gsfElectronT_
private

Definition at line 60 of file ReducedEGProducer.h.

Referenced by produce().

const StringCutObjectSelector<reco::GsfElectron> ReducedEGProducer::keepGsfElectronSel_
private

Definition at line 101 of file ReducedEGProducer.h.

Referenced by produce().

const StringCutObjectSelector<reco::Photon> ReducedEGProducer::keepPhotonSel_
private

Definition at line 98 of file ReducedEGProducer.h.

Referenced by produce().

const std::string ReducedEGProducer::outConversions_
private

Definition at line 83 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outEBEEClusters_
private

Definition at line 86 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outEBRecHits_
private

Definition at line 88 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outEERecHits_
private

Definition at line 89 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outESClusters_
private

Definition at line 87 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outESRecHits_
private

Definition at line 90 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outGsfElectronCores_
private

Definition at line 82 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::vector<std::string> ReducedEGProducer::outGsfElectronIds_
private

Definition at line 94 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outGsfElectronPfCandMap_
private

Definition at line 92 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::vector<std::string> ReducedEGProducer::outGsfElectronPFClusterIsos_
private

Definition at line 96 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outGsfElectrons_
private

Definition at line 81 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outPhotonCores_
private

Definition at line 80 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::vector<std::string> ReducedEGProducer::outPhotonIds_
private

Definition at line 93 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outPhotonPfCandMap_
private

Definition at line 91 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::vector<std::string> ReducedEGProducer::outPhotonPFClusterIsos_
private

Definition at line 95 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outPhotons_
private

Definition at line 79 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outSingleConversions_
private

Definition at line 84 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const std::string ReducedEGProducer::outSuperClusters_
private

Definition at line 85 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

std::vector<edm::EDGetTokenT<edm::ValueMap<bool> > > ReducedEGProducer::photonIdTs_
private

Definition at line 72 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const edm::EDGetTokenT<edm::ValueMap<std::vector<reco::PFCandidateRef> > > ReducedEGProducer::photonPfCandMapT_
private

Definition at line 69 of file ReducedEGProducer.h.

Referenced by produce().

std::vector<edm::EDGetTokenT<edm::ValueMap<float> > > ReducedEGProducer::photonPFClusterIsoTs_
private

Definition at line 75 of file ReducedEGProducer.h.

Referenced by produce(), and ReducedEGProducer().

const edm::EDGetTokenT<reco::PhotonCollection> ReducedEGProducer::photonT_
private

Definition at line 59 of file ReducedEGProducer.h.

Referenced by produce().

const edm::EDGetTokenT<EcalRecHitCollection> ReducedEGProducer::preshowerEcalHits_
private

Definition at line 67 of file ReducedEGProducer.h.

Referenced by produce().

const StringCutObjectSelector<reco::GsfElectron> ReducedEGProducer::relinkGsfElectronSel_
private

Definition at line 103 of file ReducedEGProducer.h.

Referenced by produce().

const StringCutObjectSelector<reco::Photon> ReducedEGProducer::relinkPhotonSel_
private

Definition at line 100 of file ReducedEGProducer.h.

Referenced by produce().

const edm::EDGetTokenT<reco::ConversionCollection> ReducedEGProducer::singleConversionT_
private

Definition at line 62 of file ReducedEGProducer.h.

Referenced by produce().

const StringCutObjectSelector<reco::GsfElectron> ReducedEGProducer::slimRelinkGsfElectronSel_
private

Definition at line 102 of file ReducedEGProducer.h.

Referenced by produce().

const StringCutObjectSelector<reco::Photon> ReducedEGProducer::slimRelinkPhotonSel_
private

Definition at line 99 of file ReducedEGProducer.h.

Referenced by produce().