CMS 3D CMS Logo

ReducedEGProducer.h
Go to the documentation of this file.
1 #ifndef RecoEgamma_EgammaPhotonProducers_ReducedEGProducer_h
2 #define RecoEgamma_EgammaPhotonProducers_ReducedEGProducer_h
3 
39 
42 
44 
45 
46 // ReducedEGProducer inherits from EDProducer, so it can be a module:
48 
49  public:
50 
53 
54  virtual void produce(edm::Event& evt, const edm::EventSetup& es) override final;
55 
56  private:
57 
58  template <typename T, typename U>
59  void linkCore(const T& core, U& cores, std::map<T, unsigned int>& coreMap);
60 
61  void linkSuperCluster(const reco::SuperClusterRef& superCluster,
62  std::map<reco::SuperClusterRef, unsigned int>& superClusterMap,
63  reco::SuperClusterCollection& superClusters,
64  const bool relink,
65  std::unordered_set<unsigned int>& superClusterFullRelinkMap);
66 
67  void linkConversions(const reco::ConversionRefVector& convrefs,
69  std::map<reco::ConversionRef, unsigned int>& conversionMap);
70 
72  const reco::GsfElectron& gsfElectron,
73  reco::ConversionCollection& conversions,
74  std::map<reco::ConversionRef, unsigned int>& conversionMap);
75 
77  const reco::SuperCluster& superCluster,
78  reco::ConversionCollection& conversions,
79  std::map<reco::ConversionRef, unsigned int>& conversionMap);
80 
81  void linkConversion(const reco::ConversionRef& convref,
82  reco::ConversionCollection& conversions,
83  std::map<reco::ConversionRef, unsigned int>& conversionMap);
84 
85  void linkCaloCluster(const reco::CaloClusterPtr& caloCluster,
86  reco::CaloClusterCollection& caloClusters,
87  std::map<reco::CaloClusterPtr, unsigned int>& caloClusterMap);
88 
89  void linkCaloClusters(const reco::SuperCluster& superCluster,
90  reco::CaloClusterCollection& ebeeClusters,
91  std::map<reco::CaloClusterPtr, unsigned int>& ebeeClusterMap,
92  std::unordered_set<DetId>& rechitMap,
93  const edm::Handle<EcalRecHitCollection>& barrelHitHandle,
94  const edm::Handle<EcalRecHitCollection>& endcapHitHandle,
95  const CaloTopology *caloTopology,
96  reco::CaloClusterCollection& esClusters,
97  std::map<reco::CaloClusterPtr, unsigned int>& esClusterMap);
98 
99  void relinkCaloClusters(reco::SuperCluster& superCluster,
100  const std::map<reco::CaloClusterPtr, unsigned int>& ebeeClusterMap,
101  const std::map<reco::CaloClusterPtr, unsigned int>& esClusterMap,
102  const edm::OrphanHandle<reco::CaloClusterCollection>& outEBEEClusterHandle,
103  const edm::OrphanHandle<reco::CaloClusterCollection>& outESClusterHandle);
104 
105  template <typename T>
106  void relinkSuperCluster(T& core,
107  const std::map<reco::SuperClusterRef, unsigned int>& superClusterMap,
108  const edm::OrphanHandle<reco::SuperClusterCollection>& outSuperClusterHandle);
109 
111  const reco::ConversionRefVector& convrefs,
112  const std::map<reco::ConversionRef, unsigned int>& conversionMap,
113  const edm::OrphanHandle<reco::ConversionCollection> &outConversionHandle);
114 
116  const std::map<reco::PhotonCoreRef, unsigned int>& photonCoreMap,
117  const edm::OrphanHandle<reco::PhotonCoreCollection>& outPhotonCoreHandle);
118 
119  void relinkGsfElectronCore(reco::GsfElectron& gsfElectron,
120  const std::map<reco::GsfElectronCoreRef, unsigned int>& gsfElectronCoreMap,
121  const edm::OrphanHandle<reco::GsfElectronCoreCollection>& outGsfElectronCoreHandle);
122 
123  //tokens for input collections
129 
134 
137 
138  std::vector<edm::EDGetTokenT<edm::ValueMap<bool> > > photonIdTs_;
139  std::vector<edm::EDGetTokenT<edm::ValueMap<float> > > gsfElectronIdTs_;
140 
141  std::vector<edm::EDGetTokenT<edm::ValueMap<float> > > photonPFClusterIsoTs_;
142  std::vector<edm::EDGetTokenT<edm::ValueMap<float> > > ootPhotonPFClusterIsoTs_;
143  std::vector<edm::EDGetTokenT<edm::ValueMap<float> > > gsfElectronPFClusterIsoTs_;
144 
145  //names for output collections
165  const std::vector<std::string> outPhotonIds_;
166  const std::vector<std::string> outGsfElectronIds_;
167  const std::vector<std::string> outPhotonPFClusterIsos_;
168  const std::vector<std::string> outOOTPhotonPFClusterIsos_;
169  const std::vector<std::string> outGsfElectronPFClusterIsos_;
170 
180 };
181 #endif
182 
183 
const bool doPreshowerEcalHits_
void linkCaloClusters(const reco::SuperCluster &superCluster, reco::CaloClusterCollection &ebeeClusters, std::map< reco::CaloClusterPtr, unsigned int > &ebeeClusterMap, std::unordered_set< DetId > &rechitMap, const edm::Handle< EcalRecHitCollection > &barrelHitHandle, const edm::Handle< EcalRecHitCollection > &endcapHitHandle, const CaloTopology *caloTopology, reco::CaloClusterCollection &esClusters, std::map< reco::CaloClusterPtr, unsigned int > &esClusterMap)
const StringCutObjectSelector< reco::Photon > relinkOOTPhotonSel_
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_
Definition: __init__.py:1
const StringCutObjectSelector< reco::GsfElectron > keepGsfElectronSel_
const std::string outOOTPhotons_
const std::string outEBEEClusters_
const StringCutObjectSelector< reco::Photon > keepPhotonSel_
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > photonPfCandMapT_
const StringCutObjectSelector< reco::GsfElectron > relinkGsfElectronSel_
void linkConversion(const reco::ConversionRef &convref, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
std::vector< Conversion > ConversionCollection
collectin of Conversion objects
Definition: ConversionFwd.h:9
const edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > gsfElectronPfCandMapT_
const std::string outEBRecHits_
const std::string outESRecHits_
void relinkConversions(reco::PhotonCore &photonCore, const reco::ConversionRefVector &convrefs, const std::map< reco::ConversionRef, unsigned int > &conversionMap, const edm::OrphanHandle< reco::ConversionCollection > &outConversionHandle)
const edm::EDGetTokenT< EcalRecHitCollection > preshowerEcalHits_
void linkConversions(const reco::ConversionRefVector &convrefs, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
const std::vector< std::string > outGsfElectronIds_
const std::string outSingleConversions_
const std::string outESClusters_
const std::string outOOTSuperClusters_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
const StringCutObjectSelector< reco::Photon > keepOOTPhotonSel_
const std::string outOOTESClusters_
void relinkGsfElectronCore(reco::GsfElectron &gsfElectron, const std::map< reco::GsfElectronCoreRef, unsigned int > &gsfElectronCoreMap, const edm::OrphanHandle< reco::GsfElectronCoreCollection > &outGsfElectronCoreHandle)
void linkConversionsByTrackRef(const edm::Handle< reco::ConversionCollection > &conversionHandle, const reco::GsfElectron &gsfElectron, reco::ConversionCollection &conversions, std::map< reco::ConversionRef, unsigned int > &conversionMap)
const std::string outOOTEBEEClusters_
std::vector< CaloCluster > CaloClusterCollection
collection of CaloCluster objects
const std::vector< std::string > outPhotonPFClusterIsos_
void linkSuperCluster(const reco::SuperClusterRef &superCluster, std::map< reco::SuperClusterRef, unsigned int > &superClusterMap, reco::SuperClusterCollection &superClusters, const bool relink, std::unordered_set< unsigned int > &superClusterFullRelinkMap)
void linkCore(const T &core, U &cores, std::map< T, unsigned int > &coreMap)
const StringCutObjectSelector< reco::Photon > relinkPhotonSel_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > gsfElectronIdTs_
void relinkCaloClusters(reco::SuperCluster &superCluster, const std::map< reco::CaloClusterPtr, unsigned int > &ebeeClusterMap, const std::map< reco::CaloClusterPtr, unsigned int > &esClusterMap, const edm::OrphanHandle< reco::CaloClusterCollection > &outEBEEClusterHandle, const edm::OrphanHandle< reco::CaloClusterCollection > &outESClusterHandle)
const std::string outPhotons_
const std::string outGsfElectronPfCandMap_
void relinkSuperCluster(T &core, const std::map< reco::SuperClusterRef, unsigned int > &superClusterMap, const edm::OrphanHandle< reco::SuperClusterCollection > &outSuperClusterHandle)
const std::string outGsfElectronCores_
const edm::EDGetTokenT< reco::PhotonCollection > photonT_
void relinkPhotonCore(reco::Photon &photon, const std::map< reco::PhotonCoreRef, unsigned int > &photonCoreMap, const edm::OrphanHandle< reco::PhotonCoreCollection > &outPhotonCoreHandle)
const std::vector< std::string > outGsfElectronPFClusterIsos_
const std::string outSuperClusters_
const std::string outConversions_
const std::string outGsfElectrons_
const StringCutObjectSelector< reco::GsfElectron > slimRelinkGsfElectronSel_
const std::string outPhotonCores_
void linkCaloCluster(const reco::CaloClusterPtr &caloCluster, reco::CaloClusterCollection &caloClusters, std::map< reco::CaloClusterPtr, unsigned int > &caloClusterMap)
const std::string outEERecHits_
const StringCutObjectSelector< reco::Photon > slimRelinkOOTPhotonSel_
const std::string outPhotonPfCandMap_
const std::vector< std::string > outOOTPhotonPFClusterIsos_
const edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > ootPhotonPFClusterIsoTs_
std::vector< edm::EDGetTokenT< edm::ValueMap< bool > > > photonIdTs_
const std::string outOOTPhotonCores_
long double T
const edm::EDGetTokenT< reco::PhotonCollection > ootPhotonT_
const edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
ReducedEGProducer(const edm::ParameterSet &ps)
const edm::EDGetTokenT< reco::ConversionCollection > conversionT_
virtual void produce(edm::Event &evt, const edm::EventSetup &es) override final