Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:14:23

0001 #ifndef EcalIndexingTools_h
0002 #define EcalIndexingTools_h
0003 
0004 #include <iostream>
0005 /* ******************************************
0006  * Alessandro Palma 19/03/2008
0007  ********************************************/
0008 
0009 class EcalIndexingTools {
0010 private:
0011   EcalIndexingTools()
0012       : totNumberOfBins_(-1), nBinsEt_(-1), nBinsEta_(-1), maxEta_(-1.), maxEt_(-1.), minEta_(-1.), minEt_(-1.){};
0013 
0014   static EcalIndexingTools* instance_;
0015 
0016   int totNumberOfBins_, nBinsEt_, nBinsEta_;
0017 
0018   double maxEta_, maxEt_, minEta_, minEt_;
0019 
0020 public:
0021   ~EcalIndexingTools(){};
0022 
0023   static EcalIndexingTools* getInstance() {
0024     if (instance_ == nullptr) {
0025       instance_ = new EcalIndexingTools();
0026 
0027       std::cout << "[EcalIndexingTools* getInstance ()] new EcalIndexingTools created " << std::endl;
0028     }
0029     return instance_;
0030   }
0031 
0032   int getNumberOfChannels() { return totNumberOfBins_; };
0033 
0034   double getEtaMax() { return maxEta_; };
0035 
0036   int getProgressiveIndex(double, double);
0037 
0038   void setBinRange(int, double, double, int, double, double);
0039 };
0040 
0041 #endif