CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 10 of file SimpleElectron.h.

10 {}
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_
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

Definition at line 47 of file SimpleElectron.h.

47 {}
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???
13  eta_(in.superCluster()->eta()),
14  isEB_(in.isEB()),
15  isMC_(isMC),
22  scale_(1.0),
23  smearing_(0.0) {}
double trackMomentumError_
float trackMomentumError() const
Definition: GsfElectron.h:884
double combinedMomentum_
const LorentzVector & p4(P4Kind kind) const
Definition: GsfElectron.cc:217
double trackMomentum_
double regEnergyError_
math::XYZVectorF trackMomentumAtVtx() const
Definition: GsfElectron.h:268
double newEnergyError_
float p4Error(P4Kind kind) const
Definition: GsfElectron.cc:230
bool isEB() const
Definition: GsfElectron.h:328
bool isMC() const
float correctedEcalEnergy() const
Definition: GsfElectron.h:882
Classification classification() const
Definition: GsfElectron.h:805
double combinedMomentumError_
float full5x5_r9() const
Definition: GsfElectron.h:476
float correctedEcalEnergyError() const
Definition: GsfElectron.h:883
unsigned int run_
bool trackerDrivenSeed() const
Definition: GsfElectron.h:159
double scEnergyError_
bool ecalDriven() const
Definition: GsfElectron.cc:168
SuperClusterRef superCluster() const override
reference to a SuperCluster
Definition: GsfElectron.h:155

Member Function Documentation

double SimpleElectron::getCombinedMomentum ( ) const
inline

Definition at line 57 of file SimpleElectron.h.

References combinedMomentum_.

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

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

Definition at line 58 of file SimpleElectron.h.

References combinedMomentumError_.

Referenced by writeTo().

58 { return combinedMomentumError_; }
double combinedMomentumError_
int SimpleElectron::getElClass ( ) const
inline

Definition at line 69 of file SimpleElectron.h.

References eClass_.

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

69 { return eClass_; }
double SimpleElectron::getEta ( ) const
inline
double SimpleElectron::getNewEnergy ( ) const
inline
double SimpleElectron::getNewEnergyError ( ) const
inline
float SimpleElectron::getR9 ( ) const
inline

Definition at line 68 of file SimpleElectron.h.

References r9_.

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

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

Definition at line 63 of file SimpleElectron.h.

References regEnergy_.

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

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

Definition at line 70 of file SimpleElectron.h.

References run_.

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

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

Definition at line 59 of file SimpleElectron.h.

References scale_.

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

Definition at line 61 of file SimpleElectron.h.

References scEnergy_.

Referenced by ElectronEnergyCalibrator::calibrate().

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

Definition at line 62 of file SimpleElectron.h.

References scEnergyError_.

Referenced by ElectronEnergyCalibrator::calibrate().

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

Definition at line 60 of file SimpleElectron.h.

References smearing_.

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

Definition at line 65 of file SimpleElectron.h.

References trackMomentum_.

Referenced by ElectronEPcombinator::computeEPcombination().

65 { return trackMomentum_; }
double trackMomentum_
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_
bool SimpleElectron::isEB ( ) const
inline
bool SimpleElectron::isEcalDriven ( ) const
inline

Definition at line 73 of file SimpleElectron.h.

References isEcalDriven_.

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

Definition at line 72 of file SimpleElectron.h.

References isMC_.

Referenced by ElectronEnergyCalibratorRun2::calibrate().

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

Definition at line 74 of file SimpleElectron.h.

References isTrackerDriven_.

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

Definition at line 77 of file SimpleElectron.h.

References combinedMomentum_.

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

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

Definition at line 78 of file SimpleElectron.h.

References combinedMomentumError_.

Referenced by ElectronEPcombinator::combine().

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

Definition at line 79 of file SimpleElectron.h.

References newEnergy_.

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

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

Definition at line 80 of file SimpleElectron.h.

References newEnergyError_.

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

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

Definition at line 25 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().

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(),
35 }
const LorentzVector & p4(P4Kind kind) const
Definition: GsfElectron.cc:217
void correctMomentum(const LorentzVector &p4, float trackMomentumError, float p4Error)
Definition: GsfElectron.h:905
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:170
double getNewEnergyError() const
double getCombinedMomentumError() const
void setCorrectedEcalEnergy(float newEnergy)
Definition: GsfElectron.cc:174
double getTrackerMomentumError() const

Member Data Documentation

double SimpleElectron::combinedMomentum_
private

Definition at line 99 of file SimpleElectron.h.

Referenced by getCombinedMomentum(), and setCombinedMomentum().

double SimpleElectron::combinedMomentumError_
private

Definition at line 100 of file SimpleElectron.h.

Referenced by getCombinedMomentumError(), and setCombinedMomentumError().

double SimpleElectron::eClass_
private

Definition at line 84 of file SimpleElectron.h.

Referenced by getElClass().

double SimpleElectron::eta_
private

Definition at line 92 of file SimpleElectron.h.

Referenced by getEta().

bool SimpleElectron::isEB_
private

Definition at line 93 of file SimpleElectron.h.

Referenced by isEB().

bool SimpleElectron::isEcalDriven_
private

Definition at line 95 of file SimpleElectron.h.

Referenced by isEcalDriven().

bool SimpleElectron::isMC_
private

Definition at line 94 of file SimpleElectron.h.

Referenced by isMC().

bool SimpleElectron::isTrackerDriven_
private

Definition at line 96 of file SimpleElectron.h.

Referenced by isTrackerDriven().

double SimpleElectron::newEnergy_
private

Definition at line 97 of file SimpleElectron.h.

Referenced by getNewEnergy(), and setNewEnergy().

double SimpleElectron::newEnergyError_
private

Definition at line 98 of file SimpleElectron.h.

Referenced by getNewEnergyError(), and setNewEnergyError().

double SimpleElectron::r9_
private

Definition at line 85 of file SimpleElectron.h.

Referenced by getR9().

double SimpleElectron::regEnergy_
private

Definition at line 90 of file SimpleElectron.h.

Referenced by getRegEnergy().

double SimpleElectron::regEnergyError_
private

Definition at line 91 of file SimpleElectron.h.

Referenced by getRegEnergyError().

unsigned int SimpleElectron::run_
private

Definition at line 83 of file SimpleElectron.h.

Referenced by getRunNumber().

double SimpleElectron::scale_
private

Definition at line 101 of file SimpleElectron.h.

Referenced by getScale().

double SimpleElectron::scEnergy_
private

Definition at line 86 of file SimpleElectron.h.

Referenced by getSCEnergy().

double SimpleElectron::scEnergyError_
private

Definition at line 87 of file SimpleElectron.h.

Referenced by getSCEnergyError().

double SimpleElectron::smearing_
private

Definition at line 102 of file SimpleElectron.h.

Referenced by getSmearing().

double SimpleElectron::trackMomentum_
private

Definition at line 88 of file SimpleElectron.h.

Referenced by getTrackerMomentum().

double SimpleElectron::trackMomentumError_
private

Definition at line 89 of file SimpleElectron.h.

Referenced by getTrackerMomentumError().