CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
HLTObjectMonitorProtonLead Class Reference

#include <DQM/HLTEvF/plugins/HLTObjectMonitorProtonLead.cc>

Inheritance diagram for HLTObjectMonitorProtonLead:

Classes

struct  hltPlot
 

Public Member Functions

 HLTObjectMonitorProtonLead (const edm::ParameterSet &)
 
 ~HLTObjectMonitorProtonLead () override
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
double get_wall_time (void)
 

Private Attributes

unordered_map< string, bool > acceptMap
 
edm::EDGetTokenT
< trigger::TriggerEvent
aodTriggerToken_
 
string backupFolder
 
hltPlot caloAK4JetEta_
 
edm::ParameterSet caloAK4JetEta_pset
 
hltPlot caloAK4JetPhi_
 
edm::ParameterSet caloAK4JetPhi_pset
 
hltPlot caloAK4JetPt_
 
edm::ParameterSet caloAK4JetPt_pset
 
hltPlot caloBJetEta_
 
edm::ParameterSet caloBJetEta_pset
 
hltPlot caloBJetPhi_
 
edm::ParameterSet caloBJetPhi_pset
 
hltPlot caloBJetPt_
 
edm::ParameterSet caloBJetPt_pset
 
hltPlot caloDiAK4JetEta_
 
edm::ParameterSet caloDiAK4JetEta_pset
 
hltPlot caloDiAK4JetPhi_
 
edm::ParameterSet caloDiAK4JetPhi_pset
 
hltPlot caloDiAK4JetPt_
 
edm::ParameterSet caloDiAK4JetPt_pset
 
bool debugPrint
 
hltPlot electronEta_
 
edm::ParameterSet electronEta_pset
 
hltPlot electronPhi_
 
edm::ParameterSet electronPhi_pset
 
hltPlot electronPt_
 
edm::ParameterSet electronPt_pset
 
HLTConfigProvider hltConfig_
 
hltPlot l2muon12Eta_
 
edm::ParameterSet l2muon12Eta_pset
 
hltPlot l2muon12Phi_
 
edm::ParameterSet l2muon12Phi_pset
 
hltPlot l2muon12Pt_
 
edm::ParameterSet l2muon12Pt_pset
 
hltPlot l3muon12Eta_
 
edm::ParameterSet l3muon12Eta_pset
 
hltPlot l3muon12Phi_
 
edm::ParameterSet l3muon12Phi_pset
 
hltPlot l3muon12Pt_
 
edm::ParameterSet l3muon12Pt_pset
 
hltPlot l3muon3Eta_
 
edm::ParameterSet l3muon3Eta_pset
 
hltPlot l3muon3Phi_
 
edm::ParameterSet l3muon3Phi_pset
 
hltPlot l3muon3Pt_
 
edm::ParameterSet l3muon3Pt_pset
 
string mainShifterFolder
 
hltPlot pAL1DoubleMuZMass_
 
edm::ParameterSet pAL1DoubleMuZMass_pset
 
hltPlot pAL2DoubleMuZMass_
 
edm::ParameterSet pAL2DoubleMuZMass_pset
 
hltPlot pAL3DoubleMuZMass_
 
edm::ParameterSet pAL3DoubleMuZMass_pset
 
hltPlot pfAK4JetEta_
 
edm::ParameterSet pfAK4JetEta_pset
 
hltPlot pfAK4JetPhi_
 
edm::ParameterSet pfAK4JetPhi_pset
 
hltPlot pfAK4JetPt_
 
edm::ParameterSet pfAK4JetPt_pset
 
hltPlot pfBJetEta_
 
edm::ParameterSet pfBJetEta_pset
 
hltPlot pfBJetPhi_
 
edm::ParameterSet pfBJetPhi_pset
 
hltPlot pfBJetPt_
 
edm::ParameterSet pfBJetPt_pset
 
hltPlot pfDiAK4JetEta_
 
edm::ParameterSet pfDiAK4JetEta_pset
 
hltPlot pfDiAK4JetPhi_
 
edm::ParameterSet pfDiAK4JetPhi_pset
 
hltPlot pfDiAK4JetPt_
 
edm::ParameterSet pfDiAK4JetPt_pset
 
hltPlot photonEta_
 
edm::ParameterSet photonEta_pset
 
hltPlot photonPhi_
 
edm::ParameterSet photonPhi_pset
 
hltPlot photonPPEta_
 
edm::ParameterSet photonPPEta_pset
 
hltPlot photonPPPhi_
 
edm::ParameterSet photonPPPhi_pset
 
hltPlot photonPPPt_
 
edm::ParameterSet photonPPPt_pset
 
hltPlot photonPt_
 
edm::ParameterSet photonPt_pset
 
vector< hltPlot * > plotList
 
unordered_map< hltPlot
*, edm::ParameterSet * > 
plotMap
 
string processName_
 
string topDirectoryName
 
edm::EDGetTokenT
< edm::TriggerResults
triggerResultsToken_
 
hltPlot wallTime_
 
edm::ParameterSet wallTime_pset
 

Detailed Description

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 69 of file HLTObjectMonitorProtonLead.cc.

Constructor & Destructor Documentation

HLTObjectMonitorProtonLead::HLTObjectMonitorProtonLead ( const edm::ParameterSet iConfig)
explicit

Definition at line 212 of file HLTObjectMonitorProtonLead.cc.

References edm::ParameterSet::getParameter(), B2GTnPMonitor_cfi::item, convertParamsToOnlineFormat::moduleName, EgammaValidation_cff::pathName, and HLTObjectMonitor_cfi::plotLabel.

214 {
215  //now do what ever initialization is needed
216  debugPrint = false;
217 
218  topDirectoryName = "HLT/ObjectMonitor";
219  mainShifterFolder = topDirectoryName + "/MainShifter";
220  backupFolder = topDirectoryName + "/Backup";
221 
222  //parse params
223  processName_ = iConfig.getParameter<string>("processName");
224 
225  caloAK4JetPt_pset = iConfig.getParameter<edm::ParameterSet>("caloAK4JetPt");
227  caloAK4JetEta_pset = iConfig.getParameter<edm::ParameterSet>("caloAK4JetEta");
228  plotMap[&caloAK4JetEta_] = &caloAK4JetEta_pset;
229  caloAK4JetPhi_pset = iConfig.getParameter<edm::ParameterSet>("caloAK4JetPhi");
230  plotMap[&caloAK4JetPhi_] = &caloAK4JetPhi_pset;
231  pfAK4JetPt_pset = iConfig.getParameter<edm::ParameterSet>("pfAK4JetPt");
232  plotMap[&pfAK4JetPt_] = &pfAK4JetPt_pset;
233  pfAK4JetEta_pset = iConfig.getParameter<edm::ParameterSet>("pfAK4JetEta");
234  plotMap[&pfAK4JetEta_] = &pfAK4JetEta_pset;
235  pfAK4JetPhi_pset = iConfig.getParameter<edm::ParameterSet>("pfAK4JetPhi");
236  plotMap[&pfAK4JetPhi_] = &pfAK4JetPhi_pset;
237  caloDiAK4JetPt_pset = iConfig.getParameter<edm::ParameterSet>("caloDiAK4JetPt");
239  caloDiAK4JetEta_pset = iConfig.getParameter<edm::ParameterSet>("caloDiAK4JetEta");
241  caloDiAK4JetPhi_pset = iConfig.getParameter<edm::ParameterSet>("caloDiAK4JetPhi");
243  pfDiAK4JetPt_pset = iConfig.getParameter<edm::ParameterSet>("pfDiAK4JetPt");
244  plotMap[&pfDiAK4JetPt_] = &pfDiAK4JetPt_pset;
245  pfDiAK4JetEta_pset = iConfig.getParameter<edm::ParameterSet>("pfDiAK4JetEta");
246  plotMap[&pfDiAK4JetEta_] = &pfDiAK4JetEta_pset;
247  pfDiAK4JetPhi_pset = iConfig.getParameter<edm::ParameterSet>("pfDiAK4JetPhi");
248  plotMap[&pfDiAK4JetPhi_] = &pfDiAK4JetPhi_pset;
249  photonPt_pset = iConfig.getParameter<edm::ParameterSet>("photonPt");
250  plotMap[&photonPt_] = &photonPt_pset;
251  photonEta_pset = iConfig.getParameter<edm::ParameterSet>("photonEta");
252  plotMap[&photonEta_] = &photonEta_pset;
253  photonPhi_pset = iConfig.getParameter<edm::ParameterSet>("photonPhi");
254  plotMap[&photonPhi_] = &photonPhi_pset;
255  photonPPPt_pset = iConfig.getParameter<edm::ParameterSet>("photonPPPt");
256  plotMap[&photonPPPt_] = &photonPPPt_pset;
257  photonPPEta_pset = iConfig.getParameter<edm::ParameterSet>("photonPPEta");
258  plotMap[&photonPPEta_] = &photonPPEta_pset;
259  photonPPPhi_pset = iConfig.getParameter<edm::ParameterSet>("photonPPPhi");
260  plotMap[&photonPPPhi_] = &photonPPPhi_pset;
261  caloBJetPt_pset = iConfig.getParameter<edm::ParameterSet>("caloBJetPt");
262  plotMap[&caloBJetPt_] = &caloBJetPt_pset;
263  caloBJetEta_pset = iConfig.getParameter<edm::ParameterSet>("caloBJetEta");
264  plotMap[&caloBJetEta_] = &caloBJetEta_pset;
265  caloBJetPhi_pset = iConfig.getParameter<edm::ParameterSet>("caloBJetPhi");
266  plotMap[&caloBJetPhi_] = &caloBJetPhi_pset;
267  pfBJetPt_pset = iConfig.getParameter<edm::ParameterSet>("pfBJetPt");
268  plotMap[&pfBJetPt_] = &pfBJetPt_pset;
269  pfBJetEta_pset = iConfig.getParameter<edm::ParameterSet>("pfBJetEta");
270  plotMap[&pfBJetEta_] = &pfBJetEta_pset;
271  pfBJetPhi_pset = iConfig.getParameter<edm::ParameterSet>("pfBJetPhi");
272  plotMap[&pfBJetPhi_] = &pfBJetPhi_pset;
273  electronPt_pset = iConfig.getParameter<edm::ParameterSet>("electronPt");
274  plotMap[&electronPt_] = &electronPt_pset;
275  electronEta_pset = iConfig.getParameter<edm::ParameterSet>("electronEta");
276  plotMap[&electronEta_] = &electronEta_pset;
277  electronPhi_pset = iConfig.getParameter<edm::ParameterSet>("electronPhi");
278  plotMap[&electronPhi_] = &electronPhi_pset;
279  l3muon3Pt_pset = iConfig.getParameter<edm::ParameterSet>("l3muon3Pt");
280  plotMap[&l3muon3Pt_] = &l3muon3Pt_pset;
281  l3muon3Eta_pset = iConfig.getParameter<edm::ParameterSet>("l3muon3Eta");
282  plotMap[&l3muon3Eta_] = &l3muon3Eta_pset;
283  l3muon3Phi_pset = iConfig.getParameter<edm::ParameterSet>("l3muon3Phi");
284  plotMap[&l3muon3Phi_] = &l3muon3Phi_pset;
285  l2muon12Pt_pset = iConfig.getParameter<edm::ParameterSet>("l2muon12Pt");
286  plotMap[&l2muon12Pt_] = &l2muon12Pt_pset;
287  l2muon12Eta_pset = iConfig.getParameter<edm::ParameterSet>("l2muon12Eta");
288  plotMap[&l2muon12Eta_] = &l2muon12Eta_pset;
289  l2muon12Phi_pset = iConfig.getParameter<edm::ParameterSet>("l2muon12Phi");
290  plotMap[&l2muon12Phi_] = &l2muon12Phi_pset;
291  l3muon12Pt_pset = iConfig.getParameter<edm::ParameterSet>("l3muon12Pt");
292  plotMap[&l3muon12Pt_] = &l3muon12Pt_pset;
293  l3muon12Eta_pset = iConfig.getParameter<edm::ParameterSet>("l3muon12Eta");
294  plotMap[&l3muon12Eta_] = &l3muon12Eta_pset;
295  l3muon12Phi_pset = iConfig.getParameter<edm::ParameterSet>("l3muon12Phi");
296  plotMap[&l3muon12Phi_] = &l3muon12Phi_pset;
297  pAL1DoubleMuZMass_pset = iConfig.getParameter<edm::ParameterSet>("pAL1DoubleMuZMass");
299  pAL2DoubleMuZMass_pset = iConfig.getParameter<edm::ParameterSet>("pAL2DoubleMuZMass");
301  pAL3DoubleMuZMass_pset = iConfig.getParameter<edm::ParameterSet>("pAL3DoubleMuZMass");
303  wallTime_pset = iConfig.getParameter<edm::ParameterSet>("wallTime");
304  plotMap[&wallTime_] = &wallTime_pset;
305 
306  for (auto item = plotMap.begin(); item != plotMap.end(); item++) {
307  (*item->first).pathName = (*item->second).getParameter<string>("pathName");
308  (*item->first).moduleName = (*item->second).getParameter<string>("moduleName");
309  (*item->first).nBins = (*item->second).getParameter<int>("NbinsX");
310  (*item->first).xMin = (*item->second).getParameter<double>("Xmin");
311  (*item->first).xMax = (*item->second).getParameter<double>("Xmax");
312  (*item->first).xAxisLabel = (*item->second).getParameter<string>("axisLabel");
313  (*item->first).plotLabel = (*item->second).getParameter<string>("plotLabel");
314  (*item->first).displayInPrimary = (*item->second).getParameter<bool>("mainWorkspace");
315 
316  if ((*item->second).exists("pathName_OR")) {
317  (*item->first).pathNameOR = (*item->second).getParameter<string>("pathName_OR");
318  }
319  if ((*item->second).exists("moduleName_OR")) {
320  (*item->first).moduleNameOR = (*item->second).getParameter<string>("moduleName_OR");
321  }
322 
323  plotList.push_back(item->first);
324  }
325  plotMap.clear();
326 
327  //set Token(s)
328  triggerResultsToken_ = consumes<edm::TriggerResults>(iConfig.getParameter<edm::InputTag>("triggerResults"));
329  aodTriggerToken_ = consumes<trigger::TriggerEvent>(iConfig.getParameter<edm::InputTag>("triggerEvent"));
330 }
edm::EDGetTokenT< trigger::TriggerEvent > aodTriggerToken_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
unordered_map< hltPlot *, edm::ParameterSet * > plotMap
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
HLTObjectMonitorProtonLead::~HLTObjectMonitorProtonLead ( )
override

Definition at line 332 of file HLTObjectMonitorProtonLead.cc.

332  {
333  // do anything here that needs to be done at desctruction time
334  // (e.g. close files, deallocate resources etc.)
335 }

Member Function Documentation

void HLTObjectMonitorProtonLead::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

single-object plots

Definition at line 342 of file HLTObjectMonitorProtonLead.cc.

References funct::abs(), gather_cfg::cout, dataset::end, PVValHelper::eta, edm::Event::getByToken(), HLT_FULL_cff::InputTag, submitPVResolutionJobs::key, relativeConstraints::keys, mu_mass, hgcalPerformanceValidation::objects, EgammaValidation_cff::pathName, bigModule::plot(), DiDispStaMuonMonitor_cfi::pt, command_line::start, AlCaHLTBitMon_QueryRunRegistry::string, triggerResults, and HLTObjectMonitor_cfi::wallTime.

342  {
343  double start = get_wall_time();
344 
345  using namespace edm;
346 
347  if (debugPrint)
348  std::cout << "Inside analyze(). " << std::endl;
349 
350  // access trigger results
353  if (!triggerResults.isValid())
354  return;
355 
356  edm::Handle<trigger::TriggerEvent> aodTriggerEvent;
357  iEvent.getByToken(aodTriggerToken_, aodTriggerEvent);
358  if (!aodTriggerEvent.isValid())
359  return;
360 
361  //reset everything to not accepted at beginning of each event
362  unordered_map<string, bool> firedMap = acceptMap;
363  for (auto plot : plotList) //loop over paths
364  {
365  if (firedMap[plot->pathName])
366  continue;
367  bool triggerAccept = false;
368  const TriggerObjectCollection objects = aodTriggerEvent->getObjects();
369  edm::InputTag moduleFilter;
371  if (plot->pathIndex > 0 && triggerResults->accept(plot->pathIndex) && hltConfig_.saveTags(plot->moduleName)) {
372  moduleFilter = edm::InputTag(plot->moduleName, "", processName_);
373  pathName = plot->pathName;
374  triggerAccept = true;
375  } else if (plot->pathIndexOR > 0 && triggerResults->accept(plot->pathIndexOR) &&
376  hltConfig_.saveTags(plot->moduleNameOR)) {
377  if (firedMap[plot->pathNameOR])
378  continue;
379  moduleFilter = edm::InputTag(plot->moduleNameOR, "", processName_);
380  pathName = plot->pathNameOR;
381  triggerAccept = true;
382  }
383 
384  if (triggerAccept) {
385  unsigned int moduleFilterIndex = aodTriggerEvent->filterIndex(moduleFilter);
386 
387  if (moduleFilterIndex + 1 > aodTriggerEvent->sizeFilters())
388  return;
389  const Keys& keys = aodTriggerEvent->filterKeys(moduleFilterIndex);
390 
396 
397  //calo AK4 jet pt + eta + phi
398  if (pathName == caloAK4JetPt_.pathName) {
399  for (const auto& key : keys) {
400  caloAK4JetPt_.ME->Fill(objects[key].pt());
401  caloAK4JetEta_.ME->Fill(objects[key].eta());
402  caloAK4JetPhi_.ME->Fill(objects[key].phi());
403  }
404  }
405  //pf AK4 jet pt + eta + phi
406  else if (pathName == pfAK4JetPt_.pathName) {
407  for (const auto& key : keys) {
408  pfAK4JetPt_.ME->Fill(objects[key].pt());
409  pfAK4JetEta_.ME->Fill(objects[key].eta());
410  pfAK4JetPhi_.ME->Fill(objects[key].phi());
411  }
412  }
413  //calo AK4 di jet pt + eta + phi
414  else if (pathName == caloDiAK4JetPt_.pathName) {
415  for (const auto& key : keys) {
416  caloDiAK4JetPt_.ME->Fill(objects[key].pt());
417  caloDiAK4JetEta_.ME->Fill(objects[key].eta());
418  caloDiAK4JetPhi_.ME->Fill(objects[key].phi());
419  }
420  }
421  //pf AK4 di jet pt + eta + phi
422  else if (pathName == pfDiAK4JetPt_.pathName) {
423  for (const auto& key : keys) {
424  pfDiAK4JetPt_.ME->Fill(objects[key].pt());
425  pfDiAK4JetEta_.ME->Fill(objects[key].eta());
426  pfDiAK4JetPhi_.ME->Fill(objects[key].phi());
427  }
428  }
429  //photon pt + eta + phi
430  else if (pathName == photonPt_.pathName) {
431  for (const auto& key : keys) {
432  photonPt_.ME->Fill(objects[key].pt());
433  photonEta_.ME->Fill(objects[key].eta());
434  photonPhi_.ME->Fill(objects[key].phi());
435  }
436  }
437  //photon PPStyle pt + eta + phi
438  else if (pathName == photonPPPt_.pathName) {
439  for (const auto& key : keys) {
440  photonPPPt_.ME->Fill(objects[key].pt());
441  photonPPEta_.ME->Fill(objects[key].eta());
442  photonPPPhi_.ME->Fill(objects[key].phi());
443  }
444  }
445  //calo Bjet pt + eta + phi
446  else if (pathName == caloBJetPt_.pathName) {
447  for (const auto& key : keys) {
448  caloBJetPt_.ME->Fill(objects[key].pt());
449  caloBJetEta_.ME->Fill(objects[key].eta());
450  caloBJetPhi_.ME->Fill(objects[key].phi());
451  }
452  }
453  //PF Bjet pt + eta + phi
454  else if (pathName == pfBJetPt_.pathName) {
455  for (const auto& key : keys) {
456  pfBJetPt_.ME->Fill(objects[key].pt());
457  pfBJetEta_.ME->Fill(objects[key].eta());
458  pfBJetPhi_.ME->Fill(objects[key].phi());
459  }
460  }
461  //electron pt + eta + phi
462  else if (pathName == electronPt_.pathName) {
463  for (const auto& key : keys) {
464  electronPt_.ME->Fill(objects[key].pt());
465  electronEta_.ME->Fill(objects[key].eta());
466  electronPhi_.ME->Fill(objects[key].phi());
467  }
468  } else if (pathName == l3muon3Pt_.pathName) {
469  for (const auto& key : keys) {
470  l3muon3Pt_.ME->Fill(objects[key].pt());
471  l3muon3Eta_.ME->Fill(objects[key].eta());
472  l3muon3Phi_.ME->Fill(objects[key].phi());
473  }
474  } else if (pathName == l2muon12Pt_.pathName) {
475  for (const auto& key : keys) {
476  l2muon12Pt_.ME->Fill(objects[key].pt());
477  l2muon12Eta_.ME->Fill(objects[key].eta());
478  l2muon12Phi_.ME->Fill(objects[key].phi());
479  }
480  } else if (pathName == l3muon12Pt_.pathName) {
481  for (const auto& key : keys) {
482  l3muon12Pt_.ME->Fill(objects[key].pt());
483  l3muon12Eta_.ME->Fill(objects[key].eta());
484  l3muon12Phi_.ME->Fill(objects[key].phi());
485  }
486  }
487 
488  // ////////////////////////////////
489  // ///
490  // /// double-object plots
491  // ///
492  // ////////////////////////////////
493 
494  else if (pathName == pAL1DoubleMuZMass_.pathName) {
495  const double mu_mass(.105658);
496  unsigned int kCnt0 = 0;
497  for (const auto& key0 : keys) {
498  unsigned int kCnt1 = 0;
499  for (const auto& key1 : keys) {
500  if (key0 != key1 &&
501  kCnt1 > kCnt0) { // avoid filling hists with same objs && avoid double counting separate objs
502  // if (abs(objects[key0].id()) == 13 && (objects[key0].id()+objects[key1].id()==0)) // id is not filled for l1 stage2 muons
503  TLorentzVector mu1, mu2, dimu;
504  mu1.SetPtEtaPhiM(objects[key0].pt(), objects[key0].eta(), objects[key0].phi(), mu_mass);
505  mu2.SetPtEtaPhiM(objects[key1].pt(), objects[key1].eta(), objects[key1].phi(), mu_mass);
506  dimu = mu1 + mu2;
507  if (dimu.M() > pAL1DoubleMuZMass_.xMin && dimu.M() < pAL1DoubleMuZMass_.xMax)
508  pAL1DoubleMuZMass_.ME->Fill(dimu.M());
509  }
510  kCnt1 += 1;
511  }
512  kCnt0 += 1;
513  }
514  } else if (pathName == pAL2DoubleMuZMass_.pathName) {
515  const double mu_mass(.105658);
516  unsigned int kCnt0 = 0;
517  for (const auto& key0 : keys) {
518  unsigned int kCnt1 = 0;
519  for (const auto& key1 : keys) {
520  if (key0 != key1 &&
521  kCnt1 > kCnt0) { // avoid filling hists with same objs && avoid double counting separate objs
522  if (abs(objects[key0].id()) == 13 &&
523  (objects[key0].id() + objects[key1].id() == 0)) { // check muon id and dimuon charge
524  TLorentzVector mu1, mu2, dimu;
525  mu1.SetPtEtaPhiM(objects[key0].pt(), objects[key0].eta(), objects[key0].phi(), mu_mass);
526  mu2.SetPtEtaPhiM(objects[key1].pt(), objects[key1].eta(), objects[key1].phi(), mu_mass);
527  dimu = mu1 + mu2;
528  if (dimu.M() > pAL2DoubleMuZMass_.xMin && dimu.M() < pAL2DoubleMuZMass_.xMax)
529  pAL2DoubleMuZMass_.ME->Fill(dimu.M());
530  }
531  }
532  kCnt1 += 1;
533  }
534  kCnt0 += 1;
535  }
536  } else if (pathName == pAL3DoubleMuZMass_.pathName) {
537  const double mu_mass(.105658);
538  unsigned int kCnt0 = 0;
539  for (const auto& key0 : keys) {
540  unsigned int kCnt1 = 0;
541  for (const auto& key1 : keys) {
542  if (key0 != key1 &&
543  kCnt1 > kCnt0) { // avoid filling hists with same objs && avoid double counting separate objs
544  if (abs(objects[key0].id()) == 13 &&
545  (objects[key0].id() + objects[key1].id() == 0)) { // check muon id and dimuon charge
546  TLorentzVector mu1, mu2, dimu;
547  mu1.SetPtEtaPhiM(objects[key0].pt(), objects[key0].eta(), objects[key0].phi(), mu_mass);
548  mu2.SetPtEtaPhiM(objects[key1].pt(), objects[key1].eta(), objects[key1].phi(), mu_mass);
549  dimu = mu1 + mu2;
550  if (dimu.M() > pAL3DoubleMuZMass_.xMin && dimu.M() < pAL3DoubleMuZMass_.xMax)
551  pAL3DoubleMuZMass_.ME->Fill(dimu.M());
552  }
553  }
554  kCnt1 += 1;
555  }
556  kCnt0 += 1;
557  }
558  }
559 
560  firedMap[pathName] = true;
561  } //end if trigger accept
562  } //end loop over plots/paths
563 
564  // sleep(1); //sleep for 1s, used to calibrate timing
565  double end = get_wall_time();
566  double wallTime = end - start;
568 }
edm::EDGetTokenT< trigger::TriggerEvent > aodTriggerToken_
bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
unordered_map< string, bool > acceptMap
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
void Fill(long long x)
def plot
Definition: bigModule.py:18
tuple key
prepare the HTCondor submission files and eventually submit them
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static std::string const triggerResults
Definition: EdmProvDump.cc:44
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:75
std::vector< size_type > Keys
string end
Definition: dataset.py:937
tuple cout
Definition: gather_cfg.py:144
static constexpr float mu_mass
void HLTObjectMonitorProtonLead::bookHistograms ( DQMStore::IBooker i,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprivate

Main shifter workspace plots

Definition at line 610 of file HLTObjectMonitorProtonLead.cc.

References dqm::implementation::IBooker::book1D(), if(), bigModule::plot(), dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

612  {
618 
619  //book wall time separately
620  ibooker.setCurrentFolder(mainShifterFolder);
621  wallTime_.ME =
624 
625  for (auto plot : plotList) {
626  std::string display_pathNames = plot->pathName;
627  if (!plot->pathNameOR.empty())
628  display_pathNames = plot->pathName + " OR " + plot->pathNameOR;
629 
630  if (plot->displayInPrimary) {
631  ibooker.setCurrentFolder(mainShifterFolder);
632  (*plot).ME = ibooker.book1D(plot->plotLabel, display_pathNames.c_str(), plot->nBins, plot->xMin, plot->xMax);
633  (*plot).ME->setAxisTitle(plot->xAxisLabel);
634  //need to add OR statement
635  } else {
636  ibooker.setCurrentFolder(backupFolder);
637  (*plot).ME = ibooker.book1D(plot->plotLabel, display_pathNames.c_str(), plot->nBins, plot->xMin, plot->xMax);
638  (*plot).ME->setAxisTitle(plot->xAxisLabel);
639  }
640  }
641 }
def plot
Definition: bigModule.py:18
if(conf_.getParameter< bool >("UseStripCablingDB"))
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void HLTObjectMonitorProtonLead::dqmBeginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprivate

Definition at line 571 of file HLTObjectMonitorProtonLead.cc.

References gather_cfg::cout, EgammaValidation_cff::pathName, bigModule::plot(), and triggerPaths.

571  {
572  if (debugPrint)
573  std::cout << "Calling beginRun. " << std::endl;
574  bool changed = true;
575  if (hltConfig_.init(iRun, iSetup, processName_, changed)) {
576  if (debugPrint)
577  std::cout << "Extracting HLTconfig. " << std::endl;
578  }
579 
580  //get path indicies from menu
581  string pathName_noVersion;
582  vector<string> triggerPaths = hltConfig_.triggerNames();
583 
584  for (const auto& pathName : triggerPaths) {
585  pathName_noVersion = hltConfig_.removeVersion(pathName);
586  for (auto plot : plotList) {
587  if (plot->pathName == pathName_noVersion) {
588  (*plot).pathIndex = hltConfig_.triggerIndex(pathName);
589  } else if (plot->pathNameOR == pathName_noVersion) {
590  (*plot).pathIndexOR = hltConfig_.triggerIndex(pathName);
591  }
592  }
593  }
594  vector<hltPlot*> plotList_temp;
595  for (auto plot : plotList) {
596  if (plot->pathIndex > 0 || plot->pathIndexOR > 0) {
597  plotList_temp.push_back(plot);
598  acceptMap[plot->pathName] = false;
599  if (plot->pathIndexOR > 0)
600  acceptMap[plot->pathNameOR] = false;
601  }
602  }
603  //now re-assign plotList to contain only the plots with paths in the menu.
604  plotList = plotList_temp;
605  plotList_temp.clear();
606 }
const std::vector< std::string > & triggerNames() const
names of trigger paths
unordered_map< string, bool > acceptMap
static const std::string removeVersion(const std::string &trigger)
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
def plot
Definition: bigModule.py:18
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
tuple cout
Definition: gather_cfg.py:144
static std::string const triggerPaths
Definition: EdmProvDump.cc:45
double HLTObjectMonitorProtonLead::get_wall_time ( void  )
private

Definition at line 643 of file HLTObjectMonitorProtonLead.cc.

643  {
644  struct timeval time;
645  if (gettimeofday(&time, nullptr))
646  return 0;
647  return (double)time.tv_sec + (double)time.tv_usec * .000001;
648 }

Member Data Documentation

unordered_map<string, bool> HLTObjectMonitorProtonLead::acceptMap
private

Definition at line 107 of file HLTObjectMonitorProtonLead.cc.

edm::EDGetTokenT<trigger::TriggerEvent> HLTObjectMonitorProtonLead::aodTriggerToken_
private

Definition at line 112 of file HLTObjectMonitorProtonLead.cc.

string HLTObjectMonitorProtonLead::backupFolder
private

Definition at line 106 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::caloAK4JetEta_
private

Definition at line 160 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::caloAK4JetEta_pset
private

Definition at line 117 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::caloAK4JetPhi_
private

Definition at line 161 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::caloAK4JetPhi_pset
private

Definition at line 118 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::caloAK4JetPt_
private

Definition at line 159 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::caloAK4JetPt_pset
private

Definition at line 116 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::caloBJetEta_
private

Definition at line 178 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::caloBJetEta_pset
private

Definition at line 135 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::caloBJetPhi_
private

Definition at line 179 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::caloBJetPhi_pset
private

Definition at line 136 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::caloBJetPt_
private

Definition at line 177 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::caloBJetPt_pset
private

Definition at line 134 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::caloDiAK4JetEta_
private

Definition at line 166 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::caloDiAK4JetEta_pset
private

Definition at line 123 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::caloDiAK4JetPhi_
private

Definition at line 167 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::caloDiAK4JetPhi_pset
private

Definition at line 124 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::caloDiAK4JetPt_
private

Definition at line 165 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::caloDiAK4JetPt_pset
private

Definition at line 122 of file HLTObjectMonitorProtonLead.cc.

bool HLTObjectMonitorProtonLead::debugPrint
private

Definition at line 102 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::electronEta_
private

Definition at line 184 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::electronEta_pset
private

Definition at line 141 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::electronPhi_
private

Definition at line 185 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::electronPhi_pset
private

Definition at line 142 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::electronPt_
private

Definition at line 183 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::electronPt_pset
private

Definition at line 140 of file HLTObjectMonitorProtonLead.cc.

HLTConfigProvider HLTObjectMonitorProtonLead::hltConfig_
private

Definition at line 103 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::l2muon12Eta_
private

Definition at line 190 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::l2muon12Eta_pset
private

Definition at line 147 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::l2muon12Phi_
private

Definition at line 191 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::l2muon12Phi_pset
private

Definition at line 148 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::l2muon12Pt_
private

Definition at line 189 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::l2muon12Pt_pset
private

Definition at line 146 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::l3muon12Eta_
private

Definition at line 193 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::l3muon12Eta_pset
private

Definition at line 150 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::l3muon12Phi_
private

Definition at line 194 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::l3muon12Phi_pset
private

Definition at line 151 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::l3muon12Pt_
private

Definition at line 192 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::l3muon12Pt_pset
private

Definition at line 149 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::l3muon3Eta_
private

Definition at line 187 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::l3muon3Eta_pset
private

Definition at line 144 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::l3muon3Phi_
private

Definition at line 188 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::l3muon3Phi_pset
private

Definition at line 145 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::l3muon3Pt_
private

Definition at line 186 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::l3muon3Pt_pset
private

Definition at line 143 of file HLTObjectMonitorProtonLead.cc.

string HLTObjectMonitorProtonLead::mainShifterFolder
private

Definition at line 105 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pAL1DoubleMuZMass_
private

Definition at line 195 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pAL1DoubleMuZMass_pset
private

Definition at line 152 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pAL2DoubleMuZMass_
private

Definition at line 196 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pAL2DoubleMuZMass_pset
private

Definition at line 153 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pAL3DoubleMuZMass_
private

Definition at line 197 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pAL3DoubleMuZMass_pset
private

Definition at line 154 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pfAK4JetEta_
private

Definition at line 163 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pfAK4JetEta_pset
private

Definition at line 120 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pfAK4JetPhi_
private

Definition at line 164 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pfAK4JetPhi_pset
private

Definition at line 121 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pfAK4JetPt_
private

Definition at line 162 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pfAK4JetPt_pset
private

Definition at line 119 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pfBJetEta_
private

Definition at line 181 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pfBJetEta_pset
private

Definition at line 138 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pfBJetPhi_
private

Definition at line 182 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pfBJetPhi_pset
private

Definition at line 139 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pfBJetPt_
private

Definition at line 180 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pfBJetPt_pset
private

Definition at line 137 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pfDiAK4JetEta_
private

Definition at line 169 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pfDiAK4JetEta_pset
private

Definition at line 126 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pfDiAK4JetPhi_
private

Definition at line 170 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pfDiAK4JetPhi_pset
private

Definition at line 127 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pfDiAK4JetPt_
private

Definition at line 168 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pfDiAK4JetPt_pset
private

Definition at line 125 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::photonEta_
private

Definition at line 172 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::photonEta_pset
private

Definition at line 129 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::photonPhi_
private

Definition at line 173 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::photonPhi_pset
private

Definition at line 130 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::photonPPEta_
private

Definition at line 175 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::photonPPEta_pset
private

Definition at line 132 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::photonPPPhi_
private

Definition at line 176 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::photonPPPhi_pset
private

Definition at line 133 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::photonPPPt_
private

Definition at line 174 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::photonPPPt_pset
private

Definition at line 131 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::photonPt_
private

Definition at line 171 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::photonPt_pset
private

Definition at line 128 of file HLTObjectMonitorProtonLead.cc.

vector<hltPlot*> HLTObjectMonitorProtonLead::plotList
private

Definition at line 96 of file HLTObjectMonitorProtonLead.cc.

unordered_map<hltPlot*, edm::ParameterSet*> HLTObjectMonitorProtonLead::plotMap
private

Definition at line 108 of file HLTObjectMonitorProtonLead.cc.

string HLTObjectMonitorProtonLead::processName_
private

Definition at line 157 of file HLTObjectMonitorProtonLead.cc.

string HLTObjectMonitorProtonLead::topDirectoryName
private

Definition at line 104 of file HLTObjectMonitorProtonLead.cc.

edm::EDGetTokenT<edm::TriggerResults> HLTObjectMonitorProtonLead::triggerResultsToken_
private

Definition at line 111 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::wallTime_
private

Definition at line 198 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::wallTime_pset
private

Definition at line 155 of file HLTObjectMonitorProtonLead.cc.