#include <EcalIndexingTools.h>
Public Member Functions | |
double | getEtaMax () |
int | getNumberOfChannels () |
int | getProgressiveIndex (double, double) |
void | setBinRange (int, double, double, int, double, double) |
~EcalIndexingTools () | |
Static Public Member Functions | |
static EcalIndexingTools * | getInstance () |
Private Member Functions | |
EcalIndexingTools () | |
Private Attributes | |
double | maxEt_ |
double | maxEta_ |
double | minEt_ |
double | minEta_ |
int | nBinsEt_ |
int | nBinsEta_ |
int | totNumberOfBins_ |
Static Private Attributes | |
static EcalIndexingTools * | instance_ = 0 |
Definition at line 11 of file EcalIndexingTools.h.
EcalIndexingTools::EcalIndexingTools | ( | ) | [inline, private] |
Definition at line 16 of file EcalIndexingTools.h.
Referenced by getInstance().
EcalIndexingTools::~EcalIndexingTools | ( | ) | [inline] |
Definition at line 26 of file EcalIndexingTools.h.
{};
double EcalIndexingTools::getEtaMax | ( | ) | [inline] |
static EcalIndexingTools* EcalIndexingTools::getInstance | ( | ) | [inline, static] |
Definition at line 28 of file EcalIndexingTools.h.
References gather_cfg::cout, EcalIndexingTools(), and instance_.
Referenced by calib::CalibElectron::getCalibModulesWeights(), ZeeCalibration::ZeeCalibration(), and ZIterativeAlgorithmWithFit::ZIterativeAlgorithmWithFit().
{ if (instance_ == 0 ){ instance_ = new EcalIndexingTools(); std::cout<< "[EcalIndexingTools* getInstance ()] new EcalIndexingTools created "<< std::endl; } return instance_; }
int EcalIndexingTools::getNumberOfChannels | ( | ) | [inline] |
Definition at line 39 of file EcalIndexingTools.h.
References totNumberOfBins_.
Referenced by calib::CalibElectron::getCalibModulesWeights(), and ZIterativeAlgorithmWithFit::ZIterativeAlgorithmWithFit().
{return totNumberOfBins_;};
int EcalIndexingTools::getProgressiveIndex | ( | double | myEta, |
double | myEt | ||
) |
INITIALIZE BOUNDARIES
Definition at line 30 of file EcalIndexingTools.cc.
References gather_cfg::cout, i, recoMuon::in, maxEt_, maxEta_, minEt_, minEta_, nBinsEt_, and nBinsEta_.
Referenced by calib::CalibElectron::getCalibModulesWeights().
{ std::cout << "minEt_ " << minEt_ <<std::endl; std::cout << "minEta_ " << minEta_ <<std::endl; std::cout << "maxEt_ " << maxEt_ <<std::endl; std::cout << "maxEta_ " << maxEta_ <<std::endl; double BoundaryEt[100] = {-99.}; double BoundaryEta[100] = {-99.}; for( int i = 0; i < ( nBinsEt_ + 1 ); i++ ){ BoundaryEt[i] = minEt_ + i * ( (maxEt_ - minEt_)/ (double)nBinsEt_ ); // std::cout << "i " << i << " BoundaryEt[i] "<< BoundaryEt[i] <<std::endl; } for( int i = 0; i < ( nBinsEta_ + 1 ); i++ ){ BoundaryEta[i] = minEta_ + i * ( (maxEta_ - minEta_)/ (double)nBinsEta_ ); //std::cout << "i " << i << " BoundaryEta[i] "<< BoundaryEta[i] <<std::endl; } int etBin(-1); int etaBin(-1); for( int i = 0; i < nBinsEta_ ; i++ ){ if( myEta > BoundaryEta[i] && myEta <= BoundaryEta[i+1] ) etaBin=i; } for( int i = 0; i < nBinsEt_ ; i++ ){ if( myEt > BoundaryEt[i] && myEt <= BoundaryEt[i+1] ) etBin=i; } // std::cout << " myEta "<< myEta << " myEt "<< myEt << " etaBin "<< etaBin << " etBin "<< etBin << std::endl; int in = etaBin * nBinsEta_ + etBin; //std::cout << "Progressive index " << in << std::endl; return in; }
void EcalIndexingTools::setBinRange | ( | int | nBinsEta, |
double | minEta, | ||
double | maxEta, | ||
int | nBinsEt, | ||
double | minEt, | ||
double | maxEt | ||
) |
Definition at line 9 of file EcalIndexingTools.cc.
References maxEt_, maxEta, maxEta_, minEt_, benchmark_cfg::minEta, minEta_, nBinsEt_, nBinsEta_, and totNumberOfBins_.
Referenced by ZeeCalibration::ZeeCalibration().
{ // std::cout<< "[EcalIndexingTools::setBinRange] setting values "<< nBinsEta << " " << minEta << " " << maxEta << std::endl; totNumberOfBins_ = nBinsEta*nBinsEt; nBinsEt_ = nBinsEt; nBinsEta_ = nBinsEta; minEt_ = minEt; minEta_ = minEta; maxEt_ = maxEt; maxEta_ = maxEta; // std::cout<< "[EcalIndexingTools::setBinRange] read back values: "<< nBinsEta_ << " " << minEta_ << " " << maxEta_ << std::endl; return; }
EcalIndexingTools * EcalIndexingTools::instance_ = 0 [static, private] |
Definition at line 16 of file EcalIndexingTools.h.
Referenced by getInstance().
double EcalIndexingTools::maxEt_ [private] |
Definition at line 22 of file EcalIndexingTools.h.
Referenced by getProgressiveIndex(), and setBinRange().
double EcalIndexingTools::maxEta_ [private] |
Definition at line 22 of file EcalIndexingTools.h.
Referenced by getEtaMax(), getProgressiveIndex(), and setBinRange().
double EcalIndexingTools::minEt_ [private] |
Definition at line 22 of file EcalIndexingTools.h.
Referenced by getProgressiveIndex(), and setBinRange().
double EcalIndexingTools::minEta_ [private] |
Definition at line 22 of file EcalIndexingTools.h.
Referenced by getProgressiveIndex(), and setBinRange().
int EcalIndexingTools::nBinsEt_ [private] |
Definition at line 20 of file EcalIndexingTools.h.
Referenced by getProgressiveIndex(), and setBinRange().
int EcalIndexingTools::nBinsEta_ [private] |
Definition at line 20 of file EcalIndexingTools.h.
Referenced by getProgressiveIndex(), and setBinRange().
int EcalIndexingTools::totNumberOfBins_ [private] |
Definition at line 20 of file EcalIndexingTools.h.
Referenced by getNumberOfChannels(), and setBinRange().