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 (const reco::Photon &in, unsigned int runNumber, bool isMC)
 
 SimplePhoton (double run, double eClass, double r9, double scEnergy, double scEnergyError, double regEnergy, double regEnergyError, double eta, bool isEB, 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) {}

◆ ~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) {}

Member Function Documentation

◆ getElClass()

int SimplePhoton::getElClass ( ) const
inline

Definition at line 53 of file SimplePhoton.h.

53 { return eClass_; }

References eClass_.

◆ getEta()

double SimplePhoton::getEta ( ) const
inline

Definition at line 51 of file SimplePhoton.h.

51 { return eta_; }

References eta_.

◆ getNewEnergy()

double SimplePhoton::getNewEnergy ( ) const
inline

Definition at line 43 of file SimplePhoton.h.

43 { return newEnergy_; }

References newEnergy_.

Referenced by writeTo().

◆ getNewEnergyError()

double SimplePhoton::getNewEnergyError ( ) const
inline

Definition at line 44 of file SimplePhoton.h.

44 { return newEnergyError_; }

References newEnergyError_.

Referenced by writeTo().

◆ getR9()

float SimplePhoton::getR9 ( ) const
inline

Definition at line 52 of file SimplePhoton.h.

52 { return r9_; }

References r9_.

◆ getRegEnergy()

double SimplePhoton::getRegEnergy ( ) const
inline

Definition at line 49 of file SimplePhoton.h.

49 { return regEnergy_; }

References regEnergy_.

◆ getRegEnergyError()

double SimplePhoton::getRegEnergyError ( ) const
inline

Definition at line 50 of file SimplePhoton.h.

50 { return regEnergyError_; }

References regEnergyError_.

◆ getRunNumber()

int SimplePhoton::getRunNumber ( ) const
inline

Definition at line 54 of file SimplePhoton.h.

54 { return run_; }

References run_.

◆ getScale()

double SimplePhoton::getScale ( ) const
inline

Definition at line 45 of file SimplePhoton.h.

45 { return scale_; }

References scale_.

◆ getSCEnergy()

double SimplePhoton::getSCEnergy ( ) const
inline

Definition at line 47 of file SimplePhoton.h.

47 { return scEnergy_; }

References scEnergy_.

◆ getSCEnergyError()

double SimplePhoton::getSCEnergyError ( ) const
inline

Definition at line 48 of file SimplePhoton.h.

48 { return scEnergyError_; }

References scEnergyError_.

◆ getSmearing()

double SimplePhoton::getSmearing ( ) const
inline

Definition at line 46 of file SimplePhoton.h.

46 { return smearing_; }

References smearing_.

◆ isEB()

bool SimplePhoton::isEB ( ) const
inline

Definition at line 55 of file SimplePhoton.h.

55 { return isEB_; }

References isEB_.

Referenced by Electron.Electron::absIsoWithFSR().

◆ isMC()

bool SimplePhoton::isMC ( ) const
inline

Definition at line 56 of file SimplePhoton.h.

56 { return isMC_; }

References isMC_.

◆ setNewEnergy()

void SimplePhoton::setNewEnergy ( double  newEnergy)
inline

Definition at line 59 of file SimplePhoton.h.

59 { newEnergy_ = newEnergy; }

References newEnergy_.

◆ setNewEnergyError()

void SimplePhoton::setNewEnergyError ( double  newEnergyError)
inline

Definition at line 60 of file SimplePhoton.h.

60 { newEnergyError_ = newEnergyError; }

References newEnergyError_.

◆ writeTo()

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

Definition at line 20 of file SimplePhoton.cc.

20  {
21  out.setCorrectedEnergy(reco::Photon::P4type::regression2, getNewEnergy(), getNewEnergyError(), true);
22 }

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

Referenced by PhotonEnergyCalibratorRun2::calibrate().

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().

electrons_cff.r9
r9
Definition: electrons_cff.py:360
SimplePhoton::newEnergy_
double newEnergy_
Definition: SimplePhoton.h:73
SimplePhoton::eClass_
double eClass_
Definition: SimplePhoton.h:64
SimplePhoton::newEnergyError_
double newEnergyError_
Definition: SimplePhoton.h:74
SimplePhoton::getNewEnergyError
double getNewEnergyError() const
Definition: SimplePhoton.h:44
convertSQLiteXML.runNumber
runNumber
Definition: convertSQLiteXML.py:91
SimplePhoton::regEnergyError_
double regEnergyError_
Definition: SimplePhoton.h:69
PVValHelper::eta
Definition: PVValidationHelpers.h:70
SimplePhoton::smearing_
double smearing_
Definition: SimplePhoton.h:76
SimplePhoton::regEnergy_
double regEnergy_
Definition: SimplePhoton.h:68
recoMuon::in
Definition: RecoMuonEnumerators.h:6
SimplePhoton::scale_
double scale_
Definition: SimplePhoton.h:75
SimplePhoton::scEnergy_
double scEnergy_
Definition: SimplePhoton.h:66
SimplePhoton::eta_
double eta_
Definition: SimplePhoton.h:70
SimplePhoton::isEB_
bool isEB_
Definition: SimplePhoton.h:71
SimplePhoton::scEnergyError_
double scEnergyError_
Definition: SimplePhoton.h:67
writedatasetfile.run
run
Definition: writedatasetfile.py:27
SimplePhoton::getNewEnergy
double getNewEnergy() const
Definition: SimplePhoton.h:43
SimplePhoton::isEB
bool isEB() const
Definition: SimplePhoton.h:55
SimplePhoton::isMC
bool isMC() const
Definition: SimplePhoton.h:56
SimplePhoton::r9_
double r9_
Definition: SimplePhoton.h:65
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
SimplePhoton::run_
double run_
Definition: SimplePhoton.h:63
SimplePhoton::isMC_
bool isMC_
Definition: SimplePhoton.h:72