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() [1/3]

SimplePhoton::SimplePhoton ( )
inline

Definition at line 10 of file SimplePhoton.h.

10 {}

◆ SimplePhoton() [2/3]

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
bool isEB() const
Definition: SimplePhoton.h:55
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 isMC() const
Definition: SimplePhoton.h:56
double regEnergyError_
Definition: SimplePhoton.h:69

◆ ~SimplePhoton()

SimplePhoton::~SimplePhoton ( )
inline

Definition at line 35 of file SimplePhoton.h.

35 {}

◆ SimplePhoton() [3/3]

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
double smearing_
Definition: SimplePhoton.h:76
double regEnergy_
Definition: SimplePhoton.h:68
double newEnergy_
Definition: SimplePhoton.h:73
bool isMC() const
Definition: SimplePhoton.h:56
double regEnergyError_
Definition: SimplePhoton.h:69

Member Function Documentation

◆ getElClass()

int SimplePhoton::getElClass ( ) const
inline

Definition at line 53 of file SimplePhoton.h.

References eClass_.

53 { return eClass_; }
double eClass_
Definition: SimplePhoton.h:64

◆ getEta()

double SimplePhoton::getEta ( ) const
inline

Definition at line 51 of file SimplePhoton.h.

References eta_.

51 { return eta_; }

◆ getNewEnergy()

double SimplePhoton::getNewEnergy ( ) const
inline

Definition at line 43 of file SimplePhoton.h.

References newEnergy_.

Referenced by writeTo().

43 { return newEnergy_; }
double newEnergy_
Definition: SimplePhoton.h:73

◆ getNewEnergyError()

double SimplePhoton::getNewEnergyError ( ) const
inline

Definition at line 44 of file SimplePhoton.h.

References newEnergyError_.

Referenced by writeTo().

44 { return newEnergyError_; }
double newEnergyError_
Definition: SimplePhoton.h:74

◆ getR9()

float SimplePhoton::getR9 ( ) const
inline

Definition at line 52 of file SimplePhoton.h.

References r9_.

52 { return r9_; }

◆ getRegEnergy()

double SimplePhoton::getRegEnergy ( ) const
inline

Definition at line 49 of file SimplePhoton.h.

References regEnergy_.

49 { return regEnergy_; }
double regEnergy_
Definition: SimplePhoton.h:68

◆ getRegEnergyError()

double SimplePhoton::getRegEnergyError ( ) const
inline

Definition at line 50 of file SimplePhoton.h.

References regEnergyError_.

50 { return regEnergyError_; }
double regEnergyError_
Definition: SimplePhoton.h:69

◆ getRunNumber()

int SimplePhoton::getRunNumber ( ) const
inline

Definition at line 54 of file SimplePhoton.h.

References run_.

54 { return run_; }

◆ getScale()

double SimplePhoton::getScale ( ) const
inline

Definition at line 45 of file SimplePhoton.h.

References scale_.

45 { return scale_; }
double scale_
Definition: SimplePhoton.h:75

◆ getSCEnergy()

double SimplePhoton::getSCEnergy ( ) const
inline

Definition at line 47 of file SimplePhoton.h.

References scEnergy_.

47 { return scEnergy_; }
double scEnergy_
Definition: SimplePhoton.h:66

◆ getSCEnergyError()

double SimplePhoton::getSCEnergyError ( ) const
inline

Definition at line 48 of file SimplePhoton.h.

References scEnergyError_.

48 { return scEnergyError_; }
double scEnergyError_
Definition: SimplePhoton.h:67

◆ getSmearing()

double SimplePhoton::getSmearing ( ) const
inline

Definition at line 46 of file SimplePhoton.h.

References smearing_.

46 { return smearing_; }
double smearing_
Definition: SimplePhoton.h:76

◆ isEB()

bool SimplePhoton::isEB ( ) const
inline

Definition at line 55 of file SimplePhoton.h.

References isEB_.

Referenced by Electron.Electron::absIsoWithFSR().

55 { return isEB_; }

◆ isMC()

bool SimplePhoton::isMC ( ) const
inline

Definition at line 56 of file SimplePhoton.h.

References isMC_.

56 { return isMC_; }

◆ setNewEnergy()

void SimplePhoton::setNewEnergy ( double  newEnergy)
inline

Definition at line 59 of file SimplePhoton.h.

References newEnergy_.

59 { newEnergy_ = newEnergy; }
double newEnergy_
Definition: SimplePhoton.h:73

◆ setNewEnergyError()

void SimplePhoton::setNewEnergyError ( double  newEnergyError)
inline

Definition at line 60 of file SimplePhoton.h.

References newEnergyError_.

60 { newEnergyError_ = newEnergyError; }
double newEnergyError_
Definition: SimplePhoton.h:74

◆ writeTo()

void SimplePhoton::writeTo ( reco::Photon out) const

Definition at line 20 of file SimplePhoton.cc.

References getNewEnergy(), getNewEnergyError(), and MillePedeFileConverter_cfg::out.

Referenced by PhotonEnergyCalibratorRun2::calibrate().

20  {
21  out.setCorrectedEnergy(reco::Photon::P4type::regression2, getNewEnergy(), getNewEnergyError(), true);
22 }
double getNewEnergy() const
Definition: SimplePhoton.h:43
double getNewEnergyError() const
Definition: SimplePhoton.h:44

Member Data Documentation

◆ eClass_

double SimplePhoton::eClass_
private

Definition at line 64 of file SimplePhoton.h.

Referenced by getElClass().

◆ eta_

double SimplePhoton::eta_
private

Definition at line 70 of file SimplePhoton.h.

Referenced by getEta().

◆ isEB_

bool SimplePhoton::isEB_
private

Definition at line 71 of file SimplePhoton.h.

Referenced by isEB().

◆ isMC_

bool SimplePhoton::isMC_
private

Definition at line 72 of file SimplePhoton.h.

Referenced by isMC().

◆ newEnergy_

double SimplePhoton::newEnergy_
private

Definition at line 73 of file SimplePhoton.h.

Referenced by getNewEnergy(), and setNewEnergy().

◆ newEnergyError_

double SimplePhoton::newEnergyError_
private

Definition at line 74 of file SimplePhoton.h.

Referenced by getNewEnergyError(), and setNewEnergyError().

◆ r9_

double SimplePhoton::r9_
private

Definition at line 65 of file SimplePhoton.h.

Referenced by getR9().

◆ regEnergy_

double SimplePhoton::regEnergy_
private

Definition at line 68 of file SimplePhoton.h.

Referenced by getRegEnergy().

◆ regEnergyError_

double SimplePhoton::regEnergyError_
private

Definition at line 69 of file SimplePhoton.h.

Referenced by getRegEnergyError().

◆ run_

double SimplePhoton::run_
private

Definition at line 63 of file SimplePhoton.h.

Referenced by getRunNumber().

◆ scale_

double SimplePhoton::scale_
private

Definition at line 75 of file SimplePhoton.h.

Referenced by getScale().

◆ scEnergy_

double SimplePhoton::scEnergy_
private

Definition at line 66 of file SimplePhoton.h.

Referenced by getSCEnergy().

◆ scEnergyError_

double SimplePhoton::scEnergyError_
private

Definition at line 67 of file SimplePhoton.h.

Referenced by getSCEnergyError().

◆ smearing_

double SimplePhoton::smearing_
private

Definition at line 76 of file SimplePhoton.h.

Referenced by getSmearing().