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 Attributes
HLTMuonCertSummary Class Reference
Inheritance diagram for HLTMuonCertSummary:
DQMEDHarvester edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual void beginJob ()
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &) override
 
virtual void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &) override
 
 HLTMuonCertSummary (const edm::ParameterSet &pset)
 
 ~HLTMuonCertSummary ()
 
- 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 dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
- 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
 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 (const std::string &iProcessName, std::vector< const char * > &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 Attributes

edm::ParameterSet parameters_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- 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::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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

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 edm::ParameterSet::getUntrackedParameter().

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_
HLTMuonCertSummary::~HLTMuonCertSummary ( )

Definition at line 98 of file HLTMuonCertSummary.cc.

99 {
100 
101 }

Member Function Documentation

void HLTMuonCertSummary::beginJob ( void  )
virtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 111 of file HLTMuonCertSummary.cc.

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

Reimplemented from DQMEDHarvester.

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:41
void HLTMuonCertSummary::dqmEndJob ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter 
)
overridevirtual

Implements DQMEDHarvester.

Definition at line 133 of file HLTMuonCertSummary.cc.

References DQMStore::IBooker::book2D(), DQMStore::IBooker::bookFloat(), MonitorElement::Fill(), DQMStore::IGetter::get(), MonitorElement::getName(), MonitorElement::getQReports(), MonitorElement::getTH2F(), i, getDQMSummary::reportSummary, 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
int i
Definition: DBlmapReader.cc:9
string reportSummary
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:302
void Fill(long long x)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
std::vector< QReport * > getQReports(void) const
get map of QReports
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
std::string HistoName
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.