CMS 3D CMS Logo

Classes | Typedefs | Enumerations | Functions | Variables

ecaldqm Namespace Reference

Classes

class  CertificationClient
class  ClusterTask
class  DQWorker
class  DQWorkerClient
class  DQWorkerTask
class  EnergyTask
class  IntegrityClient
class  IntegrityTask
class  LaserClient
class  LaserTask
class  LedTask
struct  MEData
struct  MeInfo
class  MeInfoMap
class  MESet
class  MESetChannel
class  MESetDet0D
class  MESetDet1D
class  MESetDet2D
class  MESetEcal
class  MESetNonObject
class  MESetTrend
class  OccupancyClient
class  OccupancyTask
class  PedestalTask
class  PNIntegrityTask
class  PNPresampleTask
class  PresampleClient
class  PresampleTask
class  RawDataClient
class  RawDataTask
class  SelectiveReadoutClient
class  SelectiveReadoutTask
class  SetWorker
class  SummaryClient
class  TestPulseTask
class  TimingClient
class  TimingTask
class  TowerStatusTask
class  TrigPrimClient
class  TrigPrimTask

Typedefs

typedef DQWorker *(* WorkerFactory )(const edm::ParameterSet &, const edm::ParameterSet &)

Enumerations

enum  BinningType { kCrystal, kSuperCrystal, kTriggerTower }
enum  Collections {
  kSource, kEcalRawData, kGainErrors, kChIdErrors,
  kGainSwitchErrors, kTowerIdErrors, kBlockSizeErrors, kMEMTowerIdErrors,
  kMEMBlockSizeErrors, kMEMChIdErrors, kMEMGainErrors, kEBSrFlag,
  kEESrFlag, kEBDigi, kEEDigi, kPnDiodeDigi,
  kTrigPrimDigi, kTrigPrimEmulDigi, kEBUncalibRecHit, kEEUncalibRecHit,
  kEBRecHit, kEERecHit, kEBBasicCluster, kEEBasicCluster,
  kEBSuperCluster, kEESuperCluster, kRun, kLumiSection,
  nProcessedObjects, nCollections = kRun
}
enum  Directions { kLeft, kRight }
enum  FEFlags {
  Enabled = 0, Disabled = 1, Timeout = 2, HeaderError = 3,
  ChannelId = 4, LinkError = 5, BlockSize = 6, Suppressed = 7,
  FIFOFull = 8, L1ADesync = 9, BXDesync = 10, L1ABXDesync = 11,
  FIFOFullL1ADesync = 12, HParity = 13, VParity = 14, ForcedZS = 15,
  nFEFlags = 16
}
enum  ObjectType {
  kFullEE, kEEp, kEEm, kEEpFar,
  kEEpNear, kEEmFar, kEEmNear, kSM
}
enum  SMName {
  kEEm07, kEEm08, kEEm09, kEEm01,
  kEEm02, kEEm03, kEEm04, kEEm05,
  kEEm06, kEBm01, kEBm02, kEBm03,
  kEBm04, kEBm05, kEBm06, kEBm07,
  kEBm08, kEBm09, kEBm10, kEBm11,
  kEBm12, kEBm13, kEBm14, kEBm15,
  kEBm16, kEBm17, kEBm18, kEBp01,
  kEBp02, kEBp03, kEBp04, kEBp05,
  kEBp06, kEBp07, kEBp08, kEBp09,
  kEBp10, kEBp11, kEBp12, kEBp13,
  kEBp14, kEBp15, kEBp16, kEBp17,
  kEBp18, kEEp07, kEEp08, kEEp09,
  kEEp01, kEEp02, kEEp03, kEEp04,
  kEEp05, kEEp06, kEEmLow = kEEm07, kEEmHigh = kEEm06,
  kEEpLow = kEEp07, kEEpHigh = kEEp06, kEBmLow = kEBm01, kEBmHigh = kEBm18,
  kEBpLow = kEBp01, kEBpHigh = kEBp18
}

Functions

MonitorElementbookME (DQMStore *dqmStore, const std::string &name, const std::string &title, const std::string &className, ObjectType otype, BinningType btype=kCrystal, int ism=0, double lowZ=0., double highZ=0., const char *option="s")
void calcBins (int binWidth, int divisor, long int start_time, long int last_time, long int current_time, long int &binDiff, long int &diff)
bool ccuExists (unsigned, unsigned)
void checkElectronicsMap ()
void checkTrigTowerMap ()
TObject * cloneIt (MonitorElement *me, std::string histo)
unsigned dccId (const DetId &)
unsigned dccId (const EcalElectronicsId &)
unsigned dccId (unsigned)
const std::set< unsigned > dccNoMEM (nomemarr, nomemarr+10)
 DEFINE_ECALDQM_WORKER (SummaryClient)
 DEFINE_ECALDQM_WORKER (OccupancyTask)
 DEFINE_ECALDQM_WORKER (PedestalTask)
 DEFINE_ECALDQM_WORKER (OccupancyClient)
 DEFINE_ECALDQM_WORKER (TimingClient)
 DEFINE_ECALDQM_WORKER (PNIntegrityTask)
 DEFINE_ECALDQM_WORKER (PNPresampleTask)
 DEFINE_ECALDQM_WORKER (PresampleClient)
 DEFINE_ECALDQM_WORKER (TrigPrimClient)
 DEFINE_ECALDQM_WORKER (PresampleTask)
 DEFINE_ECALDQM_WORKER (RawDataTask)
 DEFINE_ECALDQM_WORKER (SelectiveReadoutTask)
 DEFINE_ECALDQM_WORKER (IntegrityClient)
 DEFINE_ECALDQM_WORKER (TestPulseTask)
 DEFINE_ECALDQM_WORKER (ClusterTask)
 DEFINE_ECALDQM_WORKER (RawDataClient)
 DEFINE_ECALDQM_WORKER (EnergyTask)
 DEFINE_ECALDQM_WORKER (TimingTask)
 DEFINE_ECALDQM_WORKER (TowerStatusTask)
 DEFINE_ECALDQM_WORKER (IntegrityTask)
 DEFINE_ECALDQM_WORKER (TrigPrimTask)
 DEFINE_ECALDQM_WORKER (LaserClient)
 DEFINE_ECALDQM_WORKER (LaserTask)
 DEFINE_ECALDQM_WORKER (SelectiveReadoutClient)
 DEFINE_ECALDQM_WORKER (CertificationClient)
 DEFINE_ECALDQM_WORKER (LedTask)
const EcalElectronicsMappingelectronicsMap (0)
void fillME (MonitorElement *me, const EEDetId &id, double wz=1., double wprof=1.)
void fillME (MonitorElement *me, const EcalScDetId &id, double wz=1., double wprof=1.)
void fillME (MonitorElement *me, const EcalTrigTowerDetId &id, double wz=1., double wprof=1.)
void getAverageFromTProfile (TProfile *p, double &mean, double &rms)
double getBinContentME (MonitorElement *me, const EcalScDetId &id)
double getBinContentME (MonitorElement *me, const EEDetId &id)
double getBinContentME (MonitorElement *me, const EcalTrigTowerDetId &id)
double getBinEntriesME (MonitorElement *me, const EcalTrigTowerDetId &id)
double getBinEntriesME (MonitorElement *me, const EcalScDetId &id)
double getBinEntriesME (MonitorElement *me, const EEDetId &id)
double getBinErrorME (MonitorElement *me, const EcalTrigTowerDetId &id)
double getBinErrorME (MonitorElement *me, const EcalScDetId &id)
double getBinErrorME (MonitorElement *me, const EEDetId &id)
int getBinME (MonitorElement *me, const EcalScDetId &id)
int getBinME (MonitorElement *me, const EcalTrigTowerDetId &id)
int getBinME (MonitorElement *me, const EEDetId &id)
unsigned getEEPnDCC (unsigned, unsigned)
const EcalElectronicsMappinggetElectronicsMap ()
void getMeanRms (TObject *pre, TObject *cur, double &mean, double &rms)
unsigned getNSuperCrystals (unsigned)
const
EcalTrigTowerConstituentsMap
getTrigTowerMap ()
bool isEcalScDetId (const DetId &_id)
unsigned memDCCIndex (unsigned)
void setBinContentME (MonitorElement *me, const EEDetId &id, double content)
void setBinContentME (MonitorElement *me, const EcalScDetId &id, double content)
void setBinContentME (MonitorElement *me, const EcalTrigTowerDetId &id, double content)
void setBinEntriesME (MonitorElement *me, const EEDetId &id, double entries)
void setBinEntriesME (MonitorElement *me, const EcalTrigTowerDetId &id, double entries)
void setBinEntriesME (MonitorElement *me, const EcalScDetId &id, double entries)
void setBinErrorME (MonitorElement *me, const EcalScDetId &id, double error)
void setBinErrorME (MonitorElement *me, const EEDetId &id, double error)
void setBinErrorME (MonitorElement *me, const EcalTrigTowerDetId &id, double error)
void setElectronicsMap (const EcalElectronicsMapping *)
void setTrigTowerMap (const EcalTrigTowerConstituentsMap *)
void shift (TH1 *h, Directions d, int bins)
void shift2Left (TH1 *h, int bins)
void shift2Right (TH1 *h, int bins)
void shiftAxis (TH1 *h, Directions d, double shift)
std::string smName (unsigned _dccId)
unsigned tccId (const EcalElectronicsId &)
unsigned tccId (const DetId &)
unsigned towerId (const DetId &)
unsigned towerId (const EcalElectronicsId &)
const
EcalTrigTowerConstituentsMap
trigtowerMap (0)
unsigned ttId (const DetId &)
unsigned ttId (const EcalElectronicsId &)
template<class W >
DQWorkerworkerFactory (const edm::ParameterSet &_params, const edm::ParameterSet &_paths)

Variables

std::string const collectionName [nCollections]
const std::set< unsigned > dccNoMEM
const EcalElectronicsMappingelectronicsMap
unsigned nomemarr [] = {kEEm09, kEEm01, kEEm04, kEEm05, kEEm06, kEEp09, kEEp01, kEEp04, kEEp05, kEEp06}
const
EcalTrigTowerConstituentsMap
trigtowerMap

Typedef Documentation

Definition at line 64 of file DQWorker.h.


Enumeration Type Documentation

Enumerator:
kCrystal 
kSuperCrystal 
kTriggerTower 

Definition at line 32 of file GeometryHelper.h.

Enumerator:
kSource 
kEcalRawData 
kGainErrors 
kChIdErrors 
kGainSwitchErrors 
kTowerIdErrors 
kBlockSizeErrors 
kMEMTowerIdErrors 
kMEMBlockSizeErrors 
kMEMChIdErrors 
kMEMGainErrors 
kEBSrFlag 
kEESrFlag 
kEBDigi 
kEEDigi 
kPnDiodeDigi 
kTrigPrimDigi 
kTrigPrimEmulDigi 
kEBUncalibRecHit 
kEEUncalibRecHit 
kEBRecHit 
kEERecHit 
kEBBasicCluster 
kEEBasicCluster 
kEBSuperCluster 
kEESuperCluster 
kRun 
kLumiSection 
nProcessedObjects 
nCollections 

Definition at line 6 of file Collections.h.

Enumerator:
kLeft 
kRight 

Definition at line 23 of file UtilFunctions.h.

                  {
    kLeft,
    kRight
  };
Enumerator:
Enabled 
Disabled 
Timeout 
HeaderError 
ChannelId 
LinkError 
BlockSize 
Suppressed 
FIFOFull 
L1ADesync 
BXDesync 
L1ABXDesync 
FIFOFullL1ADesync 
HParity 
VParity 
ForcedZS 
nFEFlags 

Definition at line 7 of file FEFlags.h.

               {
    Enabled = 0,
    Disabled = 1,
    Timeout = 2,
    HeaderError = 3,
    ChannelId = 4,
    LinkError = 5,
    BlockSize = 6,
    Suppressed = 7,
    FIFOFull = 8,
    L1ADesync = 9,
    BXDesync = 10,
    L1ABXDesync = 11,
    FIFOFullL1ADesync = 12,
    HParity = 13,
    VParity = 14,
    ForcedZS = 15,
    nFEFlags = 16
  };
Enumerator:
kFullEE 
kEEp 
kEEm 
kEEpFar 
kEEpNear 
kEEmFar 
kEEmNear 
kSM 

Definition at line 23 of file GeometryHelper.h.

Enumerator:
kEEm07 
kEEm08 
kEEm09 
kEEm01 
kEEm02 
kEEm03 
kEEm04 
kEEm05 
kEEm06 
kEBm01 
kEBm02 
kEBm03 
kEBm04 
kEBm05 
kEBm06 
kEBm07 
kEBm08 
kEBm09 
kEBm10 
kEBm11 
kEBm12 
kEBm13 
kEBm14 
kEBm15 
kEBm16 
kEBm17 
kEBm18 
kEBp01 
kEBp02 
kEBp03 
kEBp04 
kEBp05 
kEBp06 
kEBp07 
kEBp08 
kEBp09 
kEBp10 
kEBp11 
kEBp12 
kEBp13 
kEBp14 
kEBp15 
kEBp16 
kEBp17 
kEBp18 
kEEp07 
kEEp08 
kEEp09 
kEEp01 
kEEp02 
kEEp03 
kEEp04 
kEEp05 
kEEp06 
kEEmLow 
kEEmHigh 
kEEpLow 
kEEpHigh 
kEBmLow 
kEBmHigh 
kEBpLow 
kEBpHigh 

Definition at line 23 of file EcalDQMCommonUtils.h.


Function Documentation

MonitorElement * ecaldqm::bookME ( DQMStore dqmStore,
const std::string &  name,
const std::string &  title,
const std::string &  className,
ObjectType  otype,
BinningType  btype = kCrystal,
int  ism = 0,
double  lowZ = 0.,
double  highZ = 0.,
const char *  option = "s" 
)

Definition at line 48 of file GeometryHelper.cc.

References DQMStore::book2D(), DQMStore::bookProfile2D(), Numbers::ix0EE(), Numbers::iy0EE(), kCrystal, kEEm, kEEmFar, kEEmNear, kEEp, kEEpFar, kEEpNear, kFullEE, kSM, kSuperCrystal, kTriggerTower, NULL, and ecaldqm::MeInfoMap::set().

  {
    if( !dqmStore ) return NULL;

    if( className != "TH2F" && className != "TProfile2D" ) return NULL;

    Double_t xmin, ymin;
    Double_t xmax, ymax;

    xmin = ymin = 0.;
    xmax = ymax = 0.;

    switch(otype){
    case kFullEE:
      xmax = 200.;
      ymax = 100.;
      break;
    case kEEp:
    case kEEm:
      xmax = 100.;
      ymax = 100.;
      break;
    case kEEpFar:
    case kEEmFar:
      xmin = 50.;
      xmax = 100.;
      ymax = 100.;
      break;
    case kEEpNear:
    case kEEmNear:
      xmax = 50.;
      ymax = 100.;
      break;
    case kSM:
      xmin = Numbers::ix0EE(ism);
      xmax = xmin + 50;
      ymin = Numbers::iy0EE(ism);
      ymax = ymin + 50;
      break;
    }

    Int_t nBinsX, nBinsY;

    switch(btype){
    case kCrystal:
    case kTriggerTower:
      nBinsX = (Int_t)(xmax - xmin);
      nBinsY = (Int_t)(ymax - ymin);
      break;
    case kSuperCrystal:
      nBinsX = (Int_t)(xmax - xmin) / 5;
      nBinsY = (Int_t)(ymax - ymin) / 5;
      break;
    default:
      nBinsX = nBinsY = 0;
      break;
    }

    MonitorElement *me;

    if( className == "TH2F" )
      me = dqmStore->book2D(name, title, nBinsX, xmin, xmax, nBinsY, ymin, ymax);
    else
      me = dqmStore->bookProfile2D(name, title, nBinsX, xmin, xmax, nBinsY, ymin, ymax, lowZ, highZ);

    MeInfoMap::set( me, otype, btype, ism );

    return me;
  }
void ecaldqm::calcBins ( int  binWidth,
int  divisor,
long int  start_time,
long int  last_time,
long int  current_time,
long int &  binDiff,
long int &  diff 
)

Definition at line 29 of file UtilFunctions.cc.

References evf::utils::start_time.

Referenced by EBTrendTask::analyze(), EETrendClient::analyze(), EETrendTask::analyze(), and EBTrendClient::analyze().

                                                     {

    // changing arguments : binDiff, diff

    // binWidth : time interval
    // divisor : time unit - for minute case divisor is 60 and for hour case 3600
    // start_time : initial time when the job started
    // last_time : the last updated time before calling the current "analyze" function
    // current_time : the current time inside "analyze" fucntion
    // binDiff : the bin difference for the current time compared to the bin location of the last time
    // diff : time difference between the current time and the last time

    long int diff_current_start = current_time - start_time;
    long int diff_last_start = last_time - start_time;

    // --------------------------------------------------
    // Calculate time interval and bin width
    // --------------------------------------------------

    binDiff = diff_current_start/divisor/binWidth - diff_last_start/divisor/binWidth;
    diff = (current_time - last_time)/divisor;

    if(diff >= binWidth) {
      while(diff >= binWidth) diff -= binWidth;
    }

  } // calcBins
bool ecaldqm::ccuExists ( unsigned  _dccId,
unsigned  _towerId 
) [inline]

Definition at line 268 of file EcalDQMCommonUtils.h.

References getNSuperCrystals(), and kEEpLow.

Referenced by ecaldqm::RawDataTask::runOnRawData().

                                                           {
    if(_towerId == 69 || _towerId == 70) return true;
    else if((_dccId == 8 || _dccId == 53) && _towerId >= 18 && _towerId <= 24) return false;
    else if(_dccId <= kEEmHigh + 1 || _dccId >= kEEpLow + 1){
      if(_towerId > getNSuperCrystals(_dccId)) return false;
    }
    
    return true;
  }
void ecaldqm::checkElectronicsMap ( ) [inline]

Definition at line 300 of file EcalDQMCommonUtils.h.

References electronicsMap, and Exception.

Referenced by dccId(), getElectronicsMap(), setElectronicsMap(), tccId(), towerId(), and ttId().

                                   {
    if(!electronicsMap) throw cms::Exception("InvalidCall") << "ElectronicsMapping not initialized" << std::endl;
  }
void ecaldqm::checkTrigTowerMap ( ) [inline]

Definition at line 304 of file EcalDQMCommonUtils.h.

References Exception, and trigtowerMap.

Referenced by getTrigTowerMap(), and setTrigTowerMap().

                                 {
    if(!trigtowerMap) throw cms::Exception("InvalidCall") << "TrigTowerConstituentsMap not initialized" << std::endl;
  }
TObject * ecaldqm::cloneIt ( MonitorElement me,
std::string  histo 
)

Definition at line 257 of file UtilFunctions.cc.

References MonitorElement::getRootObject(), run_regression::ret, and indexGen::title.

Referenced by EETrendClient::analyze(), and EBTrendClient::analyze().

                                                        {

    // The cloned object, ret should be deleted after using it.

    TObject* ret = 0;

    if(!me) return ret;

    std::string title = histo + " Clone";
    ret = (TObject*) (me->getRootObject()->Clone(title.c_str()));

    return ret;
  }
unsigned ecaldqm::dccId ( const DetId _id) [inline]

Definition at line 78 of file EcalDQMCommonUtils.h.

References checkElectronicsMap(), EcalElectronicsId::dccId(), EcalElectronicsMapping::DCCid(), EcalBarrel, EcalEndcap, EcalLaserPnDiode, EcalTriggerTower, electronicsMap, Exception, EcalElectronicsMapping::getDCCandSC(), EcalElectronicsMapping::getElectronicsId(), EcalPnDiodeDetId::iDCCId(), isEcalScDetId(), DetId::rawId(), and DetId::subdetId().

Referenced by DCCEventBlock::addHeaderToCollection(), LaserSorter::analyze(), DCCEESRPBlock::checkSrpIdAndNumbSRFlags(), EcalDCCHeaderBlock::EcalDCCHeaderBlock(), ESDCCHeaderBlock::ESDCCHeaderBlock(), EcalDQMBinningService::findBinsDCC_(), EcalDQMBinningService::findOffset(), ecaldqm::MESetEcal::generateNames(), LinkBoardElectronicIndex::print(), EcalElectronicsMapping::pseudoStripConstituents(), ecaldqm::TestPulseTask::runOnDigis(), ecaldqm::PedestalTask::runOnDigis(), ecaldqm::LaserTask::runOnDigis(), ecaldqm::LedTask::runOnDigis(), ecaldqm::SelectiveReadoutTask::runOnDigis(), ecaldqm::LaserTask::runOnPnDigis(), ecaldqm::TestPulseTask::runOnPnDigis(), ecaldqm::LedTask::runOnPnDigis(), ecaldqm::PedestalTask::runOnPnDigis(), ecaldqm::RawDataTask::runOnRawData(), ecaldqm::SelectiveReadoutTask::runOnSrFlag_(), ecaldqm::TowerStatusTask::runOnTowerStatus(), ecaldqm::LedTask::runOnUncalibRecHits(), ecaldqm::TestPulseTask::runOnUncalibRecHits(), ecaldqm::LaserTask::runOnUncalibRecHits(), EcalElectronicsMapper::setActiveDCC(), ESKCHIPBlock::setDccId(), EcalDCCHeaderBlock::setId(), ESDCCHeaderBlock::setId(), EcalElectronicsMapping::tccConstituents(), and EcalElectronicsMapping::ttConstituents().

                                         {
    checkElectronicsMap();

    unsigned subdet(_id.subdetId());

    if(subdet == EcalBarrel) return electronicsMap->DCCid(EBDetId(_id));
    else if(subdet == EcalTriggerTower) return electronicsMap->DCCid(EcalTrigTowerDetId(_id));
    else if(subdet == EcalEndcap){
      if(isEcalScDetId(_id)) return electronicsMap->getDCCandSC(EcalScDetId(_id)).first;
      else return electronicsMap->getElectronicsId(EEDetId(_id)).dccId();
    }
    else if(subdet == EcalLaserPnDiode) return EcalPnDiodeDetId(_id).iDCCId();

    throw cms::Exception("InvalidDetId") << "EcalDQMCommonUtils::dccId(" << _id.rawId() << ")" << std::endl;

    return 0;
  }
unsigned ecaldqm::dccId ( const EcalElectronicsId _id) [inline]

Definition at line 96 of file EcalDQMCommonUtils.h.

References EcalElectronicsId::dccId().

                                                     {
    return _id.dccId();
  }
unsigned ecaldqm::dccId ( unsigned  _index) [inline]

Definition at line 100 of file EcalDQMCommonUtils.h.

References prof2calltree::count, and dccNoMEM.

                                        {
    // for DCCs with no MEM - map the index in an array of DCCs with no MEM to the DCC ID
    unsigned iDCC(0);
    unsigned count(0);

    while(count <= _index)
      if(dccNoMEM.find(iDCC++) == dccNoMEM.end()) count++;

    return iDCC;
  }
const std::set<unsigned> ecaldqm::dccNoMEM ( nomemarr  ,
nomemarr+  10 
)
ecaldqm::DEFINE_ECALDQM_WORKER ( SummaryClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( OccupancyTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( PedestalTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( OccupancyClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( TimingClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( PNIntegrityTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( PNPresampleTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( PresampleClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( TrigPrimClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( PresampleTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( RawDataTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( SelectiveReadoutTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( IntegrityClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( TestPulseTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( ClusterTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( RawDataClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( EnergyTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( TimingTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( TowerStatusTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( IntegrityTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( TrigPrimTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( LaserClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( LaserTask  )
ecaldqm::DEFINE_ECALDQM_WORKER ( SelectiveReadoutClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( CertificationClient  )
ecaldqm::DEFINE_ECALDQM_WORKER ( LedTask  )
void ecaldqm::fillME ( MonitorElement me,
const EEDetId id,
double  wz = 1.,
double  wprof = 1. 
)

Definition at line 119 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, MonitorElement::Fill(), ecaldqm::MeInfoMap::get(), Numbers::getEcalScDetId(), Numbers::getElectronicsMapping(), EcalElectronicsMapping::getTriggerElectronicsId(), EcalElectronicsMapping::getTrigTowerDetId(), info, kCrystal, kFullEE, MonitorElement::kind(), kSM, kSuperCrystal, kTriggerTower, Association::map, ecaldqm::MeInfo::otype, x, and detailsBasic3DVector::y.

  {

    if( !me ) return;

    const MeInfo *info = MeInfoMap::get( me );

    if( !info ) return;

    if(info->btype == kCrystal){

      float x = id.ix() - 0.5;
      float y = id.iy() - 0.5;
      if( info->otype == kSM && id.zside() < 0 ) x = 100 - x;
      if( info->otype == kFullEE && id.zside() > 0 ) x += 100;

      if( me->kind() == MonitorElement::DQM_KIND_TH2F ) me->Fill( x, y, wz );
      else if( me->kind() == MonitorElement::DQM_KIND_TPROFILE2D ) me->Fill( x, y, wz, wprof );
      return;

    }else if(info->btype == kSuperCrystal){

      EcalScDetId scid( Numbers::getEcalScDetId( id ) );
      fillME( me, scid, wz, wprof );
      return;

    }else if(info->btype == kTriggerTower){

      const EcalElectronicsMapping *map = Numbers::getElectronicsMapping();
      EcalTriggerElectronicsId teid( map->getTriggerElectronicsId( id ) );
      EcalTrigTowerDetId ttid( map->getTrigTowerDetId( teid.tccId(), teid.ttId() ) );
      fillME( me, ttid, wz, wprof );
      return;

    }

  }
void ecaldqm::fillME ( MonitorElement me,
const EcalScDetId id,
double  wz = 1.,
double  wprof = 1. 
)

Definition at line 158 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, EcalElectronicsMapping::dccTowerConstituents(), MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, MonitorElement::Fill(), ecaldqm::MeInfoMap::get(), EcalElectronicsMapping::getDCCandSC(), Numbers::getElectronicsMapping(), info, EEDetId::ix(), EEDetId::iy(), kCrystal, kFullEE, MonitorElement::kind(), kSM, kSuperCrystal, Association::map, ecaldqm::MeInfo::otype, AlCaHLTBitMon_ParallelJobs::p, x, detailsBasic3DVector::y, and EEDetId::zside().

  {

    if( !me ) return;

    const MeInfo *info = MeInfoMap::get( me );

    if( !info ) return;

    if(info->btype == kCrystal){

      const EcalElectronicsMapping *map = Numbers::getElectronicsMapping();
      std::pair<int,int> p = map->getDCCandSC( id );
      std::vector<DetId> vcry = map->dccTowerConstituents( p.first, p.second );
      for(unsigned u = 0; u < vcry.size(); u++){
        EEDetId cid( vcry[u] );

        float x = cid.ix() - 0.5;
        float y = cid.iy() - 0.5;
        if( info->otype == kSM && cid.zside() < 0 ) x = 100 - x;
        if( info->otype == kFullEE && cid.zside() > 0 ) x += 100;

        if( me->kind() == MonitorElement::DQM_KIND_TH2F ) me->Fill( x, y, wz );
        else if( me->kind() == MonitorElement::DQM_KIND_TPROFILE2D ) me->Fill( x, y, wz, wprof );

      }
      return;

    }else if(info->btype == kSuperCrystal){

      float x = id.ix() * 5 - 2.5;
      float y = id.iy() * 5 - 2.5;
      if( info->otype == kSM && id.zside() < 0 ) x = 100 - x;
      if( info->otype == kFullEE && id.zside() > 0 ) x += 100;

      if( me->kind() == MonitorElement::DQM_KIND_TH2F ) me->Fill( x, y, wz );
      else if( me->kind() == MonitorElement::DQM_KIND_TPROFILE2D ) me->Fill( x, y, wz, wprof );
      return;

    }

  }
void ecaldqm::fillME ( MonitorElement me,
const EcalTrigTowerDetId id,
double  wz = 1.,
double  wprof = 1. 
)

Definition at line 202 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, Numbers::crystals(), MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, MonitorElement::Fill(), ecaldqm::MeInfoMap::get(), info, EEDetId::ix(), EEDetId::iy(), kCrystal, kFullEE, MonitorElement::kind(), kSM, kTriggerTower, ecaldqm::MeInfo::otype, x, detailsBasic3DVector::y, and EEDetId::zside().

  {

    if( !me ) return;

    const MeInfo *info = MeInfoMap::get( me );

    if( !info ) return;

    if(info->btype == kTriggerTower || info->btype == kCrystal){

      std::vector<DetId> vcry = *( Numbers::crystals( id ) );
      for(unsigned u = 0; u < vcry.size(); u++){
        EEDetId cid( vcry[u] );

        float x = cid.ix() - 0.5;
        float y = cid.iy() - 0.5;
        if( info->otype == kSM && cid.zside() < 0 ) x = 100 - x;
        if( info->otype == kFullEE && cid.zside() > 0 ) x += 100;

        if( me->kind() == MonitorElement::DQM_KIND_TH2F ) me->Fill( x, y, wz );
        else if( me->kind() == MonitorElement::DQM_KIND_TPROFILE2D ) me->Fill( x, y, wz, wprof );
      }
      return;

    }

  }
void ecaldqm::getAverageFromTProfile ( TProfile *  p,
double &  mean,
double &  rms 
)

Definition at line 191 of file UtilFunctions.cc.

References i, pileupCalc::nbins, mathSSE::sqrt(), and detailsBasic3DVector::y.

Referenced by getMeanRms().

                                                                      {

    // changing arguments : mean, rms
    mean = rms = 0.0;

    if(!p) return;

    int nbins = p->GetXaxis()->GetNbins();
    double y = 0.0;
    double y2 = 0.0;
    for(int i=1; i<=nbins; i++){
      y += p->GetBinContent(i);
      y2 += y*y;
    }
    mean = y/nbins;
    rms = std::sqrt(y2/nbins - mean*mean);

  } // getAverageFromTProfile
double ecaldqm::getBinContentME ( MonitorElement me,
const EcalScDetId id 
)

Definition at line 392 of file GeometryHelper.cc.

References MonitorElement::DQM_KIND_TH1F, getBinME(), MonitorElement::getRootObject(), and MonitorElement::kind().

  {
    if( !me ) return 0.;
    if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return 0.;

    return ((TH1 *)me->getRootObject())->GetBinContent( getBinME( me, id ) );
  }
double ecaldqm::getBinContentME ( MonitorElement me,
const EEDetId id 
)

Definition at line 383 of file GeometryHelper.cc.

References MonitorElement::DQM_KIND_TH1F, getBinME(), MonitorElement::getRootObject(), and MonitorElement::kind().

  {
    if( !me ) return 0.;
    if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return 0.;

    return ((TH1 *)me->getRootObject())->GetBinContent( getBinME( me, id ) );
  }
double ecaldqm::getBinContentME ( MonitorElement me,
const EcalTrigTowerDetId id 
)

Definition at line 401 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, Numbers::crystals(), MonitorElement::DQM_KIND_TH1F, ecaldqm::MeInfoMap::get(), getBinME(), MonitorElement::getRootObject(), info, MonitorElement::kind(), and kTriggerTower.

  {
    if( !me ) return 0.;
    if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return 0.;

    const MeInfo *info = MeInfoMap::get( me );
    if( !info || info->btype != kTriggerTower ) return 0.;

    std::vector<DetId> *crystals = Numbers::crystals( id );
    if( !crystals->size() ) return 0.;

    return ((TH1 *)me->getRootObject())->GetBinContent( getBinME( me, EEDetId( crystals->at(0) ) ) );
  }
double ecaldqm::getBinEntriesME ( MonitorElement me,
const EcalTrigTowerDetId id 
)

Definition at line 467 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, Numbers::crystals(), MonitorElement::DQM_KIND_TPROFILE2D, ecaldqm::MeInfoMap::get(), getBinME(), MonitorElement::getRootObject(), info, MonitorElement::kind(), and kTriggerTower.

  {
    if( !me ) return 0.;
    if( me->kind() != MonitorElement::DQM_KIND_TPROFILE2D ) return 0.;

    const MeInfo *info = MeInfoMap::get( me );
    if( !info || info->btype != kTriggerTower ) return 0.;

    std::vector<DetId> *crystals = Numbers::crystals( id );
    if( !crystals->size() ) return 0.;


    return ((TProfile2D *)me->getRootObject())->GetBinEntries( getBinME( me, EEDetId( crystals->at(0) ) ) );
  }
double ecaldqm::getBinEntriesME ( MonitorElement me,
const EcalScDetId id 
)

Definition at line 458 of file GeometryHelper.cc.

References MonitorElement::DQM_KIND_TPROFILE2D, getBinME(), MonitorElement::getRootObject(), and MonitorElement::kind().

  {
    if( !me ) return 0.;
    if( me->kind() != MonitorElement::DQM_KIND_TPROFILE2D ) return 0.;

    return ((TProfile2D *)me->getRootObject())->GetBinEntries( getBinME( me, id ) );
  }
double ecaldqm::getBinEntriesME ( MonitorElement me,
const EEDetId id 
)

Definition at line 449 of file GeometryHelper.cc.

References MonitorElement::DQM_KIND_TPROFILE2D, getBinME(), MonitorElement::getRootObject(), and MonitorElement::kind().

  {
    if( !me ) return 0.;
    if( me->kind() != MonitorElement::DQM_KIND_TPROFILE2D ) return 0.;

    return ((TProfile2D *)me->getRootObject())->GetBinEntries( getBinME( me, id ) );
  }
double ecaldqm::getBinErrorME ( MonitorElement me,
const EcalTrigTowerDetId id 
)

Definition at line 434 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, Numbers::crystals(), MonitorElement::DQM_KIND_TH1F, ecaldqm::MeInfoMap::get(), getBinME(), MonitorElement::getRootObject(), info, MonitorElement::kind(), and kTriggerTower.

  {
    if( !me ) return 0.;
    if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return 0.;

    const MeInfo *info = MeInfoMap::get( me );
    if( !info || info->btype != kTriggerTower ) return 0.;

    std::vector<DetId> *crystals = Numbers::crystals( id );
    if( !crystals->size() ) return 0.;

    return ((TH1 *)me->getRootObject())->GetBinError( getBinME( me, EEDetId( crystals->at(0) ) ) );
  }
double ecaldqm::getBinErrorME ( MonitorElement me,
const EcalScDetId id 
)

Definition at line 425 of file GeometryHelper.cc.

References MonitorElement::DQM_KIND_TH1F, getBinME(), MonitorElement::getRootObject(), and MonitorElement::kind().

  {
    if( !me ) return 0.;
    if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return 0.;

    return ((TH1 *)me->getRootObject())->GetBinError( getBinME( me, id ) );
  }
double ecaldqm::getBinErrorME ( MonitorElement me,
const EEDetId id 
)

Definition at line 416 of file GeometryHelper.cc.

References MonitorElement::DQM_KIND_TH1F, getBinME(), MonitorElement::getRootObject(), and MonitorElement::kind().

  {
    if( !me ) return 0.;
    if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return 0.;

    return ((TH1 *)me->getRootObject())->GetBinError( getBinME( me, id ) );
  }
int ecaldqm::getBinME ( MonitorElement me,
const EcalScDetId id 
)

Definition at line 308 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TH3F, MonitorElement::DQM_KIND_TPROFILE, ecaldqm::MeInfoMap::get(), info, ecalpyutils::ism(), ecaldqm::MeInfo::ism, Numbers::ix0EE(), Numbers::iy0EE(), kEEm, kEEmFar, kEEmNear, kEEp, kEEpFar, kEEpNear, kFullEE, MonitorElement::kind(), kSM, kSuperCrystal, and ecaldqm::MeInfo::otype.

  {
    if( !me ) return -1;
    int kind = me->kind();
    if( kind < MonitorElement::DQM_KIND_TH2F || 
        kind == MonitorElement::DQM_KIND_TPROFILE ||
        kind == MonitorElement::DQM_KIND_TH3F ) return -1;

    const MeInfo *info = MeInfoMap::get( me );
    if( !info ) return -1;

    if(info->btype != kSuperCrystal) return -1;

    int ix = id.ix();
    int iy = id.iy();
    int zside = id.zside();
    int nx;
    int ism = info->ism;

    if(info->otype == kSM){

      if(zside > 0){
        ix -= Numbers::ix0EE(ism) / 5;
        iy -= Numbers::iy0EE(ism) / 5;
      }else{
        ix = 21 - ix - Numbers::ix0EE(ism) / 5;
        iy -= Numbers::iy0EE(ism) / 5;
      }
      nx = 10;

    }else{

      switch(info->otype){
      case kFullEE:
        if(zside > 0) ix += 20;
        nx = 40;
        break;
      case kEEp:
        if(zside < 0) return -1;
        nx = 20;
        break;
      case kEEm:
        if(zside > 0) return -1;
        nx = 20;
        break;
      case kEEpFar:
        if(zside < 0 || ix > 10) return -1;
        nx = 10;
        break;
      case kEEpNear:
        if(zside < 0 || ix < 11) return -1;
        ix -= 10;
        nx = 10;
        break;
      case kEEmFar:
        if(zside > 0 || ix > 10) return -1;
        nx = 10;
        break;
      case kEEmNear:
        if(zside > 0 || ix < 11) return -1;
        ix -= 10;
        nx = 10;
        break;
      default:
        return -1;
      }

    }

    return iy * (nx + 2) + ix;

  }
int ecaldqm::getBinME ( MonitorElement me,
const EcalTrigTowerDetId id 
)
int ecaldqm::getBinME ( MonitorElement me,
const EEDetId id 
)

Definition at line 232 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TH3F, MonitorElement::DQM_KIND_TPROFILE, ecaldqm::MeInfoMap::get(), info, ecalpyutils::ism(), ecaldqm::MeInfo::ism, Numbers::ix0EE(), Numbers::iy0EE(), kEEm, kEEmFar, kEEmNear, kEEp, kEEpFar, kEEpNear, kFullEE, MonitorElement::kind(), kSM, kSuperCrystal, ecaldqm::MeInfo::otype, and pileupReCalc_HLTpaths::scale.

Referenced by getBinContentME(), getBinEntriesME(), getBinErrorME(), setBinContentME(), setBinEntriesME(), and setBinErrorME().

  {
    if( !me ) return -1;
    int kind = me->kind();
    if( kind < MonitorElement::DQM_KIND_TH2F || 
        kind == MonitorElement::DQM_KIND_TPROFILE ||
        kind == MonitorElement::DQM_KIND_TH3F ) return -1;

    const MeInfo *info = MeInfoMap::get( me );
    if( !info ) return -1;

    int ix = id.ix();
    int iy = id.iy();
    int zside = id.zside();
    int nx;
    int ism = info->ism;

    if(info->otype == kSM){

      if(zside > 0){
        ix -= Numbers::ix0EE(ism);
        iy -= Numbers::iy0EE(ism);
      }else{
        ix = 101 - ix - Numbers::ix0EE(ism);
        iy -= Numbers::iy0EE(ism);
      }
      nx = 50;

    }else{

      switch(info->otype){
      case kFullEE:
        if(zside > 0) ix += 100;
        nx = 200;
        break;
      case kEEp:
        if(zside < 0) return -1;
        nx = 100;
        break;
      case kEEm:
        if(zside > 0) return -1;
        nx = 100;
        break;
      case kEEpFar:
        if(zside < 0 || ix > 50) return -1;
        nx = 50;
        break;
      case kEEpNear:
        if(zside < 0 || ix < 51) return -1;
        ix -= 50;
        nx = 50;
        break;
      case kEEmFar:
        if(zside > 0 || ix > 50) return -1;
        nx = 50;
        break;
      case kEEmNear:
        if(zside > 0 || ix < 51) return -1;
        ix -= 50;
        nx = 50;
        break;
      default:
        return -1;
      }

    }

    int scale = info->btype == kSuperCrystal ? 5 : 1;
    ix = (ix - 1) / scale + 1;
    iy = (iy - 1) / scale + 1;
    nx = nx / scale;

    return iy * (nx + 2) + ix;
  }
unsigned ecaldqm::getEEPnDCC ( unsigned  _dee,
unsigned  _ab 
) [inline]

Definition at line 214 of file EcalDQMCommonUtils.h.

Referenced by ecaldqm::LedTask::runOnUncalibRecHits(), and ecaldqm::LaserTask::runOnUncalibRecHits().

                                                         {
    switch(_dee){
    case 1: // EE+F -> FEDs 649-653/0
      if(_ab == 0) return 650;
      else return 651;
    case 2: // EE+N -> FEDs 604-608/0
      if(_ab == 0) return 605;
      else return 606;
    case 3: // EE-N -> FEDs 601-603, 608/1, 609
      if(_ab == 0) return 601;
      else return 602;
    case 4: // EE-F -> FEDs 646-648, 653/1, 654
      if(_ab == 0) return 647;
      else return 646;
    default:
      return 600;
    }
  }
const EcalElectronicsMapping * ecaldqm::getElectronicsMap ( ) [inline]
void ecaldqm::getMeanRms ( TObject *  pre,
TObject *  cur,
double &  mean,
double &  rms 
)

Definition at line 213 of file UtilFunctions.cc.

References getAverageFromTProfile(), mergeVDriftHistosByStation::name, and mathSSE::sqrt().

Referenced by EETrendClient::analyze(), and EBTrendClient::analyze().

                                                                         {

    // changing arguments : mean, rms

    mean = rms = 0.0;

    if(!cur) return;

    TString name(cur->IsA()->GetName());

    if(name.Contains("TProfile")) {
      getAverageFromTProfile((TProfile*)cur,mean,rms);
    }
    else if(name.Contains("TH2")) {
      if(pre) {
        mean = ((TH2F*)cur)->GetEntries() - ((TH2F*)pre)->GetEntries();
        if(mean < 0) return;
        rms = std::sqrt(mean);
      }
      else {
        mean = ((TH2F*)cur)->GetEntries();
        if(mean < 0) return;
        rms = std::sqrt(mean);
      }
      float nxybins = ((TH2F*)cur)->GetNbinsX()*((TH2F*)cur)->GetNbinsY();
      if(nxybins < 1.) nxybins = 1.;
      mean /= nxybins;
      rms /= nxybins;
    }
    else if(name.Contains("TH1")) {
      if(pre) {
        ((TH1F*)pre)->Sumw2();
        ((TH1F*)pre)->Add((TH1F*)pre,(TH1F*)cur,-1,1);
        mean = ((TH1F*)pre)->GetMean();
        rms = ((TH1F*)pre)->GetRMS();
      }
      else {
        mean = ((TH1F*)cur)->GetMean();
        rms = ((TH1F*)cur)->GetRMS();
      }
    }

  } // getMeanRms
unsigned ecaldqm::getNSuperCrystals ( unsigned  _dccId) [inline]
const EcalTrigTowerConstituentsMap * ecaldqm::getTrigTowerMap ( ) [inline]
bool ecaldqm::isEcalScDetId ( const DetId _id) [inline]
unsigned ecaldqm::memDCCIndex ( unsigned  _dccid) [inline]

Definition at line 111 of file EcalDQMCommonUtils.h.

References dccNoMEM, and getHLTprescales::index.

Referenced by EcalDQMBinningService::findOffset().

                                              {
    unsigned index(0);
    unsigned iDCC(0);

    while(iDCC < _dccid)
      if(dccNoMEM.find(iDCC++) == dccNoMEM.end()) index++;

    index -= 1;

    return index;
  }
void ecaldqm::setBinContentME ( MonitorElement me,
const EEDetId id,
double  content 
)

Definition at line 483 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, ws_sso_content_reader::content, MonitorElement::DQM_KIND_TH1F, ecaldqm::MeInfoMap::get(), getBinME(), Numbers::getEcalScDetId(), Numbers::getElectronicsMapping(), MonitorElement::getRootObject(), EcalElectronicsMapping::getTriggerElectronicsId(), info, kCrystal, MonitorElement::kind(), kSuperCrystal, kTriggerTower, Association::map, and EcalElectronicsMapping::ttConstituents().

  {
    if( !me ) return;
    if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return;

    const MeInfo *info = MeInfoMap::get( me );
    if( !info ) return;

    if(info->btype == kCrystal){

      ((TH1 *)me->getRootObject())->SetBinContent( getBinME( me, id ), content );
      return;

    }else if(info->btype == kSuperCrystal){

      EcalScDetId scid( Numbers::getEcalScDetId( id ) );
      ((TH1 *)me->getRootObject())->SetBinContent( getBinME( me, id ), content );
      return;

    }else if(info->btype == kTriggerTower){

      const EcalElectronicsMapping *map = Numbers::getElectronicsMapping();
      EcalTriggerElectronicsId teid( map->getTriggerElectronicsId( id ) );
      std::vector<DetId> vcry = map->ttConstituents( teid.tccId(), teid.ttId() );
      for(unsigned u = 0; u < vcry.size(); u++)
        ((TH1 *)me->getRootObject())->SetBinContent( getBinME( me, EEDetId(vcry[u]) ), content );
      return;

    }
  }
void ecaldqm::setBinContentME ( MonitorElement me,
const EcalScDetId id,
double  content 
)

Definition at line 515 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, ws_sso_content_reader::content, EcalElectronicsMapping::dccTowerConstituents(), MonitorElement::DQM_KIND_TH1F, ecaldqm::MeInfoMap::get(), getBinME(), EcalElectronicsMapping::getDCCandSC(), Numbers::getElectronicsMapping(), MonitorElement::getRootObject(), info, kCrystal, MonitorElement::kind(), kSuperCrystal, Association::map, and AlCaHLTBitMon_ParallelJobs::p.

  {
    if( !me ) return;
    if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return;

    const MeInfo *info = MeInfoMap::get( me );
    if( !info ) return;

    if(info->btype == kCrystal){

      const EcalElectronicsMapping *map = Numbers::getElectronicsMapping();
      std::pair<int,int> p = map->getDCCandSC( id );
      std::vector<DetId> vcry = map->dccTowerConstituents( p.first, p.second );
      for(unsigned u = 0; u < vcry.size(); u++)
        ((TH1 *)me->getRootObject())->SetBinContent( getBinME( me, EEDetId(vcry[u]) ), content );
      return;

    }else if(info->btype == kSuperCrystal){

      ((TH1 *)me->getRootObject())->SetBinContent( getBinME( me, id ), content );
      return;

    }
  }
void ecaldqm::setBinContentME ( MonitorElement me,
const EcalTrigTowerDetId id,
double  content 
)

Definition at line 541 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, ws_sso_content_reader::content, Numbers::crystals(), MonitorElement::DQM_KIND_TH1F, ecaldqm::MeInfoMap::get(), getBinME(), MonitorElement::getRootObject(), info, kCrystal, MonitorElement::kind(), and kTriggerTower.

  {
    if( !me ) return;
    if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return;

    const MeInfo *info = MeInfoMap::get( me );
    if( !info ) return;

    if(info->btype == kCrystal || info->btype == kTriggerTower){

      std::vector<DetId> *crystals = Numbers::crystals( id );
      for(unsigned u = 0; u < crystals->size(); u++)
        ((TH1 *)me->getRootObject())->SetBinContent( getBinME( me, EEDetId(crystals->at(u)) ), content );
      return;

    }
  }
void ecaldqm::setBinEntriesME ( MonitorElement me,
const EEDetId id,
double  entries 
)

Definition at line 637 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, MonitorElement::DQM_KIND_TPROFILE2D, python::tagInventory::entries, ecaldqm::MeInfoMap::get(), getBinME(), Numbers::getEcalScDetId(), Numbers::getElectronicsMapping(), MonitorElement::getRootObject(), EcalElectronicsMapping::getTriggerElectronicsId(), info, kCrystal, MonitorElement::kind(), kSuperCrystal, kTriggerTower, Association::map, and EcalElectronicsMapping::ttConstituents().

  {
    if( !me ) return;
    if( me->kind() != MonitorElement::DQM_KIND_TPROFILE2D ) return;

    const MeInfo *info = MeInfoMap::get( me );
    if( !info ) return;

    if(info->btype == kCrystal){

      ((TProfile2D *)me->getRootObject())->SetBinEntries( getBinME( me, id ), entries );
      return;

    }else if(info->btype == kSuperCrystal){

      EcalScDetId scid( Numbers::getEcalScDetId( id ) );
      ((TProfile2D *)me->getRootObject())->SetBinError( getBinME( me, id ), entries );
      return;

    }else if(info->btype == kTriggerTower){

      const EcalElectronicsMapping *map = Numbers::getElectronicsMapping();
      EcalTriggerElectronicsId teid( map->getTriggerElectronicsId( id ) );
      std::vector<DetId> vcry = map->ttConstituents( teid.tccId(), teid.ttId() );
      for(unsigned u = 0; u < vcry.size(); u++)
        ((TProfile2D *)me->getRootObject())->SetBinError( getBinME( me, EEDetId(vcry[u]) ), entries );
      return;

    }

  }
void ecaldqm::setBinEntriesME ( MonitorElement me,
const EcalTrigTowerDetId id,
double  entries 
)

Definition at line 696 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, Numbers::crystals(), MonitorElement::DQM_KIND_TPROFILE2D, python::tagInventory::entries, ecaldqm::MeInfoMap::get(), getBinME(), MonitorElement::getRootObject(), info, kCrystal, MonitorElement::kind(), and kTriggerTower.

  {
    if( !me ) return;
    if( me->kind() != MonitorElement::DQM_KIND_TPROFILE2D ) return;

    const MeInfo *info = MeInfoMap::get( me );
    if( !info ) return;

    if(info->btype == kCrystal || info->btype == kTriggerTower){

      std::vector<DetId> *crystals = Numbers::crystals( id );
      for(unsigned u = 0; u < crystals->size(); u++)
        ((TProfile2D *)me->getRootObject())->SetBinError( getBinME( me, EEDetId(crystals->at(u)) ), entries );
      return;

    }
  }
void ecaldqm::setBinEntriesME ( MonitorElement me,
const EcalScDetId id,
double  entries 
)

Definition at line 670 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, EcalElectronicsMapping::dccTowerConstituents(), MonitorElement::DQM_KIND_TPROFILE2D, python::tagInventory::entries, ecaldqm::MeInfoMap::get(), getBinME(), EcalElectronicsMapping::getDCCandSC(), Numbers::getElectronicsMapping(), MonitorElement::getRootObject(), info, kCrystal, MonitorElement::kind(), kSuperCrystal, Association::map, and AlCaHLTBitMon_ParallelJobs::p.

  {
    if( !me ) return;
    if( me->kind() != MonitorElement::DQM_KIND_TPROFILE2D ) return;

    const MeInfo *info = MeInfoMap::get( me );
    if( !info ) return;

    if(info->btype == kCrystal){

      const EcalElectronicsMapping *map = Numbers::getElectronicsMapping();
      std::pair<int,int> p = map->getDCCandSC( id );
      std::vector<DetId> vcry = map->dccTowerConstituents( p.first, p.second );
      for(unsigned u = 0; u < vcry.size(); u++)
        ((TProfile2D *)me->getRootObject())->SetBinEntries( getBinME( me, EEDetId(vcry[u]) ), entries );
      return;

    }else if(info->btype == kSuperCrystal){

      ((TProfile2D *)me->getRootObject())->SetBinError( getBinME( me, id ), entries );
      return;

    }
  }
void ecaldqm::setBinErrorME ( MonitorElement me,
const EcalScDetId id,
double  error 
)

Definition at line 592 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, EcalElectronicsMapping::dccTowerConstituents(), MonitorElement::DQM_KIND_TH1F, error, ecaldqm::MeInfoMap::get(), getBinME(), EcalElectronicsMapping::getDCCandSC(), Numbers::getElectronicsMapping(), MonitorElement::getRootObject(), info, kCrystal, MonitorElement::kind(), kSuperCrystal, Association::map, and AlCaHLTBitMon_ParallelJobs::p.

  {
    if( !me ) return;
    if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return;

    const MeInfo *info = MeInfoMap::get( me );
    if( !info ) return;

    if(info->btype == kCrystal){

      const EcalElectronicsMapping *map = Numbers::getElectronicsMapping();
      std::pair<int,int> p = map->getDCCandSC( id );
      std::vector<DetId> vcry = map->dccTowerConstituents( p.first, p.second );
      for(unsigned u = 0; u < vcry.size(); u++)
        ((TH1 *)me->getRootObject())->SetBinError( getBinME( me, EEDetId(vcry[u]) ), error );
      return;

    }else if(info->btype == kSuperCrystal){

      ((TH1 *)me->getRootObject())->SetBinError( getBinME( me, id ), error );
      return;

    }
  }
void ecaldqm::setBinErrorME ( MonitorElement me,
const EEDetId id,
double  error 
)

Definition at line 560 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, MonitorElement::DQM_KIND_TH1F, error, ecaldqm::MeInfoMap::get(), getBinME(), Numbers::getEcalScDetId(), Numbers::getElectronicsMapping(), MonitorElement::getRootObject(), EcalElectronicsMapping::getTriggerElectronicsId(), info, kCrystal, MonitorElement::kind(), kSuperCrystal, kTriggerTower, Association::map, and EcalElectronicsMapping::ttConstituents().

  {
    if( !me ) return;
    if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return;

    const MeInfo *info = MeInfoMap::get( me );
    if( !info ) return;

    if(info->btype == kCrystal){

      ((TH1 *)me->getRootObject())->SetBinError( getBinME( me, id ), error );
      return;

    }else if(info->btype == kSuperCrystal){

      EcalScDetId scid( Numbers::getEcalScDetId( id ) );
      ((TH1 *)me->getRootObject())->SetBinError( getBinME( me, id ), error );
      return;

    }else if(info->btype == kTriggerTower){

      const EcalElectronicsMapping *map = Numbers::getElectronicsMapping();
      EcalTriggerElectronicsId teid( map->getTriggerElectronicsId( id ) );
      std::vector<DetId> vcry = map->ttConstituents( teid.tccId(), teid.ttId() );
      for(unsigned u = 0; u < vcry.size(); u++)
        ((TH1 *)me->getRootObject())->SetBinError( getBinME( me, EEDetId(vcry[u]) ), error );
      return;

    }
  }
void ecaldqm::setBinErrorME ( MonitorElement me,
const EcalTrigTowerDetId id,
double  error 
)

Definition at line 618 of file GeometryHelper.cc.

References ecaldqm::MeInfo::btype, Numbers::crystals(), MonitorElement::DQM_KIND_TH1F, error, ecaldqm::MeInfoMap::get(), getBinME(), MonitorElement::getRootObject(), info, kCrystal, MonitorElement::kind(), and kTriggerTower.

  {
    if( !me ) return;
    if( me->kind() < MonitorElement::DQM_KIND_TH1F ) return;

    const MeInfo *info = MeInfoMap::get( me );
    if( !info ) return;

    if(info->btype == kCrystal || info->btype == kTriggerTower){

      std::vector<DetId> *crystals = Numbers::crystals( id );
      for(unsigned u = 0; u < crystals->size(); u++)
        ((TH1 *)me->getRootObject())->SetBinError( getBinME( me, EEDetId(crystals->at(u)) ), error );
      return;

    }
  }
void ecaldqm::setElectronicsMap ( const EcalElectronicsMapping _map) [inline]
void ecaldqm::setTrigTowerMap ( const EcalTrigTowerConstituentsMap _map) [inline]
void ecaldqm::shift ( TH1 *  h,
Directions  d,
int  bins 
)

Definition at line 58 of file UtilFunctions.cc.

References combineCards::bins, h, i, j, kLeft, kRight, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by shift2Left(), and shift2Right().

  {
    if(!bins || !h) return;
    if(h->GetXaxis()->IsVariableBinSize()) return;

    if(bins < 0){
      bins = -bins;
      d = d==kRight ? kLeft : kRight;
    }

    if(!h->GetSumw2()) h->Sumw2();
    int nBins = h->GetXaxis()->GetNbins();
    if(bins >= nBins){
      h->Reset();
      return;
    }

    // the first bin goes to underflow
    // each bin moves to the right

    int firstBin, lastBin, bound, increment;
    switch(d){
    case kRight:
      firstBin = nBins + 1;
      lastBin = 0;
      bound = bins;
      increment = -1;
      break;
    case kLeft:
      firstBin = 0;
      lastBin = nBins + 1;
      bound = nBins - bins + 1;
      increment = 1;
      break;
    default:
      return;
    }

    int shift = increment * bins;

    if( h->IsA() == TClass::GetClass("TProfile") ){

      TProfile *p = static_cast<TProfile *>(h);

      // by shifting n bin to the left, the number of entries are
      // reduced by the number in n bins including the underflow bin.
      double nentries = p->GetEntries();
      for(int i = firstBin; i != firstBin + shift; i += increment) nentries -= p->GetBinEntries(i);
      p->SetEntries(nentries);

      TArrayD* sumw2 = p->GetSumw2();

      for(int i = firstBin; i != bound; i += increment){
        // GetBinContent returns binContent/binEntries
        p->SetBinContent( i, p->GetBinContent( i+shift ) * p->GetBinEntries( i+shift ) );
        p->SetBinEntries( i, p->GetBinEntries( i+shift ) );
        sumw2->SetAt( sumw2->GetAt( i+shift ), i );
      }

      for(int i = bound; i != lastBin + increment; i += increment){
        p->SetBinContent( i, 0 );
        p->SetBinEntries( i, 0 );
        sumw2->SetAt( 0., i );
      }

    }else if( h->InheritsFrom("TH2") ){

      TH2 *h2 = static_cast<TH2 *>(h);
      int nBinsY = h2->GetYaxis()->GetNbins();

      // assumes sum(binContent) == entries
      double nentries = h2->GetEntries();
      for(int i = firstBin; i != firstBin + shift; i += increment)
        for(int j=0 ; j<=nBinsY+1 ; j++) nentries -= h2->GetBinContent(i,j);

      h2->SetEntries(nentries);

      for(int i = firstBin; i != bound; i += increment)
        for(int j = 0; j <= nBinsY + 1; j++)
          h2->SetBinContent( i, j, h2->GetBinContent(i+shift, j) );

      for(int i = bound; i != lastBin + increment; i += increment)
        for(int j = 0; j <= nBinsY + 1; j++)
          h2->SetBinContent( i, j, 0 );
          
    }else if( h->InheritsFrom("TH1") ){ // any other histogram class

      // assumes sum(binContent) == entries
      double nentries = h->GetEntries();
      for(int i = firstBin; i != firstBin + shift; i += increment) nentries -= h->GetBinContent(i);

      h->SetEntries(nentries);

      for(int i = firstBin; i != bound; i += increment)
        h->SetBinContent( i, h->GetBinContent(i+shift) );

      for(int i = bound; i != lastBin + increment; i += increment)
        h->SetBinContent( i, 0 );
    }


  }
void ecaldqm::shift2Left ( TH1 *  h,
int  bins 
)

Definition at line 166 of file UtilFunctions.cc.

References kLeft, and shift().

  {
    shift(h, kLeft, bins);
  }
void ecaldqm::shift2Right ( TH1 *  h,
int  bins 
)
void ecaldqm::shiftAxis ( TH1 *  h,
Directions  d,
double  shift 
)

Definition at line 173 of file UtilFunctions.cc.

References kLeft, kRight, and pileupCalc::nbins.

  {
    if( !h ) return;
    TAxis *xax = h->GetXaxis();
    if( h->GetXaxis()->IsVariableBinSize() ) return;

    double xmax = xax->GetXmax();
    double xmin = xax->GetXmin();
    int nbins = xax->GetNbins();

    if(d == kRight)
      xax->Set(nbins, xmin - shift, xmax - shift);
    else if(d == kLeft)
      xax->Set(nbins, xmin + shift, xmax + shift);
  }
std::string ecaldqm::smName ( unsigned  _dccId) [inline]

Definition at line 196 of file EcalDQMCommonUtils.h.

References kEBmHigh, kEBmLow, kEBpHigh, kEBpLow, kEEmHigh, kEEmLow, kEEpHigh, and kEEpLow.

Referenced by EcalDQMBinningService::channelName(), MEGeom::getHist(), ME::lmdataPath(), MELaserPrim::MELaserPrim(), MEChannel::oneLine(), ME::primPath(), ME::rootFileName(), ME::smName(), and ME::smNameFromDcc().

                                          {
    std::stringstream ss;

    unsigned iSM(_dccId - 1);

    if(iSM <= kEEmHigh)
      ss << "EE-" << std::setw(2) << std::setfill('0') << (((iSM - kEEmLow + 6) % 9) + 1);
    else if(iSM <= kEBmHigh)
      ss << "EB-" << std::setw(2) << std::setfill('0') << (iSM - kEBmLow + 1);
    else if(iSM <= kEBpHigh)
      ss << "EB+" << std::setw(2) << std::setfill('0') << (iSM - kEBpLow + 1);
    else if(iSM <= kEEpHigh)
      ss << "EE+" << std::setw(2) << std::setfill('0') << (((iSM - kEEpLow + 6) % 9) + 1);

    return ss.str();
  }
unsigned ecaldqm::tccId ( const EcalElectronicsId _id) [inline]
unsigned ecaldqm::tccId ( const DetId _id) [inline]
unsigned ecaldqm::towerId ( const DetId _id) [inline]
unsigned ecaldqm::towerId ( const EcalElectronicsId _id) [inline]

Definition at line 166 of file EcalDQMCommonUtils.h.

References EcalElectronicsId::towerId().

                                                       {
    return _id.towerId();
  }
unsigned ecaldqm::ttId ( const DetId _id) [inline]
unsigned ecaldqm::ttId ( const EcalElectronicsId _id) [inline]
template<class W >
DQWorker* ecaldqm::workerFactory ( const edm::ParameterSet _params,
const edm::ParameterSet _paths 
)

Definition at line 69 of file DQWorker.h.

    {
      W* worker(new W(_params, _paths));
      return worker;
    }

Variable Documentation

std::string const ecaldqm::collectionName[nCollections]
Initial value:
 {
    "Source",
    "EcalRawData",
    "GainErrors",
    "ChIdErrors",
    "GainSwitchErrors",
    "TowerIdErrors",
    "BlockSizeErrors",
    "MEMTowerIdErrors",
    "MEMBlockSizeErrors",
    "MEMChIdErrors",
    "MEMGainErrors",
    "EBSrFlag",
    "EESrFlag",
    "EBDigi",
    "EEDigi",
    "PnDiodeDigi",
    "TrigPrimDigi",
    "TrigPrimEmulDigi",
    "EBUncalibRecHit",
    "EEUncalibRecHit",
    "EBRecHit",
    "EERecHit",
    "EBBasicCluster",
    "EEBasicCluster",
    "EBSuperCluster",
    "EESuperCluster"
  }

Definition at line 39 of file Collections.h.

Referenced by FWTableView::addTo(), BscSD::BscSD(), CaloSD::CaloSD(), EcalDQMonitorTask::EcalDQMonitorTask(), FiberSD::FiberSD(), FP420SD::FP420SD(), HFChamberSD::HFChamberSD(), HFWedgeSD::HFWedgeSD(), FP420SD::Initialize(), BscSD::Initialize(), HFChamberSD::Initialize(), TotemSD::Initialize(), FiberSD::Initialize(), HFWedgeSD::Initialize(), CaloSD::Initialize(), PFTauMVAInputDiscriminantTranslator::PFTauMVAInputDiscriminantTranslator(), FWTableView::setFrom(), and TotemSD::TotemSD().

const std::set<unsigned> ecaldqm::dccNoMEM
unsigned ecaldqm::nomemarr[] = {kEEm09, kEEm01, kEEm04, kEEm05, kEEm06, kEEp09, kEEp01, kEEp04, kEEp05, kEEp06}

Definition at line 7 of file EcalDQMCommonUtils.cc.