CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
8 
11 
15 
19 
20 using namespace std;
21 using namespace edm;
22 
23 
24 
26 
27 
28 
29 
31 
32 
33 
35  // get the DQMStore
36  theDbe = Service<DQMStore>().operator->();
37 
38  // book the ME
39  theDbe->setCurrentFolder("DT/EventInfo");
40  // global fraction
41  totalCertFraction = theDbe->bookFloat("CertificationSummary");
42  totalCertFraction->Fill(-1);
43 
44  // certification map
45  certMap = theDbe->book2D("CertificationSummaryMap","DT Certification Summary Map",12,1,13,5,-2,3);
46  certMap->setAxisTitle("sector",1);
47  certMap->setAxisTitle("wheel",2);
48 
49  theDbe->setCurrentFolder("DT/EventInfo/CertificationContents");
50  // Wheel "fractions" -> will be 0 or 1
51  for(int wheel = -2; wheel != 3; ++wheel) {
52  stringstream streams;
53  streams << "DT_Wheel" << wheel;
54  certFractions[wheel] = theDbe->bookFloat(streams.str());
55  certFractions[wheel]->Fill(-1);
56  }
57 
58  //
59 
60 }
61 
62 
63 
65 }
66 
67 
68 
69 
71 }
72 
73 
74 
75 
77 }
78 
79 
80 
82  // get the relevant summary histos
83  MonitorElement* effSummary = theDbe->get("DT/05-ChamberEff/EfficiencyGlbSummary");
84  MonitorElement* resSummary = theDbe->get("DT/02-Segments/ResidualsGlbSummary");
85  MonitorElement* segQualSummary = theDbe->get("DT/02-Segments/segmentSummary");
86 
87  // check that all needed histos are there
88  if(effSummary == 0 || resSummary == 0 || segQualSummary == 0) {
89  LogWarning("DQM|DTMonitorClient|DTCertificationSummary") << "*** Warning: not all needed summaries are present!" << endl;
90  return;
91  }
92 
93  // reset the MEs
94  totalCertFraction->Fill(0.);
95  certFractions[-2]->Fill(0.);
96  certFractions[-1]->Fill(0.);
97  certFractions[-0]->Fill(0.);
98  certFractions[1]->Fill(0.);
99  certFractions[2]->Fill(0.);
100  certMap->Reset();
101 
102  // loop over all sectors and wheels
103  for(int wheel = -2; wheel != 3; ++wheel) {
104  for(int sector = 1; sector != 13; ++sector) {
105  double eff = effSummary->getBinContent(sector, wheel+3);
106  double res = resSummary->getBinContent(sector, wheel+3);
107  double segQual = segQualSummary->getBinContent(sector, wheel+3);
108 
109  double total = 0;
110  if(segQual != 0) {
111  total = min(res,eff);
112  } else {
113  total = eff;
114  }
115 
116  certMap->Fill(sector,wheel,total);
117  // can use variable weight depending on the sector
118  double weight = 1./12.;
119  certFractions[wheel]->Fill(certFractions[wheel]->getFloatValue() + weight*total);
120  double totalWeight = 1./60.;
121  totalCertFraction->Fill(totalCertFraction->getFloatValue() + totalWeight*total);
122  }
123  }
124 
125 }
126 
127 
128 
130 
131 
132 
134 
135 
136 
virtual void beginLuminosityBlock(const edm::LuminosityBlock &lumi, const edm::EventSetup &setup)
tuple lumi
Definition: fjr2json.py:35
DTCertificationSummary(const edm::ParameterSet &pset)
Constructor.
virtual void endRun(const edm::Run &run, const edm::EventSetup &setup)
virtual void beginRun(const edm::Run &run, const edm::EventSetup &setup)
virtual ~DTCertificationSummary()
Destructor.
T min(T a, T b)
Definition: MathUtil.h:58
virtual void analyze(const edm::Event &event, const edm::EventSetup &setup)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual void endLuminosityBlock(const edm::LuminosityBlock &lumi, const edm::EventSetup &setup)
double getBinContent(int binx) const
get content of bin (1-D)
int weight
Definition: histoStyle.py:50
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
Definition: Run.h:41