CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

DTCertificationSummary Class Reference

#include <DTCertificationSummary.h>

Inheritance diagram for DTCertificationSummary:
edm::EDAnalyzer

List of all members.

Public Member Functions

 DTCertificationSummary (const edm::ParameterSet &pset)
 Constructor.
virtual ~DTCertificationSummary ()
 Destructor.

Private Member Functions

virtual void analyze (const edm::Event &event, const edm::EventSetup &setup)
virtual void beginJob ()
virtual void beginLuminosityBlock (const edm::LuminosityBlock &lumi, const edm::EventSetup &setup)
virtual void beginRun (const edm::Run &run, const edm::EventSetup &setup)
virtual void endJob ()
virtual void endLuminosityBlock (const edm::LuminosityBlock &lumi, const edm::EventSetup &setup)
virtual void endRun (const edm::Run &run, const edm::EventSetup &setup)

Private Attributes

std::map< int, MonitorElement * > certFractions
MonitorElementcertMap
DQMStoretheDbe
MonitorElementtotalCertFraction

Detailed Description

No description available.

Date:
2010/01/22 15:32:04
Revision:
1.4
Author:
G. Cerminara - INFN Torino

Definition at line 20 of file DTCertificationSummary.h.


Constructor & Destructor Documentation

DTCertificationSummary::DTCertificationSummary ( const edm::ParameterSet pset)

Constructor.

Definition at line 27 of file DTCertificationSummary.cc.

{}
DTCertificationSummary::~DTCertificationSummary ( ) [virtual]

Destructor.

Definition at line 32 of file DTCertificationSummary.cc.

{}

Member Function Documentation

void DTCertificationSummary::analyze ( const edm::Event event,
const edm::EventSetup setup 
) [private, virtual]

Implements edm::EDAnalyzer.

Definition at line 135 of file DTCertificationSummary.cc.

{}
void DTCertificationSummary::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 36 of file DTCertificationSummary.cc.

References cppFunctionSkipper::operator, and hcal_dqm_sourceclient-file_cfg::streams.

                                     {
  // get the DQMStore
  theDbe = Service<DQMStore>().operator->();
  
  // book the ME
  theDbe->setCurrentFolder("DT/EventInfo");
  // global fraction
  totalCertFraction = theDbe->bookFloat("CertificationSummary");  
  totalCertFraction->Fill(-1);

  // certification map
  certMap = theDbe->book2D("CertificationSummaryMap","DT Certification Summary Map",12,1,13,5,-2,3);
  certMap->setAxisTitle("sector",1);
  certMap->setAxisTitle("wheel",2);

  theDbe->setCurrentFolder("DT/EventInfo/CertificationContents");
  // Wheel "fractions" -> will be 0 or 1
  for(int wheel = -2; wheel != 3; ++wheel) {
    stringstream streams;
    streams << "DT_Wheel" << wheel;
    certFractions[wheel] = theDbe->bookFloat(streams.str());
    certFractions[wheel]->Fill(-1);
  }

  //

}
void DTCertificationSummary::beginLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup setup 
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 66 of file DTCertificationSummary.cc.

                                                                                                       {
}
void DTCertificationSummary::beginRun ( const edm::Run run,
const edm::EventSetup setup 
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 72 of file DTCertificationSummary.cc.

                                                                              {
}
void DTCertificationSummary::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 131 of file DTCertificationSummary.cc.

{}
void DTCertificationSummary::endLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup setup 
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 78 of file DTCertificationSummary.cc.

                                                                                                     {
}
void DTCertificationSummary::endRun ( const edm::Run run,
const edm::EventSetup setup 
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 83 of file DTCertificationSummary.cc.

References MonitorElement::getBinContent(), min, pileupDistInMC::total, and CommonMethods::weight().

                                                                           {
  // get the relevant summary histos
  MonitorElement* effSummary = theDbe->get("DT/05-ChamberEff/EfficiencyGlbSummary");
  MonitorElement* resSummary = theDbe->get("DT/02-Segments/ResidualsGlbSummary");
  MonitorElement* segQualSummary = theDbe->get("DT/02-Segments/segmentSummary");

  // check that all needed histos are there
  if(effSummary == 0 || resSummary == 0 || segQualSummary == 0) {
    LogWarning("DQM|DTMonitorClient|DTCertificationSummary") << "*** Warning: not all needed summaries are present!" << endl;
    return;
  }

  // reset the MEs
  totalCertFraction->Fill(0.);
  certFractions[-2]->Fill(0.);
  certFractions[-1]->Fill(0.);
  certFractions[-0]->Fill(0.);
  certFractions[1]->Fill(0.);
  certFractions[2]->Fill(0.);
  certMap->Reset();

  // loop over all sectors and wheels
  for(int wheel = -2; wheel != 3; ++wheel) {
    for(int sector = 1; sector != 13; ++sector) {
      double eff = effSummary->getBinContent(sector, wheel+3);
      double res = resSummary->getBinContent(sector, wheel+3);
      double segQual = segQualSummary->getBinContent(sector, wheel+3);
      
      double total = 0;
      if(segQual != 0) {
        total = min(res,eff);
      } else {
        total = eff;
      }
      
      certMap->Fill(sector,wheel,total);      
      // can use variable weight depending on the sector
      double weight = 1./12.;
      certFractions[wheel]->Fill(certFractions[wheel]->getFloatValue() + weight*total);
      double totalWeight = 1./60.;
      totalCertFraction->Fill(totalCertFraction->getFloatValue() + totalWeight*total);
    }
  }

}

Member Data Documentation

Definition at line 45 of file DTCertificationSummary.h.

Definition at line 44 of file DTCertificationSummary.h.

Definition at line 41 of file DTCertificationSummary.h.

Definition at line 43 of file DTCertificationSummary.h.