CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions | Private Attributes

ecaldqm::OccupancyTask Class Reference

#include <OccupancyTask.h>

Inheritance diagram for ecaldqm::OccupancyTask:
ecaldqm::DQWorkerTask ecaldqm::DQWorker

List of all members.

Public Types

enum  MESets {
  kDigi, kDigiProjEta, kDigiProjPhi, kDigiAll,
  kDigiDCC, kRecHit1D, kRecHitThr, kRecHitThrProjEta,
  kRecHitThrProjPhi, kRecHitThrAll, kTPDigi, kTPDigiProjEta,
  kTPDigiProjPhi, kTPDigiThr, kTPDigiThrProjEta, kTPDigiThrProjPhi,
  kTPDigiThrAll, nMESets
}

Public Member Functions

void analyze (const void *, Collections)
bool filterRunType (const std::vector< short > &)
 OccupancyTask (const edm::ParameterSet &, const edm::ParameterSet &)
void runOnDigis (const EcalDigiCollection &)
void runOnRecHits (const EcalRecHitCollection &, Collections)
void runOnTPDigis (const EcalTrigPrimDigiCollection &)
 ~OccupancyTask ()

Static Public Member Functions

static void setMEData (std::vector< MEData > &)

Private Attributes

float recHitThreshold_
float tpThreshold_

Detailed Description

Definition at line 11 of file OccupancyTask.h.


Member Enumeration Documentation

Enumerator:
kDigi 
kDigiProjEta 
kDigiProjPhi 
kDigiAll 
kDigiDCC 
kRecHit1D 
kRecHitThr 
kRecHitThrProjEta 
kRecHitThrProjPhi 
kRecHitThrAll 
kTPDigi 
kTPDigiProjEta 
kTPDigiProjPhi 
kTPDigiThr 
kTPDigiThrProjEta 
kTPDigiThrProjPhi 
kTPDigiThrAll 
nMESets 

Reimplemented from ecaldqm::DQWorker.

Definition at line 24 of file OccupancyTask.h.

                {
      kDigi, // h2f
      kDigiProjEta, // h1f
      kDigiProjPhi, // h1f
      kDigiAll,
      kDigiDCC,
      //      kRecHit, // h2f
      //      kRecHitProjEta, // h1f
      //      kRecHitProjPhi, // h1f
      kRecHit1D,
      kRecHitThr, // h2f
      kRecHitThrProjEta, // h1f
      kRecHitThrProjPhi, // h1f
      kRecHitThrAll, // h1f
      kTPDigi, // h2f
      kTPDigiProjEta, // h1f
      kTPDigiProjPhi, // h1f
      kTPDigiThr, // h2f
      kTPDigiThrProjEta, // h1f
      kTPDigiThrProjPhi, // h1f
      kTPDigiThrAll,
      nMESets
    };

Constructor & Destructor Documentation

afs cern ch work a aaltunda public www CMSSW_5_3_13_patch3 src DQM EcalBarrelMonitorTasks src OccupancyTask cc ecaldqm::OccupancyTask::OccupancyTask ( const edm::ParameterSet _params,
const edm::ParameterSet _paths 
)

Definition at line 8 of file OccupancyTask.cc.

References edm::ParameterSet::getUntrackedParameter(), edm::ParameterSet::getUntrackedParameterSet(), ecaldqm::kEBDigi, ecaldqm::kEBRecHit, ecaldqm::kEEDigi, ecaldqm::kEERecHit, and ecaldqm::kTrigPrimDigi.

  {
    collectionMask_ =
      (0x1 << kEBDigi) |
      (0x1 << kEEDigi) |
      (0x1 << kTrigPrimDigi) |
      (0x1 << kEBRecHit) |
      (0x1 << kEERecHit);

    edm::ParameterSet const& taskParams(_params.getUntrackedParameterSet(name_));

    recHitThreshold_ = taskParams.getUntrackedParameter<double>("recHitThreshold");
    tpThreshold_ = taskParams.getUntrackedParameter<double>("tpThreshold", 1.0);
  }

ecaldqm::OccupancyTask::~OccupancyTask ( )

Definition at line 26 of file OccupancyTask.cc.

  {
  }


Member Function Documentation

void ecaldqm::OccupancyTask::analyze ( const void *  _p,
Collections  _collection 
) [inline, virtual]

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 56 of file OccupancyTask.h.

References ecaldqm::kEBDigi, ecaldqm::kEBRecHit, ecaldqm::kEEDigi, ecaldqm::kEERecHit, ecaldqm::kTrigPrimDigi, runOnDigis(), runOnRecHits(), and runOnTPDigis().

                                                                           {
    switch(_collection){
    case kEBDigi:
    case kEEDigi:
      runOnDigis(*static_cast<const EcalDigiCollection*>(_p));
      break;
    case kTrigPrimDigi:
      runOnTPDigis(*static_cast<const EcalTrigPrimDigiCollection*>(_p));
      break;
    case kEBRecHit:
    case kEERecHit:
      runOnRecHits(*static_cast<const EcalRecHitCollection*>(_p), _collection);
      break;
    default:
      break;
    }
  }
bool ecaldqm::OccupancyTask::filterRunType ( const std::vector< short > &  _runType) [virtual]

Reimplemented from ecaldqm::DQWorkerTask.

Definition at line 31 of file OccupancyTask.cc.

References EcalDCCHeaderBlock::COSMIC, EcalDCCHeaderBlock::COSMICS_GLOBAL, EcalDCCHeaderBlock::COSMICS_LOCAL, EcalDCCHeaderBlock::MTCC, EcalDCCHeaderBlock::PHYSICS_GLOBAL, and EcalDCCHeaderBlock::PHYSICS_LOCAL.

  {
    for(int iFED(0); iFED < 54; iFED++){
      if(_runType[iFED] == EcalDCCHeaderBlock::COSMIC ||
         _runType[iFED] == EcalDCCHeaderBlock::MTCC ||
         _runType[iFED] == EcalDCCHeaderBlock::COSMICS_GLOBAL ||
         _runType[iFED] == EcalDCCHeaderBlock::PHYSICS_GLOBAL ||
         _runType[iFED] == EcalDCCHeaderBlock::COSMICS_LOCAL ||
         _runType[iFED] == EcalDCCHeaderBlock::PHYSICS_LOCAL) return true;
    }

    return false;
  }

void ecaldqm::OccupancyTask::runOnDigis ( const EcalDigiCollection _digis)

Definition at line 46 of file OccupancyTask.cc.

References edm::DataFrameContainer::begin(), edm::DataFrameContainer::end(), errorMatrix2Lands_multiChannel::id, kDigi, kDigiAll, kDigiDCC, kDigiProjEta, kDigiProjPhi, and ecaldqm::DQWorker::MEs_.

Referenced by analyze().

  {
    for(EcalDigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
      DetId id(digiItr->id());
      MEs_[kDigi]->fill(id);
      MEs_[kDigiProjEta]->fill(id);
      MEs_[kDigiProjPhi]->fill(id);
      MEs_[kDigiAll]->fill(id);
      MEs_[kDigiDCC]->fill(id);
    }
  }

void ecaldqm::OccupancyTask::runOnRecHits ( const EcalRecHitCollection _hits,
Collections  _collection 
)

Definition at line 78 of file OccupancyTask.cc.

References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), errorMatrix2Lands_multiChannel::id, EcalDQMBinningService::kEB, ecaldqm::kEBRecHit, EcalDQMBinningService::kEE, EcalRecHit::kGood, kRecHit1D, kRecHitThr, kRecHitThrAll, kRecHitThrProjEta, kRecHitThrProjPhi, ecaldqm::DQWorker::MEs_, recHitThreshold_, and edm::SortedCollection< T, SORT >::size().

Referenced by analyze().

  {
    uint32_t mask(~(0x1 << EcalRecHit::kGood));

    for(EcalRecHitCollection::const_iterator hitItr(_hits.begin()); hitItr != _hits.end(); ++hitItr){
      DetId id(hitItr->id());

//       MEs_[kRecHit]->fill(id);
//       MEs_[kRecHitProjEta]->fill(id);
//       MEs_[kRecHitProjPhi]->fill(id);

      if(!hitItr->checkFlagMask(mask) && hitItr->energy() > recHitThreshold_){
        MEs_[kRecHitThr]->fill(id);
        MEs_[kRecHitThrProjEta]->fill(id);
        MEs_[kRecHitThrProjPhi]->fill(id);
        MEs_[kRecHitThrAll]->fill(id);
      }
    }

    if(_collection == kEBRecHit)
      MEs_[kRecHit1D]->fill((unsigned)BinService::kEB + 1, float(_hits.size()));
    else
      MEs_[kRecHit1D]->fill((unsigned)BinService::kEE + 1, float(_hits.size()));
  }

void ecaldqm::OccupancyTask::runOnTPDigis ( const EcalTrigPrimDigiCollection _digis)
void ecaldqm::OccupancyTask::setMEData ( std::vector< MEData > &  _data) [static]

Reimplemented from ecaldqm::DQWorker.

Definition at line 105 of file OccupancyTask.cc.

References MonitorElement::DQM_KIND_TH1F, MonitorElement::DQM_KIND_TH2F, EcalDQMBinningService::AxisSpecs::high, EcalDQMBinningService::kCrystal, EcalDQMBinningService::kDCC, kDigi, kDigiAll, kDigiDCC, kDigiProjEta, kDigiProjPhi, EcalDQMBinningService::kEcal2P, EcalDQMBinningService::kEcal3P, EcalDQMBinningService::kProjEta, EcalDQMBinningService::kProjPhi, kRecHit1D, kRecHitThr, kRecHitThrAll, kRecHitThrProjEta, kRecHitThrProjPhi, EcalDQMBinningService::kSM, EcalDQMBinningService::kSuperCrystal, kTPDigi, kTPDigiProjEta, kTPDigiProjPhi, kTPDigiThr, kTPDigiThrAll, kTPDigiThrProjEta, kTPDigiThrProjPhi, EcalDQMBinningService::kTriggerTower, EcalDQMBinningService::kUser, EcalDQMBinningService::AxisSpecs::low, and EcalDQMBinningService::AxisSpecs::nbins.

  {
    BinService::AxisSpecs axis;

    _data[kDigi] = MEData("Digi", BinService::kSM, BinService::kCrystal, MonitorElement::DQM_KIND_TH2F);
    _data[kDigiProjEta] = MEData("Digi", BinService::kEcal3P, BinService::kProjEta, MonitorElement::DQM_KIND_TH1F);
    _data[kDigiProjPhi] = MEData("Digi", BinService::kEcal3P, BinService::kProjPhi, MonitorElement::DQM_KIND_TH1F);
    _data[kDigiAll] = MEData("Digi", BinService::kEcal3P, BinService::kSuperCrystal, MonitorElement::DQM_KIND_TH2F);
    _data[kDigiDCC] = MEData("DigiDCC", BinService::kEcal2P, BinService::kDCC, MonitorElement::DQM_KIND_TH1F);

    axis.nbins = 100;
    axis.low = 0.;
    axis.high = 6000.;
    _data[kRecHit1D] = MEData("RecHit1D", BinService::kEcal2P, BinService::kUser, MonitorElement::DQM_KIND_TH1F, &axis);
    _data[kRecHitThr] = MEData("RecHitThr", BinService::kSM, BinService::kCrystal, MonitorElement::DQM_KIND_TH2F);
    _data[kRecHitThrProjEta] = MEData("RecHitThr", BinService::kEcal3P, BinService::kProjEta, MonitorElement::DQM_KIND_TH1F);
    _data[kRecHitThrProjPhi] = MEData("RecHitThr", BinService::kEcal3P, BinService::kProjPhi, MonitorElement::DQM_KIND_TH1F);
    _data[kRecHitThrAll] = MEData("RecHitThr", BinService::kEcal3P, BinService::kSuperCrystal, MonitorElement::DQM_KIND_TH2F);
    _data[kTPDigi] = MEData("TPDigi", BinService::kSM, BinService::kTriggerTower, MonitorElement::DQM_KIND_TH2F);
    _data[kTPDigiProjEta] = MEData("TPDigi", BinService::kEcal3P, BinService::kProjEta, MonitorElement::DQM_KIND_TH1F);
    _data[kTPDigiProjPhi] = MEData("TPDigi", BinService::kEcal3P, BinService::kProjPhi, MonitorElement::DQM_KIND_TH1F);
    _data[kTPDigiThr] = MEData("TPDigiThr", BinService::kSM, BinService::kTriggerTower, MonitorElement::DQM_KIND_TH2F);
    _data[kTPDigiThrProjEta] = MEData("TPDigiThr", BinService::kEcal3P, BinService::kProjEta, MonitorElement::DQM_KIND_TH1F);
    _data[kTPDigiThrProjPhi] = MEData("TPDigiThr", BinService::kEcal3P, BinService::kProjPhi, MonitorElement::DQM_KIND_TH1F);
    _data[kTPDigiThrAll] = MEData("TPDigiThr", BinService::kEcal3P, BinService::kTriggerTower, MonitorElement::DQM_KIND_TH2F);
  }


Member Data Documentation

Definition at line 51 of file OccupancyTask.h.

Referenced by runOnRecHits().

Definition at line 52 of file OccupancyTask.h.

Referenced by runOnTPDigis().