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  * $Date: 2010/01/22 15:32:04 $
6  * $Revision: 1.5 $
7  * \author G. Cerminara - INFN Torino
8  */
9 
10 
13 
17 
21 
22 using namespace std;
23 using namespace edm;
24 
25 
26 
28 
29 
30 
31 
33 
34 
35 
37  // get the DQMStore
38  theDbe = Service<DQMStore>().operator->();
39 
40  // book the ME
41  theDbe->setCurrentFolder("DT/EventInfo");
42  // global fraction
43  totalCertFraction = theDbe->bookFloat("CertificationSummary");
44  totalCertFraction->Fill(-1);
45 
46  // certification map
47  certMap = theDbe->book2D("CertificationSummaryMap","DT Certification Summary Map",12,1,13,5,-2,3);
48  certMap->setAxisTitle("sector",1);
49  certMap->setAxisTitle("wheel",2);
50 
51  theDbe->setCurrentFolder("DT/EventInfo/CertificationContents");
52  // Wheel "fractions" -> will be 0 or 1
53  for(int wheel = -2; wheel != 3; ++wheel) {
54  stringstream streams;
55  streams << "DT_Wheel" << wheel;
56  certFractions[wheel] = theDbe->bookFloat(streams.str());
57  certFractions[wheel]->Fill(-1);
58  }
59 
60  //
61 
62 }
63 
64 
65 
67 }
68 
69 
70 
71 
73 }
74 
75 
76 
77 
79 }
80 
81 
82 
84  // get the relevant summary histos
85  MonitorElement* effSummary = theDbe->get("DT/05-ChamberEff/EfficiencyGlbSummary");
86  MonitorElement* resSummary = theDbe->get("DT/02-Segments/ResidualsGlbSummary");
87  MonitorElement* segQualSummary = theDbe->get("DT/02-Segments/segmentSummary");
88 
89  // check that all needed histos are there
90  if(effSummary == 0 || resSummary == 0 || segQualSummary == 0) {
91  LogWarning("DQM|DTMonitorClient|DTCertificationSummary") << "*** Warning: not all needed summaries are present!" << endl;
92  return;
93  }
94 
95  // reset the MEs
96  totalCertFraction->Fill(0.);
97  certFractions[-2]->Fill(0.);
98  certFractions[-1]->Fill(0.);
99  certFractions[-0]->Fill(0.);
100  certFractions[1]->Fill(0.);
101  certFractions[2]->Fill(0.);
102  certMap->Reset();
103 
104  // loop over all sectors and wheels
105  for(int wheel = -2; wheel != 3; ++wheel) {
106  for(int sector = 1; sector != 13; ++sector) {
107  double eff = effSummary->getBinContent(sector, wheel+3);
108  double res = resSummary->getBinContent(sector, wheel+3);
109  double segQual = segQualSummary->getBinContent(sector, wheel+3);
110 
111  double total = 0;
112  if(segQual != 0) {
113  total = min(res,eff);
114  } else {
115  total = eff;
116  }
117 
118  certMap->Fill(sector,wheel,total);
119  // can use variable weight depending on the sector
120  double weight = 1./12.;
121  certFractions[wheel]->Fill(certFractions[wheel]->getFloatValue() + weight*total);
122  double totalWeight = 1./60.;
123  totalCertFraction->Fill(totalCertFraction->getFloatValue() + totalWeight*total);
124  }
125  }
126 
127 }
128 
129 
130 
132 
133 
134 
136 
137 
138 
virtual void beginLuminosityBlock(const edm::LuminosityBlock &lumi, const edm::EventSetup &setup)
tuple lumi
Definition: fjr2json.py:35
#define min(a, b)
Definition: mlp_lapack.h:161
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.
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:36