CMS 3D CMS Logo

Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes

EcalDQMBinningService Class Reference

#include <EcalDQMBinningService.h>

List of all members.

Classes

struct  AxisSpecs

Public Types

enum  BinningType {
  kCrystal, kTriggerTower, kSuperCrystal, kTCC,
  kDCC, kProjEta, kProjPhi, kUser,
  kReport, kTrend, nBinType
}
enum  Constants {
  nPlotType = kEcal + 1, nPresetBinnings = kProjPhi + 1, nDCC = 54, nDCCMEM = 44,
  nTCC = 108, kEEmTCCLow = 0, kEEmTCCHigh = 35, kEEpTCCLow = 72,
  kEEpTCCHigh = 107, kEBTCCLow = 36, kEBTCCHigh = 71, nEBSMEta = 85,
  nEBSMPhi = 20, nEBSMBins = nEBSMEta * nEBSMPhi, nEESMX = 40, nEESMY = 40,
  nEESMBins = nEESMX * nEESMY, nEESMXExt = 45, nEESMBinsExt = nEESMXExt * nEESMY, nEBEtaBins = 34,
  nEEEtaBins = 20, nPhiBins = 36
}
enum  ObjectType {
  kEB, kEBMEM, kEE, kEEm,
  kEEp, kEEMEM, kSM, kSMMEM,
  kEcal, kEcal2P, kEcal3P, kEcalMEM2P,
  kChannel, nObjType
}

Public Member Functions

std::string channelName (uint32_t, BinningType _btype=kDCC) const
 EcalDQMBinningService (const edm::ParameterSet &, edm::ActivityRegistry &)
std::pair< unsigned,
std::vector< int > > 
findBins (ObjectType, BinningType, unsigned) const
std::pair< unsigned,
std::vector< int > > 
findBins (ObjectType, BinningType, const DetId &) const
std::pair< unsigned,
std::vector< int > > 
findBins (ObjectType, BinningType, const EcalElectronicsId &) const
std::pair< unsigned,
std::vector< int > > 
findBinsNoMap (ObjectType, BinningType, const DetId &) const
std::pair< unsigned,
std::vector< int > > 
findBinsNoMap (ObjectType, BinningType, const EcalElectronicsId &) const
unsigned findOffset (ObjectType, const DetId &) const
unsigned findOffset (ObjectType, const EcalElectronicsId &) const
unsigned findOffset (ObjectType, BinningType, unsigned) const
const std::vector< int > * getBinMap (ObjectType &, BinningType &) const
std::vector< AxisSpecsgetBinning (ObjectType, BinningType, bool _isMap=true, unsigned _objOffset=0) const
uint32_t idFromName (std::string const &) const
ObjectType objectFromOffset (ObjectType, unsigned) const
void postBeginRun (const edm::Run &, const edm::EventSetup &)
int smOffsetBins (ObjectType, BinningType, unsigned) const
int xlow (int) const
int ylow (int) const
 ~EcalDQMBinningService ()

Private Member Functions

void findBinsCrystal_ (const DetId &, ObjectType, const std::vector< int > &, std::vector< int > &) const
void findBinsDCC_ (const DetId &, ObjectType, const std::vector< int > &, std::vector< int > &) const
void findBinsProjEta_ (const DetId &, ObjectType, const std::vector< int > &, std::vector< int > &) const
void findBinsProjPhi_ (const DetId &, ObjectType, const std::vector< int > &, std::vector< int > &) const
void findBinsSuperCrystal_ (const DetId &, ObjectType, const std::vector< int > &, std::vector< int > &) const
void findBinsTCC_ (const DetId &, ObjectType, const std::vector< int > &, std::vector< int > &) const
void findBinsTriggerTower_ (const DetId &, ObjectType, const std::vector< int > &, std::vector< int > &) const
const std::vector< int > * getBinMapEB_ (BinningType) const
const std::vector< int > * getBinMapEBMEM_ (BinningType) const
const std::vector< int > * getBinMapEcal_ (BinningType) const
const std::vector< int > * getBinMapEE_ (BinningType, int) const
const std::vector< int > * getBinMapEEMEM_ (BinningType) const
const std::vector< int > * getBinMapSM_ (BinningType) const
const std::vector< int > * getBinMapSMMEM_ (BinningType) const
std::vector< AxisSpecsgetBinningEB_ (BinningType, bool) const
std::vector< AxisSpecsgetBinningEBMEM_ (BinningType, bool) const
std::vector< AxisSpecsgetBinningEcal_ (BinningType, bool) const
std::vector< AxisSpecsgetBinningEE_ (BinningType, bool, int) const
std::vector< AxisSpecsgetBinningEEMEM_ (BinningType, bool) const
std::vector< AxisSpecsgetBinningSM_ (BinningType, bool, unsigned) const
std::vector< AxisSpecsgetBinningSMMEM_ (BinningType, bool, unsigned) const

Private Attributes

std::vector< int > binMaps_ [nPlotType][nPresetBinnings]
std::pair< unsigned,
std::vector< int > > 
cache_
BinningType cacheBtype_
uint32_t cacheId_
ObjectType cacheOtype_
const double etaBound_
const CaloGeometrygeometry_
bool initialized_
int verbosity_

Detailed Description

Definition at line 26 of file EcalDQMBinningService.h.


Member Enumeration Documentation

Enumerator:
kCrystal 
kTriggerTower 
kSuperCrystal 
kTCC 
kDCC 
kProjEta 
kProjPhi 
kUser 
kReport 
kTrend 
nBinType 

Definition at line 45 of file EcalDQMBinningService.h.

Enumerator:
nPlotType 
nPresetBinnings 
nDCC 
nDCCMEM 
nTCC 
kEEmTCCLow 
kEEmTCCHigh 
kEEpTCCLow 
kEEpTCCHigh 
kEBTCCLow 
kEBTCCHigh 
nEBSMEta 
nEBSMPhi 
nEBSMBins 
nEESMX 
nEESMY 
nEESMBins 
nEESMXExt 
nEESMBinsExt 
nEBEtaBins 
nEEEtaBins 
nPhiBins 

Definition at line 59 of file EcalDQMBinningService.h.

                 {
    nPlotType = kEcal + 1,
    nPresetBinnings = kProjPhi + 1,

    nDCC = 54,
    nDCCMEM = 44,

    nTCC = 108,
    kEEmTCCLow = 0, kEEmTCCHigh = 35,
    kEEpTCCLow = 72, kEEpTCCHigh = 107,
    kEBTCCLow = 36, kEBTCCHigh = 71,

    nEBSMEta = 85,
    nEBSMPhi = 20,
    nEBSMBins = nEBSMEta * nEBSMPhi,
    nEESMX = 40,
    nEESMY = 40,
    nEESMBins = nEESMX * nEESMY,
    nEESMXExt = 45, // for EE+-02&08
    nEESMBinsExt = nEESMXExt * nEESMY,


    nEBEtaBins = 34,
    nEEEtaBins = 20,
    nPhiBins = 36
  };
Enumerator:
kEB 
kEBMEM 
kEE 
kEEm 
kEEp 
kEEMEM 
kSM 
kSMMEM 
kEcal 
kEcal2P 
kEcal3P 
kEcalMEM2P 
kChannel 
nObjType 

Definition at line 28 of file EcalDQMBinningService.h.


Constructor & Destructor Documentation

EcalDQMBinningService::EcalDQMBinningService ( const edm::ParameterSet _ps,
edm::ActivityRegistry _registry 
)
EcalDQMBinningService::~EcalDQMBinningService ( )

Definition at line 39 of file EcalDQMBinningService.cc.

{
}

Member Function Documentation

std::string EcalDQMBinningService::channelName ( uint32_t  _rawId,
BinningType  _btype = kDCC 
) const

Definition at line 574 of file EcalDQMBinningService.cc.

References EcalTriggerElectronicsId::channelId(), EcalElectronicsId::dccId(), ecaldqm::getElectronicsMap(), EBDetId::ieta(), EcalTrigTowerDetId::ieta(), EcalTrigTowerDetId::iphi(), EBDetId::iphi(), EEDetId::ix(), EcalScDetId::ix(), EEDetId::iy(), EcalScDetId::iy(), kCrystal, kDCC, ecaldqm::kEBmLow, ecaldqm::kEBpHigh, kSuperCrystal, kTCC, kTriggerTower, nDCC, EcalTriggerElectronicsId::pseudoStripId(), ecaldqm::smName(), EcalElectronicsId::stripId(), EcalTriggerElectronicsId::tccId(), EcalElectronicsId::towerId(), EcalTriggerElectronicsId::ttId(), and EcalElectronicsId::xtalId().

Referenced by ecaldqm::MESetEcal::book(), ecaldqm::MESetChannel::fill(), ecaldqm::MESetEcal::generateNames(), and ecaldqm::MESetChannel::setBinContent().

{
  std::stringstream ss;

  switch(_btype){
  case kCrystal:
    {
      // EB-03 DCC 12 CCU 12 strip 3 xtal 1 (EB ieta -13 iphi 60) (TCC 39 TT 12 pstrip 3 chan 1)
      EcalElectronicsId eid(_rawId);
      ss << smName(eid.dccId()) << " DCC " << eid.dccId() << " CCU " << eid.towerId() << " strip " << eid.stripId() << " xtal " << eid.xtalId();
      if(eid.towerId() >= 69) break;

      if(eid.dccId() >= kEBmLow + 1 && eid.dccId() <= kEBpHigh + 1){
        EBDetId ebid(getElectronicsMap()->getDetId(eid));
        ss << " (EB ieta " << std::showpos << ebid.ieta() << std::noshowpos << " iphi " << ebid.iphi() << ")";
      }
      else{
        EEDetId eeid(getElectronicsMap()->getDetId(eid));
        ss << " (EE ix " << eeid.ix() << " iy " << eeid.iy() << ")";
      }
      EcalTriggerElectronicsId teid(getElectronicsMap()->getTriggerElectronicsId(eid));
      ss << " (TCC " << teid.tccId() << " TT " << teid.ttId() << " pstrip " << teid.pseudoStripId() << " chan " << teid.channelId() << ")";
      break;
    }
  case kTriggerTower:
    {
      // EB-03 DCC 12 TCC 18 TT 3
      EcalTriggerElectronicsId teid(_rawId);
      EcalElectronicsId eid(getElectronicsMap()->getElectronicsId(teid));
      ss << smName(eid.dccId()) << " DCC " << eid.dccId() << " TCC " << teid.tccId() << " TT " << teid.ttId();
      break;
    }
  case kSuperCrystal:
    {
      // EB-03 DCC 12 CCU 18 (EBTT ieta -13 iphi 60)
      EcalElectronicsId eid(_rawId);
      ss << smName(eid.dccId()) << " DCC " << eid.dccId() << " CCU " << eid.towerId();
      if(eid.dccId() >= kEBmLow + 1 && eid.dccId() <= kEBpHigh + 1){
        EcalTrigTowerDetId ttid(EBDetId(getElectronicsMap()->getDetId(eid)).tower());
        ss << " (EBTT ieta " << std::showpos << ttid.ieta() << std::noshowpos << " iphi " << ttid.iphi() << ")";
      }
      else{
        EcalScDetId scid(EEDetId(getElectronicsMap()->getDetId(eid)).sc());
        ss << " (EESC ix " << scid.ix() << " iy " << scid.iy() << ")";
      }
      break;
    }
  case kTCC:
    {
      // EB-03 TCC 12
      int tccid(_rawId - nDCC);
      int dccid(getElectronicsMap()->DCCid(getElectronicsMap()->getTrigTowerDetId(tccid, 1)));
      ss << smName(dccid) << " TCC " << (_rawId - nDCC);
      break;
    }
  case kDCC:
    ss << smName(_rawId);
    break;
  default:
    break;
  }

  return ss.str();
}
std::pair< unsigned, std::vector< int > > EcalDQMBinningService::findBins ( ObjectType  _otype,
BinningType  _btype,
const DetId _id 
) const

Definition at line 199 of file EcalDQMBinningService.cc.

References cache_, cacheBtype_, cacheId_, cacheOtype_, findBinsCrystal_(), findBinsDCC_(), findBinsProjEta_(), findBinsProjPhi_(), findBinsSuperCrystal_(), findBinsTCC_(), findBinsTriggerTower_(), findOffset(), getBinMap(), kCrystal, kDCC, kProjEta, kProjPhi, kSM, kSMMEM, kSuperCrystal, kTCC, kTriggerTower, nObjType, nPresetBinnings, objectFromOffset(), run_regression::ret, and smOffsetBins().

Referenced by ecaldqm::MESetDet1D::find_(), ecaldqm::MESetEcal::find_(), findBins(), and findBinsNoMap().

{
  using namespace std;

  if(_otype == cacheOtype_ && _btype == cacheBtype_ && _id == cacheId_) return cache_;

  pair<unsigned, std::vector<int> > ret(-1, std::vector<int>(0));

  if(_otype >= nObjType || _btype >= unsigned(nPresetBinnings)) return ret;

  ret.first = findOffset(_otype, _id);
  if(ret.first == unsigned(-1)) return ret;
 
  // bring up the appropriate dictionary
  ObjectType okey(objectFromOffset(_otype, ret.first));
  BinningType bkey(_btype);

  if(okey == nObjType) return ret;

  const std::vector<int>* binMap(getBinMap(okey, bkey));
  if(binMap == 0) return ret;

  switch(bkey){
  case kCrystal:
    findBinsCrystal_(_id, okey, *binMap, ret.second);
    break;
  case kTriggerTower:
    findBinsTriggerTower_(_id, okey, *binMap, ret.second);
    break;
  case kSuperCrystal:
    findBinsSuperCrystal_(_id, okey, *binMap, ret.second);
    break;
  case kDCC:
    findBinsDCC_(_id, okey, *binMap, ret.second);
    break;
  case kTCC:
    findBinsTCC_(_id, okey, *binMap, ret.second);
    break;
  case kProjEta:
    findBinsProjEta_(_id, okey, *binMap, ret.second);
    break;
  case kProjPhi:
    findBinsProjPhi_(_id, okey, *binMap, ret.second);
  default :
    break;
  }

  // binMap value differs from actual bin numbers for SM plots
  if(_otype == kSM || _otype == kSMMEM){
    for(vector<int>::iterator binItr(ret.second.begin()); binItr != ret.second.end(); ++binItr)
      *binItr -= smOffsetBins(_otype, _btype, ret.first);
  }

  cacheId_ = _id;
  cacheOtype_ = _otype;
  cacheBtype_ = _btype;
  cache_ = ret;

  return ret;
}
std::pair< unsigned, std::vector< int > > EcalDQMBinningService::findBins ( ObjectType  _otype,
BinningType  _btype,
const EcalElectronicsId _id 
) const

Definition at line 261 of file EcalDQMBinningService.cc.

References findBins(), and ecaldqm::getElectronicsMap().

{
  return findBins(_otype, _btype, getElectronicsMap()->getDetId(_id));
}
std::pair< unsigned, std::vector< int > > EcalDQMBinningService::findBins ( ObjectType  _otype,
BinningType  _btype,
unsigned  _dcctccid 
) const

Definition at line 267 of file EcalDQMBinningService.cc.

References cache_, cacheBtype_, cacheId_, cacheOtype_, findOffset(), getBinMap(), getHLTprescales::index, kDCC, kEB, ecaldqm::kEBmLow, ecaldqm::kEBpHigh, kEBTCCHigh, kEBTCCLow, kEE, ecaldqm::kEEmHigh, kEEmTCCHigh, kEEp, ecaldqm::kEEpLow, kEEpTCCLow, kTCC, objectFromOffset(), and run_regression::ret.

{
  using namespace std;

  if(_otype == cacheOtype_ && _btype == cacheBtype_ && _dcctccid == cacheId_) return cache_;

  pair<unsigned, std::vector<int> > ret(-1, std::vector<int>(0));

  if(_btype != kTCC && _btype != kDCC) return ret;

  ret.first = findOffset(_otype, _btype, _dcctccid);

  if(ret.first == unsigned(-1)) return ret;

  // bring up the appropriate dictionary
  ObjectType okey(objectFromOffset(_otype, ret.first));
  BinningType bkey(_btype);

  const std::vector<int>* binMap(getBinMap(okey, bkey));
  if(binMap == 0) return ret;

  unsigned index(_dcctccid - 1);

  if(bkey == kDCC){
    if(okey == kEB) index -= kEBmLow;
    else if(okey == kEE && index >= kEEpLow) index -= (kEBpHigh - kEEmHigh);
    else if(okey == kEEp) index -= kEEpLow;
  }
  else{
    if(okey == kEB) index -= kEBTCCLow;
    else if(okey == kEE && index >= kEEpLow) index -= (kEBTCCHigh - kEEmTCCHigh);
    else if(okey == kEEp) index -= kEEpTCCLow;
  }

  ret.second.push_back(binMap->at(index));

  cacheId_ = _dcctccid;
  cacheOtype_ = _otype;
  cacheBtype_ = _btype;
  cache_ = ret;

  return ret;
}
void EcalDQMBinningService::findBinsCrystal_ ( const DetId _id,
ObjectType  _okey,
const std::vector< int > &  _binMap,
std::vector< int > &  _bins 
) const [private]

Definition at line 976 of file EcalDQMBinningService2.cc.

References EBDetId::denseIndex(), EEDetId::denseIndex(), EcalBarrel, EcalEndcap, EcalLaserPnDiode, EcalTriggerTower, ecaldqm::getElectronicsMap(), ecaldqm::getTrigTowerMap(), EcalPnDiodeDetId::iDCCId(), getHLTprescales::index, EcalPnDiodeDetId::iPnId(), ecaldqm::isEcalScDetId(), ecaldqm::kEBmLow, EEDetId::kEEhalf, ecaldqm::kEEmHigh, ecaldqm::kEEp, ecaldqm::kEEpLow, EBDetId::kSizeForDenseIndexing, ecaldqm::kSM, DetId::subdetId(), and EEDetId::zside().

Referenced by findBins().

{
  using namespace std;

  bool fullRange(_okey == kSM || _okey == kEcal);

  switch(_id.subdetId()){
  case EcalBarrel:
    {
      unsigned index(EBDetId(_id).denseIndex());
      if(fullRange) index += EEDetId::kEEhalf;
      if(index < _binMap.size()) _bins.push_back(_binMap[index]);
      break;
    }
  case EcalEndcap:
    if(isEcalScDetId(_id)){
      pair<int, int> dccSc(getElectronicsMap()->getDCCandSC(EcalScDetId(_id)));
      vector<DetId> detIds(getElectronicsMap()->dccTowerConstituents(dccSc.first, dccSc.second));
      for(vector<DetId>::iterator idItr(detIds.begin()); idItr != detIds.end(); ++idItr) {
        EEDetId eeid(*idItr);
        unsigned index(eeid.denseIndex());
        if(eeid.zside() > 0) {
          if(fullRange) index += EBDetId::kSizeForDenseIndexing;
          else if(_okey == kEEp) index -= EEDetId::kEEhalf;
        }
        if(index < _binMap.size()) _bins.push_back(_binMap[index]);
      }
    }
    else{
      EEDetId eeid(_id);
      unsigned index(eeid.denseIndex());
      if(eeid.zside() > 0) {
        if(fullRange) index += EBDetId::kSizeForDenseIndexing;
        else if(_okey == kEEp) index -= EEDetId::kEEhalf;
      }
      if(index < _binMap.size()) _bins.push_back(_binMap[index]);
    }
    break;
  case EcalTriggerTower:
    {
      EcalTrigTowerDetId ttid(_id);
      vector<DetId> detIds(getTrigTowerMap()->constituentsOf(ttid));
      for(vector<DetId>::iterator idItr(detIds.begin()); idItr != detIds.end(); ++idItr) {
        if(idItr->subdetId() == EcalBarrel) {
          unsigned index(EBDetId(*idItr).denseIndex());
          if(fullRange) index += EEDetId::kEEhalf;
          if(index < _binMap.size()) _bins.push_back(_binMap[index]);
        }
        else {
          EEDetId eeid(*idItr);
          unsigned index(eeid.denseIndex());
          if(eeid.zside() > 0) {
            if(fullRange) index += EBDetId::kSizeForDenseIndexing;
            else if(_okey == kEEp) index -= EEDetId::kEEhalf;
          }
          if (index < _binMap.size()) _bins.push_back(_binMap[index]);
        }
      }
      break;
    }
  case EcalLaserPnDiode:
    {
      EcalPnDiodeDetId pnid(_id);
      int iDCC(pnid.iDCCId() - 1);
      unsigned index(iDCC * 10 + pnid.iPnId());
      if(_okey == kEBMEM) index -= kEEmHigh * 10;
      else if(_okey == kEEMEM && iDCC >= kEEpLow) index -= (kEEpLow - kEBmLow) * 10;
      if(index < _binMap.size()) _bins.push_back(_binMap[index]);
      break;
    }
  default:
    break;
  }
}
void EcalDQMBinningService::findBinsDCC_ ( const DetId _id,
ObjectType  _okey,
const std::vector< int > &  _binMap,
std::vector< int > &  _bins 
) const [private]

Definition at line 1146 of file EcalDQMBinningService2.cc.

References ecaldqm::dccId(), getHLTprescales::index, ecaldqm::kEBmLow, ecaldqm::kEBpHigh, ecaldqm::kEEmHigh, ecaldqm::kEEp, and ecaldqm::kEEpLow.

Referenced by findBins().

{
  unsigned index(dccId(_id) - 1);
  if(_okey == kEB) index -= kEBmLow;
  else if(_okey == kEE && index >= kEEpLow) index -= (kEBpHigh - kEEmHigh);
  else if(_okey == kEEp) index -= kEEpLow;
  if(index < _binMap.size()) _bins.push_back(_binMap[index]);
}
std::pair< unsigned, std::vector< int > > EcalDQMBinningService::findBinsNoMap ( ObjectType  _otype,
BinningType  _btype,
const EcalElectronicsId _id 
) const

Definition at line 352 of file EcalDQMBinningService.cc.

References findBinsNoMap(), and ecaldqm::getElectronicsMap().

{
  return findBinsNoMap(_otype, _btype, getElectronicsMap()->getDetId(_id));
}
std::pair< unsigned, std::vector< int > > EcalDQMBinningService::findBinsNoMap ( ObjectType  _otype,
BinningType  _btype,
const DetId _id 
) const

Definition at line 312 of file EcalDQMBinningService.cc.

References newFWLiteAna::bin, Exception, findBins(), findOffset(), kDCC, kEcal2P, kSM, kSuperCrystal, kTCC, kTriggerTower, SurfaceOrientation::outer, run_regression::ret, ecaldqm::tccId(), ecaldqm::towerId(), and ecaldqm::ttId().

Referenced by ecaldqm::MESetDet1D::find_(), and findBinsNoMap().

{
  using namespace std;

  // Not yet implemented to scale to general cases
  if(!((_otype == kSM && _btype == kSuperCrystal) ||
       (_otype == kSM && _btype == kTriggerTower) ||
       (_otype == kEcal2P && _btype == kDCC) ||
       (_otype == kEcal2P && _btype == kTCC)))
    throw cms::Exception("NotImplemented") << "1D bin finding only for SM - SC plots or Ecal2P - DCC plots" << std::endl;

  if(_otype == kEcal2P && (_btype == kDCC || _btype == kTCC))
    return findBins(_otype, _btype, _id);

  pair<unsigned, std::vector<int> > ret(-1, std::vector<int>(0));

  ret.first = findOffset(_otype, _id);
  if(ret.first == unsigned(-1)) return ret;

  if(_otype == kSM && _btype == kSuperCrystal)
    ret.second.push_back(towerId(_id));
  else if(_otype == kSM && _btype == kTriggerTower){
    unsigned tccid(tccId(_id));
    if(tccid >= 37 && tccid <= 72) // EB
      ret.second.push_back(ttId(_id));
    else{
      unsigned bin(ttId(_id));
      tccid = (tccid - 1) % 36;
      bool outer(tccid >= 18);
      tccid = (tccid + 1) % 18; // TCC numbering is shifted wrt DCC numbering by one 
      if(outer) bin += 48;
      bin += (tccid % 2) * (outer ? 16 : 24);
      ret.second.push_back(bin);
    }
  }

  return ret;
}
void EcalDQMBinningService::findBinsProjEta_ ( const DetId _id,
ObjectType  _okey,
const std::vector< int > &  _binMap,
std::vector< int > &  _bins 
) const [private]

Definition at line 1166 of file EcalDQMBinningService2.cc.

References EEDetId::denseIndex(), EcalBarrel, EcalEndcap, EcalTriggerTower, ecaldqm::getTrigTowerMap(), EBDetId::ieta(), getHLTprescales::index, EEDetId::iquadrant(), ecaldqm::isEcalScDetId(), EEDetId::ix(), EEDetId::iy(), EEDetId::kEEhalf, ecaldqm::kEEp, EcalTrigTowerDetId::subDet(), DetId::subdetId(), and EEDetId::zside().

Referenced by findBins().

{
  using namespace std;

  switch(_id.subdetId()){
  case EcalBarrel:
    {
      EBDetId ebid(_id);
      unsigned index(ebid.ieta() < 0 ? ebid.ieta() + 85 : ebid.ieta() + 84);
      if(_okey == kEcal) index += EEDetId::kEEhalf / 2;
      if(index < _binMap.size()) _bins.push_back(_binMap[index]);
      break;
    }
  case EcalEndcap:
    if(!isEcalScDetId(_id)){
      EEDetId eeid(_id);
      if(eeid.iquadrant() < 3)
        eeid = EEDetId(eeid.ix(), 101 - eeid.iy(), eeid.zside());
      unsigned index(eeid.denseIndex());
      if(_okey == kEEp) index -= EEDetId::kEEhalf;
      else if(_okey == kEcal && eeid.zside() > 0) index += 170 - EEDetId::kEEhalf / 2;
      if(index < _binMap.size()) _bins.push_back(_binMap[index]);
      break;
    }
  case EcalTriggerTower:
    {
      EcalTrigTowerDetId ttid(_id);
      vector<DetId> detIds(getTrigTowerMap()->constituentsOf(ttid));
      set<int> binset;
      if(ttid.subDet() == EcalBarrel){
        for(vector<DetId>::iterator idItr(detIds.begin()); idItr != detIds.end(); ++idItr){
          EBDetId ebid(*idItr);
          unsigned index(ebid.ieta() < 0 ? ebid.ieta() + 85 : ebid.ieta() + 84);
          if(_okey == kEcal) index += EEDetId::kEEhalf / 2;
          if(index < _binMap.size()) binset.insert(_binMap[index]);
        }
      }
      else{
        for(vector<DetId>::iterator idItr(detIds.begin()); idItr != detIds.end(); ++idItr){
          EEDetId eeid(*idItr);
          if(eeid.iquadrant() < 3)
            eeid = EEDetId(eeid.ix(), eeid.iy() <= 50 ? eeid.iy() : 101 - eeid.iy(), eeid.zside());
          unsigned index(eeid.denseIndex());
          if(_okey == kEEp) index -= EEDetId::kEEhalf;
          else if(_okey == kEcal && eeid.zside() > 0) index += 170 - EEDetId::kEEhalf / 2;
          if(index < _binMap.size()) binset.insert(_binMap[index]);
        }
      }
      for(set<int>::iterator binItr(binset.begin()); binItr != binset.end(); ++binItr)
        _bins.push_back(*binItr);
      break;
    }
  default:
    break;
  }
}
void EcalDQMBinningService::findBinsProjPhi_ ( const DetId _id,
ObjectType  _okey,
const std::vector< int > &  _binMap,
std::vector< int > &  _bins 
) const [private]

Definition at line 1224 of file EcalDQMBinningService2.cc.

References EEDetId::denseIndex(), EcalBarrel, EcalEndcap, EcalTriggerTower, ecaldqm::getTrigTowerMap(), getHLTprescales::index, EBDetId::iphi(), ecaldqm::isEcalScDetId(), EEDetId::kEEhalf, EcalTrigTowerDetId::subDet(), DetId::subdetId(), and EEDetId::zside().

Referenced by findBins().

{
  using namespace std;

  switch(_id.subdetId()){
  case EcalBarrel:
    {
      EBDetId ebid(_id);
      unsigned index(ebid.iphi() - 1);
      if(_okey == kEcal) index += EEDetId::kEEhalf;
      if(index < _binMap.size()) _bins.push_back(_binMap[index]);
      break;
    }
  case EcalEndcap:
    if(!isEcalScDetId(_id)){
      EEDetId eeid(_id);
      unsigned index(eeid.denseIndex());
      if(eeid.zside() > 0) index -= EEDetId::kEEhalf;
      if(index < _binMap.size()) _bins.push_back(_binMap[index]);
      break;
    }
  case EcalTriggerTower:
    {
      EcalTrigTowerDetId ttid(_id);
      vector<DetId> detIds(getTrigTowerMap()->constituentsOf(ttid));
      set<int> binset;
      if(ttid.subDet() == EcalBarrel){
        for(vector<DetId>::iterator idItr(detIds.begin()); idItr != detIds.end(); ++idItr){
          EBDetId ebid(*idItr);
          unsigned index(ebid.iphi() - 1);
          if(_okey == kEcal) index += EEDetId::kEEhalf;
          if(index < _binMap.size()) binset.insert(_binMap[index]);
        }
      }
      else{
        for(vector<DetId>::iterator idItr(detIds.begin()); idItr != detIds.end(); ++idItr){
          EEDetId eeid(*idItr);
          unsigned index(eeid.denseIndex());
          if(eeid.zside() > 0) index -= EEDetId::kEEhalf;
          if(index < _binMap.size()) binset.insert(_binMap[index]);
        }
      }
      for(set<int>::iterator binItr(binset.begin()); binItr != binset.end(); ++binItr)
        _bins.push_back(*binItr);
      break;
    }
  default:
    break;
  }
}
void EcalDQMBinningService::findBinsSuperCrystal_ ( const DetId _id,
ObjectType  _okey,
const std::vector< int > &  _binMap,
std::vector< int > &  _bins 
) const [private]

Definition at line 1100 of file EcalDQMBinningService2.cc.

References EcalTrigTowerDetId::denseIndex(), EcalScDetId::denseIndex(), EcalBarrel, EcalEndcap, EcalTriggerTower, getHLTprescales::index, ecaldqm::isEcalScDetId(), EcalTrigTowerDetId::kEBTotalTowers, ecaldqm::kEEp, ecaldqm::kSM, EEDetId::sc(), EcalScDetId::SC_PER_EE_CNT, DetId::subdetId(), EcalScDetId::zside(), and EEDetId::zside().

Referenced by findBins().

{
  bool fullRange(_okey == kSM || _okey == kEcal);

  switch(_id.subdetId()){
  case EcalBarrel:
    {
      unsigned index(EBDetId(_id).tower().denseIndex());
      if(fullRange) index += EcalScDetId::SC_PER_EE_CNT;
      if(index < _binMap.size()) _bins.push_back(_binMap[index]);
      break;
    }
  case EcalEndcap:
    {
      int zside(0);
      unsigned index;
      if (isEcalScDetId(_id)) {
        EcalScDetId scid(_id);
        zside = scid.zside();
        index = scid.denseIndex();
      }
      else {
        EEDetId eeid(_id);
        zside = eeid.zside();
        index = eeid.sc().denseIndex();
      }
      if(zside > 0) {
        if(fullRange) index += EcalTrigTowerDetId::kEBTotalTowers;
        else if(_okey == kEEp) index -= EcalScDetId::SC_PER_EE_CNT;
      }
      if(index < _binMap.size()) _bins.push_back(_binMap[index]);
      break;
    }
  case EcalTriggerTower: // btype == kSuperCrystal && subdet == EcalTriggerTower => only happens for EB
    {
      EcalTrigTowerDetId ttid(_id);
      unsigned index(ttid.denseIndex());
      if(fullRange) index += EcalScDetId::SC_PER_EE_CNT;
      if(index < _binMap.size()) _bins.push_back(_binMap[index]);
      break;
    }
  default:
    break;
  }
}
void EcalDQMBinningService::findBinsTCC_ ( const DetId _id,
ObjectType  _okey,
const std::vector< int > &  _binMap,
std::vector< int > &  _bins 
) const [private]

Definition at line 1156 of file EcalDQMBinningService2.cc.

References getHLTprescales::index, ecaldqm::kEEp, ecaldqm::kEEpLow, and ecaldqm::tccId().

Referenced by findBins().

{
  unsigned index(tccId(_id) - 1);
  if(_okey == kEB) index -= kEBTCCLow;
  else if(_okey == kEE && index >= kEEpLow) index -= (kEBTCCHigh - kEEmTCCHigh);
  else if(_okey == kEEp) index -= kEEpTCCLow;
  if(index < _binMap.size()) _bins.push_back(_binMap[index]);
}
void EcalDQMBinningService::findBinsTriggerTower_ ( const DetId _id,
ObjectType  _okey,
const std::vector< int > &  _binMap,
std::vector< int > &  _bins 
) const [private]

Definition at line 1052 of file EcalDQMBinningService2.cc.

References EEDetId::denseIndex(), EcalBarrel, EcalEndcap, EcalTriggerTower, ecaldqm::getTrigTowerMap(), EcalTrigTowerDetId::hashedIndex(), getHLTprescales::index, ecaldqm::isEcalScDetId(), EcalTrigTowerDetId::kEBTotalTowers, EEDetId::kEEhalf, EcalTrigTowerDetId::subDet(), DetId::subdetId(), and EEDetId::zside().

Referenced by findBins().

{
  using namespace std;

  switch(_id.subdetId()){
  case EcalBarrel:
    {
      EcalTrigTowerDetId ttid(EBDetId(_id).tower());
      unsigned index(ttid.hashedIndex() + EEDetId::kEEhalf);
      if(index < _binMap.size()) _bins.push_back(_binMap[index]);
      break;
    }
  case EcalEndcap:
    if(!isEcalScDetId(_id)){
      vector<DetId> detIds(getTrigTowerMap()->constituentsOf(getTrigTowerMap()->towerOf(_id)));
      for(vector<DetId>::iterator idItr(detIds.begin()); idItr != detIds.end(); ++idItr){
        EEDetId eeid(*idItr);
        unsigned index(eeid.denseIndex());
        if(eeid.zside() > 0) index += EcalTrigTowerDetId::kEBTotalTowers;
        if(index < _binMap.size()) _bins.push_back(_binMap[index]);
      }
      break;
    }
  case EcalTriggerTower:
    {
      EcalTrigTowerDetId ttid(_id);
      if(ttid.subDet() == EcalBarrel){
        unsigned index(ttid.hashedIndex() + EEDetId::kEEhalf);
        if(index < _binMap.size()) _bins.push_back(_binMap[index]);
      }
      else{
        vector<DetId> detIds(getTrigTowerMap()->constituentsOf(ttid));
        for(vector<DetId>::iterator idItr(detIds.begin()); idItr != detIds.end(); ++idItr){
          EEDetId eeid(*idItr);
          unsigned index(eeid.denseIndex());
          if(eeid.zside() > 0) index += EcalTrigTowerDetId::kEBTotalTowers;
          if(index < _binMap.size()) _bins.push_back(_binMap[index]);
        }
      }
      break;
    }
  default:
    break;
  }

}
unsigned EcalDQMBinningService::findOffset ( ObjectType  _otype,
const DetId _id 
) const

Definition at line 358 of file EcalDQMBinningService.cc.

References cache_, cacheId_, cacheOtype_, ecaldqm::dccId(), kDCC, kEB, ecaldqm::kEBpHigh, kEcal, kEcal2P, kEcal3P, kEcalMEM2P, kEE, kEEm, ecaldqm::kEEmHigh, kEEp, and kUser.

Referenced by ecaldqm::MESetTrend::fill(), ecaldqm::MESetEcal::fill(), ecaldqm::MESetDet0D::fill(), findBins(), findBinsNoMap(), and findOffset().

{
  if(_otype == cacheOtype_ && _id == cacheId_) return cache_.first;

  unsigned iSM(dccId(_id) - 1);

  if(_otype == kEcal3P){
    if(iSM <= kEEmHigh) return findOffset(kEcal3P, kUser, (unsigned)kEEm + 1);
    else if(iSM <= kEBpHigh) return findOffset(kEcal3P, kUser, (unsigned)kEB + 1);
    else return findOffset(kEcal3P, kUser, (unsigned)kEEp + 1);
  }
  else if(_otype == kEcal2P){
    if(iSM <= kEEmHigh) return findOffset(kEcal2P, kUser, (unsigned)kEE + 1);
    else if(iSM <= kEBpHigh) return findOffset(kEcal2P, kUser, (unsigned)kEB + 1);
    else return findOffset(kEcal2P, kUser, (unsigned)kEE + 1);
  }
  else if(_otype == kEcal)
    return 0;
  else if(_otype == kEcalMEM2P){
    if(iSM <= kEEmHigh) return findOffset(kEcal2P, kUser, (unsigned)kEE + 1);
    else if(iSM <= kEBpHigh) return findOffset(kEcal2P, kUser, (unsigned)kEB + 1);
    else return findOffset(kEcal2P, kUser, (unsigned)kEE + 1);
  }

  return findOffset(_otype, kDCC, iSM + 1);
}
unsigned EcalDQMBinningService::findOffset ( ObjectType  _otype,
const EcalElectronicsId _id 
) const

Definition at line 386 of file EcalDQMBinningService.cc.

References findOffset(), and ecaldqm::getElectronicsMap().

{
  return findOffset(_otype, getElectronicsMap()->getDetId(_id));
}
unsigned EcalDQMBinningService::findOffset ( ObjectType  _otype,
BinningType  _btype,
unsigned  _dcctccid 
) const

Definition at line 392 of file EcalDQMBinningService.cc.

References ecaldqm::dccNoMEM, kDCC, kEB, ecaldqm::kEBmLow, ecaldqm::kEBpHigh, kEBTCCHigh, kEBTCCLow, kEcal, kEcal2P, kEcal3P, kEcalMEM2P, kEE, kEEm, ecaldqm::kEEmHigh, kEEmTCCHigh, kEEp, ecaldqm::kEEpHigh, ecaldqm::kEEpLow, kEEpTCCHigh, kEEpTCCLow, kSM, kSMMEM, kTCC, kUser, ecaldqm::memDCCIndex(), nDCC, and nTCC.

{
  unsigned iSM(_dcctccid - 1);

  switch(_otype){
  case kEB:
    if(_btype == kDCC && iSM >= kEBmLow && iSM <= kEBpHigh) return 0;
    else if(_btype == kTCC && iSM >= kEBTCCLow && iSM <= kEBTCCHigh) return 0;
    return -1;
  case kEE:
    if(_btype == kDCC && 
       (iSM <= kEEmHigh ||
        (iSM >= kEEpLow && iSM <= kEEpHigh))) return 0;
    else if(_btype == kTCC && 
            (iSM <= kEEmTCCHigh ||
             (iSM >= kEEpTCCLow && iSM <= kEEpTCCHigh))) return 0;
    return -1;
  case kEEm:
    if(_btype == kDCC && iSM <= kEEmHigh) return 0;
    else if(_btype == kTCC && iSM <= kEEmTCCHigh) return 0;
    else return -1;
  case kEEp:
    if(_btype == kDCC && (iSM >= kEEpLow && iSM <= kEEpHigh)) return 0;
    else if(_btype == kTCC && (iSM >= kEEpTCCLow && iSM <= kEEpTCCHigh)) return 0;
    else return -1;
  case kSM:
    if(iSM < nDCC) return iSM;
    else return -1;
  case kSMMEM:
    if(iSM < nDCC && dccNoMEM.find(iSM) == dccNoMEM.end()) return memDCCIndex(_dcctccid);
    else return -1;
  case kEcal:
    if(_btype == kDCC && iSM < nDCC) return 0;
    else if(_btype == kTCC && iSM < nTCC) return 0;
    else if(_btype == kUser) return 0;
    else return -1;
  case kEcal2P:
    {
      int iSubdet(iSM);
      if(_btype == kDCC){
        if(iSM <= kEEmHigh) iSubdet = kEE;
        else if(iSM <= kEBpHigh) iSubdet = kEB;
        else iSubdet = kEE;
      }
      else if(_btype == kTCC){
        if(iSM <= kEEmTCCHigh) iSubdet = kEE;
        else if(iSM <= kEBTCCHigh) iSubdet = kEB;
        else iSubdet = kEE;
      }
      if(iSubdet == kEE || iSubdet == kEEm || iSubdet == kEEp) return 0;
      else if(iSubdet == kEB) return 1;
      else return -1;
    }
  case kEcal3P:
    {
      int iSubdet(iSM);
      if(_btype == kDCC){
        if(iSM <= kEEmHigh) iSubdet = kEEm;
        else if(iSM <= kEBpHigh) iSubdet = kEB;
        else iSubdet = kEEp;
      }
      else if(_btype == kTCC){
        if(iSM <= kEEmTCCHigh) iSubdet = kEEm;
        else if(iSM <= kEBTCCHigh) iSubdet = kEB;
        else iSubdet = kEEp;
      }
      if(iSubdet == kEEm) return 0;
      else if(iSubdet == kEB) return 1;
      else if(iSubdet == kEEp) return 2;
      else return -1;
    }
  case kEcalMEM2P:
    {
      int iSubdet(iSM);
      if(iSubdet == kEE || iSubdet == kEEm || iSubdet == kEEp) return 0;
      else if(iSubdet == kEB) return 1;
      else return -1;
    }
  default:
    return -1;
  }
}
const std::vector< int > * EcalDQMBinningService::getBinMap ( ObjectType _okey,
BinningType _bkey 
) const

Definition at line 135 of file EcalDQMBinningService.cc.

References binMaps_, gather_cfg::cout, getBinMapEB_(), getBinMapEBMEM_(), getBinMapEcal_(), getBinMapEE_(), getBinMapEEMEM_(), getBinMapSM_(), getBinMapSMMEM_(), kCrystal, kEB, kEBMEM, kEcal, kEE, kEEm, kEEMEM, kEEp, kProjPhi, kSM, kSMMEM, kSuperCrystal, kTriggerTower, nPlotType, nPresetBinnings, findQualityFiles::size, and verbosity_.

Referenced by findBins(), and ecaldqm::MESetEcal::reset().

{
  if(unsigned(_okey) >= nPlotType || unsigned(_bkey) >= nPresetBinnings) return 0;

  if((_okey == kEEm || _okey == kEEp) && _bkey == kProjPhi)
    _okey = kEE;

  if(_bkey == kTriggerTower){
    if(_okey == kEB) _bkey = kSuperCrystal;
    else if(_okey == kEE || _okey == kEEm || _okey == kEEp) _bkey = kCrystal;
  }

  if(binMaps_[_okey][_bkey].size() != 0) return &(binMaps_[_okey][_bkey]);

  // Map is not defined yet (or is not going to be)

  const std::vector<int>* binMap(0);

  switch(_okey){
  case kEB:
    binMap = getBinMapEB_(_bkey);
    break;
  case kEBMEM:
    binMap = getBinMapEBMEM_(_bkey);
    break;
  case kEE:
    binMap = getBinMapEE_(_bkey, 0);
    break;
  case kEEm:
    binMap = getBinMapEE_(_bkey, -1);
    break;
  case kEEp:
    binMap = getBinMapEE_(_bkey, 1);
    break;
  case kEEMEM:
    binMap = getBinMapEEMEM_(_bkey);
    break;
  case kSM:
    binMap = getBinMapSM_(_bkey);
    break;
  case kSMMEM:
    binMap = getBinMapSMMEM_(_bkey);
    break;
  case kEcal:
    binMap = getBinMapEcal_(_bkey);
    break;
  default:
    return 0;
  }

  if(verbosity_ > 0){
    std::cout << "EcalDQMBinningService: Booked new binMap for " << int(_okey) << " " << int(_bkey);
    std::cout << " (Current memory usage: ";
    int bytes(0);
    for(unsigned iO(0); iO < nPlotType; iO++)
      for(unsigned iB(0); iB < nPresetBinnings; iB++)
        bytes += binMaps_[iO][iB].size() * sizeof(int);
    std::cout << bytes / 1024. << "kB)" << std::endl;
  }

  return binMap;
}
const std::vector< int > * EcalDQMBinningService::getBinMapEB_ ( BinningType  _bkey) const [private]

Definition at line 395 of file EcalDQMBinningService2.cc.

References eta(), ecalpyutils::hashedIndex(), i, ecaldqm::kCrystal, ecaldqm::kEBmLow, ecaldqm::kEBpHigh, EcalTrigTowerDetId::kEBTotalTowers, EBDetId::kSizeForDenseIndexing, ecaldqm::kSuperCrystal, phi, and Pi.

Referenced by getBinMap().

{
  std::vector<int>& binMap(binMaps_[kEB][_bkey]);

  switch(_bkey){
  case kCrystal:
    binMap.resize(EBDetId::kSizeForDenseIndexing); // EBDetId -> bin
    for(int ix = 1; ix <= 360; ix++){
      for(int iy = 1; iy <= 170; iy++){
        uint32_t dIndex(EBDetId(iy < 86 ? iy - 86 : iy - 85, ix).hashedIndex());
        binMap[dIndex] = 360 * (iy - 1) + ix ;
      }
    }
    return &binMap;

  case kSuperCrystal:
    binMap.resize(EcalTrigTowerDetId::kEBTotalTowers); // EcalTrigTowerDetId -> bin
    for(int ix = 1; ix <= 72; ix++){
      for(int iy = 1; iy <= 34; iy++){
        int ieta(iy < 18 ? (iy - 18) * 5 : (iy - 17) * 5);
        int iphi(ix * 5);
        uint32_t dIndex(EBDetId(ieta, iphi).tower().hashedIndex());
        binMap[dIndex] = 72 * (iy - 1) + ix;
      }
    }
    return &binMap;

  case kDCC:
    {
      int nEBDCC(kEBpHigh - kEBmLow + 1);
      binMap.resize(nEBDCC); // DCCId (shifted) -> bin
      for(int ix = 1; ix <= nEBDCC; ix++)
        binMap[ix - 1] = ix;
    }
    return &binMap;

  case kTCC:
    {
      int nEBTCC(kEBTCCHigh - kEBTCCLow + 1);
      binMap.resize(nEBTCC); // TCCId (shifted) -> bin
      for(int ix = 1; ix <= nEBTCC; ix++)
        binMap[ix - 1] = ix;
    }
    return &binMap;

  case kProjEta:
    {
      float binEdges[nEBEtaBins + 1];
      for(int i(0); i <= nEBEtaBins; i++)
        binEdges[i] = -etaBound_ + 2. * etaBound_ / nEBEtaBins * i;
      binMap.resize(170); // ieta -> bin
      for(int ieta(-85); ieta <= 85; ieta++){
        if(ieta == 0) continue;
        EBDetId ebid(ieta, 1);
        float eta(geometry_->getGeometry(ebid)->getPosition().eta());
        float* pBin(std::upper_bound(binEdges, binEdges + nEBEtaBins + 1, eta));
        uint32_t dIndex(ieta < 0 ? ieta + 85 : ieta + 84);
        binMap[dIndex] = static_cast<int>(pBin - binEdges);
      }
    }
    return &binMap;

  case kProjPhi:
    {
      float binEdges[nPhiBins + 1];
      for(int i(0); i <= nPhiBins; i++)
        binEdges[i] = TMath::Pi() * (-1./18. + 2. / nPhiBins * i);
      binMap.resize(360); // iphi -> bin
      for(int iphi(1); iphi <= 360; iphi++){
        EBDetId ebid(1, iphi);
        float phi(geometry_->getGeometry(ebid)->getPosition().phi());
        if(phi < -TMath::Pi() * 1./18.) phi += 2. * TMath::Pi();
        float* pBin(std::upper_bound(binEdges, binEdges + nPhiBins + 1, phi));
        uint32_t dIndex(iphi - 1);
        binMap[dIndex] = static_cast<int>(pBin - binEdges);
      }
    }
    return &binMap;

  default:
    return 0;
  }
}
const std::vector< int > * EcalDQMBinningService::getBinMapEBMEM_ ( BinningType  _bkey) const [private]

Definition at line 480 of file EcalDQMBinningService2.cc.

References ecaldqm::kCrystal, ecaldqm::kEBmLow, ecaldqm::kEBpHigh, and ecaldqm::kEBpLow.

Referenced by getBinMap().

{
  if(_bkey != kCrystal) return 0;

  int nEBMEM((kEBpHigh - kEBmLow + 1) * 10);
  std::vector<int>& binMap(binMaps_[kEBMEM][kCrystal]);

  binMap.resize(nEBMEM); // EcalPnDiodeDetId -> bin; original hashing (DCCId * 10 + PnId)
  for(int ix = 1; ix <= 18; ix++){
    for(int iy = 1; iy <= 20; iy++){
      int idcc((iy < 11 ? kEBmLow : kEBpLow) + ix - 1);
      int pnId(iy < 11 ? 11 - iy : iy - 10);
      uint32_t dIndex((idcc - kEBmLow) * 10 + pnId - 1);
      binMap[dIndex] = 18 * (iy - 1) + ix;
    }
  }
  return &binMap;
}
const std::vector< int > * EcalDQMBinningService::getBinMapEcal_ ( BinningType  _bkey) const [private]

Definition at line 837 of file EcalDQMBinningService2.cc.

References eta(), EEDetId::hashedIndex(), ecalpyutils::hashedIndex(), i, ecaldqm::kCrystal, EcalTrigTowerDetId::kEBTotalTowers, EEDetId::kEEhalf, ecaldqm::kEEmLow, ecaldqm::kEEpHigh, EBDetId::kSizeForDenseIndexing, EEDetId::kSizeForDenseIndexing, EcalScDetId::kSizeForDenseIndexing, ecaldqm::kSuperCrystal, phi, Pi, EcalScDetId::SC_PER_EE_CNT, EEDetId::validDetId(), and EcalScDetId::validDetId().

Referenced by getBinMap().

{
  std::vector<int>& binMap(binMaps_[kEcal][_bkey]);

  switch(_bkey){
  case kCrystal:
    binMap.resize(EBDetId::kSizeForDenseIndexing + EEDetId::kSizeForDenseIndexing); // DetId -> bin
    for(int ix = 1; ix <= 360; ix++){
      for(int iy = 101; iy <= 270; iy++){
        uint32_t dIndex(EBDetId(iy < 186 ? iy - 186 : iy - 185, ix).hashedIndex() + EEDetId::kEEhalf);
        binMap[dIndex] = 360 * (iy - 1) + ix ;
      }
    }
    for(int ix = 1; ix <= 200; ix++){
      int iix(ix > 100 ? ix - 100 : ix);
      int zside(ix > 100 ? 1 : -1);
      for(int iy = 1; iy <= 100; iy++){
        if(!EEDetId::validDetId(iix, iy, zside)) continue;
        uint32_t dIndex(EEDetId(iix, iy, zside).hashedIndex());
        if(zside == 1) dIndex += EBDetId::kSizeForDenseIndexing;
        binMap[dIndex] = 360 * (iy - 1) + ix;
      }
    }
    return &binMap;

  case kSuperCrystal:
    binMap.resize(EcalTrigTowerDetId::kEBTotalTowers + EcalScDetId::kSizeForDenseIndexing); // EcalTrigTowerDetId -> bin
    for(int ix = 1; ix <= 72; ix++){
      for(int iy = 21; iy <= 54; iy++){
        int ieta(iy < 38 ? (iy - 38) * 5 : (iy - 37) * 5);
        int iphi(ix * 5);
        uint32_t dIndex(EBDetId(ieta, iphi).tower().hashedIndex() + EcalScDetId::SC_PER_EE_CNT);
        binMap[dIndex] = 72 * (iy - 1) + ix;
      }
    }
    for(int ix = 1; ix <= 40; ix++){
      int iix((ix - 1) % 20 + 1);
      int zside(ix > 20 ? 1 : -1);
      for(int iy = 1; iy <= 20; iy++){
        if(!EcalScDetId::validDetId(iix, iy, zside)) continue;
        uint32_t dIndex(EcalScDetId(iix, iy, zside).hashedIndex());
        if(zside == 1) dIndex += EcalTrigTowerDetId::kEBTotalTowers;
        binMap[dIndex] = 72 * (iy - 1) + ix;
      }
    }
    return &binMap;

  case kProjEta:
    {
      float binEdges[nEBEtaBins + 2 * nEEEtaBins + 1];
      for(int i(0); i <= nEEEtaBins; i++)
        binEdges[i] = -3. + (3. - etaBound_) / nEEEtaBins * i;
      for(int i(1); i <= nEBEtaBins; i++)
        binEdges[i + nEEEtaBins] = -etaBound_ + 2. * etaBound_ / nEBEtaBins * i;
      for(int i(1); i <= nEEEtaBins; i++)
        binEdges[i + nEEEtaBins + nEBEtaBins] = etaBound_ + (3. - etaBound_) / nEEEtaBins * i;

      float* lowEdge(binEdges);
      binMap.resize(170 + EEDetId::kEEhalf); // EEDetId (half) -> bin
      for(int ix = 1; ix <= 100; ix++){
        for(int iy = 1; iy <= 50; iy++){
          if(!EEDetId::validDetId(ix, iy, -1)) continue;
          EEDetId eeid(ix, iy, -1);
          float eta(geometry_->getGeometry(eeid)->getPosition().eta());
          float* pBin(std::upper_bound(lowEdge, lowEdge + nEEEtaBins + 1, eta));
          uint32_t dIndex(eeid.hashedIndex());
          binMap[dIndex] = static_cast<int>(pBin - binEdges);
        }    
      }
      lowEdge += nEEEtaBins;
      for(int ieta(-85); ieta <= 85; ieta++){
        if(ieta == 0) continue;
        EBDetId ebid(ieta, 1);
        float eta(geometry_->getGeometry(ebid)->getPosition().eta());
        float* pBin(std::upper_bound(lowEdge, lowEdge + nEBEtaBins + 1, eta));
        uint32_t dIndex(ieta < 0 ? ieta + 85 : ieta + 84);
        dIndex += EEDetId::kEEhalf / 2;
        binMap[dIndex] = static_cast<int>(pBin - binEdges);
      }
      lowEdge += nEBEtaBins;
      for(int ix = 1; ix <= 100; ix++){
        for(int iy = 1; iy <= 50; iy++){
          if(!EEDetId::validDetId(ix, iy, 1)) continue;
          EEDetId eeid(ix, iy, 1);
          float eta(geometry_->getGeometry(eeid)->getPosition().eta());
          float* pBin(std::upper_bound(lowEdge, lowEdge + nEEEtaBins + 1, eta));
          uint32_t dIndex(eeid.hashedIndex() - EEDetId::kEEhalf / 2 + 170);
          binMap[dIndex] = static_cast<int>(pBin - binEdges);
        }    
      }
    }
    return &binMap;

  case kProjPhi:
    {
      float binEdges[nPhiBins + 1];
      for(int i(0); i <= nPhiBins; i++)
        binEdges[i] = TMath::Pi() * (-1./18. + 2. / nPhiBins * i);
      binMap.resize(360 + EEDetId::kEEhalf); // EEDetId(-) -> bin
      for(int ix = 1; ix <= 100; ix++){
        for(int iy = 1; iy <= 100; iy++){
          if(!EEDetId::validDetId(ix, iy, -1)) continue;
          EEDetId eeid(ix, iy, -1);
          float phi(geometry_->getGeometry(eeid)->getPosition().phi());
          if(phi < -TMath::Pi() * 1./18.) phi += 2. * TMath::Pi();
          float* pBin(std::upper_bound(binEdges, binEdges + nPhiBins + 1, phi));
          uint32_t dIndex(eeid.hashedIndex());
          binMap[dIndex] = static_cast<int>(pBin - binEdges);
        }    
      }
      for(int iphi(1); iphi <= 360; iphi++){
        EBDetId ebid(1, iphi);
        float phi(geometry_->getGeometry(ebid)->getPosition().phi());
        if(phi < -TMath::Pi() * 1./18.) phi += 2. * TMath::Pi();
        float* pBin(std::upper_bound(binEdges, binEdges + nPhiBins + 1, phi));
        uint32_t dIndex(iphi - 1 + EEDetId::kEEhalf);
        binMap[dIndex] = static_cast<int>(pBin - binEdges);
      }
    }
    return &binMap;

  case kTCC:
    binMap.resize(nTCC);
    for(int ix = 1; ix <= nTCC; ix++)
      binMap[ix - 1] = ix;
    return &binMap;

  case kDCC:
    binMap.resize(nDCC);
    for(int ix(kEEmLow); ix <= kEEpHigh; ix++)
      binMap[ix] = ix + 1;
    return &binMap;

  default:
    return 0;
  }
}
const std::vector< int > * EcalDQMBinningService::getBinMapEE_ ( BinningType  _bkey,
int  _zside 
) const [private]

Definition at line 500 of file EcalDQMBinningService2.cc.

References eta(), EEDetId::hashedIndex(), ecalpyutils::hashedIndex(), i, ecaldqm::kCrystal, EEDetId::kEEhalf, ecaldqm::kEEm, ecaldqm::kEEmHigh, ecaldqm::kEEmLow, ecaldqm::kEEp, ecaldqm::kEEpHigh, ecaldqm::kEEpLow, EEDetId::kSizeForDenseIndexing, EcalScDetId::kSizeForDenseIndexing, ecaldqm::kSuperCrystal, phi, Pi, EcalScDetId::SC_PER_EE_CNT, EEDetId::validDetId(), and EcalScDetId::validDetId().

Referenced by getBinMap().

{
  unsigned okey(0);
  switch(_zside){
  case -1: okey = kEEm; break;
  case 0: okey = kEE; break;
  case 1: okey = kEEp; break;
  default: return 0;
  }

  std::vector<int>& binMap(binMaps_[okey][_bkey]);

  int ixmax(_zside == 0 ? 200 : 100);
  int zside(_zside);

  switch(_bkey){
  case kCrystal: // EEDetId -> bin
    binMap.resize(_zside == 0 ? EEDetId::kSizeForDenseIndexing : EEDetId::kEEhalf);
    for(int ix = 1; ix <= ixmax; ix++){
      if(_zside == 0) zside = (ix <= 100 ? -1 : 1);
      int iix(_zside == 0 && ix > 100 ? ix - 100 : ix);
      for(int iy = 1; iy <= 100; iy++){
        if(!EEDetId::validDetId(iix, iy, zside)) continue;
        uint32_t dIndex(EEDetId(iix, iy, zside).hashedIndex());
        if(_zside == 1) dIndex -= EEDetId::kEEhalf;
        binMap[dIndex] = ixmax * (iy - 1) + ix;
      }
    }
    return &binMap;

  case kSuperCrystal: // EcalScDetId -> bin
    binMap.resize(_zside == 0 ? EcalScDetId::kSizeForDenseIndexing : EcalScDetId::SC_PER_EE_CNT);
    for(int ix = 1; ix <= ixmax / 5; ix++){
      if(_zside == 0) zside = (ix <= 20 ? -1 : 1);
      int iix(_zside == 0 && ix > 20 ? ix - 20 : ix);
      for(int iy = 1; iy <= 20; iy++){
        if(!EcalScDetId::validDetId(iix, iy, zside)) continue;
        uint32_t dIndex(EcalScDetId(iix, iy, zside).hashedIndex());
        if(_zside == 1) dIndex -= EcalScDetId::SC_PER_EE_CNT;
        binMap[dIndex] = ixmax / 5 * (iy - 1) + ix;
      }
    }
    return &binMap;

  case kDCC:
    {
      int nEEDCC(kEEmHigh - kEEmLow + kEEpHigh - kEEpLow + 2);
      if(_zside != 0) nEEDCC /= 2;
      binMap.resize(nEEDCC); // DCCId (shifted) -> bin
      for(int ix = 1; ix <= nEEDCC; ix++)
        binMap[ix - 1] = (ix + 5) % 9 + 1 + 9 * ((ix - 1) / 9);
    }
    return &binMap;

  case kTCC:
    {
      int nEETCC(kEEmTCCHigh - kEEmTCCLow + kEEpTCCHigh - kEEpTCCLow + 2);
      if(_zside != 0) nEETCC /= 2;
      binMap.resize(nEETCC); // TCCId (shifted) -> bin
      for(int ix = 1; ix <= nEETCC; ix++)
        binMap[ix - 1] = ix;
    }
    return &binMap;

  case kProjEta:
    {
      if(_zside == 0) return 0;

      float binEdges[nEEEtaBins + 1];
      if(_zside < 0){
        for(int i(0); i <= nEEEtaBins; i++)
          binEdges[i] = -3. + (3. - etaBound_) / nEEEtaBins * i;
      }
      else{
        for(int i(0); i <= nEEEtaBins; i++)
          binEdges[i] = etaBound_ + (3. - etaBound_) / nEEEtaBins * i;
      }
      binMap.resize(EEDetId::kEEhalf / 2); // EEDetId (half) -> bin
      // Only a quadrant is really necessary, but the hashed index cannot be resolved for quadrants
      for(int ix = 1; ix <= 100; ix++){
        for(int iy = 1; iy <= 50; iy++){
          if(!EEDetId::validDetId(ix, iy, _zside)) continue;
          EEDetId eeid(ix, iy, _zside);
          float eta(geometry_->getGeometry(eeid)->getPosition().eta());
          float* pBin(std::upper_bound(binEdges, binEdges + nEEEtaBins + 1, eta));
          uint32_t dIndex(eeid.hashedIndex());
          if(_zside == 1) dIndex -= EEDetId::kEEhalf;
          binMap[dIndex] = static_cast<int>(pBin - binEdges);
        }    
      }
    }
    return &binMap;

  case kProjPhi:
    {
      if(_zside != 0) return 0;

      float binEdges[nPhiBins + 1];
      for(int i(0); i <= nPhiBins; i++)
        binEdges[i] = TMath::Pi() * (-1./18. + 2. / nPhiBins * i);
      binMap.resize(EEDetId::kEEhalf); // EEDetId(-) -> bin
      for(int ix = 1; ix <= 100; ix++){
        for(int iy = 1; iy <= 100; iy++){
          if(!EEDetId::validDetId(ix, iy, -1)) continue;
          EEDetId eeid(ix, iy, -1);
          float phi(geometry_->getGeometry(eeid)->getPosition().phi());
          if(phi < -TMath::Pi() * 1./18.) phi += 2. * TMath::Pi();
          float* pBin(std::upper_bound(binEdges, binEdges + nPhiBins + 1, phi));
          uint32_t dIndex(eeid.hashedIndex());
          binMap[dIndex] = static_cast<int>(pBin - binEdges);
        }    
      }
    }
    return &binMap;

  default:
    return 0;
  }
}
const std::vector< int > * EcalDQMBinningService::getBinMapEEMEM_ ( BinningType  _bkey) const [private]

Definition at line 621 of file EcalDQMBinningService2.cc.

References ecaldqm::dccNoMEM, ecaldqm::kCrystal, ecaldqm::kEBmLow, ecaldqm::kEEmHigh, ecaldqm::kEEmLow, ecaldqm::kEEpHigh, ecaldqm::kEEpLow, and evf::evtn::offset().

Referenced by getBinMap().

{
  if(_bkey != kCrystal) return 0;

  std::vector<int>& binMap(binMaps_[kEEMEM][kCrystal]);

  binMap.resize((kEEmHigh - kEEmLow + kEEpHigh - kEEpLow + 2) * 10); // EcalPnDiodeDetId -> bin (see above)
  int memIx(1);
  int iEEDCC(-1);
  int offset(0);
  for(int iSM(kEEmLow); iSM <= kEEpHigh; iSM++){
    iEEDCC++;
    if (dccNoMEM.find(iSM) != dccNoMEM.end()) {
      for (int ich(0); ich < 10; ich++)
        binMap[iEEDCC * 10 + ich] = 0;
      continue;
    }
    if (iSM == kEBmLow) {
      iSM = kEEpLow;
      offset = 10;
      memIx = 1;
    }
    for(int iy = 1 + offset; iy <= 10 + offset; iy++){
      int pnId(iy < 11 ? 11 - iy : iy - 10);
      uint32_t dIndex(iEEDCC * 10 + pnId - 1);
      binMap[dIndex] = 4 * (iy - 1) + memIx;
    }
    memIx++;
  }

  return &binMap;
}
const std::vector< int > * EcalDQMBinningService::getBinMapSM_ ( BinningType  _bkey) const [private]

Definition at line 655 of file EcalDQMBinningService2.cc.

References ecaldqm::getElectronicsMap(), ecalpyutils::hashedIndex(), i, errorMatrix2Lands_multiChannel::id, ecaldqm::kCrystal, ecaldqm::kEBmLow, ecaldqm::kEBpHigh, ecaldqm::kEBpLow, EcalTrigTowerDetId::kEBTotalTowers, EEDetId::kEEhalf, ecaldqm::kEEm02, ecaldqm::kEEm08, ecaldqm::kEEmHigh, ecaldqm::kEEp02, ecaldqm::kEEp08, ecaldqm::kEEpLow, EBDetId::kSizeForDenseIndexing, EcalScDetId::kSizeForDenseIndexing, EEDetId::kSizeForDenseIndexing, ecaldqm::kSM, ecaldqm::kSuperCrystal, ecaldqm::kTriggerTower, EcalScDetId::SC_PER_EE_CNT, and EcalScDetId::validDetId().

Referenced by getBinMap().

{
  int totalBins(0);

  std::vector<int>& binMap(binMaps_[kSM][_bkey]);

  switch(_bkey){
  case kCrystal:
    binMap.resize(EBDetId::kSizeForDenseIndexing + EEDetId::kSizeForDenseIndexing);
    for (int iDCC(0); iDCC < nDCC; iDCC++) {
      if(iDCC >= kEBmLow && iDCC <= kEBpHigh){
        for(int ix = 1; ix <= nEBSMEta; ix++){
          for(int iy = 1; iy <= nEBSMPhi; iy++){
            int ieta(ix + xlow(iDCC));
            int iphi(iy + ylow(iDCC));
            if (iDCC >= kEBpLow){
              iphi -= 1;
              iphi *= -1;
            }
            else
              ieta *= -1;

            uint32_t dIndex(EBDetId(ieta, iphi).hashedIndex() + EEDetId::kEEhalf);
            binMap[dIndex] = totalBins + nEBSMEta * (iy - 1) + ix;
          }
        }
        totalBins += nEBSMBins;
      }
      else{
        std::vector<DetId> crystals(getElectronicsMap()->dccConstituents(iDCC + 1));
        int nEEX(nEESMX), nEEBins(nEESMBins);
        if(iDCC == kEEm02 || iDCC == kEEm08 || iDCC == kEEp02 || iDCC == kEEp08){
          nEEX = nEESMXExt;
          nEEBins = nEESMBinsExt;
        }
        for(std::vector<DetId>::iterator idItr(crystals.begin()); idItr != crystals.end(); ++idItr){
          EEDetId id(*idItr);
          uint32_t dIndex(id.hashedIndex());
          int ix(id.ix() - xlow(iDCC));
          int iy(id.iy() - ylow(iDCC));
          if (id.zside() > 0)
            dIndex += EBDetId::kSizeForDenseIndexing;

          binMap[dIndex] = totalBins + nEEX * (iy - 1) + ix;
        }
        totalBins += nEEBins;
      }
    }
    return &binMap;

  case kSuperCrystal:
    binMap.resize(EcalTrigTowerDetId::kEBTotalTowers + EcalScDetId::kSizeForDenseIndexing); // EcalTrigTowerDetId / EcalScDetId -> bin

    for(int iSM(0); iSM < nDCC; iSM++){
      if(iSM >= kEBmLow && iSM <= kEBpHigh){
        for(int ix = 1; ix <= nEBSMEta; ix += 5){
          for(int iy = 1; iy <= nEBSMPhi; iy += 5){
            int ieta(ix + xlow(iSM));
            int iphi(iy + ylow(iSM));
            if(iSM >= kEBpLow){
              iphi -= 1;
              iphi *= -1;
            }
            else
              ieta *= -1;
            uint32_t dIndex(EBDetId(ieta, iphi).tower().hashedIndex());
            binMap[dIndex + EcalScDetId::SC_PER_EE_CNT] = totalBins + nEBSMEta / 5 * (iy - 1) / 5 + (ix - 1) / 5 + 1;
          }
        }
        totalBins += nEBSMBins / 25;
      }
      else{
        int nEEX(nEESMX), nEEBins(nEESMBins);
        if(iSM == kEEm02 || iSM == kEEm08 || iSM == kEEp02 || iSM == kEEp08){
          nEEX = nEESMXExt;
          nEEBins = nEESMBinsExt;
        }
        for (int ix(1); ix <= nEEX / 5; ix++) {
          for (int iy(1); iy <= nEESMY / 5; iy++) {
            int sciz(1);
            if (iSM <= kEEmHigh) sciz = -1;
            int scix(ix + xlow(iSM) / 5);
            int sciy(iy + ylow(iSM) / 5);
            if(scix <= 0 || scix > 20 || sciy <= 0 || sciy > 20) continue;
            if(!EcalScDetId::validDetId(scix, sciy, sciz)) continue;
            uint32_t dIndex(EcalScDetId(scix, sciy, sciz).hashedIndex());
            if(sciz > 0) dIndex += EcalTrigTowerDetId::kEBTotalTowers;
            binMap[dIndex] = totalBins + nEEX / 5 * (iy - 1) + ix;
          }
        }
        totalBins += nEEBins / 25;
      }
    }
    return &binMap;

  case kTriggerTower:
    binMap.resize(EcalTrigTowerDetId::kEBTotalTowers + EEDetId::kSizeForDenseIndexing); // EcalTrigTowerDetId / EEDetId -> bin

    for(int iSM(0); iSM < nDCC; iSM++){
      if(iSM >= kEBmLow && iSM <= kEBpHigh){
        for(int ix = 1; ix <= nEBSMEta; ix += 5){
          for(int iy = 1; iy <= nEBSMPhi; iy += 5){
            int ieta(ix + xlow(iSM));
            int iphi(iy + ylow(iSM));
            if(iSM >= kEBpLow){
              iphi -= 1;
              iphi *= -1;
            }
            else
              ieta *= -1;
            uint32_t dIndex(EBDetId(ieta, iphi).tower().hashedIndex());
            binMap[dIndex + EEDetId::kEEhalf] = totalBins + nEBSMEta / 5 * (iy - 1) / 5 + (ix - 1) / 5 + 1;
          }
        }
        totalBins += nEBSMBins / 25;
      }
      else{
        int nEEX(nEESMX), nEEBins(nEESMBins);
        if(iSM == kEEm02 || iSM == kEEm08 || iSM == kEEp02 || iSM == kEEp08){
          nEEX = nEESMXExt;
          nEEBins = nEESMBinsExt;
        }

        int tccid[4];
        tccid[0] = ((iSM % 9) * 2 + 17) % 18 + 1;
        tccid[1] = tccid[0] % 18 + 1;
        tccid[2] = tccid[0] + 18;
        tccid[3] = tccid[1] + 18;
        if(iSM >= int(kEEpLow))
          for(int i(0); i < 4; i++) tccid[i] += kEEpTCCLow;
        for(int it(0); it < 4; it++){
          std::vector<DetId> crystals(getElectronicsMap()->tccConstituents(tccid[it]));
          for(std::vector<DetId>::iterator idItr(crystals.begin()); idItr != crystals.end(); ++idItr){
            EEDetId id(*idItr);
            uint32_t dIndex(id.hashedIndex());
            int ix(id.ix() - xlow(iSM));
            int iy(id.iy() - ylow(iSM));
            if (id.zside() > 0)
              dIndex += EcalTrigTowerDetId::kEBTotalTowers;

            binMap[dIndex] = totalBins + nEEX * (iy - 1) + ix;
          }
        }
        totalBins += nEEBins;
      }
    }
    return &binMap;

  default:
    return 0;
  }
}
const std::vector< int > * EcalDQMBinningService::getBinMapSMMEM_ ( BinningType  _bkey) const [private]

Definition at line 809 of file EcalDQMBinningService2.cc.

References ecaldqm::dccNoMEM, ecaldqm::kCrystal, and ecaldqm::kEBmHigh.

Referenced by getBinMap().

{
  if(_bkey != kCrystal) return 0;

  int totalBins(0);

  std::vector<int>& binMap(binMaps_[kSMMEM][_bkey]);

  binMap.resize(nDCC * 10); // EcalPnDiodeDetId -> bin (see above)
  for(int iSM(0); iSM < nDCC; iSM++){
    if (dccNoMEM.find(iSM) != dccNoMEM.end()) {
      for (int ich(0); ich < 10; ich++)
        binMap[iSM * 10 + ich] = 0;
      continue;
    }
    for(int ix = 1; ix <= 10; ix++){
      int pnId(iSM <= kEBmHigh ? 11 - ix : ix);
      uint32_t dIndex(iSM * 10 + pnId - 1);
      binMap[dIndex] = totalBins + ix;
    }

    totalBins += 10;
  }

  return &binMap;
}
std::vector< EcalDQMBinningService::AxisSpecs > EcalDQMBinningService::getBinning ( ObjectType  _otype,
BinningType  _btype,
bool  _isMap = true,
unsigned  _objOffset = 0 
) const

Definition at line 66 of file EcalDQMBinningService.cc.

References getBinningEB_(), getBinningEBMEM_(), getBinningEcal_(), getBinningEE_(), getBinningEEMEM_(), getBinningSM_(), getBinningSMMEM_(), kEB, kEBMEM, kEcal, kEE, kEEm, kEEMEM, kEEp, kSM, kSMMEM, nObjType, and nPresetBinnings.

Referenced by ecaldqm::MESetEcal::book().

{
  if(_otype >= nObjType || _btype >= unsigned(nPresetBinnings))
    return std::vector<AxisSpecs>(0); // you are on your own

  switch(_otype){
  case kEB:
    return getBinningEB_(_btype, _isMap);
  case kEBMEM:
    return getBinningEBMEM_(_btype, _isMap);
  case kEE:
    return getBinningEE_(_btype, _isMap, 0);
  case kEEm:
    return getBinningEE_(_btype, _isMap, -1);
  case kEEp:
    return getBinningEE_(_btype, _isMap, 1);
  case kEEMEM:
    return getBinningEEMEM_(_btype, _isMap);
  case kSM:
    return getBinningSM_(_btype, _isMap, _objOffset);
  case kSMMEM:
    return getBinningSMMEM_(_btype, _isMap, _objOffset);
  case kEcal:
    return getBinningEcal_(_btype, _isMap);
  default:
    return std::vector<AxisSpecs>(0);
  }
}
std::vector< EcalDQMBinningService::AxisSpecs > EcalDQMBinningService::getBinningEB_ ( BinningType  _btype,
bool  _isMap 
) const [private]

Definition at line 16 of file EcalDQMBinningService2.cc.

References EcalDQMBinningService::AxisSpecs::high, ecaldqm::kCrystal, ecaldqm::kSuperCrystal, ecaldqm::kTriggerTower, EcalDQMBinningService::AxisSpecs::low, EcalDQMBinningService::AxisSpecs::nbins, Pi, and EcalDQMBinningService::AxisSpecs::title.

Referenced by getBinning().

{
  std::vector<AxisSpecs> axes(0);
  AxisSpecs xaxis, yaxis;

  if(!_isMap){

    switch(_btype){
//     case kTriggerTower:
//     case kSuperCrystal:
//       xaxis.nbins = 2448;
//       xaxis.low = 0.;
//       xaxis.high = 2448.;
//       xaxis.title = "iTT";
//       break;
    case kTCC:
      xaxis.nbins = 36;
      xaxis.low = 9.;
      xaxis.high = 45.;
      xaxis.title = "iTCC";
      break;
    case kDCC:
      xaxis.nbins = 36;
      xaxis.low = 9.;
      xaxis.high = 45.;
      break;
    case kProjEta:
      xaxis.nbins = nEBEtaBins;
      xaxis.low = -etaBound_;
      xaxis.high = etaBound_;
      xaxis.title = "eta";
      break;
    case kProjPhi:
      xaxis.nbins = nPhiBins;
      xaxis.low = -TMath::Pi() / 18.;
      xaxis.high = TMath::Pi() * 35./18.;
      xaxis.title = "phi";
      break;
    default:
      return axes;
    }

    axes.push_back(xaxis);

  }
  else{

    switch(_btype){
    case kCrystal:
      xaxis.nbins = 360;
      yaxis.nbins = 170;
      break;
    case kSuperCrystal:
    case kTriggerTower:
      xaxis.nbins = 72;
      yaxis.nbins = 34;
      break;
    default:
      return axes;
    }

    xaxis.low = 0.;
    xaxis.high = 360.;
    xaxis.title = "iphi";
    yaxis.low = -85.;
    yaxis.high = 85.;
    yaxis.title = "ieta";

    axes.push_back(xaxis);
    axes.push_back(yaxis);

  }

  return axes;
}
std::vector< EcalDQMBinningService::AxisSpecs > EcalDQMBinningService::getBinningEBMEM_ ( BinningType  _btype,
bool  _isMap 
) const [private]

Definition at line 93 of file EcalDQMBinningService2.cc.

References EcalDQMBinningService::AxisSpecs::high, ecaldqm::kCrystal, EcalDQMBinningService::AxisSpecs::low, EcalDQMBinningService::AxisSpecs::nbins, and EcalDQMBinningService::AxisSpecs::title.

Referenced by getBinning().

{ 
  std::vector<AxisSpecs> axes(0);
  AxisSpecs xaxis, yaxis;

  if(_btype != kCrystal || !_isMap) return axes;

  xaxis.nbins = 18;
  xaxis.low = 0.;
  xaxis.high = 18.;
  xaxis.title = "channel";

  yaxis.nbins = 20;
  yaxis.low = -10.;
  yaxis.high = 10.;
  yaxis.title = "pseudo-strip";

  axes.push_back(xaxis);
  axes.push_back(yaxis);

  return axes;
}
std::vector< EcalDQMBinningService::AxisSpecs > EcalDQMBinningService::getBinningEcal_ ( BinningType  _btype,
bool  _isMap 
) const [private]

Definition at line 321 of file EcalDQMBinningService2.cc.

References EcalDQMBinningService::AxisSpecs::edges, EcalDQMBinningService::AxisSpecs::high, i, ecaldqm::kCrystal, ecaldqm::kSuperCrystal, EcalDQMBinningService::AxisSpecs::low, EcalDQMBinningService::AxisSpecs::nbins, Pi, and EcalDQMBinningService::AxisSpecs::title.

Referenced by getBinning().

{
  std::vector<AxisSpecs> axes(0);
  AxisSpecs xaxis, yaxis;

  if(!_isMap){

    switch(_btype){
    case kTCC:
      xaxis.nbins = 108;
      xaxis.low = 0.;
      xaxis.high = 108.;
      xaxis.title = "iTCC";
      break;
    case kDCC:
      xaxis.nbins = 54;
      xaxis.low = 0.;
      xaxis.high = 54.;
      break;
    case kProjEta:
      xaxis.nbins = nEBEtaBins + 2 * nEEEtaBins;
      xaxis.edges = new double[xaxis.nbins + 1];
      for(int i(0); i <= nEEEtaBins; i++)
        xaxis.edges[i] = -3. + (3. - etaBound_) / nEEEtaBins * i;
      for(int i(1); i <= nEBEtaBins; i++)
        xaxis.edges[i + nEEEtaBins] = -etaBound_ + 2. * etaBound_ / nEBEtaBins * i;
      for(int i(1); i <= nEEEtaBins; i++)
        xaxis.edges[i + nEEEtaBins + nEBEtaBins] = etaBound_ + (3. - etaBound_) / nEEEtaBins * i;
      xaxis.title = "eta";
      break;
    case kProjPhi:
      xaxis.nbins = nPhiBins;
      xaxis.low = -TMath::Pi() / 18.;
      xaxis.high = TMath::Pi() * 35./18.;
      xaxis.title = "phi";
      break;
    default:
      return axes;
    }

    axes.push_back(xaxis);
  }
  else{

    switch(_btype){
    case kCrystal:
      xaxis.nbins = 360;
      yaxis.nbins = 270;
      break;
    case kSuperCrystal:
      xaxis.nbins = 72;
      yaxis.nbins = 54;
      break;
    default:
      return axes;
    }

    xaxis.low = 0.;
    xaxis.high = 360.;
    xaxis.title = "iphi/ix/ix+100";
    yaxis.low = 0.;
    yaxis.high = 270.;
    yaxis.title = "ieta/iy";

    axes.push_back(xaxis);
    axes.push_back(yaxis);

  }

  return axes;
}
std::vector< EcalDQMBinningService::AxisSpecs > EcalDQMBinningService::getBinningEE_ ( BinningType  _btype,
bool  _isMap,
int  _zside 
) const [private]

Definition at line 117 of file EcalDQMBinningService2.cc.

References EcalDQMBinningService::AxisSpecs::high, ecaldqm::kCrystal, ecaldqm::kSuperCrystal, ecaldqm::kTriggerTower, EcalDQMBinningService::AxisSpecs::low, EcalDQMBinningService::AxisSpecs::nbins, Pi, and EcalDQMBinningService::AxisSpecs::title.

Referenced by getBinning().

{
  std::vector<AxisSpecs> axes(0);
  AxisSpecs xaxis, yaxis;

  if(!_isMap){

    switch(_btype){
//     case kTriggerTower:
//       xaxis.nbins = _zside ? 720 : 1440;
//       xaxis.low = 0.;
//       xaxis.high = _zside ? 720. : 1440.;
//       xaxis.title = "iTT";
//       break;
//     case kSuperCrystal:
//       xaxis.nbins = _zside ? 312 : 624;
//       xaxis.low = 0.;
//       xaxis.high = _zside ? 312. : 624.;
//       xaxis.title = "iSC";
//       break;
    case kTCC:
      xaxis.nbins = _zside ? 36 : 72;
      xaxis.low = 0.;
      xaxis.high = _zside ? 36. : 72.;
      xaxis.title = "iTCC";
      break;
    case kDCC:
      xaxis.nbins = _zside ? 9 : 18;
      xaxis.low = 0.;
      xaxis.high = _zside ? 9. : 18.;
      break;
    case kProjEta:
      if(!_zside) return axes;
      xaxis.nbins = nEEEtaBins;
      xaxis.low = _zside < 0 ? -3. : etaBound_;
      xaxis.high = _zside < 0 ? -etaBound_ : 3.;
      xaxis.title = "eta";
      break;
    case kProjPhi:
      xaxis.nbins = nPhiBins;
      xaxis.low = -TMath::Pi() / 18.;
      xaxis.high = TMath::Pi() * 35./18.;
      xaxis.title = "phi";
      break;
    default:
      return axes;
    }

    axes.push_back(xaxis);

  }else{

    switch(_btype){
    case kCrystal:
    case kTriggerTower:
      xaxis.nbins = _zside ? 100 : 200;
      yaxis.nbins = 100;
      break;
    case kSuperCrystal:
      xaxis.nbins = _zside ? 20 : 40;
      yaxis.nbins = 20;
      break;
    default:
      return axes;
    }

    xaxis.low = 0.;
    xaxis.high = _zside ? 100. : 200.;
    xaxis.title = "ix";
    yaxis.low = 0.;
    yaxis.high = 100.;
    yaxis.title = "iy";

    axes.push_back(xaxis);
    axes.push_back(yaxis);

  }

  return axes;
}
std::vector< EcalDQMBinningService::AxisSpecs > EcalDQMBinningService::getBinningEEMEM_ ( BinningType  _btype,
bool  _isMap 
) const [private]

Definition at line 199 of file EcalDQMBinningService2.cc.

References EcalDQMBinningService::AxisSpecs::high, ecaldqm::kCrystal, EcalDQMBinningService::AxisSpecs::low, EcalDQMBinningService::AxisSpecs::nbins, and EcalDQMBinningService::AxisSpecs::title.

Referenced by getBinning().

{
  std::vector<AxisSpecs> axes(0);
  AxisSpecs xaxis, yaxis;

  if(_btype != kCrystal || !_isMap) return axes;

  xaxis.nbins = 4;
  xaxis.low = 0.;
  xaxis.high = 4.;
  xaxis.title = "channel";

  yaxis.nbins = 20;
  yaxis.low = -10.;
  yaxis.high = 10.;
  yaxis.title = "pseudo-strip";

  axes.push_back(xaxis);
  axes.push_back(yaxis);

  return axes;
}
std::vector< EcalDQMBinningService::AxisSpecs > EcalDQMBinningService::getBinningSM_ ( BinningType  _btype,
bool  _isMap,
unsigned  _offset 
) const [private]

Definition at line 223 of file EcalDQMBinningService2.cc.

References EcalElectronicsMapping::dccConstituents(), ecaldqm::getElectronicsMap(), ecaldqm::getNSuperCrystals(), EcalDQMBinningService::AxisSpecs::high, ecaldqm::kCrystal, ecaldqm::kEBmLow, ecaldqm::kEBpHigh, ecaldqm::kEBpLow, ecaldqm::kEEm02, ecaldqm::kEEm08, ecaldqm::kEEp02, ecaldqm::kEEp08, ecaldqm::kSuperCrystal, ecaldqm::kTriggerTower, EcalDQMBinningService::AxisSpecs::low, EcalDQMBinningService::AxisSpecs::nbins, and EcalDQMBinningService::AxisSpecs::title.

Referenced by getBinning().

{
  const bool isBarrel(_offset >= kEBmLow && _offset <= kEBpHigh);

  std::vector<AxisSpecs> axes(0);
  AxisSpecs xaxis, yaxis;

  if(!_isMap){

    switch(_btype){
    case kCrystal:
      xaxis.nbins = isBarrel ? 1700 : getElectronicsMap()->dccConstituents(_offset + 1).size();
      xaxis.low = 0.;
      xaxis.high = xaxis.nbins;
      xaxis.title = "channel";
      break;
    case kTriggerTower:
      xaxis.nbins = isBarrel ? 68 : 80;
      xaxis.low = 0.;
      xaxis.high = xaxis.nbins;
      xaxis.title = "tower";
      break;
    case kSuperCrystal:
      xaxis.nbins = isBarrel ? 68 : getNSuperCrystals(_offset + 1);
      xaxis.low = 0.;
      xaxis.high = xaxis.nbins;
      xaxis.title = "tower";
      break;
    default:
      return axes;
    }

    axes.push_back(xaxis);
    
  }else{

    int nEEX(nEESMX);
    if(_offset == kEEm02 || _offset == kEEm08 || _offset == kEEp02 || _offset == kEEp08) nEEX = nEESMXExt;

    switch(_btype){
    case kCrystal:
      xaxis.nbins = isBarrel ? nEBSMEta : nEEX;
      yaxis.nbins = isBarrel ? nEBSMPhi : nEESMY;
      break;
    case kTriggerTower:
      xaxis.nbins = isBarrel ? nEBSMEta / 5 : nEEX;
      yaxis.nbins = isBarrel ? nEBSMPhi / 5 : nEESMY;
      break;
    case kSuperCrystal:
      xaxis.nbins = isBarrel ? nEBSMEta / 5 : nEEX / 5;
      yaxis.nbins = isBarrel ? nEBSMPhi / 5 : nEESMY / 5;
      break;
    default:
      return axes;
    }
    xaxis.low = xlow(_offset);
    xaxis.high = xaxis.low + (isBarrel ? nEBSMEta : nEEX);
    xaxis.title = isBarrel ? (_offset < kEBpLow ? "-ieta" : "ieta") : "ix";
    yaxis.low = ylow(_offset);
    yaxis.high = yaxis.low + (isBarrel ? nEBSMPhi : nEESMY);
    yaxis.title = isBarrel ? "iphi" : "iy";

    axes.push_back(xaxis);
    axes.push_back(yaxis);

  }

  return axes;
}
std::vector< EcalDQMBinningService::AxisSpecs > EcalDQMBinningService::getBinningSMMEM_ ( BinningType  _btype,
bool  _isMap,
unsigned  _idcc 
) const [private]

Definition at line 294 of file EcalDQMBinningService2.cc.

References ecaldqm::dccNoMEM, EcalDQMBinningService::AxisSpecs::high, ecaldqm::kCrystal, ecaldqm::kEBpLow, EcalDQMBinningService::AxisSpecs::low, EcalDQMBinningService::AxisSpecs::nbins, and EcalDQMBinningService::AxisSpecs::title.

Referenced by getBinning().

{
  std::vector<AxisSpecs> axes(0);
  AxisSpecs xaxis, yaxis;

  if(dccNoMEM.find(_idcc) != dccNoMEM.end()) return axes;
  if(_btype != kCrystal) return axes;

  xaxis.nbins = 10;
  xaxis.low = _idcc >= kEBpLow ? 0. : -10.;
  xaxis.high = _idcc >= kEBpLow ? 10. : 0.;
  xaxis.title = "pseudo-strip";

  axes.push_back(xaxis);

  if(_isMap){
    yaxis.nbins = 1;
    yaxis.low = 0.;
    yaxis.high = 5.;
    yaxis.title = "channel";
    axes.push_back(yaxis);
  }

  return axes;
}
uint32_t EcalDQMBinningService::idFromName ( std::string const &  _name) const

Definition at line 640 of file EcalDQMBinningService.cc.

References ecaldqm::kEBmLow, ecaldqm::kEEmLow, ecaldqm::kEEpLow, mergeVDriftHistosByStation::name, nDCC, evf::evtn::offset(), EcalElectronicsId::rawId(), and EcalTriggerElectronicsId::rawId().

Referenced by ecaldqm::MESetChannel::checkDirectory().

{
  TString name(_name);
  TPRegexp re("(EB|EE)([+-][0-9][0-9])(?: TCC ([0-9]+)| DCC ([0-9]+) (CCU|TCC) ([0-9]+)(?: (?:TT|strip) ([0-9]+)(?: xtal ([0-9]+)|)|)|)");
  //            1      2                       3             4        5         6                        7                8
  uint32_t rawId(0);

  TObjArray* matches(re.MatchS(name));
  if(matches->GetEntries() == 0) return 0;
  else if(matches->GetEntries() == 3){
    TString subdet(static_cast<TObjString*>(matches->At(1))->GetString());
    if(subdet == "EB"){
      int dccid(static_cast<TObjString*>(matches->At(2))->GetString().Atoi());
      unsigned offset(0);
      if(dccid < 0){
        dccid *= -1;
        offset = kEEmLow;
      }
      else offset = kEEpLow;
      rawId = (dccid + 2) % 9 + 1 + offset;
    }
    else{
      int dccid(static_cast<TObjString*>(matches->At(2))->GetString().Atoi());
      if(dccid < 0) dccid *= -1;
      else dccid += 18;
      rawId = kEBmLow + dccid;
    }
  }
  else if(matches->GetEntries() == 4)
    rawId = static_cast<TObjString*>(matches->At(3))->GetString().Atoi() + nDCC;
  else{
    TString subtype(static_cast<TObjString*>(matches->At(5))->GetString());
    if(subtype == "TCC"){
      int tccid(static_cast<TObjString*>(matches->At(6))->GetString().Atoi());
      int ttid(static_cast<TObjString*>(matches->At(7))->GetString().Atoi());
      rawId = EcalTriggerElectronicsId(tccid, ttid, 1, 1).rawId();
    }
    else{
      int dccid(static_cast<TObjString*>(matches->At(4))->GetString().Atoi());
      int towerid(static_cast<TObjString*>(matches->At(6))->GetString().Atoi());
      if(matches->GetEntries() == 7)
        rawId = EcalElectronicsId(dccid, towerid, 1, 1).rawId();
      else{
        int stripid(static_cast<TObjString*>(matches->At(7))->GetString().Atoi());
        int xtalid(static_cast<TObjString*>(matches->At(8))->GetString().Atoi());
        rawId = EcalElectronicsId(dccid, towerid, stripid, xtalid).rawId();
      }
    }
  }
  
  delete matches;

  return rawId;
}
EcalDQMBinningService::ObjectType EcalDQMBinningService::objectFromOffset ( ObjectType  _otype,
unsigned  _offset 
) const

Definition at line 476 of file EcalDQMBinningService.cc.

References kEB, kEBMEM, kEcal2P, kEcal3P, kEcalMEM2P, kEE, kEEm, kEEMEM, kEEp, and nObjType.

Referenced by ecaldqm::MESetEcal::book(), findBins(), ecaldqm::MESetEcal::generateNames(), and ecaldqm::MESetEcal::reset().

{
  if(_otype == kEcal3P) {
    switch(_offset){
    case 0: return kEEm;
    case 1: return kEB;
    case 2: return kEEp;
    default: return nObjType;
    }
  }
  else if(_otype == kEcal2P){
    switch(_offset){
    case 0: return kEE;
    case 1: return kEB;
    default: return nObjType;
    }
  }
  else if(_otype == kEcalMEM2P){
    switch(_offset){
    case 0: return kEEMEM;
    case 1: return kEBMEM;
    default: return nObjType;
    }
  }
  else
    return _otype;
}
void EcalDQMBinningService::postBeginRun ( const edm::Run ,
const edm::EventSetup _es 
)

Definition at line 44 of file EcalDQMBinningService.cc.

References Exception, geometry_, edm::EventSetup::get(), initialized_, edm::ESHandle< T >::product(), ecaldqm::setElectronicsMap(), and ecaldqm::setTrigTowerMap().

Referenced by EcalDQMBinningService().

{
  // set up ecaldqm::electronicsMap in EcalDQMCommonUtils
  edm::ESHandle<EcalElectronicsMapping> elecMapHandle;
  _es.get<EcalMappingRcd>().get(elecMapHandle);
  setElectronicsMap(elecMapHandle.product());

  // set up ecaldqm::electronicsMap in EcalDQMCommonUtils
  edm::ESHandle<EcalTrigTowerConstituentsMap> ttMapHandle;
  _es.get<IdealGeometryRecord>().get(ttMapHandle);
  setTrigTowerMap(ttMapHandle.product());

  edm::ESHandle<CaloGeometry> geomHndl;
  _es.get<CaloGeometryRecord>().get(geomHndl);
  geometry_ = geomHndl.product();
  if(!geometry_)
    throw cms::Exception("EventSetup") << "CaloGeometry invalid";

  initialized_ = true;
}
int EcalDQMBinningService::smOffsetBins ( ObjectType  _otype,
BinningType  _btype,
unsigned  _offset 
) const

Definition at line 505 of file EcalDQMBinningService.cc.

References combineCards::bins, kCrystal, ecaldqm::kEBmLow, ecaldqm::kEEm02, ecaldqm::kEEm08, ecaldqm::kEEmLow, ecaldqm::kEEp02, ecaldqm::kEEp08, ecaldqm::kEEpLow, kSM, kSMMEM, kSuperCrystal, kTriggerTower, nEBSMBins, nEESMBins, nEESMBinsExt, and evf::evtn::offset().

Referenced by findBins(), and ecaldqm::MESetEcal::reset().

{
  if(!_offset) return 0;

  switch(_otype) {
  case kSM :
    {
      int bins(0);
      int offset(_offset);

      if(offset > kEEpLow){
        int ext(0);
        if(offset > kEEp02) ext += 1;
        if(offset > kEEp08) ext += 1;
        int offBins(nEESMBins * (offset - kEEpLow) + (nEESMBinsExt - nEESMBins) * ext);
        switch(_btype){
        case kCrystal:
        case kTriggerTower:
          bins += offBins; break;
        case kSuperCrystal:
          bins += offBins / 25; break;
        default:
          break;
        }
        offset = kEEpLow;
      }
      if(offset > kEBmLow){
        int offBins(nEBSMBins * (offset - kEBmLow));
        switch(_btype){
        case kCrystal:
          bins += offBins; break;
        case kTriggerTower:
        case kSuperCrystal:
          bins += offBins / 25; break;
        default:
          break;
        }
        offset = kEBmLow;
      }
      if(offset > kEEmLow){
        int ext(0);
        if(offset > kEEm02) ext += 1;
        if(offset > kEEm08) ext += 1;
        int offBins(nEESMBins * (offset - kEEmLow) + (nEESMBinsExt - nEESMBins) * ext);
        switch(_btype){
        case kCrystal:
        case kTriggerTower:
          bins += offBins; break;
        case kSuperCrystal:
          bins += offBins / 25; break;
        default:
          break;
        }
      }

      return bins;
    }
  case kSMMEM :
    {
      return _offset * 10;
    }
  default :
    break;
  }

  return 0;
}
int EcalDQMBinningService::xlow ( int  _iSM) const

Definition at line 96 of file EcalDQMBinningService.cc.

References ecaldqm::kEBmLow, ecaldqm::kEBpHigh, ecaldqm::kEEm01, ecaldqm::kEEm02, ecaldqm::kEEm03, ecaldqm::kEEm04, ecaldqm::kEEm05, ecaldqm::kEEm06, ecaldqm::kEEm07, ecaldqm::kEEm08, ecaldqm::kEEm09, ecaldqm::kEEp01, ecaldqm::kEEp02, ecaldqm::kEEp03, ecaldqm::kEEp04, ecaldqm::kEEp05, ecaldqm::kEEp06, ecaldqm::kEEp07, ecaldqm::kEEp08, and ecaldqm::kEEp09.

{
  switch(_iSM){
  case kEEm01: case kEEp01: return 15;
  case kEEm02: case kEEp02: return 0;
  case kEEm03: case kEEp03: return 0;
  case kEEm04: case kEEp04: return 5;
  case kEEm05: case kEEp05: return 30;
  case kEEm06: case kEEp06: return 55;
  case kEEm07: case kEEp07: return 60;
  case kEEm08: case kEEp08: return 55;
  case kEEm09: case kEEp09: return 45;
  default: break;
  }

  if(_iSM >= kEBmLow && _iSM <= kEBpHigh) return 0;

  return 0;
}
int EcalDQMBinningService::ylow ( int  _iSM) const

Definition at line 117 of file EcalDQMBinningService.cc.

References ecaldqm::kEBmHigh, ecaldqm::kEBmLow, ecaldqm::kEBpHigh, ecaldqm::kEBpLow, ecaldqm::kEEm01, ecaldqm::kEEm02, ecaldqm::kEEm03, ecaldqm::kEEm04, ecaldqm::kEEm05, ecaldqm::kEEm06, ecaldqm::kEEm07, ecaldqm::kEEm08, ecaldqm::kEEm09, ecaldqm::kEEp01, ecaldqm::kEEp02, ecaldqm::kEEp03, ecaldqm::kEEp04, ecaldqm::kEEp05, ecaldqm::kEEp06, ecaldqm::kEEp07, ecaldqm::kEEp08, and ecaldqm::kEEp09.

{
  switch(_iSM){
  case kEEm01: case kEEp01: case kEEm09: case kEEp09: return 60;
  case kEEm02: case kEEp02: case kEEm08: case kEEp08: return 50;
  case kEEm03: case kEEp03: case kEEm07: case kEEp07: return 25;
  case kEEm04: case kEEp04: case kEEm06: case kEEp06: return 5;
  case kEEm05: case kEEp05: return 0;
  default: break;
  }

  if(_iSM >= kEBmLow && _iSM <= kEBmHigh) return ((_iSM - kEBmLow) % 18) * 20;
  if(_iSM >= kEBpLow && _iSM <= kEBpHigh) return (-1 - ((_iSM - kEBpLow) % 18)) * 20;

  return 0;
}

Member Data Documentation

std::vector<int> EcalDQMBinningService::binMaps_[nPlotType][nPresetBinnings] [mutable, private]

Definition at line 173 of file EcalDQMBinningService.h.

Referenced by getBinMap().

std::pair<unsigned, std::vector<int> > EcalDQMBinningService::cache_ [mutable, private]

Definition at line 186 of file EcalDQMBinningService.h.

Referenced by findBins(), and findOffset().

Definition at line 185 of file EcalDQMBinningService.h.

Referenced by findBins().

uint32_t EcalDQMBinningService::cacheId_ [mutable, private]

Definition at line 183 of file EcalDQMBinningService.h.

Referenced by findBins(), and findOffset().

Definition at line 184 of file EcalDQMBinningService.h.

Referenced by findBins(), and findOffset().

const double EcalDQMBinningService::etaBound_ [private]

Definition at line 188 of file EcalDQMBinningService.h.

Definition at line 190 of file EcalDQMBinningService.h.

Referenced by postBeginRun().

Definition at line 192 of file EcalDQMBinningService.h.

Referenced by postBeginRun().

Definition at line 194 of file EcalDQMBinningService.h.

Referenced by getBinMap().