CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Private Attributes

EEPedestalTask Class Reference

#include <EEPedestalTask.h>

Inheritance diagram for EEPedestalTask:
edm::EDAnalyzer

List of all members.

Public Member Functions

 EEPedestalTask (const edm::ParameterSet &ps)
 Constructor.
virtual ~EEPedestalTask ()
 Destructor.

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze.
void beginJob (void)
 BeginJob.
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 BeginRun.
void cleanup (void)
 Cleanup.
void endJob (void)
 EndJob.
void endRun (const edm::Run &r, const edm::EventSetup &c)
 EndRun.
void reset (void)
 Reset.
void setup (void)
 Setup.

Private Attributes

DQMStoredqmStore_
edm::InputTag EcalPnDiodeDigiCollection_
edm::InputTag EcalRawDataCollection_
edm::InputTag EEDigiCollection_
bool enableCleanup_
int ievt_
bool init_
MonitorElementmePed3SumMapG01_ [18]
MonitorElementmePed3SumMapG06_ [18]
MonitorElementmePed3SumMapG12_ [18]
MonitorElementmePed5SumMapG01_ [18]
MonitorElementmePed5SumMapG06_ [18]
MonitorElementmePed5SumMapG12_ [18]
MonitorElementmePedMapG01_ [18]
MonitorElementmePedMapG06_ [18]
MonitorElementmePedMapG12_ [18]
MonitorElementmePnPedMapG01_ [18]
MonitorElementmePnPedMapG16_ [18]
bool mergeRuns_
std::vector< int > MGPAGains_
std::vector< int > MGPAGainsPN_
std::string prefixME_

Detailed Description

Definition at line 20 of file EEPedestalTask.h.


Constructor & Destructor Documentation

EEPedestalTask::EEPedestalTask ( const edm::ParameterSet ps)

Constructor.

Definition at line 32 of file EEPedestalTask.cc.

References dqmStore_, EcalPnDiodeDigiCollection_, EcalRawDataCollection_, EEDigiCollection_, enableCleanup_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, init_, mePed3SumMapG01_, mePed3SumMapG06_, mePed3SumMapG12_, mePed5SumMapG01_, mePed5SumMapG06_, mePed5SumMapG12_, mePedMapG01_, mePedMapG06_, mePedMapG12_, mePnPedMapG01_, mePnPedMapG16_, mergeRuns_, MGPAGains_, MGPAGainsPN_, cmsCodeRules::cppFunctionSkipper::operator, and prefixME_.

                                                       {

  init_ = false;

  dqmStore_ = edm::Service<DQMStore>().operator->();

  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");

  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);

  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);

  EcalRawDataCollection_ = ps.getParameter<edm::InputTag>("EcalRawDataCollection");
  EEDigiCollection_ = ps.getParameter<edm::InputTag>("EEDigiCollection");
  EcalPnDiodeDigiCollection_ = ps.getParameter<edm::InputTag>("EcalPnDiodeDigiCollection");

  MGPAGains_.reserve(3);
  for ( unsigned int i = 1; i <= 3; i++ ) MGPAGains_.push_back(i);
  MGPAGains_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGains", MGPAGains_);

  MGPAGainsPN_.reserve(2);
  for ( unsigned int i = 1; i <= 3; i++ ) MGPAGainsPN_.push_back(i);
  MGPAGainsPN_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGainsPN", MGPAGainsPN_);

  for (int i = 0; i < 18; i++) {
    mePedMapG01_[i] = 0;
    mePedMapG06_[i] = 0;
    mePedMapG12_[i] = 0;
#ifdef COMMON_NOISE_ANALYSIS
    mePed3SumMapG01_[i] = 0;
    mePed3SumMapG06_[i] = 0;
    mePed3SumMapG12_[i] = 0;
    mePed5SumMapG01_[i] = 0;
    mePed5SumMapG06_[i] = 0;
    mePed5SumMapG12_[i] = 0;
#endif
    mePnPedMapG01_[i] = 0;
    mePnPedMapG16_[i] = 0;
  }

}
EEPedestalTask::~EEPedestalTask ( ) [virtual]

Destructor.

Definition at line 74 of file EEPedestalTask.cc.

                               {

}

Member Function Documentation

void EEPedestalTask::analyze ( const edm::Event e,
const edm::EventSetup c 
) [protected, virtual]

Analyze.

Implements edm::EDAnalyzer.

Definition at line 347 of file EEPedestalTask.cc.

References ecalMGPA::adc(), EcalMGPASample::adc(), EcalEndcap, EcalPnDiodeDigiCollection_, EcalRawDataCollection_, EEDigiCollection_, MonitorElement::Fill(), EcalMGPASample::gainId(), edm::Event::getByLabel(), i, ievt_, init_, Numbers::iSM(), ecalpyutils::ism(), EEDetId::ix(), Numbers::ix0EE(), Numbers::iy0EE(), j, LogDebug, mePed3SumMapG01_, mePed3SumMapG06_, mePed3SumMapG12_, mePed5SumMapG01_, mePed5SumMapG06_, mePed5SumMapG12_, mePedMapG01_, mePedMapG06_, mePedMapG12_, mePnPedMapG01_, mePnPedMapG16_, EcalDCCHeaderBlock::PEDESTAL_GAP, EcalDCCHeaderBlock::PEDESTAL_STD, EcalDataFrame::sample(), setup(), Numbers::subDet(), and Numbers::validEE().

                                                                     {

  bool enable = false;
  int runType[18];
  for (int i=0; i<18; i++) runType[i] = -1;

  edm::Handle<EcalRawDataCollection> dcchs;

  if ( e.getByLabel(EcalRawDataCollection_, dcchs) ) {

    for ( EcalRawDataCollection::const_iterator dcchItr = dcchs->begin(); dcchItr != dcchs->end(); ++dcchItr ) {

      if ( Numbers::subDet( *dcchItr ) != EcalEndcap ) continue;

      int ism = Numbers::iSM( *dcchItr, EcalEndcap );

      runType[ism-1] = dcchItr->getRunType();

      if ( dcchItr->getRunType() == EcalDCCHeaderBlock::PEDESTAL_STD ||
           dcchItr->getRunType() == EcalDCCHeaderBlock::PEDESTAL_GAP ) enable = true;

    }

  } else {

    edm::LogWarning("EEPedestalTask") << EcalRawDataCollection_ << " not available";

  }

  if ( ! enable ) return;

  if ( ! init_ ) this->setup();

  ievt_++;

  edm::Handle<EEDigiCollection> digis;

  if ( e.getByLabel(EEDigiCollection_, digis) ) {

    int need = digis->size();
    LogDebug("EEPedestalTask") << "event " << ievt_ << " digi collection size " << need;

    float xmap01[18][50][50];
    float xmap06[18][50][50];
    float xmap12[18][50][50];

    for ( int ism = 1; ism <= 18; ism++ ) {
      for ( int ix = 1; ix <= 50; ix++ ) {
        for ( int iy = 1; iy <= 50; iy++ ) {

          xmap01[ism-1][ix-1][iy-1] = 0.;
          xmap06[ism-1][ix-1][iy-1] = 0.;
          xmap12[ism-1][ix-1][iy-1] = 0.;

        }
      }
    }

    for ( EEDigiCollection::const_iterator digiItr = digis->begin(); digiItr != digis->end(); ++digiItr ) {

      EEDetId id = digiItr->id();

      int ix = id.ix();
      int iy = id.iy();

      int ism = Numbers::iSM( id );

      if ( ism >= 1 && ism <= 9 ) ix = 101 - ix;

      float xix = ix - 0.5;
      float xiy = iy - 0.5;

      if ( ! ( runType[ism-1] == EcalDCCHeaderBlock::PEDESTAL_STD ||
               runType[ism-1] == EcalDCCHeaderBlock::PEDESTAL_GAP ) ) continue;

      EEDataFrame dataframe = (*digiItr);

      for (int i = 0; i < 10; i++) {

        int adc = dataframe.sample(i).adc();

        MonitorElement* mePedMap = 0;

        if ( dataframe.sample(i).gainId() == 1 ) mePedMap = mePedMapG12_[ism-1];
        if ( dataframe.sample(i).gainId() == 2 ) mePedMap = mePedMapG06_[ism-1];
        if ( dataframe.sample(i).gainId() == 3 ) mePedMap = mePedMapG01_[ism-1];

        float xval = float(adc);

        if ( mePedMap ) mePedMap->Fill(xix, xiy, xval);

        if ( dataframe.sample(i).gainId() == 1 ) xmap12[ism-1][ix-1-Numbers::ix0EE(ism)][iy-1-Numbers::iy0EE(ism)] = xmap12[ism-1][ix-1-Numbers::ix0EE(ism)][iy-1-Numbers::iy0EE(ism)] + xval;
        if ( dataframe.sample(i).gainId() == 2 ) xmap06[ism-1][ix-1-Numbers::ix0EE(ism)][iy-1-Numbers::iy0EE(ism)] = xmap06[ism-1][ix-1-Numbers::ix0EE(ism)][iy-1-Numbers::iy0EE(ism)] + xval;
        if ( dataframe.sample(i).gainId() == 3 ) xmap01[ism-1][ix-1-Numbers::ix0EE(ism)][iy-1-Numbers::iy0EE(ism)] = xmap01[ism-1][ix-1-Numbers::ix0EE(ism)][iy-1-Numbers::iy0EE(ism)] + xval;

      }

      xmap12[ism-1][ix-1-Numbers::ix0EE(ism)][iy-1-Numbers::iy0EE(ism)]=xmap12[ism-1][ix-1-Numbers::ix0EE(ism)][iy-1-Numbers::iy0EE(ism)]/10.;
      xmap06[ism-1][ix-1-Numbers::ix0EE(ism)][iy-1-Numbers::iy0EE(ism)]=xmap06[ism-1][ix-1-Numbers::ix0EE(ism)][iy-1-Numbers::iy0EE(ism)]/10.;
      xmap01[ism-1][ix-1-Numbers::ix0EE(ism)][iy-1-Numbers::iy0EE(ism)]=xmap01[ism-1][ix-1-Numbers::ix0EE(ism)][iy-1-Numbers::iy0EE(ism)]/10.;

    }

    // to be re-done using the 3x3 & 5x5 Selectors (if faster)

#ifdef COMMON_NOISE_ANALYSIS
    for ( int ism = 1; ism <= 18; ism++ ) {
      for ( int ix = 1; ix <= 50; ix++ ) {
        for ( int iy = 1; iy <= 50; iy++ ) {

          int xix = ix + Numbers::ix0EE(ism);
          int xiy = iy + Numbers::iy0EE(ism);

          if ( ism >= 1 && ism <= 9 ) xix = 101 - xix;

          if ( ! Numbers::validEE(ism, xix, xiy) ) continue;

          float xix = ix - 0.5;
          float xiy = iy - 0.5;

          float x3val01;
          float x3val06;
          float x3val12;

          if ( ix >= 2 && ix <= 49 && iy >= 2 && iy <= 49 ) {

            x3val01 = 0.;
            x3val06 = 0.;
            x3val12 = 0.;
            for ( int i = -1; i <= +1; i++ ) {
              for ( int j = -1; j <= +1; j++ ) {

                x3val01 = x3val01 + xmap01[ism-1][ix-1+i][iy-1+j];
                x3val06 = x3val06 + xmap06[ism-1][ix-1+i][iy-1+j];
                x3val12 = x3val12 + xmap12[ism-1][ix-1+i][iy-1+j];

              }
            }
            x3val01 = x3val01 / 9.;
            x3val06 = x3val06 / 9.;
            x3val12 = x3val12 / 9.;
            if ( mePed3SumMapG01_[ism-1] && x3val01 != 0. ) mePed3SumMapG01_[ism-1]->Fill(xix+Numbers::ix0EE(ism), xiy+Numbers::iy0EE(ism), x3val01);
            if ( mePed3SumMapG06_[ism-1] && x3val06 != 0. ) mePed3SumMapG06_[ism-1]->Fill(xix+Numbers::ix0EE(ism), xiy+Numbers::iy0EE(ism), x3val06);
            if ( mePed3SumMapG12_[ism-1] && x3val12 != 0. ) mePed3SumMapG12_[ism-1]->Fill(xix+Numbers::ix0EE(ism), xiy+Numbers::iy0EE(ism), x3val12);

          }

          float x5val01;
          float x5val06;
          float x5val12;

          if ( ix >= 3 && ix <= 48 && iy >= 3 && iy <= 48 ) {

            x5val01 = 0.;
            x5val06 = 0.;
            x5val12 = 0.;
            for ( int i = -2; i <= +2; i++ ) {
              for ( int j = -2; j <= +2; j++ ) {

                x5val01 = x5val01 + xmap01[ism-1][ix-1+i][iy-1+j];
                x5val06 = x5val06 + xmap06[ism-1][ix-1+i][iy-1+j];
                x5val12 = x5val12 + xmap12[ism-1][ix-1+i][iy-1+j];

              }
            }
            x5val01 = x5val01 / 25.;
            x5val06 = x5val06 / 25.;
            x5val12 = x5val12 / 25.;
            if ( mePed5SumMapG01_[ism-1] && x5val01 != 0. ) mePed5SumMapG01_[ism-1]->Fill(xix+Numbers::ix0EE(ism), xiy+Numbers::iy0EE(ism), x5val01);
            if ( mePed5SumMapG06_[ism-1] && x5val06 != 0. ) mePed5SumMapG06_[ism-1]->Fill(xix+Numbers::ix0EE(ism), xiy+Numbers::iy0EE(ism), x5val06);
            if ( mePed5SumMapG12_[ism-1] && x5val12 != 0. ) mePed5SumMapG12_[ism-1]->Fill(xix+Numbers::ix0EE(ism), xiy+Numbers::iy0EE(ism), x5val12);

          }

        }
      }
    }
#endif

  } else {

    edm::LogWarning("EEPedestalTask") << EEDigiCollection_ << " not available";

  }

  edm::Handle<EcalPnDiodeDigiCollection> pns;

  if ( e.getByLabel(EcalPnDiodeDigiCollection_, pns) ) {

    int nep = pns->size();
    LogDebug("EEPedestalTask") << "event " << ievt_ << " pns collection size " << nep;

    for ( EcalPnDiodeDigiCollection::const_iterator pnItr = pns->begin(); pnItr != pns->end(); ++pnItr ) {

      if ( Numbers::subDet( pnItr->id() ) != EcalEndcap ) continue;

      int ism = Numbers::iSM( pnItr->id() );

      int num = pnItr->id().iPnId();

      if ( ! ( runType[ism-1] == EcalDCCHeaderBlock::PEDESTAL_STD ||
               runType[ism-1] == EcalDCCHeaderBlock::PEDESTAL_GAP ) ) continue;

      for (int i = 0; i < 50; i++) {

        int adc = pnItr->sample(i).adc();

        MonitorElement* mePNPed = 0;

        if ( pnItr->sample(i).gainId() == 0 ) mePNPed = mePnPedMapG01_[ism-1];
        if ( pnItr->sample(i).gainId() == 1 ) mePNPed = mePnPedMapG16_[ism-1];

        float xval = float(adc);

        if ( mePNPed ) mePNPed->Fill(num - 0.5, xval);

      }

    }

  } else {

    edm::LogWarning("EEPedestalTask") << EcalPnDiodeDigiCollection_ << " not available";

  }

}
void EEPedestalTask::beginJob ( void  ) [protected, virtual]

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 78 of file EEPedestalTask.cc.

References dqmStore_, ievt_, prefixME_, DQMStore::rmdir(), and DQMStore::setCurrentFolder().

                                 {

  ievt_ = 0;

  if ( dqmStore_ ) {
    dqmStore_->setCurrentFolder(prefixME_ + "/EEPedestalTask");
    dqmStore_->rmdir(prefixME_ + "/EEPedestalTask");
  }

}
void EEPedestalTask::beginRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 89 of file EEPedestalTask.cc.

References Numbers::initGeometry(), mergeRuns_, and reset().

                                                                     {

  Numbers::initGeometry(c, false);

  if ( ! mergeRuns_ ) this->reset();

}
void EEPedestalTask::cleanup ( void  ) [protected]

Cleanup.

Definition at line 256 of file EEPedestalTask.cc.

References dqmStore_, spr::find(), edm::getName(), i, init_, mePed3SumMapG01_, mePed3SumMapG06_, mePed3SumMapG12_, mePed5SumMapG01_, mePed5SumMapG06_, mePed5SumMapG12_, mePedMapG01_, mePedMapG06_, mePedMapG12_, mePnPedMapG01_, mePnPedMapG16_, MGPAGains_, MGPAGainsPN_, prefixME_, DQMStore::removeElement(), and DQMStore::setCurrentFolder().

Referenced by endJob().

                                {

  if ( ! init_ ) return;

  if ( dqmStore_ ) {
    dqmStore_->setCurrentFolder(prefixME_ + "/EEPedestalTask");

    if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {

      dqmStore_->setCurrentFolder(prefixME_ + "/EEPedestalTask/Gain01");
      for ( int i = 0; i < 18; i++ ) {
        if ( mePedMapG01_[i] ) dqmStore_->removeElement( mePedMapG01_[i]->getName() );
        mePedMapG01_[i] = 0;
#ifdef COMMON_NOISE_ANALYSIS
        if ( mePed3SumMapG01_[i] ) dqmStore_->removeElement( mePed3SumMapG01_[i]->getName() );
        mePed3SumMapG01_[i] = 0;
        if ( mePed5SumMapG01_[i] ) dqmStore_->removeElement( mePed5SumMapG01_[i]->getName() );
        mePed5SumMapG01_[i] = 0;
#endif
      }

    }

    if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {

      dqmStore_->setCurrentFolder(prefixME_ + "/EEPedestalTask/Gain06");
      for ( int i = 0; i < 18; i++ ) {
        if ( mePedMapG06_[i] ) dqmStore_->removeElement( mePedMapG06_[i]->getName() );
        mePedMapG06_[i] = 0;
#ifdef COMMON_NOISE_ANALYSIS
        if ( mePed3SumMapG06_[i] ) dqmStore_->removeElement( mePed3SumMapG06_[i]->getName() );
        mePed3SumMapG06_[i] = 0;
        if ( mePed5SumMapG06_[i] ) dqmStore_->removeElement( mePed5SumMapG06_[i]->getName() );
        mePed5SumMapG06_[i] = 0;
#endif
      }

    }

    if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {

      dqmStore_->setCurrentFolder(prefixME_ + "/EEPedestalTask/Gain12");
      for ( int i = 0; i < 18; i++ ) {
        if ( mePedMapG12_[i] ) dqmStore_->removeElement( mePedMapG12_[i]->getName() );
        mePedMapG12_[i] = 0;
#ifdef COMMON_NOISE_ANALYSIS
        if ( mePed3SumMapG12_[i] ) dqmStore_->removeElement( mePed3SumMapG12_[i]->getName() );
        mePed3SumMapG12_[i] = 0;
        if ( mePed5SumMapG12_[i] ) dqmStore_->removeElement( mePed5SumMapG12_[i]->getName() );
        mePed5SumMapG12_[i] = 0;
#endif
      }

    }

    dqmStore_->setCurrentFolder(prefixME_ + "/EEPedestalTask/PN");

    if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {

      dqmStore_->setCurrentFolder(prefixME_ + "/EEPedestalTask/PN/Gain01");
      for ( int i = 0; i < 18; i++ ) {
        if ( mePnPedMapG01_[i]) dqmStore_->removeElement( mePnPedMapG01_[i]->getName() );
        mePnPedMapG01_[i] = 0;
      }

    }

    if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {

      dqmStore_->setCurrentFolder(prefixME_ + "/EEPedestalTask/PN/Gain16");
      for ( int i = 0; i < 18; i++ ) {
        if ( mePnPedMapG16_[i]) dqmStore_->removeElement( mePnPedMapG16_[i]->getName() );
        mePnPedMapG16_[i] = 0;
      }

    }

  }

  init_ = false;

}
void EEPedestalTask::endJob ( void  ) [protected, virtual]

EndJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 339 of file EEPedestalTask.cc.

References cleanup(), enableCleanup_, and ievt_.

                               {

  edm::LogInfo("EEPedestalTask") << "analyzed " << ievt_ << " events";

  if ( enableCleanup_ ) this->cleanup();

}
void EEPedestalTask::endRun ( const edm::Run r,
const edm::EventSetup c 
) [protected, virtual]

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 97 of file EEPedestalTask.cc.

                                                                   {

}
void EEPedestalTask::reset ( void  ) [protected]

Reset.

Definition at line 101 of file EEPedestalTask.cc.

References spr::find(), i, mePed3SumMapG01_, mePed3SumMapG06_, mePed3SumMapG12_, mePed5SumMapG01_, mePed5SumMapG06_, mePed5SumMapG12_, mePedMapG01_, mePedMapG06_, mePedMapG12_, mePnPedMapG01_, mePnPedMapG16_, MGPAGains_, MGPAGainsPN_, and MonitorElement::Reset().

Referenced by beginRun().

                               {

  for (int i = 0; i < 18; i++) {
    if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
      if ( mePedMapG01_[i] ) mePedMapG01_[i]->Reset();
    }
    if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
      if ( mePedMapG06_[i] ) mePedMapG06_[i]->Reset();
    }
    if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
      if ( mePedMapG12_[i] ) mePedMapG12_[i]->Reset();
    }
#ifdef COMMON_NOISE_ANALYSIS
    if ( mePed3SumMapG01_[i] ) mePed3SumMapG01_[i]->Reset();
    if ( mePed3SumMapG06_[i] ) mePed3SumMapG06_[i]->Reset();
    if ( mePed3SumMapG12_[i] ) mePed3SumMapG12_[i]->Reset();
    if ( mePed5SumMapG01_[i] ) mePed5SumMapG01_[i]->Reset();
    if ( mePed5SumMapG06_[i] ) mePed5SumMapG06_[i]->Reset();
    if ( mePed5SumMapG12_[i] ) mePed5SumMapG12_[i]->Reset();
#endif
    if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
      if ( mePnPedMapG01_[i] ) mePnPedMapG01_[i]->Reset();
    }
    if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
      if ( mePnPedMapG16_[i] ) mePnPedMapG16_[i]->Reset();
    }
  }

}
void EEPedestalTask::setup ( void  ) [protected]

Setup.

Definition at line 131 of file EEPedestalTask.cc.

References DQMStore::bookProfile(), DQMStore::bookProfile2D(), dqmStore_, spr::find(), trackerHits::histo, i, init_, Numbers::ix0EE(), Numbers::iy0EE(), mePed3SumMapG01_, mePed3SumMapG06_, mePed3SumMapG12_, mePed5SumMapG01_, mePed5SumMapG06_, mePed5SumMapG12_, mePedMapG01_, mePedMapG06_, mePedMapG12_, mePnPedMapG01_, mePnPedMapG16_, MGPAGains_, MGPAGainsPN_, prefixME_, Numbers::sEE(), MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), and DQMStore::tag().

Referenced by analyze().

                              {

  init_ = true;

  char histo[200];

  if ( dqmStore_ ) {
    dqmStore_->setCurrentFolder(prefixME_ + "/EEPedestalTask");

    if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {

      dqmStore_->setCurrentFolder(prefixME_ + "/EEPedestalTask/Gain01");
      for (int i = 0; i < 18; i++) {
        sprintf(histo, "EEPT pedestal %s G01", Numbers::sEE(i+1).c_str());
        mePedMapG01_[i] = dqmStore_->bookProfile2D(histo, histo, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50., 4096, 0., 4096., "s");
        mePedMapG01_[i]->setAxisTitle("ix", 1);
        if ( i+1 >= 1 && i+1 <= 9 ) mePedMapG01_[i]->setAxisTitle("101-ix", 1);
        mePedMapG01_[i]->setAxisTitle("iy", 2);
        dqmStore_->tag(mePedMapG01_[i], i+1);
#ifdef COMMON_NOISE_ANALYSIS
        sprintf(histo, "EEPT pedestal 3sum %s G01", Numbers::sEE(i+1).c_str());
        mePed3SumMapG01_[i] = dqmStore_->bookProfile2D(histo, histo, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50., 4096, 0., 4096., "s");
        mePed3SumMapG01_[i]->setAxisTitle("ix", 1);
        if ( i+1 >= 1 && i+1 <= 9 ) mePed3SumMapG01_[i]->setAxisTitle("101-ix", 1);
        mePed3SumMapG01_[i]->setAxisTitle("iy", 2);
        dqmStore_->tag(mePed3SumMapG01_[i], i+1);
        sprintf(histo, "EEPT pedestal 5sum %s G01", Numbers::sEE(i+1).c_str());
        mePed5SumMapG01_[i] = dqmStore_->bookProfile2D(histo, histo, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50., 4096, 0., 4096., "s");
        mePed5SumMapG01_[i]->setAxisTitle("ix", 1);
        if ( i+1 >= 1 && i+1 <= 9 ) mePed5SumMapG01_[i]->setAxisTitle("101-ix", 1);
        mePed5SumMapG01_[i]->setAxisTitle("iy", 2);
        dqmStore_->tag(mePed5SumMapG01_[i], i+1);
#endif
      }

    }

    if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {

      dqmStore_->setCurrentFolder(prefixME_ + "/EEPedestalTask/Gain06");
      for (int i = 0; i < 18; i++) {
        sprintf(histo, "EEPT pedestal %s G06", Numbers::sEE(i+1).c_str());
        mePedMapG06_[i] = dqmStore_->bookProfile2D(histo, histo, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50., 4096, 0., 4096., "s");
        mePedMapG06_[i]->setAxisTitle("ix", 1);
        if ( i+1 >= 1 && i+1 <= 9 ) mePedMapG06_[i]->setAxisTitle("101-ix", 1);
        mePedMapG06_[i]->setAxisTitle("iy", 2);
        dqmStore_->tag(mePedMapG06_[i], i+1);
#ifdef COMMON_NOISE_ANALYSIS
        sprintf(histo, "EEPT pedestal 3sum %s G06", Numbers::sEE(i+1).c_str());
        mePed3SumMapG06_[i] = dqmStore_->bookProfile2D(histo, histo, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50., 4096, 0., 4096., "s");
        mePed3SumMapG06_[i]->setAxisTitle("ix", 1);
        if ( i+1 >= 1 && i+1 <= 9 ) mePed3SumMapG06_[i]->setAxisTitle("101-ix", 1);
        mePed3SumMapG06_[i]->setAxisTitle("iy", 2);
        dqmStore_->tag(mePed3SumMapG06_[i], i+1);
        sprintf(histo, "EEPT pedestal 5sum %s G06", Numbers::sEE(i+1).c_str());
        mePed5SumMapG06_[i] = dqmStore_->bookProfile2D(histo, histo, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50., 4096, 0., 4096., "s");
        mePed5SumMapG06_[i]->setAxisTitle("ix", 1);
        if ( i+1 >= 1 && i+1 <= 9 ) mePed5SumMapG06_[i]->setAxisTitle("101-ix", 1);
        mePed5SumMapG06_[i]->setAxisTitle("iy", 2);
        dqmStore_->tag(mePed5SumMapG06_[i], i+1);
#endif
      }

    }

    if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {

      dqmStore_->setCurrentFolder(prefixME_ + "/EEPedestalTask/Gain12");
      for (int i = 0; i < 18; i++) {
        sprintf(histo, "EEPT pedestal %s G12", Numbers::sEE(i+1).c_str());
        mePedMapG12_[i] = dqmStore_->bookProfile2D(histo, histo, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50., 4096, 0., 4096., "s");
        mePedMapG12_[i]->setAxisTitle("ix", 1);
        if ( i+1 >= 1 && i+1 <= 9 ) mePedMapG12_[i]->setAxisTitle("101-ix", 1);
        mePedMapG12_[i]->setAxisTitle("iy", 2);
        dqmStore_->tag(mePedMapG12_[i], i+1);
#ifdef COMMON_NOISE_ANALYSIS
        sprintf(histo, "EEPT pedestal 3sum %s G12", Numbers::sEE(i+1).c_str());
        mePed3SumMapG12_[i] = dqmStore_->bookProfile2D(histo, histo, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50., 4096, 0., 4096., "s");
        mePed3SumMapG12_[i]->setAxisTitle("ix", 1);
        if ( i+1 >= 1 && i+1 <= 9 ) mePed3SumMapG12_[i]->setAxisTitle("101-ix", 1);
        mePed3SumMapG12_[i]->setAxisTitle("iy", 2);
        dqmStore_->tag(mePed3SumMapG12_[i], i+1);
        sprintf(histo, "EEPT pedestal 5sum %s G12", Numbers::sEE(i+1).c_str());
        mePed5SumMapG12_[i] = dqmStore_->bookProfile2D(histo, histo, 50, Numbers::ix0EE(i+1)+0., Numbers::ix0EE(i+1)+50., 50, Numbers::iy0EE(i+1)+0., Numbers::iy0EE(i+1)+50., 4096, 0., 4096., "s");
        mePed5SumMapG12_[i]->setAxisTitle("ix", 1);
        if ( i+1 >= 1 && i+1 <= 9 ) mePed5SumMapG12_[i]->setAxisTitle("101-ix", 1);
        mePed5SumMapG12_[i]->setAxisTitle("iy", 2);
        dqmStore_->tag(mePed5SumMapG12_[i], i+1);
#endif
      }

    }

    dqmStore_->setCurrentFolder(prefixME_ + "/EEPedestalTask/PN");

    if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {

      dqmStore_->setCurrentFolder(prefixME_ + "/EEPedestalTask/PN/Gain01");
      for (int i = 0; i < 18; i++) {
        sprintf(histo, "EEPDT PNs pedestal %s G01", Numbers::sEE(i+1).c_str());
        mePnPedMapG01_[i] =  dqmStore_->bookProfile(histo, histo, 10, 0., 10., 4096, 0., 4096., "s");
        mePnPedMapG01_[i]->setAxisTitle("channel", 1);
        mePnPedMapG01_[i]->setAxisTitle("pedestal", 2);
        dqmStore_->tag(mePnPedMapG01_[i], i+1);
      }

    }

    if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {

      dqmStore_->setCurrentFolder(prefixME_ + "/EEPedestalTask/PN/Gain16");
      for (int i = 0; i < 18; i++) {
        sprintf(histo, "EEPDT PNs pedestal %s G16", Numbers::sEE(i+1).c_str());
        mePnPedMapG16_[i] =  dqmStore_->bookProfile(histo, histo, 10, 0., 10., 4096, 0., 4096., "s");
        mePnPedMapG16_[i]->setAxisTitle("channel", 1);
        mePnPedMapG16_[i]->setAxisTitle("pedestal", 2);
        dqmStore_->tag(mePnPedMapG16_[i], i+1);
      }

    }

  }

}

Member Data Documentation

Definition at line 60 of file EEPedestalTask.h.

Referenced by beginJob(), cleanup(), EEPedestalTask(), and setup().

Definition at line 70 of file EEPedestalTask.h.

Referenced by analyze(), and EEPedestalTask().

Definition at line 68 of file EEPedestalTask.h.

Referenced by analyze(), and EEPedestalTask().

Definition at line 69 of file EEPedestalTask.h.

Referenced by analyze(), and EEPedestalTask().

Definition at line 64 of file EEPedestalTask.h.

Referenced by EEPedestalTask(), and endJob().

int EEPedestalTask::ievt_ [private]

Definition at line 58 of file EEPedestalTask.h.

Referenced by analyze(), beginJob(), and endJob().

bool EEPedestalTask::init_ [private]

Definition at line 89 of file EEPedestalTask.h.

Referenced by analyze(), cleanup(), EEPedestalTask(), and setup().

Definition at line 78 of file EEPedestalTask.h.

Referenced by analyze(), cleanup(), EEPedestalTask(), reset(), and setup().

Definition at line 79 of file EEPedestalTask.h.

Referenced by analyze(), cleanup(), EEPedestalTask(), reset(), and setup().

Definition at line 80 of file EEPedestalTask.h.

Referenced by analyze(), cleanup(), EEPedestalTask(), reset(), and setup().

Definition at line 82 of file EEPedestalTask.h.

Referenced by analyze(), cleanup(), EEPedestalTask(), reset(), and setup().

Definition at line 83 of file EEPedestalTask.h.

Referenced by analyze(), cleanup(), EEPedestalTask(), reset(), and setup().

Definition at line 84 of file EEPedestalTask.h.

Referenced by analyze(), cleanup(), EEPedestalTask(), reset(), and setup().

Definition at line 74 of file EEPedestalTask.h.

Referenced by analyze(), cleanup(), EEPedestalTask(), reset(), and setup().

Definition at line 75 of file EEPedestalTask.h.

Referenced by analyze(), cleanup(), EEPedestalTask(), reset(), and setup().

Definition at line 76 of file EEPedestalTask.h.

Referenced by analyze(), cleanup(), EEPedestalTask(), reset(), and setup().

Definition at line 86 of file EEPedestalTask.h.

Referenced by analyze(), cleanup(), EEPedestalTask(), reset(), and setup().

Definition at line 87 of file EEPedestalTask.h.

Referenced by analyze(), cleanup(), EEPedestalTask(), reset(), and setup().

Definition at line 66 of file EEPedestalTask.h.

Referenced by beginRun(), and EEPedestalTask().

std::vector<int> EEPedestalTask::MGPAGains_ [private]

Definition at line 71 of file EEPedestalTask.h.

Referenced by cleanup(), EEPedestalTask(), reset(), and setup().

std::vector<int> EEPedestalTask::MGPAGainsPN_ [private]

Definition at line 72 of file EEPedestalTask.h.

Referenced by cleanup(), EEPedestalTask(), reset(), and setup().

std::string EEPedestalTask::prefixME_ [private]

Definition at line 62 of file EEPedestalTask.h.

Referenced by beginJob(), cleanup(), EEPedestalTask(), and setup().