CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
HLTObjectsMonitor Class Reference
Inheritance diagram for HLTObjectsMonitor:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Classes

struct  MEbinning
 

Public Member Functions

 HLTObjectsMonitor (const edm::ParameterSet &)
 
 ~HLTObjectsMonitor () override=default
 
- Public Member Functions inherited from DQMEDAnalyzer
void beginRun (edm::Run const &, edm::EventSetup const &) final
 
void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

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 dxyFinder (double, double, edm::Handle< reco::RecoChargedCandidateCollection >, edm::Handle< reco::BeamSpot >, double)
 
double dzFinder (double, double, double, double, edm::Handle< reco::RecoChargedCandidateCollection >, double)
 
void getPSet ()
 
bool isHEM17 (double eta, double phi)
 
bool isHEP17 (double eta, double phi)
 

Static Private Member Functions

static hltPlot getPlotPSet (edm::ParameterSet pset)
 

Private Attributes

std::string backupFolder_
 
edm::InputTag beamSpot_
 
edm::EDGetTokenT< reco::BeamSpotbeamSpotToken_
 
edm::EDGetTokenT< reco::JetTagCollectioncaloJetBTagsToken_
 
const MEbinning csv_binning_
 
bool debug_
 
edm::InputTag eleCandidates_
 
edm::EDGetTokenT< std::vector< reco::RecoChargedCandidate > > eleCandidatesToken_
 
const MEbinning eta_binning_hem17_
 
const MEbinning eta_binning_hep17_
 
MonitorElementeventsPlot_
 
HLTConfigProvider hltConfig_
 
std::vector< hltPlothltPlots_
 
std::string label_
 
std::string mainFolder_
 
const double MASS_MU = .105658
 
double MAX_CSV = 1.
 
double MAX_ETA_HEP17 = 3.0
 
double MAX_PHI = 3.2
 
double MAX_PHI_HEP17 = -0.52
 
double MIN_ETA_HEP17 = 1.3
 
double MIN_PHI_HEP17 = -0.87
 
edm::InputTag muCandidates_
 
edm::EDGetTokenT< std::vector< reco::RecoChargedCandidate > > muCandidatesToken_
 
int N_CSV = 20
 
int N_ETA_HEP17 = 6
 
int N_PHI = 64
 
int N_PHI_HEP17 = 7
 
edm::EDGetTokenT< reco::JetTagCollectionpfJetBTagsToken_
 
const MEbinning phi_binning_
 
const MEbinning phi_binning_hep17_
 
std::vector< double > phi_variable_binning_
 
std::vector< edm::ParameterSetplotPSETS_
 
std::string processName_
 
std::string TopFolder_
 
edm::EDGetTokenT< trigger::TriggerEventtriggerEventToken_
 
edm::EDGetTokenT< edm::TriggerResultstriggerResultsToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr< dqmDetails::NoCacheglobalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr< dqmDetails::NoCacheglobalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 98 of file HLTObjectsMonitor.cc.

Constructor & Destructor Documentation

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

Definition at line 278 of file HLTObjectsMonitor.cc.

References backupFolder_, getPSet(), mps_fire::i, mainFolder_, MAX_PHI, N_PHI, phi_variable_binning_, and TopFolder_.

279  : TopFolder_ ( iConfig.getParameter<std::string>("TopFolder") )
280  , label_ ( iConfig.getParameter<std::string>("label") )
281  , processName_ ( iConfig.getParameter<std::string>("processName") )
282  , plotPSETS_ ( iConfig.getParameter<std::vector<edm::ParameterSet> >("plots") )
283  , debug_ ( iConfig.getUntrackedParameter<bool>("debug",false) )
284  , triggerResultsToken_ ( consumes<edm::TriggerResults> (iConfig.getParameter<edm::InputTag>("TriggerResults") ) )
285  , triggerEventToken_ ( consumes<trigger::TriggerEvent>(iConfig.getParameter<edm::InputTag>("TriggerSummary") ) )
286  , beamSpot_ ( iConfig.getParameter<edm::InputTag>("beamspot") )
287  , beamSpotToken_ ( consumes<reco::BeamSpot>(beamSpot_) )
288  , caloJetBTagsToken_ ( consumes<reco::JetTagCollection>(iConfig.getParameter<edm::InputTag>("caloJetBTags") ) )
289  , pfJetBTagsToken_ ( consumes<reco::JetTagCollection>(iConfig.getParameter<edm::InputTag>("pfJetBTags") ) )
290  , muCandidates_ ( iConfig.getParameter<edm::InputTag>("muCandidates") )
291  , muCandidatesToken_ ( consumes<std::vector<reco::RecoChargedCandidate> >(muCandidates_) )
292  , eleCandidates_ ( iConfig.getParameter<edm::InputTag>("eleCandidates") )
293  , eleCandidatesToken_ ( consumes<std::vector<reco::RecoChargedCandidate> >(eleCandidates_) )
294 {
295  getPSet();
296 
297  //now do what ever initialization is needed
298  mainFolder_ = TopFolder_+"/MainShifter";
299  backupFolder_ = TopFolder_+"/Backup";
300 
301  //set Token(s)
302 
303 
304  double step = 2*MAX_PHI/double(N_PHI);
305  for ( int i=0; i<=N_PHI; i++)
306  phi_variable_binning_.push_back(-MAX_PHI + step*i);
307 
308 }
edm::EDGetTokenT< reco::JetTagCollection > pfJetBTagsToken_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
edm::InputTag muCandidates_
edm::EDGetTokenT< reco::JetTagCollection > caloJetBTagsToken_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
edm::InputTag beamSpot_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< std::vector< reco::RecoChargedCandidate > > eleCandidatesToken_
edm::InputTag eleCandidates_
edm::EDGetTokenT< std::vector< reco::RecoChargedCandidate > > muCandidatesToken_
std::vector< double > phi_variable_binning_
std::vector< edm::ParameterSet > plotPSETS_
step
edm::EDGetTokenT< trigger::TriggerEvent > triggerEventToken_
HLTObjectsMonitor::~HLTObjectsMonitor ( )
overridedefault

Member Function Documentation

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

Definition at line 317 of file HLTObjectsMonitor.cc.

References funct::abs(), edm::HLTGlobalStatus::accept(), hiMultiTrackSelector_cfi::beamspot, beamSpotToken_, edm::AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper >::begin(), caloJetBTagsToken_, gather_cfg::cout, debug_, deltaR(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, PVValHelper::dxy, dxyFinder(), PVValHelper::dz, dzFinder(), eleCandidatesToken_, edm::AssociationVector< KeyRefProd, CVal, KeyRef, SizeType, KeyReferenceHelper >::end(), PVValHelper::eta, eventsPlot_, MonitorElement::Fill(), trigger::TriggerEvent::filterIndex(), trigger::TriggerEvent::filterKeys(), edm::Event::getByToken(), trigger::TriggerEvent::getObjects(), hltConfig_, hltPlots_, globals_cff::id2, training_settings::idx, isHEM17(), isHEP17(), edm::HandleBase::isValid(), crabWrapper::key, relativeConstraints::keys, LogDebug, ResonanceBuilder::mass, MASS_MU, python.rootplot.argparse::module, HLTConfigProvider::moduleLabels(), edm::moduleName(), muCandidatesToken_, pfJetBTagsToken_, phi, plotFactory::plot, processName_, EnergyCorrector::pt, hiDetachedQuadStep_cff::pt2, q1, q2, HLTConfigProvider::saveTags(), trigger::TriggerEvent::sizeFilters(), triggerEventToken_, triggerResults, triggerResultsToken_, and findQualityFiles::v.

318 {
319  // if ( debug_ )
320  // std::cout << "[HLTObjectsMonitor::analyze]" << std::endl;
321 
322  // access trigger results
324  iEvent.getByToken(triggerResultsToken_, triggerResults);
325  if (!triggerResults.isValid()) return;
326 
328  iEvent.getByToken(triggerEventToken_, triggerEvent);
329  if (!triggerEvent.isValid()) return;
330 
332  iEvent.getByToken(caloJetBTagsToken_, caloJetBTags);
333 
335  iEvent.getByToken(pfJetBTagsToken_, pfJetBTags);
336 
338  iEvent.getByToken(muCandidatesToken_, muCandidates);
339 
341  iEvent.getByToken(eleCandidatesToken_, eleCandidates);
342 
344  iEvent.getByToken(beamSpotToken_, beamspot);
345 
346  // loop over path
347  int ibin = -1;
348  for (auto & plot : hltPlots_) {
349  ibin++;
350  if ( plot.pathIDX <= 0 ) continue;
351 
352  if ( triggerResults->accept(plot.pathIDX) ) {
353  if ( debug_ )
354  std::cout << plot.pathNAME << " --> bin: " << ibin << std::endl;
355  eventsPlot_->Fill(ibin);
356 
357  const trigger::TriggerObjectCollection objects = triggerEvent->getObjects();
358  if ( hltConfig_.saveTags(plot.moduleNAME) ) {
359  if ( debug_ )
360  std::cout << "objects: " << objects.size() << std::endl;
361 
362  bool moduleFOUND = false;
363  std::vector<std::string> moduleNames = hltConfig_.moduleLabels(plot.pathIDX);
364  for ( const auto & module : moduleNames ) {
365  if ( module == plot.moduleNAME) moduleFOUND = true;
366  }
367  if ( debug_ )
368  std::cout << plot.moduleNAME << (moduleFOUND ? "" : "NOT" ) << " found in the list of modules" << std::endl;
369 
370  if (debug_)
371  for ( const auto & module : moduleNames ) {
372  unsigned int idx = triggerEvent->filterIndex(edm::InputTag(module,"",processName_));
373  std::cout << "module: " << module;
374  if ( idx < triggerEvent->sizeFilters() )
375  std::cout << " --> " << idx;
376  std::cout << std::endl;
377  }
378  //
379  // trigger accepted and collection w/ objects is available
381  unsigned int moduleIDX = triggerEvent->filterIndex(moduleName);
382  if (debug_)
383  std::cout << "moduleNAME: " << plot.moduleNAME << " --> " << moduleIDX << std::endl;
384 
385  if ( moduleIDX >= triggerEvent->sizeFilters() ) {
386  LogDebug ("HLTObjectsMonitor") << plot.pathNAME << " " << plot.moduleNAME << " is not available ! please, fix update DQM/HLTEvF/python/HLTObjectsMonitor_cfi.py";
387  return;
388  }
389 
390  const trigger::Keys &keys = triggerEvent->filterKeys( moduleIDX );
391  if ( debug_ )
392  std::cout << "keys: " << keys.size() << std::endl;
393 
394  plot.nME.first->Fill(keys.size());
395 
396  double MR = 0.;
397  double RSQ = 0.;
398  for ( const auto & key : keys ) {
399 
400  double pt = objects[key].pt();
401  double eta = objects[key].eta();
402  double phi = objects[key].phi();
403  double mass = objects[key].mass();
404  double energy = objects[key].energy();
405  int id = objects[key].id();
406  if ( debug_ )
407  std::cout << "object ID " << id << " mass: " << mass << std::endl;
408 
409  // single-object plots
410  plot.ptME.first->Fill(pt);
411  if ( plot.doPlotETA ) plot.etaME.first->Fill(eta);
412  plot.phiME.first->Fill(phi);
413 
414  if ( plot.doPlotCSV ) {
415 
416  if ( plot.doCALO ) {
417  if ( !caloJetBTags.isValid() ) plot.csvME.first->Fill(-10.);
418  else {
419  for ( auto it = caloJetBTags->begin();
420  it != caloJetBTags->end(); ++it ) {
421  double dR = deltaR(eta,phi,it->first->eta(),it->first->phi());
422  if ( debug_ )
423  std::cout << "[HLTObjectsMonitor::analyze] deltaR: " << dR << " matched ? " << ( dR <= 0.4 ? "YEAP" : "NOPE" ) << std::endl;
424  plot.csvME.first->Fill(it->second);
425  }
426  }
427 
428  } else if ( plot.doPF ) {
429  if ( !pfJetBTags.isValid() ) plot.csvME.first->Fill(-10.);
430  else {
431  for ( auto it = pfJetBTags->begin();
432  it != pfJetBTags->end(); ++it ) {
433  double dR = deltaR(eta,phi,it->first->eta(),it->first->phi());
434  if ( debug_ )
435  std::cout << "[HLTObjectsMonitor::analyze] deltaR: " << dR << " matched ? " << ( dR <= 0.4 ? "YEAP" : "NOPE" ) << std::endl;
436  plot.csvME.first->Fill(it->second);
437  }
438  }
439  }
440  }
441  if ( plot.doPlotMASS ) plot.massME.first->Fill(mass);
442  if ( plot.doPlotENERGY ) plot.energyME.first->Fill(energy);
443  if ( plot.doPlot2D ) plot.etaVSphiME.first->Fill(eta,phi);
444  if ( plot.doPlotHEP17 ) {
445  if ( isHEP17(eta,phi) ) plot.ptMEhep17.first->Fill(pt);
446  if ( isHEM17(eta,phi) ) plot.ptMEhem17.first->Fill(pt);
447  }
448 
449  if(id == 0){ //the MET object containing MR and Rsq will show up with ID = 0
450  MR = objects[key].px(); //razor variables stored in dummy reco::MET objects
451  RSQ = objects[key].py();
452  }
453 
454  if ( plot.doPlotDXY ) {
455  double dxy = -99.;
456  if ( abs(id) == 13 )
457  dxy = dxyFinder(eta,phi,muCandidates, beamspot, 0.1); // dRcut = 0.1
458  else
459  dxy = dxyFinder(eta,phi,eleCandidates, beamspot, 0.1); // dRcut = 0.1
460  plot.dxyME.first->Fill(dxy);
461  }
462  } // end loop on keys
463  if ( plot.doPlotRazor ) {
464  plot.mrME.first->Fill(MR);
465  plot.rsqME.first->Fill(RSQ);
466  }
467 
468  if ( keys.size() < 2 ) {
469  if ( plot.doPlotDiMass || plot.doPlotDZ )
470  LogDebug ("HLTObjectsMonitor") << plot.pathNAME << " " << plot.moduleNAME << " # objects is (" << keys.size() << ") less than 2 ! you probably want to either change the moduleNAME or switch off di-object system plots (doPlotDZ: " << plot.doPlotDZ << " doPlotDiMass: " << plot.doPlotDiMass << ") in DQM/HLTEvF/python/HLTObjectsMonitor_cfi.py)";
471  } else {
472  for ( const auto & key : keys ) {
473  double pt = objects[key].pt();
474  double eta = objects[key].eta();
475  double phi = objects[key].phi();
476  int id = objects[key].id();
477 
478  unsigned int kCnt0 = 0;
479 
480  TLorentzVector v1;
481  if ( abs(id) == 13 ) // check if it is a muon
482  v1.SetPtEtaPhiM(pt,eta,phi,MASS_MU);
483  else
484  v1.SetPtEtaPhiM(pt,eta,phi,0);
485 
486  unsigned int kCnt1 = 0;
487  for ( const auto & key1: keys ) {
488 
489  if (key != key1 && kCnt1 > kCnt0) { // avoid filling hists with same objs && avoid double counting separate objs
490 
491  double pt2 = objects[key1].phi();
492  double eta2 = objects[key1].eta();
493  double phi2 = objects[key1].phi();
494  int id2 = objects[key1].id();
495 
496  double dR = deltaR( eta, phi, eta2, phi2);
497  plot.dRME.first->Fill(dR);
498  plot.dRetaVSphiME.first->Fill(eta,phi,dR);
499 
500  int q1 = ( id==0 ? 0 : id/abs(id) );
501  int q2 = ( id2==0 ? 0 : id2/abs(id2) );
502  int q1q2 = q1*q2;
503  plot.q1q2ME.first->Fill(q1q2);
504 
505  if ( abs(id) != abs(id2) )
506  edm::LogWarning ("HLTObjectsMonitor") << plot.pathNAME << " " << plot.moduleNAME << " objects have different ID !?!" << abs(id) << " and " << abs(id2);
507 
508  if( (id+id2 ) == 0 ) { // check di-object system charge and flavor
509 
510  TLorentzVector v2;
511  if ( abs( id2 ) == 13 ) // check if it is a muon
512  v2.SetPtEtaPhiM(pt2,eta2,phi2, MASS_MU);
513  else
514  v2.SetPtEtaPhiM(pt2,eta2,phi2, 0);
515 
516  if ( plot.doPlotDiMass ) {
517  TLorentzVector v = v1+v2;
518  plot.dimassME.first->Fill(v.M());
519  }
520 
521  if ( plot.doPlotDZ ) {
522  double dz = -99.;
523  if ( abs(id) == 13 )
524  dz = dzFinder(eta,phi,eta2,phi2,muCandidates, 0.1); // dRcut = 0.1
525  else
526  dz = dzFinder(eta,phi,eta2,phi2,eleCandidates, 0.1); // dRcut = 0.1
527  plot.dzME.first->Fill(dz);
528  }
529  }
530 
531  }
532  kCnt1++;
533  }
534  kCnt0++;
535  }
536 
537  }
538  }
539  }
540  }
541 
542 }
#define LogDebug(id)
edm::EDGetTokenT< reco::JetTagCollection > pfJetBTagsToken_
bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
std::vector< hltPlot > hltPlots_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:135
edm::EDGetTokenT< reco::JetTagCollection > caloJetBTagsToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:508
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
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
const_iterator end() const
double q2[4]
Definition: TauolaWrapper.h:88
void Fill(long long x)
edm::EDGetTokenT< std::vector< reco::RecoChargedCandidate > > eleCandidatesToken_
bool isHEP17(double eta, double phi)
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:98
double dxyFinder(double, double, edm::Handle< reco::RecoChargedCandidateCollection >, edm::Handle< reco::BeamSpot >, double)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static std::string const triggerResults
Definition: EdmProvDump.cc:41
bool isValid() const
Definition: HandleBase.h:74
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:81
double q1[4]
Definition: TauolaWrapper.h:87
std::vector< size_type > Keys
HLTConfigProvider hltConfig_
edm::EDGetTokenT< std::vector< reco::RecoChargedCandidate > > muCandidatesToken_
bool isHEM17(double eta, double phi)
MonitorElement * eventsPlot_
double dzFinder(double, double, double, double, edm::Handle< reco::RecoChargedCandidateCollection >, double)
const_iterator begin() const
Definition: vlib.h:208
edm::EDGetTokenT< trigger::TriggerEvent > triggerEventToken_
void HLTObjectsMonitor::bookHistograms ( DQMStore::IBooker i,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

Implements DQMEDAnalyzer.

Definition at line 584 of file HLTObjectsMonitor.cc.

References backupFolder_, DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::bookProfile2D(), gather_cfg::cout, csv_binning_, debug_, end, eventsPlot_, hltPlots_, mps_fire::i, label_, LogDebug, mainFolder_, dataset::name, HLTObjectsMonitor::MEbinning::nbins, pileupCalc::nbins, plotFactory::plot, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, fftjetcommon_cfi::title, TopFolder_, HLTObjectsMonitor::MEbinning::xmax, and HLTObjectsMonitor::MEbinning::xmin.

585 {
586 
587  if ( debug_ )
588  std::cout << "[HLTObjectsMonitor::bookHistograms]" << std::endl;
589 
590  ibooker.setCurrentFolder(TopFolder_);
591 
592  std::string name = "eventsPerPath_"+label_;
593  std::string title = " events per path";
594  int nbins = hltPlots_.size();
595  eventsPlot_ = ibooker.book1D(name,title,nbins,-0.5,double(nbins)-0.5);
596  eventsPlot_->setAxisTitle("HLT path");
597  for ( int i=0; i<nbins; i++ ) {
598  eventsPlot_->setBinLabel(i+1,hltPlots_[i].pathNAME);
599  if ( debug_ )
600  std::cout << hltPlots_[i].pathNAME << " --> bin: " << i+1 << std::endl;
601  }
602 
603  for (auto & plot : hltPlots_) {
604 
605  if ( debug_ )
606  std::cout << "booking plots for " << plot.label << std::endl;
607 
608  if ( plot.pathIDX <= 0 ) {
609  LogDebug ("HLTObjectsMonitor") << plot.pathNAME << " is not available in the HLT menu ! no plots are going to be booked for it (update DQM/HLTEvF/python/HLTObjectsMonitor_cfi.py)";
610  continue;
611  }
612  if ( debug_ )
613  std::cout << "booking histograms for " << plot.pathNAME << std::endl;
614 
615  {
616  if ( plot.nME.second )
617  ibooker.setCurrentFolder(mainFolder_);
618  else
619  ibooker.setCurrentFolder(backupFolder_);
620 
621  name = plot.label+"_nobjects";
622  title = plot.pathNAME+" # objects";
623  plot.nME.first = ibooker.book1D(name,title,20,-0.5,19.5);
624  plot.nME.first->setAxisTitle(plot.xTITLE+" # objects");
625  }
626 
627  if ( plot.ptME.second )
628  ibooker.setCurrentFolder(mainFolder_);
629  else
630  ibooker.setCurrentFolder(backupFolder_);
631 
632  name = plot.label+"_pt";
633  title = plot.pathNAME+" p_T";
634  int nbins = (plot.ptBINNING).size()-1;
635  std::vector<float> fbinning((plot.ptBINNING).begin(),(plot.ptBINNING).end());
636  float* arr = &fbinning[0];
637  plot.ptME.first = ibooker.book1D(name,title,nbins,arr);
638  plot.ptME.first->setAxisTitle(plot.xTITLE+" p_{T} [GeV]");
639 
640 
641  {
642  if ( plot.phiME.second )
643  ibooker.setCurrentFolder(mainFolder_);
644  else
645  ibooker.setCurrentFolder(backupFolder_);
646 
647  name = plot.label+"_phi";
648  title = plot.pathNAME+" #phi";
649  int nbins = (plot.phiBINNING).size()-1;
650  std::vector<float> fbinning((plot.phiBINNING).begin(),(plot.phiBINNING).end());
651  float* arr = &fbinning[0];
652  plot.phiME.first = ibooker.book1D(name,title,nbins,arr);
653  plot.phiME.first->setAxisTitle(plot.xTITLE+" #phi [rad]");
654  }
655 
656  if ( plot.doPlotETA ) {
657  if ( plot.etaME.second )
658  ibooker.setCurrentFolder(mainFolder_);
659  else
660  ibooker.setCurrentFolder(backupFolder_);
661 
662  name = plot.label+"_eta";
663  title = plot.pathNAME+" #eta";
664  int nbins = (plot.etaBINNING).size()-1;
665  std::vector<float> fbinning((plot.etaBINNING).begin(),(plot.etaBINNING).end());
666  float* arr = &fbinning[0];
667 
668  plot.etaME.first = ibooker.book1D(name,title,nbins,arr);
669  plot.etaME.first->setAxisTitle(plot.xTITLE+" #eta");
670  }
671 
672  if ( plot.doPlotMASS ) {
673  if ( plot.massME.second )
674  ibooker.setCurrentFolder(mainFolder_);
675  else
676  ibooker.setCurrentFolder(backupFolder_);
677 
678  name = plot.label+"_mass";
679  title = plot.pathNAME+" mass";
680  int nbins = (plot.massBINNING).size()-1;
681  std::vector<float> fbinning((plot.massBINNING).begin(),(plot.massBINNING).end());
682  float* arr = &fbinning[0];
683 
684  plot.massME.first = ibooker.book1D(name,title,nbins,arr);
685  plot.massME.first->setAxisTitle(plot.xTITLE+" mass [GeV]");
686  }
687 
688  if ( plot.doPlotENERGY ) {
689  if ( plot.energyME.second )
690  ibooker.setCurrentFolder(mainFolder_);
691  else
692  ibooker.setCurrentFolder(backupFolder_);
693 
694  name = plot.label+"_energy";
695  title = plot.pathNAME+" energy";
696  int nbins = (plot.ptBINNING).size()-1;
697  std::vector<float> fbinning((plot.ptBINNING).begin(),(plot.ptBINNING).end());
698  float* arr = &fbinning[0];
699 
700  plot.energyME.first = ibooker.book1D(name,title,nbins,arr);
701  plot.energyME.first->setAxisTitle(plot.xTITLE+" energy [GeV]");
702  }
703 
704  if ( plot.doPlotCSV ) {
705  if ( plot.csvME.second )
706  ibooker.setCurrentFolder(mainFolder_);
707  else
708  ibooker.setCurrentFolder(backupFolder_);
709 
710  name = plot.label+"_csv";
711  title = plot.pathNAME+" CSV";
712 
713  plot.csvME.first = ibooker.book1D(name,title,csv_binning_.nbins,csv_binning_.xmin,csv_binning_.xmax);
714  plot.csvME.first->setAxisTitle(plot.xTITLE+" CSV discriminator");
715  }
716 
717  if ( plot.doPlot2D ) {
718  if ( plot.etaVSphiME.second )
719  ibooker.setCurrentFolder(mainFolder_);
720  else
721  ibooker.setCurrentFolder(backupFolder_);
722 
723  name = plot.label+"_etaVSphi";
724  title = plot.pathNAME+" #eta vs #phi";
725  int nbinsX = (plot.etaBINNING).size()-1;
726  std::vector<float> fbinningX((plot.etaBINNING).begin(),(plot.etaBINNING).end());
727  float* arrX = &fbinningX[0];
728  int nbinsY = (plot.phiBINNING).size()-1;;
729  std::vector<float> fbinningY((plot.phiBINNING).begin(),(plot.phiBINNING).end());
730  float* arrY = &fbinningY[0];
731  plot.etaVSphiME.first = ibooker.book2D(name,title,nbinsX,arrX,nbinsY,arrY);
732  plot.etaVSphiME.first->setAxisTitle(plot.xTITLE+" #eta",1);
733  plot.etaVSphiME.first->setAxisTitle(plot.xTITLE+" #phi",2);
734  }
735 
736  if ( plot.doPlotHEP17 ) {
737 
738  if ( plot.ptMEhep17.second )
739  ibooker.setCurrentFolder(mainFolder_);
740  else
741  ibooker.setCurrentFolder(backupFolder_);
742 
743  int nbins = (plot.ptBINNING).size()-1;
744  std::vector<float> fbinning((plot.ptBINNING).begin(),(plot.ptBINNING).end());
745  float* arr = &fbinning[0];
746 
747  name = plot.label+"_pt_HEP17";
748  title = plot.pathNAME+" p_{T} HEP17";
749  plot.ptMEhep17.first = ibooker.book1D(name,title,nbins,arr);
750  plot.ptMEhep17.first->setAxisTitle(plot.xTITLE+" p_{T} [GeV]",1);
751 
752  if ( plot.ptMEhem17.second )
753  ibooker.setCurrentFolder(mainFolder_);
754  else
755  ibooker.setCurrentFolder(backupFolder_);
756 
757  name = plot.label+"_pt_HEM17";
758  title = plot.pathNAME+" p_{T} HEM17";
759  plot.ptMEhem17.first = ibooker.book1D(name,title,nbins,arr);
760  plot.ptMEhem17.first->setAxisTitle(plot.xTITLE+" p_{T} [GeV]",1);
761  }
762 
763  if ( plot.doPlotRazor ) {
764  if ( plot.mrME.second )
765  ibooker.setCurrentFolder(mainFolder_);
766  else
767  ibooker.setCurrentFolder(backupFolder_);
768 
769  name = plot.label+"_mr";
770  title = plot.pathNAME+" M_{R}";
771  plot.mrME.first = ibooker.book1D(name,title,100,0.,100.);
772  plot.mrME.first->setAxisTitle(plot.xTITLE+" M_{R} [GeV]",1);
773 
774  if ( plot.rsqME.second )
775  ibooker.setCurrentFolder(mainFolder_);
776  else
777  ibooker.setCurrentFolder(backupFolder_);
778 
779  name = plot.label+"_rsq";
780  title = plot.pathNAME+" RSQ";
781  plot.rsqME.first = ibooker.book1D(name,title,100,0.,100.);
782  plot.rsqME.first->setAxisTitle(plot.xTITLE+" RSQ [GeV]",1);
783 
784  }
785 
786  if ( plot.doPlotDXY ) {
787 
788  if ( plot.dxyME.second )
789  ibooker.setCurrentFolder(mainFolder_);
790  else
791  ibooker.setCurrentFolder(backupFolder_);
792 
793  name = plot.label+"_dxy";
794  title = plot.pathNAME+" d_{xy}";
795  int nbins = (plot.dxyBINNING).size()-1;
796  std::vector<float> fbinning((plot.dxyBINNING).begin(),(plot.dxyBINNING).end());
797  float* arr = &fbinning[0];
798  plot.dxyME.first = ibooker.book1D(name,title,nbins,arr);
799  plot.dxyME.first->setAxisTitle(plot.xTITLE+" d_{xy} [cm]");
800 
801  }
802 
803  if ( plot.doPlotDZ ) {
804 
805  if ( plot.dzME.second )
806  ibooker.setCurrentFolder(mainFolder_);
807  else
808  ibooker.setCurrentFolder(backupFolder_);
809 
810  name = plot.label+"_dz";
811  title = plot.pathNAME+" d_{z}";
812  int nbins = (plot.dzBINNING).size()-1;
813  std::vector<float> fbinning((plot.dzBINNING).begin(),(plot.dzBINNING).end());
814  float* arr = &fbinning[0];
815  plot.dzME.first = ibooker.book1D(name,title,nbins,arr);
816  plot.dzME.first->setAxisTitle(plot.xTITLE+" d_{z} [cm]");
817 
818  }
819 
820  if ( plot.dRME.second )
821  ibooker.setCurrentFolder(mainFolder_);
822  else
823  ibooker.setCurrentFolder(backupFolder_);
824 
825  name = plot.label+"_dR";
826  title = plot.pathNAME+" di-object dR";
827  plot.dRME.first = ibooker.book1D(name,title,50,0.,5.);
828  plot.dRME.first->setAxisTitle(plot.xTITLE+" dR_{obj,obj}");
829 
830  if ( plot.dRetaVSphiME.second )
831  ibooker.setCurrentFolder(mainFolder_);
832  else
833  ibooker.setCurrentFolder(backupFolder_);
834 
835  name = plot.label+"_dR_etaVSphi";
836  title = plot.pathNAME+" di-object dR in the #eta-#phi plane (of 1st obj)";
837  plot.dRetaVSphiME.first = ibooker.bookProfile2D(name,title,60,-3.,3.,64,-3.2,3.2,0.,5.);
838  plot.dRetaVSphiME.first->setAxisTitle(plot.xTITLE+" #eta",1);
839  plot.dRetaVSphiME.first->setAxisTitle(plot.xTITLE+" #phi",2);
840  plot.dRetaVSphiME.first->setAxisTitle(plot.xTITLE+" dR_{obj,obj}",3);
841 
842  if ( plot.q1q2ME.second )
843  ibooker.setCurrentFolder(mainFolder_);
844  else
845  ibooker.setCurrentFolder(backupFolder_);
846 
847  name = plot.label+"_q1q2";
848  title = plot.pathNAME+" di-object q1xq2";
849  plot.q1q2ME.first = ibooker.book1D(name,title,3,-1.,1.);
850  plot.q1q2ME.first->setAxisTitle(plot.xTITLE+" q_{obj1} x q_{obj2}");
851 
852  if ( plot.doPlotDiMass ) {
853 
854  if ( plot.dimassME.second )
855  ibooker.setCurrentFolder(mainFolder_);
856  else
857  ibooker.setCurrentFolder(backupFolder_);
858 
859  name = plot.label+"_dimass";
860  title = plot.pathNAME+" di-object mass";
861  int nbins = (plot.dimassBINNING).size()-1;
862  std::vector<float> fbinning((plot.dimassBINNING).begin(),(plot.dimassBINNING).end());
863  float* arr = &fbinning[0];
864  plot.dimassME.first = ibooker.book1D(name,title,nbins,arr);
865  plot.dimassME.first->setAxisTitle(plot.xTITLE+" m_{obj,obj} [GeV]");
866 
867  }
868  }
869 
870  if ( debug_ )
871  std::cout << "[HLTObjectsMonitor::bookHistograms] DONE" << std::endl;
872 
873 }
#define LogDebug(id)
size
Write out results.
std::vector< hltPlot > hltPlots_
const MEbinning csv_binning_
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
#define end
Definition: vmac.h:37
MonitorElement * eventsPlot_
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void HLTObjectsMonitor::dqmBeginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 546 of file HLTObjectsMonitor.cc.

References gather_cfg::cout, debug_, hltConfig_, hltPlots_, HLTConfigProvider::init(), plotFactory::plot, processName_, HLTConfigProvider::removeVersion(), AlCaHLTBitMon_QueryRunRegistry::string, HLTConfigProvider::triggerIndex(), HLTConfigProvider::triggerNames(), and triggerPaths.

547 {
548  bool changed = true;
549  if (hltConfig_.init(iRun, iSetup, processName_, changed))
550  if (debug_) std::cout << "[HLTObjectsMonitor::dqmBeginRun] extracting HLTconfig" << std::endl;
551 
552  //get path indicies from menu
553  std::string pathName_noVersion;
554  std::vector<std::string> triggerPaths = hltConfig_.triggerNames();
555 
556  if ( debug_ )
557  std::cout << "[HLTObjectsMonitor::dqmBeginRun] triggerPaths: " << triggerPaths.size() << " <--> " << hltPlots_.size() << std::endl;
558 
559  for (const auto & pathName : triggerPaths) {
560 
561  if ( debug_ )
562  std::cout << "[HLTObjectsMonitor::dqmBeginRun] " << pathName << std::endl;
563 
564  pathName_noVersion = hltConfig_.removeVersion(pathName);
565  // std::cout << "pathName: " << pathName << " --> " << pathName_noVersion << std::endl;
566  for (auto & plot : hltPlots_) {
567  if (plot.pathNAME == pathName_noVersion) {
568  plot.pathIDX = hltConfig_.triggerIndex(pathName);
569  // check that the index makes sense, otherwise force pathIDX = -1
570  if ( plot.pathIDX <= 0 || plot.pathIDX == int(triggerPaths.size()) )
571  plot.pathIDX = -1;
572  }
573  }
574  }
575 
576  if ( debug_ ) {
577  for (const auto & plot : hltPlots_)
578  std::cout << "plot: " << plot.pathNAME << " --> pathIDX: " << plot.pathIDX << std::endl;
579  std::cout << "[HLTObjectsMonitor::dqmBeginRun] DONE" << std::endl;
580  }
581 
582 }
std::vector< hltPlot > hltPlots_
const std::vector< std::string > & triggerNames() const
names of trigger paths
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
HLTConfigProvider hltConfig_
static std::string const triggerPaths
Definition: EdmProvDump.cc:42
double HLTObjectsMonitor::dxyFinder ( double  eta,
double  phi,
edm::Handle< reco::RecoChargedCandidateCollection candidates,
edm::Handle< reco::BeamSpot beamspot,
double  dRcut = 0.1 
)
private

Definition at line 876 of file HLTObjectsMonitor.cc.

References beamSpot_, deltaR(), PVValHelper::dxy, eleCandidates_, edm::HandleBase::isValid(), LogDebug, electrons_cff::matched, muCandidates_, reco::BeamSpot::x0(), and reco::BeamSpot::y0().

Referenced by analyze().

877 {
878  double dxy = -99.;
879  if ( !candidates.isValid() ) {
880  LogDebug ("HLTObjectsMonitor") << "either " << muCandidates_ << " or " << eleCandidates_ << " is not valid ! please, update DQM/HLTEvF/python/HLTObjectsMonitor_cfi.py"
881  << " by switching OFF doPlotDXY or updating the InputTag collection";
882  return dxy;
883  }
884  if ( !beamspot.isValid() ) {
885  LogDebug ("HLTObjectsMonitor") << beamSpot_ << " is not valid ! please, update DQM/HLTEvF/python/HLTObjectsMonitor_cfi.py"
886  << " by switching OFF doPlotDXY or updating the InputTag collection";
887  return dxy;
888  }
889 
890  bool matched = false;
891  for (reco::RecoChargedCandidateCollection::const_iterator candidate = candidates->begin();
892  candidate != candidates->end(); ++candidate) {
893 
894  if ( deltaR( eta,phi,candidate->eta(),candidate->phi() ) < dRcut ) {
895  matched = true;
896  dxy = (-(candidate->vx()-beamspot->x0()) * candidate->py() + (candidate->vy()-beamspot->y0()) * candidate->px())/candidate->pt();
897  break;
898  }
899  }
900  if (!matched)
901  edm::LogWarning ("HLTObjectsMonitor") << "trigger object does not match ( dR > " << dRcut << ") to any of the candidates in either "
902  << muCandidates_ << " or " << eleCandidates_;
903 
904  return dxy;
905 }
#define LogDebug(id)
edm::InputTag muCandidates_
edm::InputTag beamSpot_
edm::InputTag eleCandidates_
bool isValid() const
Definition: HandleBase.h:74
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
double y0() const
y coordinate
Definition: BeamSpot.h:66
double x0() const
x coordinate
Definition: BeamSpot.h:64
double HLTObjectsMonitor::dzFinder ( double  eta1,
double  phi1,
double  eta2,
double  phi2,
edm::Handle< reco::RecoChargedCandidateCollection candidates,
double  dRcut = 0.1 
)
private

Definition at line 908 of file HLTObjectsMonitor.cc.

References gather_cfg::cout, debug_, DEFINE_FWK_MODULE, deltaR(), PVValHelper::dz, eleCandidates_, reco::LeafCandidate::eta(), edm::HandleBase::isValid(), LogDebug, muCandidates_, reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), and reco::LeafCandidate::vz().

Referenced by analyze().

909 {
910  double dz = -99.;
911  if ( !candidates.isValid() ) {
912  LogDebug ("HLTObjectsMonitor") << "either " << muCandidates_ << " or " << eleCandidates_ << " is not valid ! please, update DQM/HLTEvF/python/HLTObjectsMonitor_cfi.py"
913  << " by switching OFF doPlotDZ or updating the InputTag collection";
914  return dz;
915  }
916 
917  const reco::RecoChargedCandidate* cand1;
918  const reco::RecoChargedCandidate* cand2;
919  bool matched1 = false;
920  bool matched2 = false;
921  for (reco::RecoChargedCandidateCollection::const_iterator candidate = candidates->begin();
922  candidate != candidates->end(); ++candidate) {
923 
924  if ( deltaR( eta1,phi1,candidate->eta(),candidate->phi() ) < dRcut ) {
925  matched1 = true;
926  cand1 = &*candidate;
927  if ( debug_ )
928  std::cout << "cand1: " << cand1->pt() << " " << cand1->eta() << " " << cand1->phi() << std::endl;
929  break;
930  }
931  }
932  if (!matched1) {
933  LogDebug ("HLTObjectsMonitor") << "trigger object1 does not match ( dR > " << dRcut << ") to any of the candidates in either "
934  << muCandidates_ << " or " << eleCandidates_;
935  return dz;
936  }
937 
938  for (reco::RecoChargedCandidateCollection::const_iterator candidate = candidates->begin();
939  candidate != candidates->end(); ++candidate) {
940  if ( debug_ ) {
941  std::cout << "candidate: " << candidate->pt() << " cand1: " << cand1->pt() << std::endl;
942  std::cout << "candidate: " << candidate->eta() << " cand1: " << cand1->eta() << std::endl;
943  std::cout << "candidate: " << candidate->phi() << " cand1: " << cand1->phi() << std::endl;
944  }
945  if (&*candidate == cand1) continue;
946 
947  if ( deltaR( eta2,phi2,candidate->eta(),candidate->phi() ) < dRcut ) {
948  matched2 = true;
949  cand2 = &*candidate;
950  if ( debug_ )
951  std::cout << "cand2: " << cand2->pt() << " " << cand2->eta() << " " << cand2->phi() << std::endl;
952  break;
953  }
954  }
955  if (!matched2) {
956  LogDebug ("HLTObjectsMonitor") << "trigger object2 does not match ( dR > " << dRcut << ") to any of the candidates in either "
957  << muCandidates_ << " or " << eleCandidates_;
958  return dz;
959  }
960 
961  dz = cand1->vz() - cand2->vz();
962  return dz;
963 }
#define LogDebug(id)
double eta() const final
momentum pseudorapidity
edm::InputTag muCandidates_
double pt() const final
transverse momentum
edm::InputTag eleCandidates_
bool isValid() const
Definition: HandleBase.h:74
double vz() const override
z coordinate of vertex position
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
double phi() const final
momentum azimuthal angle
hltPlot HLTObjectsMonitor::getPlotPSet ( edm::ParameterSet  pset)
staticprivate

Definition at line 207 of file HLTObjectsMonitor.cc.

References funct::false, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), AlCaHLTBitMon_QueryRunRegistry::string, and funct::true.

207  {
208 
209  return hltPlot{
210  std::make_pair<MonitorElement*,bool>(nullptr,false),
211  std::make_pair<MonitorElement*,bool>(nullptr,pset.getParameter<bool>("displayInPrimary_eta") ),
212  std::make_pair<MonitorElement*,bool>(nullptr,pset.getParameter<bool>("displayInPrimary_phi") ),
213  std::make_pair<MonitorElement*,bool>(nullptr,pset.getParameter<bool>("displayInPrimary_pt") ),
214  std::make_pair<MonitorElement*,bool>(nullptr,pset.getParameter<bool>("displayInPrimary_mass") ),
215  std::make_pair<MonitorElement*,bool>(nullptr,pset.getParameter<bool>("displayInPrimary_energy") ),
216  std::make_pair<MonitorElement*,bool>(nullptr,pset.getParameter<bool>("displayInPrimary_csv") ),
217  std::make_pair<MonitorElement*,bool>(nullptr,pset.getParameter<bool>("displayInPrimary_etaVSphi") ),
218  std::make_pair<MonitorElement*,bool>(nullptr,pset.getParameter<bool>("displayInPrimary_pt_HEP17") ),
219  std::make_pair<MonitorElement*,bool>(nullptr,pset.getParameter<bool>("displayInPrimary_pt_HEM17") ),
220  std::make_pair<MonitorElement*,bool>(nullptr,pset.getParameter<bool>("displayInPrimary_MR") ),
221  std::make_pair<MonitorElement*,bool>(nullptr,pset.getParameter<bool>("displayInPrimary_RSQ") ),
222  std::make_pair<MonitorElement*,bool>(nullptr,pset.getParameter<bool>("displayInPrimary_dxy") ),
223  std::make_pair<MonitorElement*,bool>(nullptr,pset.getParameter<bool>("displayInPrimary_dz") ),
224  std::make_pair<MonitorElement*,bool>(nullptr,pset.getParameter<bool>("displayInPrimary_dimass") ),
225  std::make_pair<MonitorElement*,bool>(nullptr,false),
226  std::make_pair<MonitorElement*,bool>(nullptr,false),
227  std::make_pair<MonitorElement*,bool>(nullptr,false),
228  pset.getParameter<std::string>("label" ),
229  pset.getParameter<std::string>("pathNAME" ),
230  -1,
231  pset.getParameter<std::string>("moduleNAME"),
232  pset.getParameter<std::string>("xTITLE" ),
233  pset.getParameter<std::vector<double> >("etaBINNING" ),
234  pset.getParameter<std::vector<double> >("ptBINNING" ),
235  pset.getParameter<std::vector<double> >("phiBINNING" ),
236  pset.getParameter<std::vector<double> >("massBINNING" ),
237  pset.getParameter<std::vector<double> >("dxyBINNING" ),
238  pset.getParameter<std::vector<double> >("dzBINNING" ),
239  pset.getParameter<std::vector<double> >("dimassBINNING" ),
240  pset.getUntrackedParameter<bool>("doPlot2D", false ),
241  pset.getUntrackedParameter<bool>("doPlotETA", true ),
242  pset.getUntrackedParameter<bool>("doPlotMASS", false ),
243  pset.getUntrackedParameter<bool>("doPlotENERGY", false ),
244  pset.getUntrackedParameter<bool>("doPlotHEP17", true ),
245  pset.getUntrackedParameter<bool>("doPlotCSV", false ),
246  pset.getUntrackedParameter<bool>("doCALO", false ),
247  pset.getUntrackedParameter<bool>("doPF", false ),
248  pset.getUntrackedParameter<bool>("doPlotRazor", false ),
249  pset.getUntrackedParameter<bool>("doPlotDXY", false ),
250  pset.getUntrackedParameter<bool>("doPlotDZ", false ),
251  pset.getUntrackedParameter<bool>("doPlotDiMass", false )
252  };
253 
254 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void HLTObjectsMonitor::getPSet ( )
private

Definition at line 257 of file HLTObjectsMonitor.cc.

References muonDTDigis_cfi::pset.

Referenced by HLTObjectsMonitor().

257  {
258 
259  for ( const auto & pset : plotPSETS_ )
260  hltPlots_.push_back( getPlotPSet(pset) );
261 }
std::vector< hltPlot > hltPlots_
static hltPlot getPlotPSet(edm::ParameterSet pset)
std::vector< edm::ParameterSet > plotPSETS_
bool HLTObjectsMonitor::isHEM17 ( double  eta,
double  phi 
)
private

Definition at line 269 of file HLTObjectsMonitor.cc.

Referenced by analyze().

269  {
270  if ( (eta >= -MAX_ETA_HEP17 && eta <= -MIN_ETA_HEP17) &&
271  (phi >= MIN_PHI_HEP17 && phi <= MAX_PHI_HEP17) ) return true;
272  else
273  return false;
274 }
bool HLTObjectsMonitor::isHEP17 ( double  eta,
double  phi 
)
private

Definition at line 263 of file HLTObjectsMonitor.cc.

Referenced by analyze().

263  {
264  if ( (eta >= MIN_ETA_HEP17 && eta <= MAX_ETA_HEP17) &&
265  (phi >= MIN_PHI_HEP17 && phi <= MAX_PHI_HEP17) ) return true;
266  else
267  return false;
268 }

Member Data Documentation

std::string HLTObjectsMonitor::backupFolder_
private

Definition at line 134 of file HLTObjectsMonitor.cc.

Referenced by bookHistograms(), and HLTObjectsMonitor().

edm::InputTag HLTObjectsMonitor::beamSpot_
private

Definition at line 140 of file HLTObjectsMonitor.cc.

Referenced by dxyFinder().

edm::EDGetTokenT<reco::BeamSpot> HLTObjectsMonitor::beamSpotToken_
private

Definition at line 141 of file HLTObjectsMonitor.cc.

Referenced by analyze().

edm::EDGetTokenT<reco::JetTagCollection> HLTObjectsMonitor::caloJetBTagsToken_
private

Definition at line 143 of file HLTObjectsMonitor.cc.

Referenced by analyze().

const MEbinning HLTObjectsMonitor::csv_binning_
private
Initial value:
{
N_CSV, -MAX_CSV, MAX_CSV
}

Definition at line 169 of file HLTObjectsMonitor.cc.

Referenced by bookHistograms().

bool HLTObjectsMonitor::debug_
private

Definition at line 131 of file HLTObjectsMonitor.cc.

Referenced by analyze(), bookHistograms(), dqmBeginRun(), and dzFinder().

edm::InputTag HLTObjectsMonitor::eleCandidates_
private

Definition at line 148 of file HLTObjectsMonitor.cc.

Referenced by dxyFinder(), and dzFinder().

edm::EDGetTokenT<std::vector<reco::RecoChargedCandidate> > HLTObjectsMonitor::eleCandidatesToken_
private

Definition at line 149 of file HLTObjectsMonitor.cc.

Referenced by analyze().

const MEbinning HLTObjectsMonitor::eta_binning_hem17_
private
Initial value:

Definition at line 193 of file HLTObjectsMonitor.cc.

const MEbinning HLTObjectsMonitor::eta_binning_hep17_
private
Initial value:

Definition at line 189 of file HLTObjectsMonitor.cc.

MonitorElement* HLTObjectsMonitor::eventsPlot_
private

Definition at line 128 of file HLTObjectsMonitor.cc.

Referenced by analyze(), and bookHistograms().

HLTConfigProvider HLTObjectsMonitor::hltConfig_
private

Definition at line 126 of file HLTObjectsMonitor.cc.

Referenced by analyze(), and dqmBeginRun().

std::vector<hltPlot> HLTObjectsMonitor::hltPlots_
private

Definition at line 129 of file HLTObjectsMonitor.cc.

Referenced by analyze(), bookHistograms(), and dqmBeginRun().

std::string HLTObjectsMonitor::label_
private
std::string HLTObjectsMonitor::mainFolder_
private

Definition at line 133 of file HLTObjectsMonitor.cc.

Referenced by bookHistograms(), and HLTObjectsMonitor().

const double HLTObjectsMonitor::MASS_MU = .105658
private

Definition at line 151 of file HLTObjectsMonitor.cc.

Referenced by analyze().

double HLTObjectsMonitor::MAX_CSV = 1.
private

Definition at line 167 of file HLTObjectsMonitor.cc.

double HLTObjectsMonitor::MAX_ETA_HEP17 = 3.0
private

Definition at line 186 of file HLTObjectsMonitor.cc.

double HLTObjectsMonitor::MAX_PHI = 3.2
private

Definition at line 161 of file HLTObjectsMonitor.cc.

Referenced by HLTObjectsMonitor().

double HLTObjectsMonitor::MAX_PHI_HEP17 = -0.52
private

Definition at line 180 of file HLTObjectsMonitor.cc.

double HLTObjectsMonitor::MIN_ETA_HEP17 = 1.3
private

Definition at line 187 of file HLTObjectsMonitor.cc.

double HLTObjectsMonitor::MIN_PHI_HEP17 = -0.87
private

Definition at line 181 of file HLTObjectsMonitor.cc.

edm::InputTag HLTObjectsMonitor::muCandidates_
private

Definition at line 146 of file HLTObjectsMonitor.cc.

Referenced by dxyFinder(), and dzFinder().

edm::EDGetTokenT<std::vector<reco::RecoChargedCandidate> > HLTObjectsMonitor::muCandidatesToken_
private

Definition at line 147 of file HLTObjectsMonitor.cc.

Referenced by analyze().

int HLTObjectsMonitor::N_CSV = 20
private

Definition at line 168 of file HLTObjectsMonitor.cc.

int HLTObjectsMonitor::N_ETA_HEP17 = 6
private

Definition at line 188 of file HLTObjectsMonitor.cc.

int HLTObjectsMonitor::N_PHI = 64
private

Definition at line 162 of file HLTObjectsMonitor.cc.

Referenced by HLTObjectsMonitor().

int HLTObjectsMonitor::N_PHI_HEP17 = 7
private

Definition at line 182 of file HLTObjectsMonitor.cc.

edm::EDGetTokenT<reco::JetTagCollection> HLTObjectsMonitor::pfJetBTagsToken_
private

Definition at line 144 of file HLTObjectsMonitor.cc.

Referenced by analyze().

const MEbinning HLTObjectsMonitor::phi_binning_
private
Initial value:
{
N_PHI, -MAX_PHI, MAX_PHI
}

Definition at line 163 of file HLTObjectsMonitor.cc.

const MEbinning HLTObjectsMonitor::phi_binning_hep17_
private
Initial value:

Definition at line 183 of file HLTObjectsMonitor.cc.

std::vector<double> HLTObjectsMonitor::phi_variable_binning_
private

Definition at line 173 of file HLTObjectsMonitor.cc.

Referenced by HLTObjectsMonitor().

std::vector<edm::ParameterSet> HLTObjectsMonitor::plotPSETS_
private

Definition at line 124 of file HLTObjectsMonitor.cc.

std::string HLTObjectsMonitor::processName_
private

Definition at line 123 of file HLTObjectsMonitor.cc.

Referenced by analyze(), and dqmBeginRun().

std::string HLTObjectsMonitor::TopFolder_
private

Definition at line 121 of file HLTObjectsMonitor.cc.

Referenced by bookHistograms(), and HLTObjectsMonitor().

edm::EDGetTokenT<trigger::TriggerEvent> HLTObjectsMonitor::triggerEventToken_
private

Definition at line 138 of file HLTObjectsMonitor.cc.

Referenced by analyze().

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

Definition at line 137 of file HLTObjectsMonitor.cc.

Referenced by analyze().