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 (const reco::GsfElectron &in, unsigned int runNumber, bool isMC)
 
 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)
 
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) {}

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

Member Function Documentation

◆ getCombinedMomentum()

double SimpleElectron::getCombinedMomentum ( ) const
inline

Definition at line 57 of file SimpleElectron.h.

57 { return combinedMomentum_; }

References combinedMomentum_.

Referenced by writeTo().

◆ getCombinedMomentumError()

double SimpleElectron::getCombinedMomentumError ( ) const
inline

Definition at line 58 of file SimpleElectron.h.

58 { return combinedMomentumError_; }

References combinedMomentumError_.

Referenced by writeTo().

◆ getElClass()

int SimpleElectron::getElClass ( ) const
inline

Definition at line 69 of file SimpleElectron.h.

69 { return eClass_; }

References eClass_.

Referenced by ElectronEPcombinator::computeEPcombination().

◆ getEta()

double SimpleElectron::getEta ( ) const
inline

Definition at line 67 of file SimpleElectron.h.

67 { return eta_; }

References eta_.

◆ getNewEnergy()

double SimpleElectron::getNewEnergy ( ) const
inline

Definition at line 55 of file SimpleElectron.h.

55 { return newEnergy_; }

References newEnergy_.

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

◆ getNewEnergyError()

double SimpleElectron::getNewEnergyError ( ) const
inline

Definition at line 56 of file SimpleElectron.h.

56 { return newEnergyError_; }

References newEnergyError_.

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

◆ getR9()

float SimpleElectron::getR9 ( ) const
inline

Definition at line 68 of file SimpleElectron.h.

68 { return r9_; }

References r9_.

◆ getRegEnergy()

double SimpleElectron::getRegEnergy ( ) const
inline

Definition at line 63 of file SimpleElectron.h.

63 { return regEnergy_; }

References regEnergy_.

Referenced by ElectronEPcombinator::computeEPcombination().

◆ getRegEnergyError()

double SimpleElectron::getRegEnergyError ( ) const
inline

Definition at line 64 of file SimpleElectron.h.

64 { return regEnergyError_; }

References regEnergyError_.

Referenced by ElectronEPcombinator::computeEPcombination().

◆ getRunNumber()

unsigned int SimpleElectron::getRunNumber ( ) const
inline

Definition at line 70 of file SimpleElectron.h.

70 { return run_; }

References run_.

◆ getScale()

double SimpleElectron::getScale ( ) const
inline

Definition at line 59 of file SimpleElectron.h.

59 { return scale_; }

References scale_.

◆ getSCEnergy()

double SimpleElectron::getSCEnergy ( ) const
inline

Definition at line 61 of file SimpleElectron.h.

61 { return scEnergy_; }

References scEnergy_.

◆ getSCEnergyError()

double SimpleElectron::getSCEnergyError ( ) const
inline

Definition at line 62 of file SimpleElectron.h.

62 { return scEnergyError_; }

References scEnergyError_.

◆ getSmearing()

double SimpleElectron::getSmearing ( ) const
inline

Definition at line 60 of file SimpleElectron.h.

60 { return smearing_; }

References smearing_.

◆ getTrackerMomentum()

double SimpleElectron::getTrackerMomentum ( ) const
inline

Definition at line 65 of file SimpleElectron.h.

65 { return trackMomentum_; }

References trackMomentum_.

Referenced by ElectronEPcombinator::computeEPcombination().

◆ getTrackerMomentumError()

double SimpleElectron::getTrackerMomentumError ( ) const
inline

Definition at line 66 of file SimpleElectron.h.

66 { return trackMomentumError_; }

References trackMomentumError_.

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

◆ isEB()

bool SimpleElectron::isEB ( ) const
inline

Definition at line 71 of file SimpleElectron.h.

71 { return isEB_; }

References isEB_.

Referenced by Electron.Electron::absIsoWithFSR().

◆ isEcalDriven()

bool SimpleElectron::isEcalDriven ( ) const
inline

Definition at line 73 of file SimpleElectron.h.

73 { return isEcalDriven_; }

References isEcalDriven_.

◆ isMC()

bool SimpleElectron::isMC ( ) const
inline

Definition at line 72 of file SimpleElectron.h.

72 { return isMC_; }

References isMC_.

◆ isTrackerDriven()

bool SimpleElectron::isTrackerDriven ( ) const
inline

Definition at line 74 of file SimpleElectron.h.

74 { return isTrackerDriven_; }

References isTrackerDriven_.

◆ setCombinedMomentum()

void SimpleElectron::setCombinedMomentum ( double  combinedMomentum)
inline

Definition at line 77 of file SimpleElectron.h.

77 { combinedMomentum_ = combinedMomentum; }

References combinedMomentum_.

◆ setCombinedMomentumError()

void SimpleElectron::setCombinedMomentumError ( double  combinedMomentumError)
inline

Definition at line 78 of file SimpleElectron.h.

78 { combinedMomentumError_ = combinedMomentumError; }

References combinedMomentumError_.

◆ setNewEnergy()

void SimpleElectron::setNewEnergy ( double  newEnergy)
inline

Definition at line 79 of file SimpleElectron.h.

79 { newEnergy_ = newEnergy; }

References newEnergy_.

◆ setNewEnergyError()

void SimpleElectron::setNewEnergyError ( double  newEnergyError)
inline

Definition at line 80 of file SimpleElectron.h.

80 { newEnergyError_ = newEnergyError; }

References newEnergyError_.

◆ writeTo()

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

Definition at line 25 of file SimpleElectron.cc.

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 }

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

Referenced by ElectronEnergyCalibratorRun2::calibrate().

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

SimpleElectron::trackMomentumError_
double trackMomentumError_
Definition: SimpleElectron.h:89
SimpleElectron::regEnergyError_
double regEnergyError_
Definition: SimpleElectron.h:91
electrons_cff.r9
r9
Definition: electrons_cff.py:360
SimpleElectron::getTrackerMomentumError
double getTrackerMomentumError() const
Definition: SimpleElectron.h:66
SimpleElectron::newEnergyError_
double newEnergyError_
Definition: SimpleElectron.h:98
SimpleElectron::r9_
double r9_
Definition: SimpleElectron.h:85
SimpleElectron::run_
unsigned int run_
Definition: SimpleElectron.h:83
SimpleElectron::isTrackerDriven_
bool isTrackerDriven_
Definition: SimpleElectron.h:96
reco::GsfElectron::P4_COMBINATION
Definition: GsfElectron.h:831
SimpleElectron::scale_
double scale_
Definition: SimpleElectron.h:101
SimpleElectron::scEnergy_
double scEnergy_
Definition: SimpleElectron.h:86
SimpleElectron::combinedMomentum_
double combinedMomentum_
Definition: SimpleElectron.h:99
SimpleElectron::isMC
bool isMC() const
Definition: SimpleElectron.h:72
SimpleElectron::trackMomentum_
double trackMomentum_
Definition: SimpleElectron.h:88
convertSQLiteXML.runNumber
runNumber
Definition: convertSQLiteXML.py:91
SimpleElectron::getCombinedMomentum
double getCombinedMomentum() const
Definition: SimpleElectron.h:57
SimpleElectron::isEB
bool isEB() const
Definition: SimpleElectron.h:71
PVValHelper::eta
Definition: PVValidationHelpers.h:70
SimpleElectron::newEnergy_
double newEnergy_
Definition: SimpleElectron.h:97
reco::btau::trackMomentum
Definition: TaggingVariable.h:41
SimpleElectron::combinedMomentumError_
double combinedMomentumError_
Definition: SimpleElectron.h:100
SimpleElectron::isEB_
bool isEB_
Definition: SimpleElectron.h:93
SimpleElectron::isEcalDriven_
bool isEcalDriven_
Definition: SimpleElectron.h:95
recoMuon::in
Definition: RecoMuonEnumerators.h:6
SimpleElectron::isMC_
bool isMC_
Definition: SimpleElectron.h:94
SimpleElectron::smearing_
double smearing_
Definition: SimpleElectron.h:102
SimpleElectron::eClass_
double eClass_
Definition: SimpleElectron.h:84
SimpleElectron::getNewEnergyError
double getNewEnergyError() const
Definition: SimpleElectron.h:56
SimpleElectron::isTrackerDriven
bool isTrackerDriven() const
Definition: SimpleElectron.h:74
SimpleElectron::eta_
double eta_
Definition: SimpleElectron.h:92
SimpleElectron::regEnergy_
double regEnergy_
Definition: SimpleElectron.h:90
SimpleElectron::scEnergyError_
double scEnergyError_
Definition: SimpleElectron.h:87
writedatasetfile.run
run
Definition: writedatasetfile.py:27
SimpleElectron::getNewEnergy
double getNewEnergy() const
Definition: SimpleElectron.h:55
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
SimpleElectron::isEcalDriven
bool isEcalDriven() const
Definition: SimpleElectron.h:73
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
SimpleElectron::getCombinedMomentumError
double getCombinedMomentumError() const
Definition: SimpleElectron.h:58