Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:13:57

0001 #ifndef SimpleElectron_H
0002 #define SimpleElectron_H
0003 
0004 #ifndef SimpleElectron_STANDALONE
0005 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
0006 #endif
0007 
0008 class SimpleElectron {
0009 public:
0010   SimpleElectron() {}
0011   SimpleElectron(unsigned int run,
0012                  double eClass,
0013                  double r9,
0014                  double scEnergy,
0015                  double scEnergyError,
0016                  double trackMomentum,
0017                  double trackMomentumError,
0018                  double regEnergy,
0019                  double regEnergyError,
0020                  double combinedMomentum,
0021                  double combinedMomentumError,
0022                  double eta,
0023                  bool isEB,
0024                  bool isMC,
0025                  bool isEcalDriven,
0026                  bool isTrackerDriven)
0027       : run_(run),
0028         eClass_(eClass),
0029         r9_(r9),
0030         scEnergy_(scEnergy),
0031         scEnergyError_(scEnergyError),
0032         trackMomentum_(trackMomentum),
0033         trackMomentumError_(trackMomentumError),
0034         regEnergy_(regEnergy),
0035         regEnergyError_(regEnergyError),
0036         eta_(eta),
0037         isEB_(isEB),
0038         isMC_(isMC),
0039         isEcalDriven_(isEcalDriven),
0040         isTrackerDriven_(isTrackerDriven),
0041         newEnergy_(regEnergy_),
0042         newEnergyError_(regEnergyError_),
0043         combinedMomentum_(combinedMomentum),
0044         combinedMomentumError_(combinedMomentumError),
0045         scale_(1.0),
0046         smearing_(0.0) {}
0047   ~SimpleElectron() {}
0048 
0049 #ifndef SimpleElectron_STANDALONE
0050   explicit SimpleElectron(const reco::GsfElectron &in, unsigned int runNumber, bool isMC);
0051   void writeTo(reco::GsfElectron &out) const;
0052 #endif
0053 
0054   //accessors
0055   double getNewEnergy() const { return newEnergy_; }
0056   double getNewEnergyError() const { return newEnergyError_; }
0057   double getCombinedMomentum() const { return combinedMomentum_; }
0058   double getCombinedMomentumError() const { return combinedMomentumError_; }
0059   double getScale() const { return scale_; }
0060   double getSmearing() const { return smearing_; }
0061   double getSCEnergy() const { return scEnergy_; }
0062   double getSCEnergyError() const { return scEnergyError_; }
0063   double getRegEnergy() const { return regEnergy_; }
0064   double getRegEnergyError() const { return regEnergyError_; }
0065   double getTrackerMomentum() const { return trackMomentum_; }
0066   double getTrackerMomentumError() const { return trackMomentumError_; }
0067   double getEta() const { return eta_; }
0068   float getR9() const { return r9_; }
0069   int getElClass() const { return eClass_; }
0070   unsigned int getRunNumber() const { return run_; }
0071   bool isEB() const { return isEB_; }
0072   bool isMC() const { return isMC_; }
0073   bool isEcalDriven() const { return isEcalDriven_; }
0074   bool isTrackerDriven() const { return isTrackerDriven_; }
0075 
0076   //setters
0077   void setCombinedMomentum(double combinedMomentum) { combinedMomentum_ = combinedMomentum; }
0078   void setCombinedMomentumError(double combinedMomentumError) { combinedMomentumError_ = combinedMomentumError; }
0079   void setNewEnergy(double newEnergy) { newEnergy_ = newEnergy; }
0080   void setNewEnergyError(double newEnergyError) { newEnergyError_ = newEnergyError; }
0081 
0082 private:
0083   unsigned int run_;
0084   double eClass_;
0085   double r9_;
0086   double scEnergy_;
0087   double scEnergyError_;
0088   double trackMomentum_;
0089   double trackMomentumError_;
0090   double regEnergy_;
0091   double regEnergyError_;
0092   double eta_;
0093   bool isEB_;
0094   bool isMC_;
0095   bool isEcalDriven_;
0096   bool isTrackerDriven_;
0097   double newEnergy_;
0098   double newEnergyError_;
0099   double combinedMomentum_;
0100   double combinedMomentumError_;
0101   double scale_;
0102   double smearing_;
0103 };
0104 
0105 #endif