CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HLTMuonCertSummary Class Reference
Inheritance diagram for HLTMuonCertSummary:

Public Member Functions

virtual void beginJob () override
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &) override
 
virtual void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
 HLTMuonCertSummary (const edm::ParameterSet &pset)
 
 ~HLTMuonCertSummary ()
 

Private Attributes

edm::ParameterSet parameters_
 
bool verbose_
 

Detailed Description

Definition at line 59 of file HLTMuonCertSummary.cc.

Constructor & Destructor Documentation

HLTMuonCertSummary::HLTMuonCertSummary ( const edm::ParameterSet pset)
explicit

Definition at line 83 of file HLTMuonCertSummary.cc.

References muonDTDigis_cfi::pset.

85 {
86 
87  using namespace edm;
88 
89  parameters_ = pset;
90  verbose_ = parameters_.getUntrackedParameter<bool>("verbose", false);
91 
92  if(verbose_) LogInfo ("HLTMuonVal") << ">>> Constructor (HLTMuonCertSummary) <<<" << endl;
93 
94 }
T getUntrackedParameter(std::string const &, T const &) const
edm::ParameterSet parameters_
HLT enums.
HLTMuonCertSummary::~HLTMuonCertSummary ( )

Definition at line 98 of file HLTMuonCertSummary.cc.

99 {
100 
101 }

Member Function Documentation

void HLTMuonCertSummary::beginJob ( void  )
overridevirtual

Definition at line 111 of file HLTMuonCertSummary.cc.

112 {
113 
114 }
void HLTMuonCertSummary::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
overridevirtual

Definition at line 120 of file HLTMuonCertSummary.cc.

References edm::RunBase::id().

121 {
122 
123  using namespace edm;
124  if(verbose_) LogInfo ("HLTMuonVal") << ">>> BeginRun (HLTMuonCertSummary) <<<" << std::endl;
125  if(verbose_) LogInfo ("HLTMuonVal") << ">>> "<< run.id() << std::endl;
126 
127 }
RunID const & id() const
Definition: RunBase.h:39
HLT enums.
void HLTMuonCertSummary::dqmEndJob ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter 
)
overridevirtual

Definition at line 133 of file HLTMuonCertSummary.cc.

References DQMStore::IBooker::book2D(), DQMStore::IBooker::bookFloat(), DEFINE_FWK_MODULE, MonitorElement::Fill(), DQMStore::IGetter::get(), MonitorElement::getName(), MonitorElement::getQReports(), MonitorElement::getTH2F(), mps_fire::i, DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

134 {
135 
136  using namespace edm;
137  if(verbose_) LogInfo ("HLTMuonVal") << ">>> EndRun (HLTMuonCertSummary) <<<" << std::endl;
138 
139  std::vector<string> histoNameVector;
140 
141 
142  //booking histograms according to naming conventions
143 
144 
145 
146  iBooker.setCurrentFolder("HLT/EventInfo/muonQuality");
147 
148  MonitorElement* reportSummary = iBooker.bookFloat("HLT_MUON_REPORT_SUMMARY");
149 
150  int SummaryBitResult = 100;
151 
152  MonitorElement* CertificationSummary = iBooker.bookFloat("HLT_MUON_CERTIFICATION_SUMMARY");
153 
154 
155 
156  //for now these will hold values from eta/phi tests for spikes/holes
157  MonitorElement* reportSummaryMap = iBooker.book2D("HLT_MUON_ReportSummaryMap","HLT_MUON: ReportSummaryMap",6,-0.5,5.5,1,-0.5,0.5);
158  MonitorElement* CertificationSummaryMap = iBooker.book2D("HLT_MUON_CertificationSummaryMap","HLT_MUON: CertificationSummaryMap",6,-0.5,5.5,1,-0.5,0.5);
159 
160  TH2 * reportSummaryMapTH2 = reportSummaryMap->getTH2F();
161 
162  reportSummaryMapTH2->GetXaxis()->SetBinLabel(1,"PhiEtaOccAll");
163  reportSummaryMapTH2->GetXaxis()->SetBinLabel(2,"PhiEtaOccMatch");
164  reportSummaryMapTH2->GetXaxis()->SetBinLabel(3,"PhiEtaEff");
165  reportSummaryMapTH2->GetXaxis()->SetBinLabel(4,"PhiEff");
166  reportSummaryMapTH2->GetXaxis()->SetBinLabel(5,"EtaEff");
167  reportSummaryMapTH2->GetXaxis()->SetBinLabel(6,"PtEff");
168 
169  reportSummaryMapTH2->GetYaxis()->SetBinLabel(1,"HLT_Mu5_allMuons");
170 
171 
172  TH2 * CertificationSummaryMapTH2 = CertificationSummaryMap->getTH2F();
173 
174  CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(1,"PhiEtaOccAll");
175  CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(2,"PhiEtaOccMatch");
176  CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(3,"PhiEtaEff");
177  CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(4,"PhiEff");
178  CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(5,"EtaEff");
179  CertificationSummaryMapTH2->GetXaxis()->SetBinLabel(6,"PtEff");
180 
181  CertificationSummaryMapTH2->GetYaxis()->SetBinLabel(1,"HLT_Mu5_allMuons");
182 
183 
184  histoNameVector.push_back("HLT/Muon/Distributions/HLT_Mu5/allMuons/recPhiVsRecEta_All");
185  histoNameVector.push_back("HLT/Muon/Distributions/HLT_Mu5/allMuons/recPhiVsRecEta_L3Filtered");
186  histoNameVector.push_back("HLT/Muon/Distributions/HLT_Mu5/allMuons/recEffPhiVsEta_L3Filtered");
187  histoNameVector.push_back("HLT/Muon/Distributions/HLT_Mu5/allMuons/recEffPt_L3Filtered");
188  histoNameVector.push_back("HLT/Muon/Distributions/HLT_Mu5/allMuons/recEffPhi_L3Filtered");
189  histoNameVector.push_back("HLT/Muon/Distributions/HLT_Mu5/allMuons/recEffEta_L3Filtered");
190 
191  // to do: what do we want in certification contents?
192  // iBooker.setCurrentFolder("Egamma/EventInfo/CertificationContents/");
193 
194 
195  // //looping over histograms to be tested
196  if(verbose_) LogInfo ("HLTMuonVal") << "\n>>> looping over histograms to be tested <<<\n\n";
197 
198  for(std::vector<string>::iterator it=histoNameVector.begin();it!=histoNameVector.end();++it){
199 
200  string HistoName = (*it);
201  if(verbose_) LogInfo ("HLTMuonVal") << ">>> " << HistoName;
202 
203 
204  MonitorElement * TestHist=0;
205 
206  TestHist = iGetter.get(HistoName);
207 
208  bool validMe = TestHist!=0;
209  if(verbose_) LogInfo ("HLTMuonVal") << " is valid? " << validMe << "\n";
210  if(!validMe) continue;
211 
212  string histNameNoPath = TestHist->getName();
213 
214  if(verbose_) LogInfo ("HLTMuonVal") << ">>> TestHist Name: " << histNameNoPath << "\n\n";
215 
216 
217 
218  //get QReports associated to each ME
219  std::vector<QReport *> myQReports = TestHist->getQReports();
220  if(verbose_) LogInfo ("HLTMuonVal") << TestHist->getName() <<": myQReports.size() = " << myQReports.size() << "\n\n";
221  for(uint i=0;i!=myQReports.size();++i) {
222 
223  std::string qtname = myQReports[i]->getQRName() ; // get QT name
224  float qtresult = myQReports[i]->getQTresult(); // get QT result value
225  int qtstatus = myQReports[i]->getStatus() ; // get QT status value
226 
227  if(verbose_) LogInfo ("HLTMuonVal") << "\tTest " << i << ": qtname: " << qtname << "\n";
228  if(verbose_) LogInfo ("HLTMuonVal") << "\tTest " << i << ": qtresult: " << qtresult << std::endl;
229  if(verbose_) LogInfo ("HLTMuonVal") << "\tTest " << i << ": qtstatus: " << qtstatus << "\n\n";
230 
231 
232  //book and fill float for each test done
233  iBooker.setCurrentFolder("HLT/EventInfo/muonQuality/");
234  MonitorElement * qValueInt = iBooker.bookFloat(histNameNoPath+"_HLT_Mu5_"+qtname);
235  qValueInt->Fill(qtstatus);
236 
237  // We're assuming that you want all of the bits to go into the decision
238 
239 
240  if (HistoName.find("recPhiVsRecEta_All") != std::string::npos) {
241  reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(1,1), qtstatus);
242  CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(1,1), qtstatus );
243  if ( (qtstatus == 200) && (SummaryBitResult < 300)) SummaryBitResult = 200;
244  if ( qtstatus == 300 ) SummaryBitResult = 300;
245 
246  }
247 
248  if (HistoName.find("recPhiVsRecEta_L3Filtered") != std::string::npos) {
249  reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(2,1), qtstatus);
250  CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(2,1), qtstatus);
251  if ( (qtstatus == 200) && (SummaryBitResult < 300)) SummaryBitResult = 200;
252  if (qtstatus == 300 ) SummaryBitResult = 300;
253 
254  }
255 
256  if (HistoName.find("recEffPhiVsEta_L3Filtered") != std::string::npos) {
257  reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(3,1), qtstatus );
258  CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(3,1), qtstatus);
259  if ( (qtstatus == 200) && (SummaryBitResult < 300)) SummaryBitResult = 200;
260  if (qtstatus == 300 ) SummaryBitResult = 300;
261  }
262 
263  if (HistoName.find("recEffPhi_L3Filtered") != std::string::npos) {
264  reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(4,1), qtstatus);
265  CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(4,1), qtstatus);
266  }
267 
268  if (HistoName.find("recEffEta_L3Filtered") != std::string::npos) {
269  reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(5,1), qtstatus);
270  CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(5,1), qtstatus);
271  }
272 
273  if (HistoName.find("recEffPt_L3Filtered") != std::string::npos) {
274  reportSummaryMapTH2->SetBinContent(reportSummaryMapTH2->GetBin(6,1), qtstatus);
275  CertificationSummaryMapTH2->SetBinContent(CertificationSummaryMapTH2->GetBin(6,1), qtstatus);
276  }
277 
278 
279  }
280  }
281 
282 
283  reportSummary->Fill(SummaryBitResult);
284  CertificationSummary->Fill(SummaryBitResult);
285 
286 
287 
288  // Set the final bits
289 
290  iBooker.setCurrentFolder("HLT/EventInfo/reportSummaryContents");
291  MonitorElement* muonHLTQualityBinaryBit = iBooker.bookFloat ("HLT_Muon");
292 
293  if (SummaryBitResult == 100){
294  muonHLTQualityBinaryBit->Fill(1);
295  } else {
296  muonHLTQualityBinaryBit->Fill(0);
297  }
298 
299 }
const std::string & getName(void) const
get name of ME
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:305
void Fill(long long x)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
std::vector< QReport * > getQReports(void) const
get map of QReports
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
std::string HistoName
HLT enums.
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:109
TH2F * getTH2F(void) const

Member Data Documentation

edm::ParameterSet HLTMuonCertSummary::parameters_
private
bool HLTMuonCertSummary::verbose_
private

Definition at line 76 of file HLTMuonCertSummary.cc.