Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:10:16

0001 #ifndef SimplePhoton_H
0002 #define SimplePhoton_H
0003 
0004 #ifndef SimpleElectron_STANDALONE
0005 #include "DataFormats/EgammaCandidates/interface/Photon.h"
0006 #endif
0007 
0008 class SimplePhoton {
0009 public:
0010   SimplePhoton() {}
0011   SimplePhoton(double run,
0012                double eClass,
0013                double r9,
0014                double scEnergy,
0015                double scEnergyError,
0016                double regEnergy,
0017                double regEnergyError,
0018                double eta,
0019                bool isEB,
0020                bool isMC)
0021       : run_(run),
0022         eClass_(eClass),
0023         r9_(r9),
0024         scEnergy_(scEnergy),
0025         scEnergyError_(scEnergyError),
0026         regEnergy_(regEnergy),
0027         regEnergyError_(regEnergyError),
0028         eta_(eta),
0029         isEB_(isEB),
0030         isMC_(isMC),
0031         newEnergy_(regEnergy_),
0032         newEnergyError_(regEnergyError_),
0033         scale_(1.0),
0034         smearing_(0.0) {}
0035   ~SimplePhoton() {}
0036 
0037 #ifndef SimplePhoton_STANDALONE
0038   explicit SimplePhoton(const reco::Photon& in, unsigned int runNumber, bool isMC);
0039   void writeTo(reco::Photon& out) const;
0040 #endif
0041 
0042   //accessors
0043   double getNewEnergy() const { return newEnergy_; }
0044   double getNewEnergyError() const { return newEnergyError_; }
0045   double getScale() const { return scale_; }
0046   double getSmearing() const { return smearing_; }
0047   double getSCEnergy() const { return scEnergy_; }
0048   double getSCEnergyError() const { return scEnergyError_; }
0049   double getRegEnergy() const { return regEnergy_; }
0050   double getRegEnergyError() const { return regEnergyError_; }
0051   double getEta() const { return eta_; }
0052   float getR9() const { return r9_; }
0053   int getElClass() const { return eClass_; }
0054   int getRunNumber() const { return run_; }
0055   bool isEB() const { return isEB_; }
0056   bool isMC() const { return isMC_; }
0057 
0058   //setters
0059   void setNewEnergy(double newEnergy) { newEnergy_ = newEnergy; }
0060   void setNewEnergyError(double newEnergyError) { newEnergyError_ = newEnergyError; }
0061 
0062 private:
0063   double run_;
0064   double eClass_;
0065   double r9_;
0066   double scEnergy_;
0067   double scEnergyError_;
0068   double regEnergy_;
0069   double regEnergyError_;
0070   double eta_;
0071   bool isEB_;
0072   bool isMC_;
0073   double newEnergy_;
0074   double newEnergyError_;
0075   double scale_;
0076   double smearing_;
0077 };
0078 
0079 #endif