CMS 3D CMS Logo

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.

Referenced by ~SimplePhoton().

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  :
22  run_(run),
23  eClass_(eClass),
24  r9_(r9),
25  scEnergy_(scEnergy),
26  scEnergyError_(scEnergyError),
27  regEnergy_(regEnergy),
28  regEnergyError_(regEnergyError),
29  eta_(eta),
30  isEB_(isEB),
31  isMC_(isMC),
34  scale_(1.0), smearing_(0.0)
35  {}
double scEnergy_
Definition: SimplePhoton.h:67
double scale_
Definition: SimplePhoton.h:76
double eClass_
Definition: SimplePhoton.h:65
double scEnergyError_
Definition: SimplePhoton.h:68
double newEnergyError_
Definition: SimplePhoton.h:75
double smearing_
Definition: SimplePhoton.h:77
double regEnergy_
Definition: SimplePhoton.h:69
double newEnergy_
Definition: SimplePhoton.h:74
bool isEB() const
Definition: SimplePhoton.h:56
bool isMC() const
Definition: SimplePhoton.h:57
double regEnergyError_
Definition: SimplePhoton.h:70
SimplePhoton::~SimplePhoton ( )
inline
SimplePhoton::SimplePhoton ( const reco::Photon in,
unsigned int  runNumber,
bool  isMC 
)
explicit

Definition at line 4 of file SimplePhoton.cc.

4  :
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), smearing_(0.0)
18 {}
double scEnergy_
Definition: SimplePhoton.h:67
reco::SuperClusterRef superCluster() const
Ref to SuperCluster.
double scale_
Definition: SimplePhoton.h:76
double eClass_
Definition: SimplePhoton.h:65
double scEnergyError_
Definition: SimplePhoton.h:68
double newEnergyError_
Definition: SimplePhoton.h:75
float full5x5_r9() const
Definition: Photon.h:240
double smearing_
Definition: SimplePhoton.h:77
double regEnergy_
Definition: SimplePhoton.h:69
double newEnergy_
Definition: SimplePhoton.h:74
float getCorrectedEnergyError(P4type type) const
bool isMC() const
Definition: SimplePhoton.h:57
float getCorrectedEnergy(P4type type) const
bool isEB() const
Definition: Photon.h:121
double regEnergyError_
Definition: SimplePhoton.h:70

Member Function Documentation

int SimplePhoton::getElClass ( ) const
inline

Definition at line 54 of file SimplePhoton.h.

References eClass_.

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

Definition at line 52 of file SimplePhoton.h.

References eta_.

Referenced by PhotonEnergyCalibratorRun2::calibrate().

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

Definition at line 44 of file SimplePhoton.h.

References newEnergy_.

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

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

Definition at line 45 of file SimplePhoton.h.

References newEnergyError_.

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

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

Definition at line 53 of file SimplePhoton.h.

References r9_.

Referenced by PhotonEnergyCalibratorRun2::calibrate().

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

Definition at line 50 of file SimplePhoton.h.

References regEnergy_.

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

Definition at line 51 of file SimplePhoton.h.

References regEnergyError_.

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

Definition at line 55 of file SimplePhoton.h.

References run_.

Referenced by PhotonEnergyCalibratorRun2::calibrate().

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

Definition at line 46 of file SimplePhoton.h.

References scale_.

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

Definition at line 48 of file SimplePhoton.h.

References scEnergy_.

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

Definition at line 49 of file SimplePhoton.h.

References scEnergyError_.

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

Definition at line 47 of file SimplePhoton.h.

References smearing_.

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

Definition at line 56 of file SimplePhoton.h.

References isEB_.

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

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

Definition at line 57 of file SimplePhoton.h.

References isMC_.

Referenced by PhotonEnergyCalibratorRun2::calibrate(), and ~SimplePhoton().

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

Definition at line 60 of file SimplePhoton.h.

References newEnergy_.

Referenced by PhotonEnergyCalibratorRun2::calibrate().

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

Definition at line 61 of file SimplePhoton.h.

References newEnergyError_.

Referenced by PhotonEnergyCalibratorRun2::calibrate().

61 {newEnergyError_ = newEnergyError;}
double newEnergyError_
Definition: SimplePhoton.h:75
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(), and ~SimplePhoton().

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

Member Data Documentation

double SimplePhoton::eClass_
private

Definition at line 65 of file SimplePhoton.h.

Referenced by getElClass().

double SimplePhoton::eta_
private

Definition at line 71 of file SimplePhoton.h.

Referenced by getEta().

bool SimplePhoton::isEB_
private

Definition at line 72 of file SimplePhoton.h.

Referenced by isEB().

bool SimplePhoton::isMC_
private

Definition at line 73 of file SimplePhoton.h.

Referenced by isMC().

double SimplePhoton::newEnergy_
private

Definition at line 74 of file SimplePhoton.h.

Referenced by getNewEnergy(), and setNewEnergy().

double SimplePhoton::newEnergyError_
private

Definition at line 75 of file SimplePhoton.h.

Referenced by getNewEnergyError(), and setNewEnergyError().

double SimplePhoton::r9_
private

Definition at line 66 of file SimplePhoton.h.

Referenced by getR9().

double SimplePhoton::regEnergy_
private

Definition at line 69 of file SimplePhoton.h.

Referenced by getRegEnergy().

double SimplePhoton::regEnergyError_
private

Definition at line 70 of file SimplePhoton.h.

Referenced by getRegEnergyError().

double SimplePhoton::run_
private

Definition at line 64 of file SimplePhoton.h.

Referenced by getRunNumber().

double SimplePhoton::scale_
private

Definition at line 76 of file SimplePhoton.h.

Referenced by getScale().

double SimplePhoton::scEnergy_
private

Definition at line 67 of file SimplePhoton.h.

Referenced by getSCEnergy().

double SimplePhoton::scEnergyError_
private

Definition at line 68 of file SimplePhoton.h.

Referenced by getSCEnergyError().

double SimplePhoton::smearing_
private

Definition at line 77 of file SimplePhoton.h.

Referenced by getSmearing().