Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-10 02:59:05

0001 #ifndef CastorShowerLibraryInfo_h
0002 #define CastorShowerLibraryInfo_h
0003 
0004 #include "TROOT.h"
0005 #include "Rtypes.h"
0006 #include "TObject.h"
0007 #include "TClass.h"
0008 #include "TDictionary.h"
0009 
0010 #include <vector>
0011 #include <string>
0012 class SLBin : public TObject {
0013 public:
0014   SLBin() {}
0015   ~SLBin() override {}
0016   // Setters
0017   void Clear(Option_t* option = "") override {
0018     NEvts = NBins = NEvtPerBin = 0;
0019     Bins.clear();
0020   };
0021   void setNEvts(unsigned int n) { NEvts = n; };
0022   void setNBins(unsigned int n) { NBins = n; };
0023   void setNEvtPerBin(unsigned int n) { NEvtPerBin = n; };
0024   void setBin(double val) { Bins.push_back(val); };
0025   void setBin(const std::vector<double>& b) { Bins = b; };
0026   // getters
0027   unsigned int getNEvts() { return NEvts; };
0028   unsigned int getNBins() { return NBins; };
0029   unsigned int getNEvtPerBin() { return NEvtPerBin; };
0030   double getBin(int i) { return Bins.at(i); };
0031   std::vector<double>& getBin() { return Bins; };
0032 
0033 private:
0034   unsigned int NEvts;
0035   unsigned int NBins;
0036   unsigned int NEvtPerBin;
0037   std::vector<double> Bins;
0038   ClassDefOverride(SLBin, 2);
0039 };
0040 
0041 class CastorShowerLibraryInfo : public TObject {
0042 public:
0043   CastorShowerLibraryInfo();
0044   ~CastorShowerLibraryInfo() override;
0045 
0046   void Clear(Option_t* option = "") override;
0047 
0048   // Data members
0049   SLBin Energy;
0050   SLBin Eta;
0051   SLBin Phi;
0052 
0053   ClassDefOverride(CastorShowerLibraryInfo, 2);
0054 };
0055 
0056 #endif