CMS 3D CMS Logo

SimpleElectron.h
Go to the documentation of this file.
1 #ifndef SimpleElectron_H
2 #define SimpleElectron_H
3 
4 #ifndef SimpleElectron_STANDALONE
6 #endif
7 
9 public:
11  SimpleElectron(unsigned int run,
12  double eClass,
13  double r9,
14  double scEnergy,
15  double scEnergyError,
16  double trackMomentum,
17  double trackMomentumError,
18  double regEnergy,
19  double regEnergyError,
20  double combinedMomentum,
21  double combinedMomentumError,
22  double eta,
23  bool isEB,
24  bool isMC,
25  bool isEcalDriven,
26  bool isTrackerDriven)
27  : run_(run),
28  eClass_(eClass),
29  r9_(r9),
30  scEnergy_(scEnergy),
31  scEnergyError_(scEnergyError),
32  trackMomentum_(trackMomentum),
33  trackMomentumError_(trackMomentumError),
34  regEnergy_(regEnergy),
35  regEnergyError_(regEnergyError),
36  eta_(eta),
37  isEB_(isEB),
38  isMC_(isMC),
39  isEcalDriven_(isEcalDriven),
40  isTrackerDriven_(isTrackerDriven),
43  combinedMomentum_(combinedMomentum),
44  combinedMomentumError_(combinedMomentumError),
45  scale_(1.0),
46  smearing_(0.0) {}
48 
49 #ifndef SimpleElectron_STANDALONE
50  explicit SimpleElectron(const reco::GsfElectron &in, unsigned int runNumber, bool isMC);
51  void writeTo(reco::GsfElectron &out) const;
52 #endif
53 
54  //accessors
55  double getNewEnergy() const { return newEnergy_; }
56  double getNewEnergyError() const { return newEnergyError_; }
57  double getCombinedMomentum() const { return combinedMomentum_; }
59  double getScale() const { return scale_; }
60  double getSmearing() const { return smearing_; }
61  double getSCEnergy() const { return scEnergy_; }
62  double getSCEnergyError() const { return scEnergyError_; }
63  double getRegEnergy() const { return regEnergy_; }
64  double getRegEnergyError() const { return regEnergyError_; }
65  double getTrackerMomentum() const { return trackMomentum_; }
66  double getTrackerMomentumError() const { return trackMomentumError_; }
67  double getEta() const { return eta_; }
68  float getR9() const { return r9_; }
69  int getElClass() const { return eClass_; }
70  unsigned int getRunNumber() const { return run_; }
71  bool isEB() const { return isEB_; }
72  bool isMC() const { return isMC_; }
73  bool isEcalDriven() const { return isEcalDriven_; }
74  bool isTrackerDriven() const { return isTrackerDriven_; }
75 
76  //setters
77  void setCombinedMomentum(double combinedMomentum) { combinedMomentum_ = combinedMomentum; }
78  void setCombinedMomentumError(double combinedMomentumError) { combinedMomentumError_ = combinedMomentumError; }
79  void setNewEnergy(double newEnergy) { newEnergy_ = newEnergy; }
80  void setNewEnergyError(double newEnergyError) { newEnergyError_ = newEnergyError; }
81 
82 private:
83  unsigned int run_;
84  double eClass_;
85  double r9_;
86  double scEnergy_;
90  double regEnergy_;
92  double eta_;
93  bool isEB_;
94  bool isMC_;
97  double newEnergy_;
101  double scale_;
102  double smearing_;
103 };
104 
105 #endif
double getScale() const
double trackMomentumError_
int getElClass() const
double getSCEnergy() const
double combinedMomentum_
void setNewEnergyError(double newEnergyError)
double getRegEnergy() const
void setCombinedMomentum(double combinedMomentum)
double getTrackerMomentum() const
double trackMomentum_
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 setNewEnergy(double newEnergy)
double regEnergyError_
double newEnergyError_
double getNewEnergy() const
bool isTrackerDriven() const
double getCombinedMomentum() const
bool isMC() const
unsigned int getRunNumber() const
double getNewEnergyError() const
void writeTo(reco::GsfElectron &out) const
double getEta() const
float getR9() const
double getCombinedMomentumError() const
double getRegEnergyError() const
double combinedMomentumError_
double getSCEnergyError() const
bool isEB() const
unsigned int run_
double getSmearing() const
double scEnergyError_
void setCombinedMomentumError(double combinedMomentumError)
double getTrackerMomentumError() const
bool isEcalDriven() const