CMS 3D CMS Logo

DTCertificationSummary.cc
Go to the documentation of this file.
1 
2 /*
3  * See header file for a description of this class.
4  *
5  * \author G. Cerminara - INFN Torino
6  */
7 
10 
14 
17 
18 using namespace std;
19 using namespace edm;
20 
22 
24 
26  DQMStore::IGetter& igetter,
27  edm::LuminosityBlock const& lumiSeg,
28  edm::EventSetup const& context) {
29  //FR moved here from beginJob
30 
31  // book the ME
32  ibooker.setCurrentFolder("DT/EventInfo");
33  // global fraction
34  if (!igetter.get("CertificationSummary")) {
35  totalCertFraction = ibooker.bookFloat("CertificationSummary");
36  totalCertFraction->Fill(-1);
37 
38  // certification map
39  certMap = ibooker.book2D("CertificationSummaryMap", "DT Certification Summary Map", 12, 1, 13, 5, -2, 3);
40  certMap->setAxisTitle("sector", 1);
41  certMap->setAxisTitle("wheel", 2);
42 
43  ibooker.setCurrentFolder("DT/EventInfo/CertificationContents");
44  // Wheel "fractions" -> will be 0 or 1
45  for (int wheel = -2; wheel != 3; ++wheel) {
46  stringstream streams;
47  streams << "DT_Wheel" << wheel;
48  certFractions[wheel] = ibooker.bookFloat(streams.str());
49  certFractions[wheel]->Fill(-1);
50  }
51  }
52 }
53 
55 
57 
59  // get the relevant summary histos
60  MonitorElement* effSummary = igetter.get("DT/05-ChamberEff/EfficiencyGlbSummary");
61  MonitorElement* resSummary = igetter.get("DT/02-Segments/ResidualsGlbSummary");
62  MonitorElement* segQualSummary = igetter.get("DT/02-Segments/segmentSummary");
63 
64  // check that all needed histos are there
65  if (effSummary == nullptr || resSummary == nullptr || segQualSummary == nullptr) {
66  LogWarning("DQM|DTMonitorClient|DTCertificationSummary")
67  << "*** Warning: not all needed summaries are present!" << endl;
68  return;
69  }
70 
71  // reset the MEs
72  totalCertFraction->Fill(0.);
73  certFractions[-2]->Fill(0.);
74  certFractions[-1]->Fill(0.);
75  certFractions[-0]->Fill(0.);
76  certFractions[1]->Fill(0.);
77  certFractions[2]->Fill(0.);
78  certMap->Reset();
79 
80  // loop over all sectors and wheels
81  for (int wheel = -2; wheel != 3; ++wheel) {
82  for (int sector = 1; sector != 13; ++sector) {
83  double eff = effSummary->getBinContent(sector, wheel + 3);
84  double res = resSummary->getBinContent(sector, wheel + 3);
85  double segQual = segQualSummary->getBinContent(sector, wheel + 3);
86 
87  double total = 0;
88  if (segQual != 0) {
89  total = min(res, eff);
90  } else {
91  total = eff;
92  }
93 
94  certMap->Fill(sector, wheel, total);
95  // can use variable weight depending on the sector
96  double weight = 1. / 12.;
97  certFractions[wheel]->Fill(certFractions[wheel]->getFloatValue() + weight * total);
98  double totalWeight = 1. / 60.;
99  totalCertFraction->Fill(totalCertFraction->getFloatValue() + totalWeight * total);
100  }
101  }
102 }
FEDNumbering.h
MessageLogger.h
dqm::implementation::IBooker::bookFloat
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
ESHandle.h
DTCertificationSummary::~DTCertificationSummary
~DTCertificationSummary() override
Destructor.
Definition: DTCertificationSummary.cc:23
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
min
T min(T a, T b)
Definition: MathUtil.h:58
edm
HLT enums.
Definition: AlignableModifier.h:19
generateEDF.totalWeight
totalWeight
Definition: generateEDF.py:688
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
DQMStore.h
DTCertificationSummary::DTCertificationSummary
DTCertificationSummary(const edm::ParameterSet &pset)
Constructor.
Definition: DTCertificationSummary.cc:21
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
Service.h
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
edm::LogWarning
Definition: MessageLogger.h:141
edm::ParameterSet
Definition: ParameterSet.h:36
DTCertificationSummary.h
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
edm::EventSetup
Definition: EventSetup.h:57
res
Definition: Electron.h:6
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
dqm::implementation::IGetter
Definition: DQMStore.h:484
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
HLT_2018_cff.streams
streams
Definition: HLT_2018_cff.py:3574
dqm::implementation::IGetter::get
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:651
EventSetup.h
dqm::implementation::IBooker
Definition: DQMStore.h:43
dqmMemoryStats.total
total
Definition: dqmMemoryStats.py:152
DTCertificationSummary::dqmEndLuminosityBlock
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
DQM Client Diagnostic in online mode.
Definition: DTCertificationSummary.cc:25
DTCertificationSummary::endRun
void endRun(const edm::Run &run, const edm::EventSetup &setup) override
Definition: DTCertificationSummary.cc:56
DTCertificationSummary::beginRun
void beginRun(const edm::Run &run, const edm::EventSetup &setup) override
Definition: DTCertificationSummary.cc:54
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:800
dqm::impl::MonitorElement::getBinContent
virtual double getBinContent(int binx) const
get content of bin (1-D)
Definition: MonitorElement.cc:592
weight
Definition: weight.py:1
DTCertificationSummary::dqmEndJob
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
DQM Client Diagnostic in offline mode.
Definition: DTCertificationSummary.cc:58
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27