13 template <
typename T,
typename U,
typename V>
15 if (!(empty_tag == tag))
16 tok = sume.template consumes<U>(
tag);
20 #include <unordered_map> 75 "EGFull5x5ShowerShapeModifierFromValueMaps");
77 EGFull5x5ShowerShapeModifierFromValueMaps::EGFull5x5ShowerShapeModifierFromValueMaps(
const edm::
ParameterSet& conf,
78 edm::ConsumesCollector& cc)
80 if (conf.exists(
"electron_config")) {
82 if (electrons.
exists(
"electronSrc"))
84 if (electrons.
exists(
"sigmaEtaEta"))
86 if (electrons.
exists(
"sigmaIetaIeta"))
88 if (electrons.
exists(
"sigmaIphiIphi"))
90 if (electrons.
exists(
"e1x5"))
92 if (electrons.
exists(
"e2x5Max"))
94 if (electrons.
exists(
"e5x5"))
96 if (electrons.
exists(
"r9"))
98 if (electrons.
exists(
"hcalDepth1OverEcal"))
100 if (electrons.
exists(
"hcalDepth2OverEcal"))
102 if (electrons.
exists(
"hcalDepth1OverEcalBc"))
104 if (electrons.
exists(
"hcalDepth2OverEcalBc"))
107 if (conf.exists(
"photon_config")) {
109 if (photons.
exists(
"photonSrc"))
111 if (photons.
exists(
"sigmaEtaEta"))
113 if (photons.
exists(
"sigmaIetaIeta"))
115 if (photons.
exists(
"e1x5"))
117 if (photons.
exists(
"e2x5"))
119 if (photons.
exists(
"e3x3"))
121 if (photons.
exists(
"e5x5"))
123 if (photons.
exists(
"maxEnergyXtal"))
125 if (photons.
exists(
"hcalDepth1OverEcal"))
127 if (photons.
exists(
"hcalDepth2OverEcal"))
129 if (photons.
exists(
"hcalDepth1OverEcalBc"))
131 if (photons.
exists(
"hcalDepth2OverEcalBc"))
135 ele_idx = pho_idx = 0;
139 inline void get_product(
const edm::Event& evt,
199 template <
typename T,
typename U,
typename V>
200 inline void assignValue(
const T& ptr,
const U& tok,
const V&
map,
float&
value) {
201 if (!tok.isUninitialized())
202 value = map.find(tok.index())->
second->get(ptr.id(), ptr.key());
edm::EDGetTokenT< edm::View< pat::Photon > > tok_photon_src
T getParameter(std::string const &) const
Analysis-level Photon class.
EGFull5x5ShowerShapeModifierFromValueMaps(const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
std::unordered_map< unsigned, edm::Handle< edm::ValueMap< float > > > pho_vmaps
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth2OverEcalBc
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< edm::ValueMap< float > > tok_r9
edm::EDGetTokenT< edm::ValueMap< float > > tok_e1x5
edm::EDGetTokenT< edm::ValueMap< float > > tok_sigmaIetaIeta
edm::EDGetTokenT< edm::ValueMap< float > > tok_e3x3
unsigned int index() const
edm::EDGetTokenT< edm::ValueMap< float > > tok_e1x5
bool exists(std::string const ¶meterName) const
checks if a parameter exists
edm::EDGetTokenT< edm::View< pat::Electron > > tok_electron_src
edm::EDGetTokenT< edm::ValueMap< float > > tok_e5x5
edm::EDGetTokenT< edm::ValueMap< float > > tok_e5x5
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth2OverEcalBc
U second(std::pair< T, U > const &p)
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth1OverEcal
edm::EDGetTokenT< edm::ValueMap< float > > tok_e2x5Max
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth2OverEcal
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth1OverEcal
const edm::Ptr< reco::Candidate > & originalObjectRef() const
reference to original object. Returns a null reference if not available
std::vector< edm::Ptr< reco::Photon > > phos_by_oop
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth1OverEcalBc
void setEventContent(const edm::EventSetup &) final
Analysis-level electron class.
edm::EDGetTokenT< edm::ValueMap< float > > tok_sigmaIphiIphi
void full5x5_setShowerShapeVariables(const ShowerShape &a)
const ShowerShape & full5x5_showerShape() const
void setEvent(const edm::Event &) final
const ShowerShape & full5x5_showerShapeVariables() const
edm::EDGetTokenT< edm::ValueMap< float > > tok_sigmaEtaEta
std::unordered_map< unsigned, edm::Handle< edm::ValueMap< float > > > ele_vmaps
std::vector< edm::Ptr< reco::GsfElectron > > eles_by_oop
bool isUninitialized() const
#define DEFINE_EDM_PLUGIN(factory, type, name)
void modifyObject(pat::Electron &) const final
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth1OverEcalBc
edm::EDGetTokenT< edm::ValueMap< float > > tok_sigmaIetaIeta
edm::EDGetTokenT< edm::ValueMap< float > > tok_sigmaEtaEta
edm::EDGetTokenT< edm::ValueMap< float > > tok_maxEnergyXtal
edm::EDGetTokenT< edm::ValueMap< float > > tok_e2x5
void full5x5_setShowerShape(const ShowerShape &s)
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth2OverEcal