Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:59:16

0001 #ifndef SimplePhoton_STANDALONE
0002 #include "EgammaAnalysis/ElectronTools/interface/SimplePhoton.h"
0003 
0004 SimplePhoton::SimplePhoton(const reco::Photon &in, unsigned int runNumber, bool isMC)
0005     : run_(runNumber),
0006       eClass_(-1),
0007       r9_(in.full5x5_r9()),
0008       scEnergy_(in.superCluster()->rawEnergy() + (in.isEB() ? 0 : in.superCluster()->preshowerEnergy())),
0009       scEnergyError_(-999.),  // FIXME???
0010       regEnergy_(in.getCorrectedEnergy(reco::Photon::P4type::regression2)),
0011       regEnergyError_(in.getCorrectedEnergyError(reco::Photon::P4type::regression2)),
0012       eta_(in.superCluster()->eta()),
0013       isEB_(in.isEB()),
0014       isMC_(isMC),
0015       newEnergy_(regEnergy_),
0016       newEnergyError_(regEnergyError_),
0017       scale_(1.0),
0018       smearing_(0.0) {}
0019 
0020 void SimplePhoton::writeTo(reco::Photon &out) const {
0021   out.setCorrectedEnergy(reco::Photon::P4type::regression2, getNewEnergy(), getNewEnergyError(), true);
0022 }
0023 #endif