CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
EGRegressionModifierV3 Class Reference
Inheritance diagram for EGRegressionModifierV3:
ModifyObjectValueBase

Classes

struct  EleRegs
 
struct  PhoRegs
 

Public Member Functions

 EGRegressionModifierV3 (const edm::ParameterSet &conf, edm::ConsumesCollector &cc)
 
void modifyObject (reco::GsfElectron &) const final
 
void modifyObject (reco::Photon &) const final
 
void modifyObject (pat::Electron &) const final
 
void modifyObject (pat::Photon &) const final
 
void setEvent (const edm::Event &) final
 
void setEventContent (const edm::EventSetup &) final
 
 ~EGRegressionModifierV3 () override
 
- Public Member Functions inherited from ModifyObjectValueBase
virtual void modifyObject (reco::Muon &) const
 
virtual void modifyObject (reco::BaseTau &) const
 
virtual void modifyObject (reco::Jet &) const
 
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 Member Functions

std::array< float, 32 > getRegData (const reco::GsfElectron &ele) const
 
std::array< float, 32 > getRegData (const reco::Photon &pho) const
 
void getSeedCrysCoord (const reco::CaloCluster &clus, int &iEtaOrX, int &iPhiOrY) const
 

Private Attributes

edm::ESHandle< CaloGeometrycaloGeomHandle_
 
std::unique_ptr< EleRegseleRegs_
 
float maxRawEnergyForLowPtEBSigma_
 
float maxRawEnergyForLowPtEESigma_
 
std::unique_ptr< PhoRegsphoRegs_
 
edm::EDGetTokenT< double > rhoToken_
 
float rhoValue_
 
bool useClosestToCentreSeedCrysDef_
 

Detailed Description

Definition at line 22 of file EGRegressionModifierV3.cc.

Constructor & Destructor Documentation

EGRegressionModifierV3::EGRegressionModifierV3 ( const edm::ParameterSet conf,
edm::ConsumesCollector cc 
)

Definition at line 74 of file EGRegressionModifierV3.cc.

75  :
77  rhoValue_(0.),
78  rhoToken_(cc.consumes<double>(conf.getParameter<edm::InputTag>("rhoTag"))),
79  useClosestToCentreSeedCrysDef_(conf.getParameter<bool>("useClosestToCentreSeedCrysDef")),
80  maxRawEnergyForLowPtEBSigma_(conf.getParameter<double>("maxRawEnergyForLowPtEBSigma")),
81  maxRawEnergyForLowPtEESigma_(conf.getParameter<double>("maxRawEnergyForLowPtEESigma"))
82 {
83  if(conf.exists("eleRegs")) {
84  eleRegs_ = std::make_unique<EleRegs>(conf.getParameter<edm::ParameterSet>("eleRegs"));
85  }
86  if(conf.exists("phoRegs")) {
87  phoRegs_ = std::make_unique<PhoRegs>(conf.getParameter<edm::ParameterSet>("phoRegs"));
88  }
89 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< double > rhoToken_
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::unique_ptr< PhoRegs > phoRegs_
ModifyObjectValueBase(const edm::ParameterSet &conf)
std::unique_ptr< EleRegs > eleRegs_
EGRegressionModifierV3::~EGRegressionModifierV3 ( )
override

Definition at line 91 of file EGRegressionModifierV3.cc.

91 {}

Member Function Documentation

std::array< float, 32 > EGRegressionModifierV3::getRegData ( const reco::GsfElectron ele) const
private

Definition at line 209 of file EGRegressionModifierV3.cc.

References funct::abs(), data, reco::deltaPhi(), reco::GsfElectron::ShowerShape::e5x5, reco::CaloCluster::eta(), reco::GsfElectron::full5x5_showerShape(), getSeedCrysCoord(), reco::GsfElectron::hcalOverEcalBc(), reco::GsfElectron::isEB(), SiStripPI::max, reco::GsfElectron::nSaturatedXtals(), reco::CaloCluster::phi(), rhoValue_, and reco::GsfElectron::superCluster().

Referenced by modifyObject().

210 {
211  std::array<float, 32> data;
212 
213  const reco::SuperClusterRef& superClus = ele.superCluster();
214  const edm::Ptr<reco::CaloCluster>& seedClus = superClus->seed();
215 
216  const bool isEB = ele.isEB();
217  const double rawEnergy = superClus->rawEnergy();
218  const double rawESEnergy = superClus->preshowerEnergy();
219  const int numberOfClusters = superClus->clusters().size();
220  const auto& ssFull5x5 = ele.full5x5_showerShape();
221 
222  float e5x5Inverse = ssFull5x5.e5x5 != 0. ? vdt::fast_inv(ssFull5x5.e5x5) : 0.;
223 
224  data[0] = rawEnergy;
225  data[1] = superClus->etaWidth();
226  data[2] = superClus->phiWidth();
227  data[3] = superClus->seed()->energy()/rawEnergy;
228  data[4] = ssFull5x5.e5x5/rawEnergy;
229  data[5] = ele.hcalOverEcalBc();
230  data[6] = rhoValue_;
231  data[7] = seedClus->eta() - superClus->position().Eta();
232  data[8] = reco::deltaPhi( seedClus->phi(),superClus->position().Phi());
233  data[9] = ssFull5x5.r9;
234  data[10] = ssFull5x5.sigmaIetaIeta;
235  data[11] = ssFull5x5.sigmaIetaIphi;
236  data[12] = ssFull5x5.sigmaIphiIphi;
237  data[13] = ssFull5x5.eMax*e5x5Inverse;
238  data[14] = ssFull5x5.e2nd*e5x5Inverse;
239  data[15] = ssFull5x5.eTop*e5x5Inverse;
240  data[16] = ssFull5x5.eBottom*e5x5Inverse;
241  data[17] = ssFull5x5.eLeft*e5x5Inverse;
242  data[18] = ssFull5x5.eRight*e5x5Inverse;
243  data[19] = ssFull5x5.e2x5Max*e5x5Inverse;
244  data[20] = ssFull5x5.e2x5Left*e5x5Inverse;
245  data[21] = ssFull5x5.e2x5Right*e5x5Inverse;
246  data[22] = ssFull5x5.e2x5Top*e5x5Inverse;
247  data[23] = ssFull5x5.e2x5Bottom*e5x5Inverse;
248  data[24] = ele.nSaturatedXtals();
249  data[25] = std::max(0,numberOfClusters);
250 
251  if(isEB){
252  int iEta,iPhi;
253  getSeedCrysCoord(*seedClus,iEta,iPhi);
254  int signIEta = iEta > 0 ? +1 : -1;
255  data[26] = iEta;
256  data[27] = iPhi;
257  data[28] = (iEta-signIEta)%5;
258  data[29] = (iPhi-1)%2;
259  const int iEtaCorr = iEta - (iEta > 0 ? +1 : -1);
260  const int iEtaCorr26 = iEta - (iEta > 0 ? +26 : -26);
261  data[30] = std::abs(iEta)<=25 ? iEtaCorr%20 : iEtaCorr26%20;
262  data[31] = (iPhi-1)%20;
263  }else{
264  int iX,iY;
265  getSeedCrysCoord(*seedClus,iX,iY);
266  data[26] = iX;
267  data[27] = iY;
268  data[28] = rawESEnergy/rawEnergy;
269  }
270 
271  return data;
272 }
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:22
float nSaturatedXtals() const
Definition: GsfElectron.h:520
bool isEB() const
Definition: GsfElectron.h:356
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:168
void getSeedCrysCoord(const reco::CaloCluster &clus, int &iEtaOrX, int &iPhiOrY) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float hcalOverEcalBc() const
Definition: GsfElectron.h:452
const ShowerShape & full5x5_showerShape() const
Definition: GsfElectron.h:483
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:185
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:171
std::array< float, 32 > EGRegressionModifierV3::getRegData ( const reco::Photon pho) const
private

Definition at line 274 of file EGRegressionModifierV3.cc.

References funct::abs(), data, reco::deltaPhi(), reco::Photon::ShowerShape::e5x5, reco::CaloCluster::eta(), reco::Photon::full5x5_r9(), reco::Photon::full5x5_showerShapeVariables(), getSeedCrysCoord(), reco::Photon::hadronicOverEm(), reco::Photon::isEB(), SiStripPI::max, reco::Photon::nSaturatedXtals(), reco::CaloCluster::phi(), rhoValue_, and reco::Photon::superCluster().

275 {
276  std::array<float, 32> data;
277 
278  const reco::SuperClusterRef& superClus = pho.superCluster();
279  const edm::Ptr<reco::CaloCluster>& seedClus = superClus->seed();
280 
281  const bool isEB = pho.isEB();
282  const double rawEnergy = superClus->rawEnergy();
283  const double rawESEnergy = superClus->preshowerEnergy();
284  const int numberOfClusters = superClus->clusters().size();
285  const auto& ssFull5x5 = pho.full5x5_showerShapeVariables();
286 
287  float e5x5Inverse = ssFull5x5.e5x5 != 0. ? vdt::fast_inv(ssFull5x5.e5x5) : 0.;
288 
289  data[0] = rawEnergy;
290  data[1] = superClus->etaWidth();
291  data[2] = superClus->phiWidth();
292  data[3] = superClus->seed()->energy()/rawEnergy;
293  data[4] = ssFull5x5.e5x5/rawEnergy;
294  //interestingly enough this differs from electrons where it uses cone based
295  //naively Sam would have thought using cone based is even worse than tower based
296  data[5] = pho.hadronicOverEm();
297  data[6] = rhoValue_;
298  data[7] = seedClus->eta() - superClus->position().Eta();
299  data[8] = reco::deltaPhi( seedClus->phi(),superClus->position().Phi());
300  data[9] = pho.full5x5_r9();
301  data[10] = ssFull5x5.sigmaIetaIeta;
302  //interestingly sigmaIEtaIPhi differs in defination here from
303  //electron & sc definations of sigmaIEtaIPhi
304  data[11] = ssFull5x5.sigmaIetaIphi;
305  data[12] = ssFull5x5.sigmaIphiIphi;
306  data[13] = ssFull5x5.maxEnergyXtal*e5x5Inverse;
307  data[14] = ssFull5x5.e2nd*e5x5Inverse;
308  data[15] = ssFull5x5.eTop*e5x5Inverse;
309  data[16] = ssFull5x5.eBottom*e5x5Inverse;
310  data[17] = ssFull5x5.eLeft*e5x5Inverse;
311  data[18] = ssFull5x5.eRight*e5x5Inverse;
312  data[19] = ssFull5x5.e2x5Max*e5x5Inverse;
313  data[20] = ssFull5x5.e2x5Left*e5x5Inverse;
314  data[21] = ssFull5x5.e2x5Right*e5x5Inverse;
315  data[22] = ssFull5x5.e2x5Top*e5x5Inverse;
316  data[23] = ssFull5x5.e2x5Bottom*e5x5Inverse;
317  data[24] = pho.nSaturatedXtals();
318  data[25] = std::max(0,numberOfClusters);
319 
320  if(isEB){
321  int iEta,iPhi;
322  getSeedCrysCoord(*seedClus,iEta,iPhi);
323  data[26] = iEta;
324  data[27] = iPhi;
325  int signIEta = iEta > 0 ? +1 : -1;
326  data[28] = (iEta-signIEta)%5;
327  data[29] = (iPhi-1)%2;
328  const int iEtaCorr = iEta - (iEta > 0 ? +1 : -1);
329  const int iEtaCorr26 = iEta - (iEta > 0 ? +26 : -26);
330  data[30] = std::abs(iEta)<=25 ? iEtaCorr%20 : iEtaCorr26%20;
331  data[31] = (iPhi-1)%20;
332  }else{
333  int iX,iY;
334  getSeedCrysCoord(*seedClus,iX,iY);
335  data[26] = iX;
336  data[27] = iY;
337  data[28] = rawESEnergy/rawEnergy;
338  }
339 
340  return data;
341 }
constexpr double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:22
reco::SuperClusterRef superCluster() const override
Ref to SuperCluster.
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:168
float full5x5_r9() const
Definition: Photon.h:252
void getSeedCrysCoord(const reco::CaloCluster &clus, int &iEtaOrX, int &iPhiOrY) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float hadronicOverEm() const
the total hadronic over electromagnetic fraction
Definition: Photon.h:212
bool isEB() const
Definition: Photon.h:121
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const ShowerShape & full5x5_showerShapeVariables() const
Definition: Photon.h:206
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:171
float nSaturatedXtals() const
Definition: Photon.h:266
void EGRegressionModifierV3::getSeedCrysCoord ( const reco::CaloCluster clus,
int &  iEtaOrX,
int &  iPhiOrY 
) const
private

Definition at line 343 of file EGRegressionModifierV3.cc.

References caloGeomHandle_, EcalBarrel, EBDetId::ieta(), EEDetId::ix(), egammaTools::localEcalClusterCoordsEB(), egammaTools::localEcalClusterCoordsEE(), reco::CaloCluster::seed(), DetId::subdetId(), and useClosestToCentreSeedCrysDef_.

Referenced by getRegData().

344 {
345  iEtaOrX = 0;
346  iPhiOrY = 0;
347 
348  const bool isEB = clus.seed().subdetId()==EcalBarrel;
349 
351  float dummy;
352  if(isEB){
354  iEtaOrX, iPhiOrY, dummy, dummy);
355  }else{
357  iEtaOrX, iPhiOrY, dummy, dummy);
358  }
359  }else{
360  if(isEB){
361  const EBDetId ebId(clus.seed());
362  iEtaOrX = ebId.ieta();
363  iPhiOrY = ebId.iphi();
364  }else{
365  const EEDetId eeId(clus.seed());
366  iEtaOrX = eeId.ix();
367  iPhiOrY = eeId.iy();
368  }
369  }
370 }
void localEcalClusterCoordsEB(const reco::CaloCluster &bclus, const CaloGeometry &geom, float &etacry, float &phicry, int &ieta, int &iphi, float &thetatilt, float &phitilt)
int ix() const
Definition: EEDetId.h:77
edm::ESHandle< CaloGeometry > caloGeomHandle_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
void localEcalClusterCoordsEE(const reco::CaloCluster &bclus, const CaloGeometry &geom, float &xcry, float &ycry, int &ix, int &iy, float &thetatilt, float &phitilt)
int ieta() const
get the crystal ieta
Definition: EBDetId.h:49
DetId seed() const
return DetId of seed
Definition: CaloCluster.h:207
void EGRegressionModifierV3::modifyObject ( reco::GsfElectron ele) const
finalvirtual

Reimplemented from ModifyObjectValueBase.

Definition at line 107 of file EGRegressionModifierV3.cc.

References reco::GsfElectron::correctMomentum(), eleRegs_, reco::GsfElectron::fbrem(), DetId::Forward, getRegData(), edm::Ref< C, T, F >::isAvailable(), reco::GsfElectron::isEB(), CastorSimpleRecAlgoImpl::isSaturated(), reco::GsfElectron::ClassificationVariables::kDefaultValue, maxRawEnergyForLowPtEBSigma_, maxRawEnergyForLowPtEESigma_, min(), reco::GsfElectron::nSaturatedXtals(), reco::GsfElectron::p4(), reco::GsfElectron::setCorrectedEcalEnergy(), reco::GsfElectron::setCorrectedEcalEnergyError(), reco::GsfElectron::superCluster(), and reco::GsfElectron::trackMomentumError().

Referenced by modifyObject().

108 {
109  //check if we have specified an electron regression correction and
110  //return the object unmodified if so
111  if(!eleRegs_) return;
112 
113  const reco::SuperClusterRef& superClus = ele.superCluster();
114 
115  // skip HGCAL for now
116  if( superClus->seed()->seed().det() == DetId::Forward ) return;
117 
118  // do not apply corrections in case of missing info (slimmed MiniAOD electrons)
119  if(!superClus->clusters().isAvailable()) return;
120 
121  //check if fbrem is filled as its needed for E/p combination so abort if its set to the default value
122  //this will be the case for <5 (or current cuts) for miniAOD electrons
124 
125  auto regData = getRegData(ele);
126  const float rawEnergy = superClus->rawEnergy();
127  const float rawESEnergy = superClus->preshowerEnergy();
128  //bug here, it should include the ES, kept for backwards compat
129  const float rawEt = rawEnergy*superClus->position().rho()/superClus->position().r();
130  const bool isSaturated = ele.nSaturatedXtals()!=0;
131 
132  const float ecalMean = eleRegs_->ecalOnlyMean(rawEt,ele.isEB(),isSaturated,regData.data());
133  const float ecalMeanCorr = ecalMean > 0. ? ecalMean : 1.0;
134  //as the sample is trained flat in pt, the regression's only source of very high energy
135  //electrons is in the high endcap and therefore it gives a very poor resolution estimate
136  //to any electrons with this energy, regardless of their actual eta
137  //hence this lovely hack
138  if(ele.isEB() && maxRawEnergyForLowPtEBSigma_>=0 &&
139  eleRegs_->ecalOnlySigma.useLowEtBin(rawEt,isSaturated)){
140  regData[0] = std::min(regData[0],maxRawEnergyForLowPtEBSigma_);
141  }
142  if(!ele.isEB() && maxRawEnergyForLowPtEESigma_>=0 &&
143  eleRegs_->ecalOnlySigma.useLowEtBin(rawEt,isSaturated)){
144  regData[0] = std::min(regData[0],maxRawEnergyForLowPtEESigma_);
145  }
146  const float ecalSigma = eleRegs_->ecalOnlySigma(rawEt,ele.isEB(),isSaturated,regData.data());
147 
148  const float corrEnergy = (rawEnergy + rawESEnergy)*ecalMeanCorr;
149  const float corrEnergyErr = corrEnergy*ecalSigma;
150 
151  ele.setCorrectedEcalEnergy(corrEnergy);
152  ele.setCorrectedEcalEnergyError(corrEnergyErr);
153 
154  std::pair<float,float> combEnergyAndErr = eleRegs_->epComb.combine(ele);
155  const math::XYZTLorentzVector newP4 = ele.p4()*combEnergyAndErr.first/ele.p4().t();
156  ele.correctMomentum(newP4, ele.trackMomentumError(), combEnergyAndErr.second);
157 }
bool isAvailable() const
Definition: Ref.h:575
float nSaturatedXtals() const
Definition: GsfElectron.h:520
float trackMomentumError() const
Definition: GsfElectron.h:847
const LorentzVector & p4(P4Kind kind) const
Definition: GsfElectron.cc:225
void correctMomentum(const LorentzVector &p4, float trackMomentumError, float p4Error)
Definition: GsfElectron.h:869
float fbrem() const
Definition: GsfElectron.h:772
bool isEB() const
Definition: GsfElectron.h:356
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
void setCorrectedEcalEnergyError(float newEnergyError)
Definition: GsfElectron.cc:179
T min(T a, T b)
Definition: MathUtil.h:58
std::unique_ptr< EleRegs > eleRegs_
void setCorrectedEcalEnergy(float newEnergy)
Definition: GsfElectron.cc:182
bool isSaturated(const Digi &digi, const int &maxADCvalue, int ifirst, int n)
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:185
std::array< float, 32 > getRegData(const reco::GsfElectron &ele) const
void EGRegressionModifierV3::modifyObject ( reco::Photon pho) const
finalvirtual

Reimplemented from ModifyObjectValueBase.

Definition at line 164 of file EGRegressionModifierV3.cc.

References DetId::Forward, getRegData(), edm::Ref< C, T, F >::isAvailable(), reco::Photon::isEB(), CastorSimpleRecAlgoImpl::isSaturated(), maxRawEnergyForLowPtEBSigma_, maxRawEnergyForLowPtEESigma_, min(), reco::Photon::nSaturatedXtals(), phoRegs_, reco::Photon::setCorrectedEnergy(), and reco::Photon::superCluster().

165 {
166  //check if we have specified an photon regression correction and
167  //return the object unmodified if so
168  if(!phoRegs_) return;
169 
170  const reco::SuperClusterRef& superClus = pho.superCluster();
171 
172  // skip HGCAL for now
173  if(superClus->seed()->seed().det() == DetId::Forward ) return;
174 
175  // do not apply corrections in case of missing info (happens for some slimmed MiniAOD photons)
176  if(!superClus->clusters().isAvailable()) return;
177 
178  auto regData = getRegData(pho);
179 
180  const float rawEnergy = superClus->rawEnergy();
181  const float rawESEnergy = superClus->preshowerEnergy();
182  //bug here, it should include the ES, kept for backwards compat
183  const float rawEt = rawEnergy*superClus->position().rho()/superClus->position().r();
184  const bool isSaturated = pho.nSaturatedXtals();
185  const float ecalMean = phoRegs_->ecalOnlyMean(rawEt,pho.isEB(),isSaturated,regData.data());
186  const float ecalMeanCorr = ecalMean > 0. ? ecalMean : 1.0;
187 
188  //see the electrons for explaination of this lovely feature
189  if(pho.isEB() && maxRawEnergyForLowPtEBSigma_>=0 &&
190  phoRegs_->ecalOnlySigma.useLowEtBin(rawEt,isSaturated)){
191  regData[0] = std::min(regData[0],maxRawEnergyForLowPtEBSigma_);
192  }
193  if(!pho.isEB() && maxRawEnergyForLowPtEESigma_>=0 &&
194  phoRegs_->ecalOnlySigma.useLowEtBin(rawEt,isSaturated)){
195  regData[0] = std::min(regData[0],maxRawEnergyForLowPtEESigma_);
196  }
197  const float ecalSigma = phoRegs_->ecalOnlySigma(rawEt,pho.isEB(),isSaturated,regData.data());
198 
199  const double corrEnergy = (rawEnergy + rawESEnergy)*ecalMeanCorr;
200  const double corrEnergyErr = corrEnergy*ecalSigma;
201 
202  pho.setCorrectedEnergy(reco::Photon::P4type::regression2, corrEnergy, corrEnergyErr, true);
203 }
bool isAvailable() const
Definition: Ref.h:575
void setCorrectedEnergy(P4type type, float E, float dE, bool toCand=true)
std::unique_ptr< PhoRegs > phoRegs_
reco::SuperClusterRef superCluster() const override
Ref to SuperCluster.
T min(T a, T b)
Definition: MathUtil.h:58
bool isEB() const
Definition: Photon.h:121
bool isSaturated(const Digi &digi, const int &maxADCvalue, int ifirst, int n)
std::array< float, 32 > getRegData(const reco::GsfElectron &ele) const
float nSaturatedXtals() const
Definition: Photon.h:266
void EGRegressionModifierV3::modifyObject ( pat::Electron ele) const
finalvirtual

Reimplemented from ModifyObjectValueBase.

Definition at line 159 of file EGRegressionModifierV3.cc.

References modifyObject().

160 {
161  modifyObject(static_cast<reco::GsfElectron&>(ele));
162 }
void modifyObject(reco::GsfElectron &) const final
void EGRegressionModifierV3::modifyObject ( pat::Photon pho) const
finalvirtual

Reimplemented from ModifyObjectValueBase.

Definition at line 205 of file EGRegressionModifierV3.cc.

References modifyObject().

205  {
206  modifyObject(static_cast<reco::Photon&>(pho));
207 }
void modifyObject(reco::GsfElectron &) const final
void EGRegressionModifierV3::setEvent ( const edm::Event evt)
finalvirtual

Reimplemented from ModifyObjectValueBase.

Definition at line 93 of file EGRegressionModifierV3.cc.

References edm::Event::getByToken(), rhoToken_, and rhoValue_.

94 {
95  edm::Handle<double> rhoHandle;
96  evt.getByToken(rhoToken_, rhoHandle);
97  rhoValue_ = *rhoHandle;
98 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::EDGetTokenT< double > rhoToken_
void EGRegressionModifierV3::setEventContent ( const edm::EventSetup iSetup)
finalvirtual

Reimplemented from ModifyObjectValueBase.

Definition at line 100 of file EGRegressionModifierV3.cc.

References caloGeomHandle_, eleRegs_, edm::EventSetup::get(), phoRegs_, and useClosestToCentreSeedCrysDef_.

101 {
102  if(eleRegs_) eleRegs_->setEventContent(iSetup);
103  if(phoRegs_) phoRegs_->setEventContent(iSetup);
105 }
std::unique_ptr< PhoRegs > phoRegs_
edm::ESHandle< CaloGeometry > caloGeomHandle_
std::unique_ptr< EleRegs > eleRegs_
T get() const
Definition: EventSetup.h:71

Member Data Documentation

edm::ESHandle<CaloGeometry> EGRegressionModifierV3::caloGeomHandle_
private

Definition at line 66 of file EGRegressionModifierV3.cc.

Referenced by getSeedCrysCoord(), and setEventContent().

std::unique_ptr<EleRegs> EGRegressionModifierV3::eleRegs_
private

Definition at line 57 of file EGRegressionModifierV3.cc.

Referenced by modifyObject(), and setEventContent().

float EGRegressionModifierV3::maxRawEnergyForLowPtEBSigma_
private

Definition at line 64 of file EGRegressionModifierV3.cc.

Referenced by modifyObject().

float EGRegressionModifierV3::maxRawEnergyForLowPtEESigma_
private

Definition at line 65 of file EGRegressionModifierV3.cc.

Referenced by modifyObject().

std::unique_ptr<PhoRegs> EGRegressionModifierV3::phoRegs_
private

Definition at line 58 of file EGRegressionModifierV3.cc.

Referenced by modifyObject(), and setEventContent().

edm::EDGetTokenT<double> EGRegressionModifierV3::rhoToken_
private

Definition at line 61 of file EGRegressionModifierV3.cc.

Referenced by setEvent().

float EGRegressionModifierV3::rhoValue_
private

Definition at line 60 of file EGRegressionModifierV3.cc.

Referenced by getRegData(), and setEvent().

bool EGRegressionModifierV3::useClosestToCentreSeedCrysDef_
private

Definition at line 63 of file EGRegressionModifierV3.cc.

Referenced by getSeedCrysCoord(), and setEventContent().