CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
DTCertificationSummary Class Reference

#include <DTCertificationSummary.h>

Inheritance diagram for DTCertificationSummary:
DQMEDHarvester edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 DTCertificationSummary (const edm::ParameterSet &pset)
 Constructor. More...
 
virtual ~DTCertificationSummary ()
 Destructor. More...
 
- Public Member Functions inherited from DQMEDHarvester
virtual void analyze (edm::Event const &, edm::EventSetup const &) final
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
 DQMEDHarvester (void)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void beginRun (const edm::Run &run, const edm::EventSetup &setup)
 
void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &)
 DQM Client Diagnostic in offline mode. More...
 
void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 DQM Client Diagnostic in online mode. More...
 
void endRun (const edm::Run &run, const edm::EventSetup &setup)
 

Private Attributes

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

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

No description available.

Author
G. Cerminara - INFN Torino

Definition at line 19 of file DTCertificationSummary.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 25 of file DTCertificationSummary.cc.

25 {}
DTCertificationSummary::~DTCertificationSummary ( )
virtual

Destructor.

Definition at line 28 of file DTCertificationSummary.cc.

28 {}

Member Function Documentation

void DTCertificationSummary::beginRun ( const edm::Run run,
const edm::EventSetup setup 
)
privatevirtual

Reimplemented from DQMEDHarvester.

Definition at line 62 of file DTCertificationSummary.cc.

62  {
63 }
void DTCertificationSummary::dqmEndJob ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter 
)
privatevirtual

DQM Client Diagnostic in offline mode.

Implements DQMEDHarvester.

Definition at line 71 of file DTCertificationSummary.cc.

References DQMStore::IGetter::get(), MonitorElement::getBinContent(), min(), pileupDistInMC::total, and puppiForMET_cff::weight.

71  {
72 
73  // get the relevant summary histos
74  MonitorElement* effSummary = igetter.get("DT/05-ChamberEff/EfficiencyGlbSummary");
75  MonitorElement* resSummary = igetter.get("DT/02-Segments/ResidualsGlbSummary");
76  MonitorElement* segQualSummary = igetter.get("DT/02-Segments/segmentSummary");
77 
78  // check that all needed histos are there
79  if(effSummary == 0 || resSummary == 0 || segQualSummary == 0) {
80  LogWarning("DQM|DTMonitorClient|DTCertificationSummary") << "*** Warning: not all needed summaries are present!" << endl;
81  return;
82  }
83 
84  // reset the MEs
86  certFractions[-2]->Fill(0.);
87  certFractions[-1]->Fill(0.);
88  certFractions[-0]->Fill(0.);
89  certFractions[1]->Fill(0.);
90  certFractions[2]->Fill(0.);
91  certMap->Reset();
92 
93  // loop over all sectors and wheels
94  for(int wheel = -2; wheel != 3; ++wheel) {
95  for(int sector = 1; sector != 13; ++sector) {
96  double eff = effSummary->getBinContent(sector, wheel+3);
97  double res = resSummary->getBinContent(sector, wheel+3);
98  double segQual = segQualSummary->getBinContent(sector, wheel+3);
99 
100  double total = 0;
101  if(segQual != 0) {
102  total = min(res,eff);
103  } else {
104  total = eff;
105  }
106 
107  certMap->Fill(sector,wheel,total);
108  // can use variable weight depending on the sector
109  double weight = 1./12.;
110  certFractions[wheel]->Fill(certFractions[wheel]->getFloatValue() + weight*total);
111  double totalWeight = 1./60.;
113  }
114  }
115 
116 }
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:301
void Fill(long long x)
MonitorElement * totalCertFraction
double getFloatValue(void) const
T min(T a, T b)
Definition: MathUtil.h:58
std::map< int, MonitorElement * > certFractions
double getBinContent(int binx) const
get content of bin (1-D)
void Reset(void)
reset ME (ie. contents, errors, etc)
void DTCertificationSummary::dqmEndLuminosityBlock ( DQMStore::IBooker ibooker,
DQMStore::IGetter igetter,
edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  context 
)
privatevirtual

DQM Client Diagnostic in online mode.

Reimplemented from DQMEDHarvester.

Definition at line 33 of file DTCertificationSummary.cc.

References DQMStore::IBooker::book2D(), DQMStore::IBooker::bookFloat(), MonitorElement::Fill(), DQMStore::IGetter::get(), MonitorElement::setAxisTitle(), DQMStore::IBooker::setCurrentFolder(), and hcal_dqm_sourceclient-file_cfg::streams.

34  {
35 
36  //FR moved here from beginJob
37 
38  // book the ME
39  ibooker.setCurrentFolder("DT/EventInfo");
40  // global fraction
41  if (! igetter.get("CertificationSummary")) {
42  totalCertFraction = ibooker.bookFloat("CertificationSummary");
44 
45  // certification map
46  certMap = ibooker.book2D("CertificationSummaryMap","DT Certification Summary Map",12,1,13,5,-2,3);
47  certMap->setAxisTitle("sector",1);
48  certMap->setAxisTitle("wheel",2);
49 
50  ibooker.setCurrentFolder("DT/EventInfo/CertificationContents");
51  // Wheel "fractions" -> will be 0 or 1
52  for(int wheel = -2; wheel != 3; ++wheel) {
53  stringstream streams;
54  streams << "DT_Wheel" << wheel;
55  certFractions[wheel] = ibooker.bookFloat(streams.str());
56  certFractions[wheel]->Fill(-1);
57  }
58  }
59 }
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:301
void Fill(long long x)
MonitorElement * totalCertFraction
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:273
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
std::map< int, MonitorElement * > certFractions
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:109
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void DTCertificationSummary::endRun ( const edm::Run run,
const edm::EventSetup setup 
)
privatevirtual

Reimplemented from DQMEDHarvester.

Definition at line 67 of file DTCertificationSummary.cc.

67  {
68 
69 }

Member Data Documentation

std::map<int, MonitorElement*> DTCertificationSummary::certFractions
private

Definition at line 45 of file DTCertificationSummary.h.

MonitorElement* DTCertificationSummary::certMap
private

Definition at line 44 of file DTCertificationSummary.h.

MonitorElement* DTCertificationSummary::totalCertFraction
private

Definition at line 43 of file DTCertificationSummary.h.