CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
SimpleElectron Class Reference

#include <SimpleElectron.h>

Public Member Functions

double getCombinedMomentum () const
 
double getCombinedMomentumError () const
 
int getElClass () const
 
double getEta () const
 
double getNewEnergy () const
 
double getNewEnergyError () const
 
float getR9 () const
 
double getRegEnergy () const
 
double getRegEnergyError () const
 
unsigned int getRunNumber () const
 
double getScale () const
 
double getSCEnergy () const
 
double getSCEnergyError () const
 
double getSmearing () const
 
double getTrackerMomentum () const
 
double getTrackerMomentumError () const
 
bool isEB () const
 
bool isEcalDriven () const
 
bool isMC () const
 
bool isTrackerDriven () const
 
void setCombinedMomentum (double combinedMomentum)
 
void setCombinedMomentumError (double combinedMomentumError)
 
void setNewEnergy (double newEnergy)
 
void setNewEnergyError (double newEnergyError)
 
 SimpleElectron ()
 
 SimpleElectron (unsigned int run, double eClass, double r9, double scEnergy, double scEnergyError, double trackMomentum, double trackMomentumError, double regEnergy, double regEnergyError, double combinedMomentum, double combinedMomentumError, double eta, bool isEB, bool isMC, bool isEcalDriven, bool isTrackerDriven)
 
 SimpleElectron (const reco::GsfElectron &in, unsigned int runNumber, bool isMC)
 
void writeTo (reco::GsfElectron &out) const
 
 ~SimpleElectron ()
 

Private Attributes

double combinedMomentum_
 
double combinedMomentumError_
 
double eClass_
 
double eta_
 
bool isEB_
 
bool isEcalDriven_
 
bool isMC_
 
bool isTrackerDriven_
 
double newEnergy_
 
double newEnergyError_
 
double r9_
 
double regEnergy_
 
double regEnergyError_
 
unsigned int run_
 
double scale_
 
double scEnergy_
 
double scEnergyError_
 
double smearing_
 
double trackMomentum_
 
double trackMomentumError_
 

Detailed Description

Definition at line 8 of file SimpleElectron.h.

Constructor & Destructor Documentation

◆ SimpleElectron() [1/3]

SimpleElectron::SimpleElectron ( )
inline

Definition at line 10 of file SimpleElectron.h.

10 {}

◆ SimpleElectron() [2/3]

SimpleElectron::SimpleElectron ( unsigned int  run,
double  eClass,
double  r9,
double  scEnergy,
double  scEnergyError,
double  trackMomentum,
double  trackMomentumError,
double  regEnergy,
double  regEnergyError,
double  combinedMomentum,
double  combinedMomentumError,
double  eta,
bool  isEB,
bool  isMC,
bool  isEcalDriven,
bool  isTrackerDriven 
)
inline

Definition at line 11 of file SimpleElectron.h.

27  : run_(run),
28  eClass_(eClass),
29  r9_(r9),
30  scEnergy_(scEnergy),
31  scEnergyError_(scEnergyError),
33  trackMomentumError_(trackMomentumError),
34  regEnergy_(regEnergy),
35  regEnergyError_(regEnergyError),
36  eta_(eta),
37  isEB_(isEB),
38  isMC_(isMC),
43  combinedMomentum_(combinedMomentum),
44  combinedMomentumError_(combinedMomentumError),
45  scale_(1.0),
46  smearing_(0.0) {}
double trackMomentumError_
double combinedMomentum_
bool isEB() const
double trackMomentum_
bool isMC() const
double regEnergyError_
double newEnergyError_
bool isTrackerDriven() const
double combinedMomentumError_
unsigned int run_
bool isEcalDriven() const
double scEnergyError_

◆ ~SimpleElectron()

SimpleElectron::~SimpleElectron ( )
inline

Definition at line 47 of file SimpleElectron.h.

47 {}

◆ SimpleElectron() [3/3]

SimpleElectron::SimpleElectron ( const reco::GsfElectron in,
unsigned int  runNumber,
bool  isMC 
)
explicit

Definition at line 3 of file SimpleElectron.cc.

4  : run_(runNumber),
5  eClass_(int(in.classification())),
6  r9_(in.full5x5_r9()),
7  scEnergy_(in.superCluster()->rawEnergy() + (in.isEB() ? 0 : in.superCluster()->preshowerEnergy())),
8  scEnergyError_(-999.), // FIXME???
9  trackMomentum_(in.trackMomentumAtVtx().R()),
10  trackMomentumError_(in.trackMomentumError()),
11  regEnergy_(in.correctedEcalEnergy()),
12  regEnergyError_(in.correctedEcalEnergyError()),
13  eta_(in.superCluster()->eta()),
14  isEB_(in.isEB()),
15  isMC_(isMC),
16  isEcalDriven_(in.ecalDriven()),
17  isTrackerDriven_(in.trackerDrivenSeed()),
22  scale_(1.0),
23  smearing_(0.0) {}
double trackMomentumError_
double combinedMomentum_
double trackMomentum_
bool isMC() const
double regEnergyError_
double newEnergyError_
double combinedMomentumError_
unsigned int run_
double scEnergyError_

Member Function Documentation

◆ getCombinedMomentum()

double SimpleElectron::getCombinedMomentum ( ) const
inline

Definition at line 57 of file SimpleElectron.h.

References combinedMomentum_.

Referenced by writeTo().

57 { return combinedMomentum_; }
double combinedMomentum_

◆ getCombinedMomentumError()

double SimpleElectron::getCombinedMomentumError ( ) const
inline

Definition at line 58 of file SimpleElectron.h.

References combinedMomentumError_.

Referenced by writeTo().

58 { return combinedMomentumError_; }
double combinedMomentumError_

◆ getElClass()

int SimpleElectron::getElClass ( ) const
inline

Definition at line 69 of file SimpleElectron.h.

References eClass_.

Referenced by ElectronEPcombinator::computeEPcombination().

69 { return eClass_; }

◆ getEta()

double SimpleElectron::getEta ( ) const
inline

Definition at line 67 of file SimpleElectron.h.

References eta_.

67 { return eta_; }

◆ getNewEnergy()

double SimpleElectron::getNewEnergy ( ) const
inline

Definition at line 55 of file SimpleElectron.h.

References newEnergy_.

Referenced by ElectronEPcombinator::computeEPcombination(), and writeTo().

55 { return newEnergy_; }

◆ getNewEnergyError()

double SimpleElectron::getNewEnergyError ( ) const
inline

Definition at line 56 of file SimpleElectron.h.

References newEnergyError_.

Referenced by ElectronEPcombinator::computeEPcombination(), and writeTo().

56 { return newEnergyError_; }
double newEnergyError_

◆ getR9()

float SimpleElectron::getR9 ( ) const
inline

Definition at line 68 of file SimpleElectron.h.

References r9_.

68 { return r9_; }

◆ getRegEnergy()

double SimpleElectron::getRegEnergy ( ) const
inline

Definition at line 63 of file SimpleElectron.h.

References regEnergy_.

Referenced by ElectronEPcombinator::computeEPcombination().

63 { return regEnergy_; }

◆ getRegEnergyError()

double SimpleElectron::getRegEnergyError ( ) const
inline

Definition at line 64 of file SimpleElectron.h.

References regEnergyError_.

Referenced by ElectronEPcombinator::computeEPcombination().

64 { return regEnergyError_; }
double regEnergyError_

◆ getRunNumber()

unsigned int SimpleElectron::getRunNumber ( ) const
inline

Definition at line 70 of file SimpleElectron.h.

References run_.

70 { return run_; }
unsigned int run_

◆ getScale()

double SimpleElectron::getScale ( ) const
inline

Definition at line 59 of file SimpleElectron.h.

References scale_.

59 { return scale_; }

◆ getSCEnergy()

double SimpleElectron::getSCEnergy ( ) const
inline

Definition at line 61 of file SimpleElectron.h.

References scEnergy_.

61 { return scEnergy_; }

◆ getSCEnergyError()

double SimpleElectron::getSCEnergyError ( ) const
inline

Definition at line 62 of file SimpleElectron.h.

References scEnergyError_.

62 { return scEnergyError_; }
double scEnergyError_

◆ getSmearing()

double SimpleElectron::getSmearing ( ) const
inline

Definition at line 60 of file SimpleElectron.h.

References smearing_.

60 { return smearing_; }

◆ getTrackerMomentum()

double SimpleElectron::getTrackerMomentum ( ) const
inline

Definition at line 65 of file SimpleElectron.h.

References trackMomentum_.

Referenced by ElectronEPcombinator::computeEPcombination().

65 { return trackMomentum_; }
double trackMomentum_

◆ getTrackerMomentumError()

double SimpleElectron::getTrackerMomentumError ( ) const
inline

Definition at line 66 of file SimpleElectron.h.

References trackMomentumError_.

Referenced by ElectronEPcombinator::computeEPcombination(), and writeTo().

66 { return trackMomentumError_; }
double trackMomentumError_

◆ isEB()

bool SimpleElectron::isEB ( ) const
inline

Definition at line 71 of file SimpleElectron.h.

References isEB_.

Referenced by Electron.Electron::absIsoWithFSR().

71 { return isEB_; }

◆ isEcalDriven()

bool SimpleElectron::isEcalDriven ( ) const
inline

Definition at line 73 of file SimpleElectron.h.

References isEcalDriven_.

73 { return isEcalDriven_; }

◆ isMC()

bool SimpleElectron::isMC ( ) const
inline

Definition at line 72 of file SimpleElectron.h.

References isMC_.

72 { return isMC_; }

◆ isTrackerDriven()

bool SimpleElectron::isTrackerDriven ( ) const
inline

Definition at line 74 of file SimpleElectron.h.

References isTrackerDriven_.

74 { return isTrackerDriven_; }

◆ setCombinedMomentum()

void SimpleElectron::setCombinedMomentum ( double  combinedMomentum)
inline

Definition at line 77 of file SimpleElectron.h.

References combinedMomentum_.

77 { combinedMomentum_ = combinedMomentum; }
double combinedMomentum_

◆ setCombinedMomentumError()

void SimpleElectron::setCombinedMomentumError ( double  combinedMomentumError)
inline

Definition at line 78 of file SimpleElectron.h.

References combinedMomentumError_.

78 { combinedMomentumError_ = combinedMomentumError; }
double combinedMomentumError_

◆ setNewEnergy()

void SimpleElectron::setNewEnergy ( double  newEnergy)
inline

Definition at line 79 of file SimpleElectron.h.

References newEnergy_.

79 { newEnergy_ = newEnergy; }

◆ setNewEnergyError()

void SimpleElectron::setNewEnergyError ( double  newEnergyError)
inline

Definition at line 80 of file SimpleElectron.h.

References newEnergyError_.

80 { newEnergyError_ = newEnergyError; }
double newEnergyError_

◆ writeTo()

void SimpleElectron::writeTo ( reco::GsfElectron out) const

Definition at line 25 of file SimpleElectron.cc.

References getCombinedMomentum(), getCombinedMomentumError(), getNewEnergy(), getNewEnergyError(), getTrackerMomentumError(), and MillePedeFileConverter_cfg::out.

Referenced by ElectronEnergyCalibratorRun2::calibrate().

25  {
26  math::XYZTLorentzVector oldMomentum = out.p4();
27  math::XYZTLorentzVector newMomentum =
28  math::XYZTLorentzVector(oldMomentum.x() * getCombinedMomentum() / oldMomentum.t(),
29  oldMomentum.y() * getCombinedMomentum() / oldMomentum.t(),
30  oldMomentum.z() * getCombinedMomentum() / oldMomentum.t(),
32  out.setCorrectedEcalEnergy(getNewEnergy());
33  out.setCorrectedEcalEnergyError(getNewEnergyError());
34  out.correctMomentum(newMomentum, getTrackerMomentumError(), getCombinedMomentumError());
35 }
double getNewEnergy() const
double getCombinedMomentum() const
double getTrackerMomentumError() const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
double getCombinedMomentumError() const
double getNewEnergyError() const

Member Data Documentation

◆ combinedMomentum_

double SimpleElectron::combinedMomentum_
private

Definition at line 99 of file SimpleElectron.h.

Referenced by getCombinedMomentum(), and setCombinedMomentum().

◆ combinedMomentumError_

double SimpleElectron::combinedMomentumError_
private

Definition at line 100 of file SimpleElectron.h.

Referenced by getCombinedMomentumError(), and setCombinedMomentumError().

◆ eClass_

double SimpleElectron::eClass_
private

Definition at line 84 of file SimpleElectron.h.

Referenced by getElClass().

◆ eta_

double SimpleElectron::eta_
private

Definition at line 92 of file SimpleElectron.h.

Referenced by getEta().

◆ isEB_

bool SimpleElectron::isEB_
private

Definition at line 93 of file SimpleElectron.h.

Referenced by isEB().

◆ isEcalDriven_

bool SimpleElectron::isEcalDriven_
private

Definition at line 95 of file SimpleElectron.h.

Referenced by isEcalDriven().

◆ isMC_

bool SimpleElectron::isMC_
private

Definition at line 94 of file SimpleElectron.h.

Referenced by isMC().

◆ isTrackerDriven_

bool SimpleElectron::isTrackerDriven_
private

Definition at line 96 of file SimpleElectron.h.

Referenced by isTrackerDriven().

◆ newEnergy_

double SimpleElectron::newEnergy_
private

Definition at line 97 of file SimpleElectron.h.

Referenced by getNewEnergy(), and setNewEnergy().

◆ newEnergyError_

double SimpleElectron::newEnergyError_
private

Definition at line 98 of file SimpleElectron.h.

Referenced by getNewEnergyError(), and setNewEnergyError().

◆ r9_

double SimpleElectron::r9_
private

Definition at line 85 of file SimpleElectron.h.

Referenced by getR9().

◆ regEnergy_

double SimpleElectron::regEnergy_
private

Definition at line 90 of file SimpleElectron.h.

Referenced by getRegEnergy().

◆ regEnergyError_

double SimpleElectron::regEnergyError_
private

Definition at line 91 of file SimpleElectron.h.

Referenced by getRegEnergyError().

◆ run_

unsigned int SimpleElectron::run_
private

Definition at line 83 of file SimpleElectron.h.

Referenced by getRunNumber().

◆ scale_

double SimpleElectron::scale_
private

Definition at line 101 of file SimpleElectron.h.

Referenced by getScale().

◆ scEnergy_

double SimpleElectron::scEnergy_
private

Definition at line 86 of file SimpleElectron.h.

Referenced by getSCEnergy().

◆ scEnergyError_

double SimpleElectron::scEnergyError_
private

Definition at line 87 of file SimpleElectron.h.

Referenced by getSCEnergyError().

◆ smearing_

double SimpleElectron::smearing_
private

Definition at line 102 of file SimpleElectron.h.

Referenced by getSmearing().

◆ trackMomentum_

double SimpleElectron::trackMomentum_
private

Definition at line 88 of file SimpleElectron.h.

Referenced by getTrackerMomentum().

◆ trackMomentumError_

double SimpleElectron::trackMomentumError_
private

Definition at line 89 of file SimpleElectron.h.

Referenced by getTrackerMomentumError().