CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
SimplePhoton Class Reference

#include <SimplePhoton.h>

Public Member Functions

int getElClass () const
 
double getEta () const
 
double getNewEnergy () const
 
double getNewEnergyError () const
 
float getR9 () const
 
double getRegEnergy () const
 
double getRegEnergyError () const
 
int getRunNumber () const
 
double getScale () const
 
double getSCEnergy () const
 
double getSCEnergyError () const
 
double getSmearing () const
 
bool isEB () const
 
bool isMC () const
 
void setNewEnergy (double newEnergy)
 
void setNewEnergyError (double newEnergyError)
 
 SimplePhoton ()
 
 SimplePhoton (double run, double eClass, double r9, double scEnergy, double scEnergyError, double regEnergy, double regEnergyError, double eta, bool isEB, bool isMC)
 
 SimplePhoton (const reco::Photon &in, unsigned int runNumber, bool isMC)
 
void writeTo (reco::Photon &out) const
 
 ~SimplePhoton ()
 

Private Attributes

double eClass_
 
double eta_
 
bool isEB_
 
bool isMC_
 
double newEnergy_
 
double newEnergyError_
 
double r9_
 
double regEnergy_
 
double regEnergyError_
 
double run_
 
double scale_
 
double scEnergy_
 
double scEnergyError_
 
double smearing_
 

Detailed Description

Definition at line 8 of file SimplePhoton.h.

Constructor & Destructor Documentation

SimplePhoton::SimplePhoton ( )
inline

Definition at line 10 of file SimplePhoton.h.

10 {}
SimplePhoton::SimplePhoton ( double  run,
double  eClass,
double  r9,
double  scEnergy,
double  scEnergyError,
double  regEnergy,
double  regEnergyError,
double  eta,
bool  isEB,
bool  isMC 
)
inline

Definition at line 11 of file SimplePhoton.h.

21  : run_(run),
22  eClass_(eClass),
23  r9_(r9),
24  scEnergy_(scEnergy),
25  scEnergyError_(scEnergyError),
26  regEnergy_(regEnergy),
27  regEnergyError_(regEnergyError),
28  eta_(eta),
29  isEB_(isEB),
30  isMC_(isMC),
33  scale_(1.0),
34  smearing_(0.0) {}
double scEnergy_
Definition: SimplePhoton.h:66
double scale_
Definition: SimplePhoton.h:75
double eClass_
Definition: SimplePhoton.h:64
double scEnergyError_
Definition: SimplePhoton.h:67
double newEnergyError_
Definition: SimplePhoton.h:74
double smearing_
Definition: SimplePhoton.h:76
double regEnergy_
Definition: SimplePhoton.h:68
double newEnergy_
Definition: SimplePhoton.h:73
bool isEB() const
Definition: SimplePhoton.h:55
bool isMC() const
Definition: SimplePhoton.h:56
double regEnergyError_
Definition: SimplePhoton.h:69
SimplePhoton::~SimplePhoton ( )
inline

Definition at line 35 of file SimplePhoton.h.

35 {}
SimplePhoton::SimplePhoton ( const reco::Photon in,
unsigned int  runNumber,
bool  isMC 
)
explicit

Definition at line 4 of file SimplePhoton.cc.

5  : run_(runNumber),
6  eClass_(-1),
7  r9_(in.full5x5_r9()),
8  scEnergy_(in.superCluster()->rawEnergy() + (in.isEB() ? 0 : in.superCluster()->preshowerEnergy())),
9  scEnergyError_(-999.), // FIXME???
10  regEnergy_(in.getCorrectedEnergy(reco::Photon::P4type::regression2)),
11  regEnergyError_(in.getCorrectedEnergyError(reco::Photon::P4type::regression2)),
12  eta_(in.superCluster()->eta()),
13  isEB_(in.isEB()),
14  isMC_(isMC),
17  scale_(1.0),
18  smearing_(0.0) {}
double scEnergy_
Definition: SimplePhoton.h:66
double scale_
Definition: SimplePhoton.h:75
double eClass_
Definition: SimplePhoton.h:64
double scEnergyError_
Definition: SimplePhoton.h:67
double newEnergyError_
Definition: SimplePhoton.h:74
float full5x5_r9() const
Definition: Photon.h:288
double smearing_
Definition: SimplePhoton.h:76
double regEnergy_
Definition: SimplePhoton.h:68
reco::SuperClusterRef superCluster() const override
Ref to SuperCluster.
double newEnergy_
Definition: SimplePhoton.h:73
float getCorrectedEnergyError(P4type type) const
bool isMC() const
Definition: SimplePhoton.h:56
float getCorrectedEnergy(P4type type) const
bool isEB() const
Definition: Photon.h:123
double regEnergyError_
Definition: SimplePhoton.h:69

Member Function Documentation

int SimplePhoton::getElClass ( ) const
inline

Definition at line 53 of file SimplePhoton.h.

References eClass_.

53 { return eClass_; }
double eClass_
Definition: SimplePhoton.h:64
double SimplePhoton::getEta ( ) const
inline

Definition at line 51 of file SimplePhoton.h.

References eta_.

Referenced by PhotonEnergyCalibratorRun2::calibrate().

51 { return eta_; }
double SimplePhoton::getNewEnergy ( ) const
inline

Definition at line 43 of file SimplePhoton.h.

References newEnergy_.

Referenced by PhotonEnergyCalibratorRun2::calibrate(), and writeTo().

43 { return newEnergy_; }
double newEnergy_
Definition: SimplePhoton.h:73
double SimplePhoton::getNewEnergyError ( ) const
inline

Definition at line 44 of file SimplePhoton.h.

References newEnergyError_.

Referenced by PhotonEnergyCalibratorRun2::calibrate(), and writeTo().

44 { return newEnergyError_; }
double newEnergyError_
Definition: SimplePhoton.h:74
float SimplePhoton::getR9 ( ) const
inline

Definition at line 52 of file SimplePhoton.h.

References r9_.

Referenced by PhotonEnergyCalibratorRun2::calibrate().

52 { return r9_; }
double SimplePhoton::getRegEnergy ( ) const
inline

Definition at line 49 of file SimplePhoton.h.

References regEnergy_.

49 { return regEnergy_; }
double regEnergy_
Definition: SimplePhoton.h:68
double SimplePhoton::getRegEnergyError ( ) const
inline

Definition at line 50 of file SimplePhoton.h.

References regEnergyError_.

50 { return regEnergyError_; }
double regEnergyError_
Definition: SimplePhoton.h:69
int SimplePhoton::getRunNumber ( ) const
inline

Definition at line 54 of file SimplePhoton.h.

References run_.

Referenced by PhotonEnergyCalibratorRun2::calibrate().

54 { return run_; }
double SimplePhoton::getScale ( ) const
inline

Definition at line 45 of file SimplePhoton.h.

References scale_.

45 { return scale_; }
double scale_
Definition: SimplePhoton.h:75
double SimplePhoton::getSCEnergy ( ) const
inline

Definition at line 47 of file SimplePhoton.h.

References scEnergy_.

47 { return scEnergy_; }
double scEnergy_
Definition: SimplePhoton.h:66
double SimplePhoton::getSCEnergyError ( ) const
inline

Definition at line 48 of file SimplePhoton.h.

References scEnergyError_.

48 { return scEnergyError_; }
double scEnergyError_
Definition: SimplePhoton.h:67
double SimplePhoton::getSmearing ( ) const
inline

Definition at line 46 of file SimplePhoton.h.

References smearing_.

46 { return smearing_; }
double smearing_
Definition: SimplePhoton.h:76
bool SimplePhoton::isEB ( ) const
inline

Definition at line 55 of file SimplePhoton.h.

References isEB_.

Referenced by Electron.Electron::absIsoWithFSR(), and PhotonEnergyCalibratorRun2::calibrate().

55 { return isEB_; }
bool SimplePhoton::isMC ( ) const
inline

Definition at line 56 of file SimplePhoton.h.

References isMC_.

Referenced by PhotonEnergyCalibratorRun2::calibrate().

56 { return isMC_; }
void SimplePhoton::setNewEnergy ( double  newEnergy)
inline

Definition at line 59 of file SimplePhoton.h.

References newEnergy_.

Referenced by PhotonEnergyCalibratorRun2::calibrate().

59 { newEnergy_ = newEnergy; }
double newEnergy_
Definition: SimplePhoton.h:73
void SimplePhoton::setNewEnergyError ( double  newEnergyError)
inline

Definition at line 60 of file SimplePhoton.h.

References newEnergyError_.

Referenced by PhotonEnergyCalibratorRun2::calibrate().

60 { newEnergyError_ = newEnergyError; }
double newEnergyError_
Definition: SimplePhoton.h:74
void SimplePhoton::writeTo ( reco::Photon out) const

Definition at line 20 of file SimplePhoton.cc.

References getNewEnergy(), getNewEnergyError(), and reco::Photon::setCorrectedEnergy().

Referenced by PhotonEnergyCalibratorRun2::calibrate().

20  {
21  out.setCorrectedEnergy(reco::Photon::P4type::regression2, getNewEnergy(), getNewEnergyError(), true);
22 }
double getNewEnergy() const
Definition: SimplePhoton.h:43
void setCorrectedEnergy(P4type type, float E, float dE, bool toCand=true)
double getNewEnergyError() const
Definition: SimplePhoton.h:44

Member Data Documentation

double SimplePhoton::eClass_
private

Definition at line 64 of file SimplePhoton.h.

Referenced by getElClass().

double SimplePhoton::eta_
private

Definition at line 70 of file SimplePhoton.h.

Referenced by getEta().

bool SimplePhoton::isEB_
private

Definition at line 71 of file SimplePhoton.h.

Referenced by isEB().

bool SimplePhoton::isMC_
private

Definition at line 72 of file SimplePhoton.h.

Referenced by isMC().

double SimplePhoton::newEnergy_
private

Definition at line 73 of file SimplePhoton.h.

Referenced by getNewEnergy(), and setNewEnergy().

double SimplePhoton::newEnergyError_
private

Definition at line 74 of file SimplePhoton.h.

Referenced by getNewEnergyError(), and setNewEnergyError().

double SimplePhoton::r9_
private

Definition at line 65 of file SimplePhoton.h.

Referenced by getR9().

double SimplePhoton::regEnergy_
private

Definition at line 68 of file SimplePhoton.h.

Referenced by getRegEnergy().

double SimplePhoton::regEnergyError_
private

Definition at line 69 of file SimplePhoton.h.

Referenced by getRegEnergyError().

double SimplePhoton::run_
private

Definition at line 63 of file SimplePhoton.h.

Referenced by getRunNumber().

double SimplePhoton::scale_
private

Definition at line 75 of file SimplePhoton.h.

Referenced by getScale().

double SimplePhoton::scEnergy_
private

Definition at line 66 of file SimplePhoton.h.

Referenced by getSCEnergy().

double SimplePhoton::scEnergyError_
private

Definition at line 67 of file SimplePhoton.h.

Referenced by getSCEnergyError().

double SimplePhoton::smearing_
private

Definition at line 76 of file SimplePhoton.h.

Referenced by getSmearing().