CMS 3D CMS Logo

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
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 
double get_wall_time (void)
 

Private Attributes

unordered_map< string, bool > acceptMap
 
edm::EDGetTokenT< trigger::TriggerEventaodTriggerToken_
 
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::TriggerResultstriggerResultsToken_
 
hltPlot wallTime_
 
edm::ParameterSet wallTime_pset
 

Detailed Description

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 71 of file HLTObjectMonitorProtonLead.cc.

Constructor & Destructor Documentation

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

Definition at line 220 of file HLTObjectMonitorProtonLead.cc.

References edm::ParameterSet::getParameter(), edm::moduleName(), anotherprimaryvertexanalyzer_cfi::xMax, and anotherprimaryvertexanalyzer_cfi::xMin.

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

Definition at line 346 of file HLTObjectMonitorProtonLead.cc.

347 {
348 
349  // do anything here that needs to be done at desctruction time
350  // (e.g. close files, deallocate resources etc.)
351 
352 }

Member Function Documentation

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

single-object plots


Definition at line 361 of file HLTObjectMonitorProtonLead.cc.

References funct::abs(), edm::HLTGlobalStatus::accept(), gather_cfg::cout, end, PVValHelper::eta, trigger::TriggerEvent::filterIndex(), trigger::TriggerEvent::filterKeys(), edm::Event::getByToken(), trigger::TriggerEvent::getObjects(), edm::HandleBase::isValid(), crabWrapper::key, relativeConstraints::keys, plotFactory::plot, EnergyCorrector::pt, trigger::TriggerEvent::sizeFilters(), command_line::start, AlCaHLTBitMon_QueryRunRegistry::string, and triggerResults.

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

Main shifter workspace plots


Definition at line 638 of file HLTObjectMonitorProtonLead.cc.

References DQMStore::IBooker::book1D(), reco::if(), plotFactory::plot, MonitorElement::setAxisTitle(), DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

639 {
640 
646 
647  //book wall time separately
648  ibooker.setCurrentFolder(mainShifterFolder);
651 
652  for (auto plot : plotList)
653  {
654  std::string display_pathNames = plot->pathName;
655  if (!plot->pathNameOR.empty()) display_pathNames = plot->pathName + " OR " + plot->pathNameOR;
656 
657  if (plot->displayInPrimary)
658  {
659  ibooker.setCurrentFolder(mainShifterFolder);
660  (*plot).ME = ibooker.book1D(plot->plotLabel,display_pathNames.c_str(),plot->nBins,plot->xMin,plot->xMax);
661  (*plot).ME->setAxisTitle(plot->xAxisLabel);
662  //need to add OR statement
663  }
664  else
665  {
666  ibooker.setCurrentFolder(backupFolder);
667  (*plot).ME = ibooker.book1D(plot->plotLabel,display_pathNames.c_str(),plot->nBins,plot->xMin,plot->xMax);
668  (*plot).ME->setAxisTitle(plot->xAxisLabel);
669  }
670  }
671 
672 }
if(dp >Float(M_PI)) dp-
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 586 of file HLTObjectMonitorProtonLead.cc.

References gather_cfg::cout, plotFactory::plot, and triggerPaths.

587 {
588  if (debugPrint) std::cout << "Calling beginRun. " << std::endl;
589  bool changed = true;
590  if (hltConfig_.init(iRun, iSetup, processName_, changed))
591  {
592  if (debugPrint) std::cout << "Extracting HLTconfig. " << std::endl;
593  }
594 
595  //get path indicies from menu
596  string pathName_noVersion;
597  vector<string> triggerPaths = hltConfig_.triggerNames();
598 
599  for (const auto & pathName : triggerPaths)
600  {
601  pathName_noVersion = hltConfig_.removeVersion(pathName);
602  for (auto plot : plotList)
603  {
604  if (plot->pathName == pathName_noVersion)
605  {
606  (*plot).pathIndex = hltConfig_.triggerIndex(pathName);
607  }
608  else if (plot->pathNameOR == pathName_noVersion)
609  {
610  (*plot).pathIndexOR = hltConfig_.triggerIndex(pathName);
611  }
612  }
613  }
614  vector<hltPlot*> plotList_temp;
615  for (auto plot : plotList)
616  {
617  if (plot->pathIndex > 0 || plot->pathIndexOR > 0)
618  {
619  plotList_temp.push_back(plot);
620  acceptMap[plot->pathName] = false;
621  if (plot->pathIndexOR > 0) acceptMap[plot->pathNameOR] = false;
622  }
623  }
624  //now re-assign plotList to contain only the plots with paths in the menu.
625  plotList = plotList_temp;
626  plotList_temp.clear();
627 
628 }
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)
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
static std::string const triggerPaths
Definition: EdmProvDump.cc:42
void HLTObjectMonitorProtonLead::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprivate

Definition at line 633 of file HLTObjectMonitorProtonLead.cc.

References gather_cfg::cout.

634 {
635  if (debugPrint) std::cout << "Calling endRun. " << std::endl;
636 }
double HLTObjectMonitorProtonLead::get_wall_time ( void  )
private

Definition at line 674 of file HLTObjectMonitorProtonLead.cc.

675 {
676  struct timeval time;
677  if (gettimeofday(&time,nullptr)) return 0;
678  return (double)time.tv_sec + (double)time.tv_usec * .000001;
679 }

Member Data Documentation

unordered_map<string, bool> HLTObjectMonitorProtonLead::acceptMap
private

Definition at line 114 of file HLTObjectMonitorProtonLead.cc.

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

Definition at line 119 of file HLTObjectMonitorProtonLead.cc.

string HLTObjectMonitorProtonLead::backupFolder
private

Definition at line 113 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::caloAK4JetEta_
private

Definition at line 167 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::caloAK4JetEta_pset
private

Definition at line 124 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::caloAK4JetPhi_
private

Definition at line 168 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::caloAK4JetPhi_pset
private

Definition at line 125 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::caloAK4JetPt_
private

Definition at line 166 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::caloAK4JetPt_pset
private

Definition at line 123 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::caloBJetEta_
private

Definition at line 185 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::caloBJetEta_pset
private

Definition at line 142 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::caloBJetPhi_
private

Definition at line 186 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::caloBJetPhi_pset
private

Definition at line 143 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::caloBJetPt_
private

Definition at line 184 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::caloBJetPt_pset
private

Definition at line 141 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::caloDiAK4JetEta_
private

Definition at line 173 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::caloDiAK4JetEta_pset
private

Definition at line 130 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::caloDiAK4JetPhi_
private

Definition at line 174 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::caloDiAK4JetPhi_pset
private

Definition at line 131 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::caloDiAK4JetPt_
private

Definition at line 172 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::caloDiAK4JetPt_pset
private

Definition at line 129 of file HLTObjectMonitorProtonLead.cc.

bool HLTObjectMonitorProtonLead::debugPrint
private

Definition at line 109 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::electronEta_
private

Definition at line 191 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::electronEta_pset
private

Definition at line 148 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::electronPhi_
private

Definition at line 192 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::electronPhi_pset
private

Definition at line 149 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::electronPt_
private

Definition at line 190 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::electronPt_pset
private

Definition at line 147 of file HLTObjectMonitorProtonLead.cc.

HLTConfigProvider HLTObjectMonitorProtonLead::hltConfig_
private

Definition at line 110 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::l2muon12Eta_
private

Definition at line 197 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::l2muon12Eta_pset
private

Definition at line 154 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::l2muon12Phi_
private

Definition at line 198 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::l2muon12Phi_pset
private

Definition at line 155 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::l2muon12Pt_
private

Definition at line 196 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::l2muon12Pt_pset
private

Definition at line 153 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::l3muon12Eta_
private

Definition at line 200 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::l3muon12Eta_pset
private

Definition at line 157 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::l3muon12Phi_
private

Definition at line 201 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::l3muon12Phi_pset
private

Definition at line 158 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::l3muon12Pt_
private

Definition at line 199 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::l3muon12Pt_pset
private

Definition at line 156 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::l3muon3Eta_
private

Definition at line 194 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::l3muon3Eta_pset
private

Definition at line 151 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::l3muon3Phi_
private

Definition at line 195 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::l3muon3Phi_pset
private

Definition at line 152 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::l3muon3Pt_
private

Definition at line 193 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::l3muon3Pt_pset
private

Definition at line 150 of file HLTObjectMonitorProtonLead.cc.

string HLTObjectMonitorProtonLead::mainShifterFolder
private

Definition at line 112 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pAL1DoubleMuZMass_
private

Definition at line 202 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pAL1DoubleMuZMass_pset
private

Definition at line 159 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pAL2DoubleMuZMass_
private

Definition at line 203 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pAL2DoubleMuZMass_pset
private

Definition at line 160 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pAL3DoubleMuZMass_
private

Definition at line 204 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pAL3DoubleMuZMass_pset
private

Definition at line 161 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pfAK4JetEta_
private

Definition at line 170 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pfAK4JetEta_pset
private

Definition at line 127 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pfAK4JetPhi_
private

Definition at line 171 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pfAK4JetPhi_pset
private

Definition at line 128 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pfAK4JetPt_
private

Definition at line 169 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pfAK4JetPt_pset
private

Definition at line 126 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pfBJetEta_
private

Definition at line 188 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pfBJetEta_pset
private

Definition at line 145 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pfBJetPhi_
private

Definition at line 189 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pfBJetPhi_pset
private

Definition at line 146 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pfBJetPt_
private

Definition at line 187 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pfBJetPt_pset
private

Definition at line 144 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pfDiAK4JetEta_
private

Definition at line 176 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pfDiAK4JetEta_pset
private

Definition at line 133 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pfDiAK4JetPhi_
private

Definition at line 177 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pfDiAK4JetPhi_pset
private

Definition at line 134 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::pfDiAK4JetPt_
private

Definition at line 175 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::pfDiAK4JetPt_pset
private

Definition at line 132 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::photonEta_
private

Definition at line 179 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::photonEta_pset
private

Definition at line 136 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::photonPhi_
private

Definition at line 180 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::photonPhi_pset
private

Definition at line 137 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::photonPPEta_
private

Definition at line 182 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::photonPPEta_pset
private

Definition at line 139 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::photonPPPhi_
private

Definition at line 183 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::photonPPPhi_pset
private

Definition at line 140 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::photonPPPt_
private

Definition at line 181 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::photonPPPt_pset
private

Definition at line 138 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::photonPt_
private

Definition at line 178 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::photonPt_pset
private

Definition at line 135 of file HLTObjectMonitorProtonLead.cc.

vector<hltPlot*> HLTObjectMonitorProtonLead::plotList
private

Definition at line 103 of file HLTObjectMonitorProtonLead.cc.

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

Definition at line 115 of file HLTObjectMonitorProtonLead.cc.

string HLTObjectMonitorProtonLead::processName_
private

Definition at line 164 of file HLTObjectMonitorProtonLead.cc.

string HLTObjectMonitorProtonLead::topDirectoryName
private

Definition at line 111 of file HLTObjectMonitorProtonLead.cc.

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

Definition at line 118 of file HLTObjectMonitorProtonLead.cc.

hltPlot HLTObjectMonitorProtonLead::wallTime_
private

Definition at line 205 of file HLTObjectMonitorProtonLead.cc.

edm::ParameterSet HLTObjectMonitorProtonLead::wallTime_pset
private

Definition at line 162 of file HLTObjectMonitorProtonLead.cc.