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::SimpleElectron ( )
inline

Definition at line 11 of file SimpleElectron.h.

Referenced by ~SimpleElectron().

11 {}
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 12 of file SimpleElectron.h.

28  :
29  run_(run),
30  eClass_(eClass),
31  r9_(r9),
32  scEnergy_(scEnergy),
33  scEnergyError_(scEnergyError),
35  trackMomentumError_(trackMomentumError),
36  regEnergy_(regEnergy),
37  regEnergyError_(regEnergyError),
38  eta_(eta),
39  isEB_(isEB),
40  isMC_(isMC),
45  combinedMomentum_(combinedMomentum),
46  combinedMomentumError_(combinedMomentumError),
47  scale_(1.0), smearing_(0.0)
48  {}
double trackMomentumError_
double combinedMomentum_
double trackMomentum_
double regEnergyError_
double newEnergyError_
bool isTrackerDriven() const
bool isMC() const
double combinedMomentumError_
bool isEB() const
unsigned int run_
double scEnergyError_
bool isEcalDriven() const
SimpleElectron::~SimpleElectron ( )
inline
SimpleElectron::SimpleElectron ( const reco::GsfElectron in,
unsigned int  runNumber,
bool  isMC 
)
explicit

Definition at line 3 of file SimpleElectron.cc.

3  :
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???
13  eta_(in.superCluster()->eta()),
14  isEB_(in.isEB()),
15  isMC_(isMC),
22  scale_(1.0), smearing_(0.0)
23 {
24 }
double trackMomentumError_
float trackMomentumError() const
Definition: GsfElectron.h:847
double combinedMomentum_
const LorentzVector & p4(P4Kind kind) const
Definition: GsfElectron.cc:225
double trackMomentum_
double regEnergyError_
math::XYZVectorF trackMomentumAtVtx() const
Definition: GsfElectron.h:295
double newEnergyError_
float p4Error(P4Kind kind) const
Definition: GsfElectron.cc:237
bool isEB() const
Definition: GsfElectron.h:356
bool isMC() const
float correctedEcalEnergy() const
Definition: GsfElectron.h:845
Classification classification() const
Definition: GsfElectron.h:768
double combinedMomentumError_
float full5x5_r9() const
Definition: GsfElectron.h:467
float correctedEcalEnergyError() const
Definition: GsfElectron.h:846
unsigned int run_
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:185
bool trackerDrivenSeed() const
Definition: GsfElectron.h:189
double scEnergyError_
bool ecalDriven() const
Definition: GsfElectron.cc:174

Member Function Documentation

double SimpleElectron::getCombinedMomentum ( ) const
inline

Definition at line 59 of file SimpleElectron.h.

References combinedMomentum_.

Referenced by ElectronEnergyCalibrator::correctLinearity(), and writeTo().

59 {return combinedMomentum_;}
double combinedMomentum_
double SimpleElectron::getCombinedMomentumError ( ) const
inline

Definition at line 60 of file SimpleElectron.h.

References combinedMomentumError_.

Referenced by writeTo().

60 {return combinedMomentumError_;}
double combinedMomentumError_
int SimpleElectron::getElClass ( ) const
inline
double SimpleElectron::getEta ( ) const
inline
double SimpleElectron::getNewEnergy ( ) const
inline
double SimpleElectron::getNewEnergyError ( ) const
inline
float SimpleElectron::getR9 ( ) const
inline

Definition at line 70 of file SimpleElectron.h.

References r9_.

Referenced by ElectronEnergyCalibratorRun2::calibrate(), and ElectronEnergyCalibrator::calibrate().

70 {return r9_;}
double SimpleElectron::getRegEnergy ( ) const
inline

Definition at line 65 of file SimpleElectron.h.

References regEnergy_.

Referenced by ElectronEnergyCalibrator::calibrate(), and ElectronEPcombinator::computeEPcombination().

65 {return regEnergy_;}
double SimpleElectron::getRegEnergyError ( ) const
inline
unsigned int SimpleElectron::getRunNumber ( ) const
inline

Definition at line 72 of file SimpleElectron.h.

References run_.

Referenced by ElectronEnergyCalibratorRun2::calibrate(), and ElectronEnergyCalibrator::calibrate().

72 {return run_;}
unsigned int run_
double SimpleElectron::getScale ( ) const
inline

Definition at line 61 of file SimpleElectron.h.

References scale_.

61 {return scale_;}
double SimpleElectron::getSCEnergy ( ) const
inline

Definition at line 63 of file SimpleElectron.h.

References scEnergy_.

Referenced by ElectronEnergyCalibrator::calibrate().

63 {return scEnergy_;}
double SimpleElectron::getSCEnergyError ( ) const
inline

Definition at line 64 of file SimpleElectron.h.

References scEnergyError_.

Referenced by ElectronEnergyCalibrator::calibrate().

64 {return scEnergyError_;}
double scEnergyError_
double SimpleElectron::getSmearing ( ) const
inline

Definition at line 62 of file SimpleElectron.h.

References smearing_.

62 {return smearing_;}
double SimpleElectron::getTrackerMomentum ( ) const
inline

Definition at line 67 of file SimpleElectron.h.

References trackMomentum_.

Referenced by ElectronEPcombinator::computeEPcombination().

67 {return trackMomentum_;}
double trackMomentum_
double SimpleElectron::getTrackerMomentumError ( ) const
inline

Definition at line 68 of file SimpleElectron.h.

References trackMomentumError_.

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

68 {return trackMomentumError_;}
double trackMomentumError_
bool SimpleElectron::isEB ( ) const
inline
bool SimpleElectron::isEcalDriven ( ) const
inline

Definition at line 75 of file SimpleElectron.h.

References isEcalDriven_.

75 {return isEcalDriven_;}
bool SimpleElectron::isMC ( ) const
inline

Definition at line 74 of file SimpleElectron.h.

References isMC_.

Referenced by ElectronEnergyCalibratorRun2::calibrate(), and ~SimpleElectron().

74 {return isMC_;}
bool SimpleElectron::isTrackerDriven ( ) const
inline

Definition at line 76 of file SimpleElectron.h.

References isTrackerDriven_.

76 {return isTrackerDriven_;}
void SimpleElectron::setCombinedMomentum ( double  combinedMomentum)
inline

Definition at line 79 of file SimpleElectron.h.

References combinedMomentum_.

Referenced by ElectronEPcombinator::combine(), and ElectronEnergyCalibrator::correctLinearity().

79 {combinedMomentum_ = combinedMomentum;}
double combinedMomentum_
void SimpleElectron::setCombinedMomentumError ( double  combinedMomentumError)
inline

Definition at line 80 of file SimpleElectron.h.

References combinedMomentumError_.

Referenced by ElectronEPcombinator::combine().

80 {combinedMomentumError_ = combinedMomentumError;}
double combinedMomentumError_
void SimpleElectron::setNewEnergy ( double  newEnergy)
inline

Definition at line 81 of file SimpleElectron.h.

References newEnergy_.

Referenced by ElectronEnergyCalibratorRun2::calibrate(), and ElectronEnergyCalibrator::calibrate().

81 {newEnergy_ = newEnergy;}
void SimpleElectron::setNewEnergyError ( double  newEnergyError)
inline

Definition at line 82 of file SimpleElectron.h.

References newEnergyError_.

Referenced by ElectronEnergyCalibratorRun2::calibrate(), and ElectronEnergyCalibrator::calibrate().

82 {newEnergyError_ = newEnergyError;}
double newEnergyError_
void SimpleElectron::writeTo ( reco::GsfElectron out) const

Definition at line 27 of file SimpleElectron.cc.

References reco::GsfElectron::correctMomentum(), getCombinedMomentum(), getCombinedMomentumError(), getNewEnergy(), getNewEnergyError(), getTrackerMomentumError(), reco::GsfElectron::p4(), reco::GsfElectron::setCorrectedEcalEnergy(), and reco::GsfElectron::setCorrectedEcalEnergyError().

Referenced by ElectronEnergyCalibratorRun2::calibrate(), and ~SimpleElectron().

28 {
29  math::XYZTLorentzVector oldMomentum = out.p4();
30  math::XYZTLorentzVector newMomentum = math::XYZTLorentzVector(oldMomentum.x()*getCombinedMomentum()/oldMomentum.t(),
31  oldMomentum.y()*getCombinedMomentum()/oldMomentum.t(),
32  oldMomentum.z()*getCombinedMomentum()/oldMomentum.t(),
37 }
const LorentzVector & p4(P4Kind kind) const
Definition: GsfElectron.cc:225
void correctMomentum(const LorentzVector &p4, float trackMomentumError, float p4Error)
Definition: GsfElectron.h:869
double getNewEnergy() const
double getCombinedMomentum() const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
void setCorrectedEcalEnergyError(float newEnergyError)
Definition: GsfElectron.cc:179
double getNewEnergyError() const
double getCombinedMomentumError() const
void setCorrectedEcalEnergy(float newEnergy)
Definition: GsfElectron.cc:182
double getTrackerMomentumError() const

Member Data Documentation

double SimpleElectron::combinedMomentum_
private

Definition at line 101 of file SimpleElectron.h.

Referenced by getCombinedMomentum(), and setCombinedMomentum().

double SimpleElectron::combinedMomentumError_
private

Definition at line 102 of file SimpleElectron.h.

Referenced by getCombinedMomentumError(), and setCombinedMomentumError().

double SimpleElectron::eClass_
private

Definition at line 86 of file SimpleElectron.h.

Referenced by getElClass().

double SimpleElectron::eta_
private

Definition at line 94 of file SimpleElectron.h.

Referenced by getEta().

bool SimpleElectron::isEB_
private

Definition at line 95 of file SimpleElectron.h.

Referenced by isEB().

bool SimpleElectron::isEcalDriven_
private

Definition at line 97 of file SimpleElectron.h.

Referenced by isEcalDriven().

bool SimpleElectron::isMC_
private

Definition at line 96 of file SimpleElectron.h.

Referenced by isMC().

bool SimpleElectron::isTrackerDriven_
private

Definition at line 98 of file SimpleElectron.h.

Referenced by isTrackerDriven().

double SimpleElectron::newEnergy_
private

Definition at line 99 of file SimpleElectron.h.

Referenced by getNewEnergy(), and setNewEnergy().

double SimpleElectron::newEnergyError_
private

Definition at line 100 of file SimpleElectron.h.

Referenced by getNewEnergyError(), and setNewEnergyError().

double SimpleElectron::r9_
private

Definition at line 87 of file SimpleElectron.h.

Referenced by getR9().

double SimpleElectron::regEnergy_
private

Definition at line 92 of file SimpleElectron.h.

Referenced by getRegEnergy().

double SimpleElectron::regEnergyError_
private

Definition at line 93 of file SimpleElectron.h.

Referenced by getRegEnergyError().

unsigned int SimpleElectron::run_
private

Definition at line 85 of file SimpleElectron.h.

Referenced by getRunNumber().

double SimpleElectron::scale_
private

Definition at line 103 of file SimpleElectron.h.

Referenced by getScale().

double SimpleElectron::scEnergy_
private

Definition at line 88 of file SimpleElectron.h.

Referenced by getSCEnergy().

double SimpleElectron::scEnergyError_
private

Definition at line 89 of file SimpleElectron.h.

Referenced by getSCEnergyError().

double SimpleElectron::smearing_
private

Definition at line 104 of file SimpleElectron.h.

Referenced by getSmearing().

double SimpleElectron::trackMomentum_
private

Definition at line 90 of file SimpleElectron.h.

Referenced by getTrackerMomentum().

double SimpleElectron::trackMomentumError_
private

Definition at line 91 of file SimpleElectron.h.

Referenced by getTrackerMomentumError().