CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Attributes
EGFull5x5ShowerShapeModifierFromValueMaps Class Reference
Inheritance diagram for EGFull5x5ShowerShapeModifierFromValueMaps:
ModifyObjectValueBase

Classes

struct  electron_config
 
struct  photon_config
 

Public Member Functions

 EGFull5x5ShowerShapeModifierFromValueMaps (const edm::ParameterSet &conf)
 
void modifyObject (pat::Electron &) const overridefinal
 
void modifyObject (pat::Photon &) const overridefinal
 
void setConsumes (edm::ConsumesCollector &) overridefinal
 
void setEvent (const edm::Event &) overridefinal
 
void setEventContent (const edm::EventSetup &) overridefinal
 
- Public Member Functions inherited from ModifyObjectValueBase
virtual void modifyObject (pat::Muon &) const
 
virtual void modifyObject (pat::Tau &) const
 
virtual void modifyObject (pat::Jet &) const
 
 ModifyObjectValueBase (const edm::ParameterSet &conf)
 
const std::string & name () const
 
virtual ~ModifyObjectValueBase ()
 

Private Attributes

electron_config e_conf
 
unsigned ele_idx
 
std::unordered_map< unsigned,
edm::Handle< edm::ValueMap
< float > > > 
ele_vmaps
 
std::unordered_map< unsigned,
edm::Ptr< reco::GsfElectron > > 
eles_by_oop
 
photon_config ph_conf
 
unsigned pho_idx
 
std::unordered_map< unsigned,
edm::Handle< edm::ValueMap
< float > > > 
pho_vmaps
 
std::unordered_map< unsigned,
edm::Ptr< reco::Photon > > 
phos_by_oop
 

Detailed Description

Definition at line 17 of file EGFull5x5ShowerShapeModifier.cc.

Constructor & Destructor Documentation

EGFull5x5ShowerShapeModifierFromValueMaps::EGFull5x5ShowerShapeModifierFromValueMaps ( const edm::ParameterSet conf)

Definition at line 97 of file EGFull5x5ShowerShapeModifier.cc.

References EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::e1x5, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::e1x5, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::e2x5, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::e2x5Max, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::e3x3, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::e5x5, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::e5x5, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::electron_src, HI_PhotonSkim_cff::electrons, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::hcalDepth1OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::hcalDepth1OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::hcalDepth1OverEcalBc, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::hcalDepth1OverEcalBc, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::hcalDepth2OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::hcalDepth2OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::hcalDepth2OverEcalBc, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::hcalDepth2OverEcalBc, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::maxEnergyXtal, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::photon_src, interactiveExample::photons, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::r9, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::sigmaEtaEta, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::sigmaEtaEta, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::sigmaIetaIeta, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::sigmaIetaIeta, and EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::sigmaIphiIphi.

97  :
98  ModifyObjectValueBase(conf) {
99  if( conf.exists("electron_config") ) {
100  const edm::ParameterSet& electrons = conf.getParameter<edm::ParameterSet>("electron_config");
101  if( electrons.exists("electronSrc") ) e_conf.electron_src = electrons.getParameter<edm::InputTag>("electronSrc");
102  if( electrons.exists("sigmaEtaEta") ) e_conf.sigmaEtaEta = electrons.getParameter<edm::InputTag>("sigmaEtaEta");
103  if( electrons.exists("sigmaIetaIeta") ) e_conf.sigmaIetaIeta = electrons.getParameter<edm::InputTag>("sigmaIetaIeta");
104  if( electrons.exists("sigmaIphiIphi") ) e_conf.sigmaIphiIphi = electrons.getParameter<edm::InputTag>("sigmaIphiIphi");
105  if( electrons.exists("e1x5") ) e_conf.e1x5 = electrons.getParameter<edm::InputTag>("e1x5");
106  if( electrons.exists("e2x5Max") ) e_conf.e2x5Max = electrons.getParameter<edm::InputTag>("e2x5Max");
107  if( electrons.exists("e5x5") ) e_conf.e5x5 = electrons.getParameter<edm::InputTag>("e5x5");
108  if( electrons.exists("r9") ) e_conf.r9 = electrons.getParameter<edm::InputTag>("r9");
109  if( electrons.exists("hcalDepth1OverEcal") ) e_conf.hcalDepth1OverEcal = electrons.getParameter<edm::InputTag>("hcalDepth1OverEcal");
110  if( electrons.exists("hcalDepth2OverEcal") ) e_conf.hcalDepth2OverEcal = electrons.getParameter<edm::InputTag>("hcalDepth2OverEcal");
111  if( electrons.exists("hcalDepth1OverEcalBc") ) e_conf.hcalDepth1OverEcalBc = electrons.getParameter<edm::InputTag>("hcalDepth1OverEcalBc");
112  if( electrons.exists("hcalDepth2OverEcalBc") ) e_conf.hcalDepth2OverEcalBc = electrons.getParameter<edm::InputTag>("hcalDepth2OverEcalBc");
113  }
114  if( conf.exists("photon_config") ) {
115  const edm::ParameterSet& photons = conf.getParameter<edm::ParameterSet>("photon_config");
116  if( photons.exists("photonSrc") ) ph_conf.photon_src = photons.getParameter<edm::InputTag>("photonSrc");
117  if( photons.exists("sigmaEtaEta") ) ph_conf.sigmaEtaEta = photons.getParameter<edm::InputTag>("sigmaEtaEta");
118  if( photons.exists("sigmaIetaIeta") ) ph_conf.sigmaIetaIeta = photons.getParameter<edm::InputTag>("sigmaIetaIeta");
119  if( photons.exists("e1x5") ) ph_conf.e1x5 = photons.getParameter<edm::InputTag>("e1x5");
120  if( photons.exists("e2x5") ) ph_conf.e2x5 = photons.getParameter<edm::InputTag>("e2x5");
121  if( photons.exists("e3x3") ) ph_conf.e3x3 = photons.getParameter<edm::InputTag>("e3x3");
122  if( photons.exists("e5x5") ) ph_conf.e5x5 = photons.getParameter<edm::InputTag>("e5x5");
123  if( photons.exists("maxEnergyXtal") ) ph_conf.maxEnergyXtal = photons.getParameter<edm::InputTag>("maxEnergyXtal");
124  if( photons.exists("hcalDepth1OverEcal") ) ph_conf.hcalDepth1OverEcal = photons.getParameter<edm::InputTag>("hcalDepth1OverEcal");
125  if( photons.exists("hcalDepth2OverEcal") ) ph_conf.hcalDepth2OverEcal = photons.getParameter<edm::InputTag>("hcalDepth2OverEcal");
126  if( photons.exists("hcalDepth1OverEcalBc") ) ph_conf.hcalDepth1OverEcalBc = photons.getParameter<edm::InputTag>("hcalDepth1OverEcalBc");
127  if( photons.exists("hcalDepth2OverEcalBc") ) ph_conf.hcalDepth2OverEcalBc = photons.getParameter<edm::InputTag>("hcalDepth2OverEcalBc");
128  }
129 
130  ele_idx = pho_idx = 0;
131 }
T getParameter(std::string const &) const
bool exists(std::string const &parameterName) const
checks if a parameter exists
ModifyObjectValueBase(const edm::ParameterSet &conf)

Member Function Documentation

void EGFull5x5ShowerShapeModifierFromValueMaps::modifyObject ( pat::Electron ele) const
finaloverridevirtual

Reimplemented from ModifyObjectValueBase.

Definition at line 238 of file EGFull5x5ShowerShapeModifier.cc.

References assignValue(), e_conf, ele_idx, ele_vmaps, eles_by_oop, edm::hlt::Exception, reco::GsfElectron::full5x5_setShowerShape(), reco::GsfElectron::full5x5_showerShape(), edm::EDGetTokenT< T >::isUninitialized(), edm::Ptr< T >::key(), relval_steps::key, pat::PATObject< ObjectType >::originalObjectRef(), EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_e1x5, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_e2x5Max, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_e5x5, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_electron_src, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_hcalDepth1OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_hcalDepth1OverEcalBc, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_hcalDepth2OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_hcalDepth2OverEcalBc, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_r9, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_sigmaEtaEta, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_sigmaIetaIeta, and EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_sigmaIphiIphi.

238  {
239  // we encounter two cases here, either we are running AOD -> MINIAOD
240  // and the value maps are to the reducedEG object, can use original object ptr
241  // or we are running MINIAOD->MINIAOD and we need to fetch the pat objects to reference
244  auto key = eles_by_oop.find(ele_idx);
245  if( key != eles_by_oop.end() ) {
246  ptr = key->second;
247  } else {
248  throw cms::Exception("BadElectronKey")
249  << "Original object pointer with key = " << ele.originalObjectRef().key() << " not found in cache!";
250  }
251  }
252  //now we go through and modify the objects using the valuemaps we read in
253  auto full5x5 = ele.full5x5_showerShape();
254  assignValue(ptr,e_conf.tok_sigmaEtaEta,ele_vmaps,full5x5.sigmaEtaEta);
255  assignValue(ptr,e_conf.tok_sigmaIetaIeta,ele_vmaps,full5x5.sigmaIetaIeta);
256  assignValue(ptr,e_conf.tok_sigmaIphiIphi,ele_vmaps,full5x5.sigmaIphiIphi);
257  assignValue(ptr,e_conf.tok_e1x5,ele_vmaps,full5x5.e1x5);
258  assignValue(ptr,e_conf.tok_e2x5Max,ele_vmaps,full5x5.e2x5Max);
259  assignValue(ptr,e_conf.tok_e5x5,ele_vmaps,full5x5.e5x5);
260  assignValue(ptr,e_conf.tok_r9,ele_vmaps,full5x5.r9);
261  assignValue(ptr,e_conf.tok_hcalDepth1OverEcal,ele_vmaps,full5x5.hcalDepth1OverEcal);
262  assignValue(ptr,e_conf.tok_hcalDepth2OverEcal,ele_vmaps,full5x5.hcalDepth2OverEcal);
263  assignValue(ptr,e_conf.tok_hcalDepth1OverEcalBc,ele_vmaps,full5x5.hcalDepth1OverEcalBc);
264  assignValue(ptr,e_conf.tok_hcalDepth2OverEcalBc,ele_vmaps,full5x5.hcalDepth2OverEcalBc);
265 
266  ele.full5x5_setShowerShape(full5x5);
267  ++ele_idx;
268 }
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth2OverEcalBc
key_type key() const
Definition: Ptr.h:169
edm::EDGetTokenT< edm::View< pat::Electron > > tok_electron_src
std::unordered_map< unsigned, edm::Ptr< reco::GsfElectron > > eles_by_oop
std::unordered_map< unsigned, edm::Handle< edm::ValueMap< float > > > ele_vmaps
const edm::Ptr< reco::Candidate > & originalObjectRef() const
reference to original object. Returns a null reference if not available
Definition: PATObject.h:484
const ShowerShape & full5x5_showerShape() const
Definition: GsfElectron.h:431
void assignValue(const T &ptr, const U &tok, const V &map, Z &value)
bool isUninitialized() const
Definition: EDGetToken.h:71
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth1OverEcalBc
void full5x5_setShowerShape(const ShowerShape &s)
Definition: GsfElectron.h:435
void EGFull5x5ShowerShapeModifierFromValueMaps::modifyObject ( pat::Photon pho) const
finaloverridevirtual

Reimplemented from ModifyObjectValueBase.

Definition at line 272 of file EGFull5x5ShowerShapeModifier.cc.

References assignValue(), edm::hlt::Exception, reco::Photon::full5x5_setShowerShapeVariables(), reco::Photon::full5x5_showerShapeVariables(), edm::EDGetTokenT< T >::isUninitialized(), edm::Ptr< T >::key(), relval_steps::key, pat::PATObject< ObjectType >::originalObjectRef(), ph_conf, pho_idx, pho_vmaps, phos_by_oop, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_e1x5, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_e2x5, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_e3x3, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_e5x5, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_hcalDepth1OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_hcalDepth1OverEcalBc, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_hcalDepth2OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_hcalDepth2OverEcalBc, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_maxEnergyXtal, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_photon_src, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_sigmaEtaEta, and EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_sigmaIetaIeta.

272  {
273  // we encounter two cases here, either we are running AOD -> MINIAOD
274  // and the value maps are to the reducedEG object, can use original object ptr
275  // or we are running MINIAOD->MINIAOD and we need to fetch the pat objects to reference
278  auto key = phos_by_oop.find(pho_idx);
279  if( key != phos_by_oop.end() ) {
280  ptr = key->second;
281  } else {
282  throw cms::Exception("BadPhotonKey")
283  << "Original object pointer with key = " << pho.originalObjectRef().key() << " not found in cache!";
284  }
285  }
286  //now we go through and modify the objects using the valuemaps we read in
287  auto full5x5 = pho.full5x5_showerShapeVariables();
288  assignValue(ptr,ph_conf.tok_sigmaEtaEta,pho_vmaps,full5x5.sigmaEtaEta);
289  assignValue(ptr,ph_conf.tok_sigmaIetaIeta,pho_vmaps,full5x5.sigmaIetaIeta);
290  assignValue(ptr,ph_conf.tok_e1x5,pho_vmaps,full5x5.e1x5);
291  assignValue(ptr,ph_conf.tok_e2x5,pho_vmaps,full5x5.e2x5);
292  assignValue(ptr,ph_conf.tok_e3x3,pho_vmaps,full5x5.e3x3);
293  assignValue(ptr,ph_conf.tok_e5x5,pho_vmaps,full5x5.e5x5);
294  assignValue(ptr,ph_conf.tok_maxEnergyXtal,pho_vmaps,full5x5.maxEnergyXtal);
295  assignValue(ptr,ph_conf.tok_hcalDepth1OverEcal,pho_vmaps,full5x5.hcalDepth1OverEcal);
296  assignValue(ptr,ph_conf.tok_hcalDepth2OverEcal,pho_vmaps,full5x5.hcalDepth2OverEcal);
297  assignValue(ptr,ph_conf.tok_hcalDepth1OverEcalBc,pho_vmaps,full5x5.hcalDepth1OverEcalBc);
298  assignValue(ptr,ph_conf.tok_hcalDepth2OverEcalBc,pho_vmaps,full5x5.hcalDepth2OverEcalBc);
299 
300  pho.full5x5_setShowerShapeVariables(full5x5);
301  ++pho_idx;
302 }
edm::EDGetTokenT< edm::View< pat::Photon > > tok_photon_src
key_type key() const
Definition: Ptr.h:169
std::unordered_map< unsigned, edm::Ptr< reco::Photon > > phos_by_oop
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth2OverEcalBc
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
Definition: PATObject.h:484
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth1OverEcalBc
void full5x5_setShowerShapeVariables(const ShowerShape &a)
Definition: Photon.h:171
const ShowerShape & full5x5_showerShapeVariables() const
Definition: Photon.h:168
void assignValue(const T &ptr, const U &tok, const V &map, Z &value)
bool isUninitialized() const
Definition: EDGetToken.h:71
std::unordered_map< unsigned, edm::Handle< edm::ValueMap< float > > > pho_vmaps
void EGFull5x5ShowerShapeModifierFromValueMaps::setConsumes ( edm::ConsumesCollector sumes)
finaloverridevirtual

Reimplemented from ModifyObjectValueBase.

Definition at line 202 of file EGFull5x5ShowerShapeModifier.cc.

References edm::ConsumesCollector::consumes(), EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::e1x5, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::e1x5, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::e2x5, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::e2x5Max, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::e3x3, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::e5x5, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::e5x5, e_conf, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::electron_src, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::hcalDepth1OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::hcalDepth1OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::hcalDepth1OverEcalBc, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::hcalDepth1OverEcalBc, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::hcalDepth2OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::hcalDepth2OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::hcalDepth2OverEcalBc, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::hcalDepth2OverEcalBc, make_consumes(), EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::maxEnergyXtal, ph_conf, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::photon_src, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::r9, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::sigmaEtaEta, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::sigmaEtaEta, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::sigmaIetaIeta, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::sigmaIetaIeta, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::sigmaIphiIphi, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_e1x5, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_e1x5, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_e2x5, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_e2x5Max, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_e3x3, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_e5x5, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_e5x5, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_electron_src, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_hcalDepth1OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_hcalDepth1OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_hcalDepth1OverEcalBc, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_hcalDepth1OverEcalBc, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_hcalDepth2OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_hcalDepth2OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_hcalDepth2OverEcalBc, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_hcalDepth2OverEcalBc, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_maxEnergyXtal, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_photon_src, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_r9, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_sigmaEtaEta, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_sigmaEtaEta, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_sigmaIetaIeta, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_sigmaIetaIeta, and EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_sigmaIphiIphi.

202  {
203  //setup electrons
216 
217  // setup photons
230 }
edm::EDGetTokenT< edm::View< pat::Photon > > tok_photon_src
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth2OverEcalBc
void make_consumes(T &tag, U &tok, V &sume)
edm::EDGetTokenT< edm::View< pat::Electron > > tok_electron_src
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth2OverEcalBc
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth2OverEcal
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth1OverEcal
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth1OverEcalBc
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth1OverEcalBc
void EGFull5x5ShowerShapeModifierFromValueMaps::setEvent ( const edm::Event evt)
finaloverridevirtual

Reimplemented from ModifyObjectValueBase.

Definition at line 140 of file EGFull5x5ShowerShapeModifier.cc.

References e_conf, ele_idx, ele_vmaps, eles_by_oop, get_product(), edm::Event::getByToken(), i, edm::EDGetTokenT< T >::isUninitialized(), ph_conf, pho_idx, pho_vmaps, phos_by_oop, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_e1x5, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_e1x5, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_e2x5, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_e2x5Max, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_e3x3, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_e5x5, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_e5x5, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_electron_src, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_hcalDepth1OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_hcalDepth1OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_hcalDepth1OverEcalBc, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_hcalDepth1OverEcalBc, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_hcalDepth2OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_hcalDepth2OverEcal, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_hcalDepth2OverEcalBc, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_hcalDepth2OverEcalBc, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_maxEnergyXtal, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_photon_src, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_r9, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_sigmaEtaEta, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_sigmaEtaEta, EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_sigmaIetaIeta, EGFull5x5ShowerShapeModifierFromValueMaps::photon_config::tok_sigmaIetaIeta, and EGFull5x5ShowerShapeModifierFromValueMaps::electron_config::tok_sigmaIphiIphi.

140  {
141  eles_by_oop.clear();
142  phos_by_oop.clear();
143  ele_vmaps.clear();
144  pho_vmaps.clear();
145 
146  ele_idx = pho_idx = 0;
147 
151 
152  for( unsigned i = 0; i < eles->size(); ++i ) {
153  edm::Ptr<pat::Electron> ptr = eles->ptrAt(i);
154  eles_by_oop[i] = ptr;
155  }
156  }
157 
169 
173 
174  for( unsigned i = 0; i < phos->size(); ++i ) {
175  edm::Ptr<pat::Photon> ptr = phos->ptrAt(i);
176  phos_by_oop[i] = ptr;
177  }
178  }
179 
191 
192 }
edm::EDGetTokenT< edm::View< pat::Photon > > tok_photon_src
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth2OverEcalBc
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
std::unordered_map< unsigned, edm::Ptr< reco::Photon > > phos_by_oop
edm::EDGetTokenT< edm::View< pat::Electron > > tok_electron_src
std::unordered_map< unsigned, edm::Ptr< reco::GsfElectron > > eles_by_oop
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth2OverEcalBc
void get_product(const edm::Event &evt, const edm::EDGetTokenT< edm::ValueMap< T > > &tok, std::unordered_map< unsigned, edm::Handle< edm::ValueMap< T > > > &map)
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth2OverEcal
std::unordered_map< unsigned, edm::Handle< edm::ValueMap< float > > > ele_vmaps
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth1OverEcal
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth1OverEcalBc
bool isUninitialized() const
Definition: EDGetToken.h:71
edm::EDGetTokenT< edm::ValueMap< float > > tok_hcalDepth1OverEcalBc
std::unordered_map< unsigned, edm::Handle< edm::ValueMap< float > > > pho_vmaps
void EGFull5x5ShowerShapeModifierFromValueMaps::setEventContent ( const edm::EventSetup evs)
finaloverridevirtual

Reimplemented from ModifyObjectValueBase.

Definition at line 195 of file EGFull5x5ShowerShapeModifier.cc.

195  {
196 }

Member Data Documentation

electron_config EGFull5x5ShowerShapeModifierFromValueMaps::e_conf
private

Definition at line 83 of file EGFull5x5ShowerShapeModifier.cc.

Referenced by modifyObject(), setConsumes(), and setEvent().

unsigned EGFull5x5ShowerShapeModifierFromValueMaps::ele_idx
mutableprivate

Definition at line 89 of file EGFull5x5ShowerShapeModifier.cc.

Referenced by modifyObject(), and setEvent().

std::unordered_map<unsigned,edm::Handle<edm::ValueMap<float> > > EGFull5x5ShowerShapeModifierFromValueMaps::ele_vmaps
private

Definition at line 86 of file EGFull5x5ShowerShapeModifier.cc.

Referenced by modifyObject(), and setEvent().

std::unordered_map<unsigned,edm::Ptr<reco::GsfElectron> > EGFull5x5ShowerShapeModifierFromValueMaps::eles_by_oop
private

Definition at line 85 of file EGFull5x5ShowerShapeModifier.cc.

Referenced by modifyObject(), and setEvent().

photon_config EGFull5x5ShowerShapeModifierFromValueMaps::ph_conf
private

Definition at line 84 of file EGFull5x5ShowerShapeModifier.cc.

Referenced by modifyObject(), setConsumes(), and setEvent().

unsigned EGFull5x5ShowerShapeModifierFromValueMaps::pho_idx
mutableprivate

Definition at line 89 of file EGFull5x5ShowerShapeModifier.cc.

Referenced by modifyObject(), and setEvent().

std::unordered_map<unsigned,edm::Handle<edm::ValueMap<float> > > EGFull5x5ShowerShapeModifierFromValueMaps::pho_vmaps
private

Definition at line 88 of file EGFull5x5ShowerShapeModifier.cc.

Referenced by modifyObject(), and setEvent().

std::unordered_map<unsigned,edm::Ptr<reco::Photon> > EGFull5x5ShowerShapeModifierFromValueMaps::phos_by_oop
private

Definition at line 87 of file EGFull5x5ShowerShapeModifier.cc.

Referenced by modifyObject(), and setEvent().