CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes
Tau3MuMonitor Class Reference
Inheritance diagram for Tau3MuMonitor:
DQMEDAnalyzer TriggerDQMBase edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Types

typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Public Types inherited from TriggerDQMBase
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 

Public Member Functions

 Tau3MuMonitor (const edm::ParameterSet &)
 
 ~Tau3MuMonitor () override throw ()
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 
- Public Member Functions inherited from TriggerDQMBase
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX, const bool bookDen=true)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const std::vector< double > &binningX, const std::vector< double > &binningY, const bool bookDen=true)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbins, const double xmin, const double xmax, const bool bookDen=true)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbinsX, const double xmin, const double xmax, const double ymin, const double ymax, const bool bookDen=true)
 
void bookME (DQMStore::IBooker &, ObjME &me, const std::string &histname, const std::string &histtitle, const uint nbinsX, const double xmin, const double xmax, const uint nbinsY, const double ymin, const double ymax, const bool bookDen=true)
 
void setMETitle (ObjME &me, const std::string &titleX, const std::string &titleY)
 
 TriggerDQMBase ()=default
 
virtual ~TriggerDQMBase ()=default
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 
- Static Public Member Functions inherited from TriggerDQMBase
static void fillHistoLSPSetDescription (edm::ParameterSetDescription &pset)
 
static void fillHistoPSetDescription (edm::ParameterSetDescription &pset)
 
static MEbinning getHistoLSPSet (const edm::ParameterSet &pset)
 
static MEbinning getHistoPSet (const edm::ParameterSet &pset)
 

Protected Member Functions

void analyze (edm::Event const &iEvent, edm::EventSetup const &iSetup) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Attributes

MEbinning eta_binning_
 
const std::string folderName_
 
std::unique_ptr< GenericTriggerEventFlaggenTriggerEventFlag_
 
bool hltPathsAreValid_
 
MEbinning mass_binning_
 
MEbinning phi_binning_
 
MEbinning pt_binning_
 
const bool requireValidHLTPaths_
 
MonitorElementtau1DEta_
 
MonitorElementtau1DMass_
 
MonitorElementtau1DPhi_
 
MonitorElementtau1DPt_
 
MonitorElementtau2DEtaPhi_
 
edm::EDGetTokenT< reco::CompositeCandidateCollectiontauToken_
 
bool validProduct_ = true
 

Additional Inherited Members

- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 12 of file Tau3MuMonitor.cc.

Member Typedef Documentation

◆ DQMStore

Definition at line 15 of file Tau3MuMonitor.cc.

◆ MonitorElement

Definition at line 14 of file Tau3MuMonitor.cc.

Constructor & Destructor Documentation

◆ Tau3MuMonitor()

Tau3MuMonitor::Tau3MuMonitor ( const edm::ParameterSet iConfig)

Definition at line 50 of file Tau3MuMonitor.cc.

51  : folderName_(iConfig.getParameter<std::string>("FolderName")),
52  requireValidHLTPaths_(iConfig.getParameter<bool>("requireValidHLTPaths")),
53  hltPathsAreValid_(false),
54  tauToken_(mayConsume<reco::CompositeCandidateCollection>(iConfig.getParameter<edm::InputTag>("taus"))),
58  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("etaPSet"))),
60  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("phiPSet"))),
62  iConfig.getParameter<edm::ParameterSet>("histoPSet").getParameter<edm::ParameterSet>("massPSet"))),
64  iConfig.getParameter<edm::ParameterSet>("GenericTriggerEventPSet"), consumesCollector(), *this)) {}

◆ ~Tau3MuMonitor()

Tau3MuMonitor::~Tau3MuMonitor ( )
throw (
)
override

Definition at line 66 of file Tau3MuMonitor.cc.

66  {
68  genTriggerEventFlag_.reset();
69  }
70 }

References genTriggerEventFlag_.

Member Function Documentation

◆ analyze()

void Tau3MuMonitor::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 131 of file Tau3MuMonitor.cc.

131  {
132  // if valid HLT paths are required,
133  // analyze event only if all paths are valid
135  return;
136  }
137 
138  // require the trigger to be fired
139  if (genTriggerEventFlag_->on() && !genTriggerEventFlag_->accept(iEvent, iSetup))
140  return;
141 
142  // check if the previous event failed because of missing tau3mu collection.
143  // Return silently, a warning must have been issued already at this point
144  if (not validProduct_)
145  return;
146 
147  // get ahold of the tau(3mu) collection
149  iEvent.getByToken(tauToken_, tauHandle);
150 
151  // if the handle is not valid issue a warning (only for the forst occurrency)
152  if (not tauHandle.isValid()) {
153  edm::LogWarning("ProductNotValid") << "Tau3Mu trigger product not valid";
154  validProduct_ = false;
155  return;
156  }
157 
158  // loop and fill
159  for (auto const& itau : *tauHandle) {
160  tau1DPt_->Fill(itau.pt());
161  tau1DEta_->Fill(itau.eta());
162  tau1DPhi_->Fill(itau.phi());
163  tau1DMass_->Fill(itau.mass());
164  tau2DEtaPhi_->Fill(itau.eta(), itau.phi());
165  }
166 }

References dqm::impl::MonitorElement::Fill(), genTriggerEventFlag_, hltPathsAreValid_, iEvent, edm::HandleBase::isValid(), requireValidHLTPaths_, tau1DEta_, tau1DMass_, tau1DPhi_, tau1DPt_, tau2DEtaPhi_, tauToken_, and validProduct_.

◆ bookHistograms()

void Tau3MuMonitor::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 72 of file Tau3MuMonitor.cc.

72  {
73  // Initialize the GenericTriggerEventFlag
75  genTriggerEventFlag_->initRun(iRun, iSetup);
76  }
77 
78  // check if every HLT path specified in numerator and denominator has a valid match in the HLT Menu
80  (genTriggerEventFlag_ && genTriggerEventFlag_->on() && genTriggerEventFlag_->allHLTPathsAreValid());
81 
82  // if valid HLT paths are required,
83  // create DQM outputs only if all paths are valid
85  return;
86  }
87 
88  std::string histname;
89 
90  std::string currentFolder = folderName_;
91  ibooker.setCurrentFolder(currentFolder);
92 
93  // tau 3 mu 1D pt
94  histname = "tau1DPt";
95  tau1DPt_ = ibooker.book1D(histname, "", pt_binning_.nbins, pt_binning_.xmin, pt_binning_.xmax);
96  tau1DPt_->setAxisTitle("3-#mu p_{T} [GeV]", 1);
97  tau1DPt_->setAxisTitle("counts", 2);
98 
99  // tau 3 mu 1D eta
100  histname = "tau1DEta";
102  tau1DEta_->setAxisTitle("3-#mu #eta", 1);
103  tau1DEta_->setAxisTitle("counts", 2);
104 
105  // tau 3 mu 1D phi
106  histname = "tau1DPhi";
108  tau1DPhi_->setAxisTitle("3-#mu #phi", 1);
109  tau1DPhi_->setAxisTitle("counts", 2);
110 
111  // tau 3 mu 1D mass
112  histname = "tau1DMass";
114  tau1DMass_->setAxisTitle("mass_{3#mu} [GeV]", 1);
115  tau1DMass_->setAxisTitle("counts", 2);
116 
117  // tau 3 mu 2D eta vs phi
118  histname = "tau2DEtaPhi";
119  tau2DEtaPhi_ = ibooker.book2D(histname,
120  "",
127  tau2DEtaPhi_->setAxisTitle("3-#mu #eta", 1);
128  tau2DEtaPhi_->setAxisTitle("3-#mu #phi", 2);
129 }

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), eta_binning_, folderName_, genTriggerEventFlag_, hltPathsAreValid_, mass_binning_, TriggerDQMBase::MEbinning::nbins, phi_binning_, pt_binning_, requireValidHLTPaths_, dqm::impl::MonitorElement::setAxisTitle(), dqm::implementation::NavigatorBase::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, tau1DEta_, tau1DMass_, tau1DPhi_, tau1DPt_, tau2DEtaPhi_, TriggerDQMBase::MEbinning::xmax, and TriggerDQMBase::MEbinning::xmin.

◆ fillDescriptions()

void Tau3MuMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 168 of file Tau3MuMonitor.cc.

168  {
170  desc.add<std::string>("FolderName", "HLT/BPH/");
171  desc.add<bool>("requireValidHLTPaths", true);
172 
173  desc.add<edm::InputTag>("taus", edm::InputTag("hltTauPt10MuPts511Mass1p2to2p3Iso", "Taus"));
174 
188  desc.add<edm::ParameterSetDescription>("histoPSet", histoPSet);
189 
191  genericTriggerEventPSet.add<bool>("andOr");
192  genericTriggerEventPSet.add<edm::InputTag>("dcsInputTag", edm::InputTag("scalersRawToDigi"));
193  genericTriggerEventPSet.add<std::vector<int> >("dcsPartitions", {});
194  genericTriggerEventPSet.add<bool>("andOrDcs", false);
195  genericTriggerEventPSet.add<bool>("errorReplyDcs", true);
196  genericTriggerEventPSet.add<std::string>("dbLabel", "");
197  genericTriggerEventPSet.add<bool>("andOrHlt", true);
198  genericTriggerEventPSet.add<edm::InputTag>("hltInputTag", edm::InputTag("TriggerResults::HLT"));
199  genericTriggerEventPSet.add<std::vector<std::string> >("hltPaths", {});
200  genericTriggerEventPSet.add<std::string>("hltDBKey", "");
201  genericTriggerEventPSet.add<bool>("errorReplyHlt", false);
202  genericTriggerEventPSet.add<unsigned int>("verbosityLevel", 0);
203  desc.add<edm::ParameterSetDescription>("GenericTriggerEventPSet", genericTriggerEventPSet);
204 
205  descriptions.add("tau3muMonitoring", desc);
206 }

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, V0Monitor_cfi::etaPSet, TriggerDQMBase::fillHistoPSetDescription(), SiStripSourceConfigTier0_cff::genericTriggerEventPSet, LumiMonitor_cff::histoPSet, HLT_FULL_cff::InputTag, V0Monitor_cff::massPSet, BPHMonitor_cff::phiPSet, V0Monitor_cfi::ptPSet, and AlCaHLTBitMon_QueryRunRegistry::string.

Member Data Documentation

◆ eta_binning_

MEbinning Tau3MuMonitor::eta_binning_
private

Definition at line 43 of file Tau3MuMonitor.cc.

Referenced by bookHistograms().

◆ folderName_

const std::string Tau3MuMonitor::folderName_
private

Definition at line 26 of file Tau3MuMonitor.cc.

Referenced by bookHistograms().

◆ genTriggerEventFlag_

std::unique_ptr<GenericTriggerEventFlag> Tau3MuMonitor::genTriggerEventFlag_
private

Definition at line 47 of file Tau3MuMonitor.cc.

Referenced by analyze(), bookHistograms(), and ~Tau3MuMonitor().

◆ hltPathsAreValid_

bool Tau3MuMonitor::hltPathsAreValid_
private

Definition at line 29 of file Tau3MuMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ mass_binning_

MEbinning Tau3MuMonitor::mass_binning_
private

Definition at line 45 of file Tau3MuMonitor.cc.

Referenced by bookHistograms().

◆ phi_binning_

MEbinning Tau3MuMonitor::phi_binning_
private

Definition at line 44 of file Tau3MuMonitor.cc.

Referenced by bookHistograms().

◆ pt_binning_

MEbinning Tau3MuMonitor::pt_binning_
private

Definition at line 42 of file Tau3MuMonitor.cc.

Referenced by bookHistograms().

◆ requireValidHLTPaths_

const bool Tau3MuMonitor::requireValidHLTPaths_
private

Definition at line 28 of file Tau3MuMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ tau1DEta_

MonitorElement* Tau3MuMonitor::tau1DEta_
private

Definition at line 37 of file Tau3MuMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ tau1DMass_

MonitorElement* Tau3MuMonitor::tau1DMass_
private

Definition at line 39 of file Tau3MuMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ tau1DPhi_

MonitorElement* Tau3MuMonitor::tau1DPhi_
private

Definition at line 38 of file Tau3MuMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ tau1DPt_

MonitorElement* Tau3MuMonitor::tau1DPt_
private

Definition at line 36 of file Tau3MuMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ tau2DEtaPhi_

MonitorElement* Tau3MuMonitor::tau2DEtaPhi_
private

Definition at line 40 of file Tau3MuMonitor.cc.

Referenced by analyze(), and bookHistograms().

◆ tauToken_

edm::EDGetTokenT<reco::CompositeCandidateCollection> Tau3MuMonitor::tauToken_
private

Definition at line 34 of file Tau3MuMonitor.cc.

Referenced by analyze().

◆ validProduct_

bool Tau3MuMonitor::validProduct_ = true
private

Definition at line 32 of file Tau3MuMonitor.cc.

Referenced by analyze().

V0Monitor_cfi.ptPSet
ptPSet
Definition: V0Monitor_cfi.py:25
Tau3MuMonitor::tau1DPt_
MonitorElement * tau1DPt_
Definition: Tau3MuMonitor.cc:36
V0Monitor_cfi.etaPSet
etaPSet
Definition: V0Monitor_cfi.py:30
Tau3MuMonitor::tauToken_
edm::EDGetTokenT< reco::CompositeCandidateCollection > tauToken_
Definition: Tau3MuMonitor.cc:34
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
dqm::implementation::NavigatorBase::setCurrentFolder
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
SiStripSourceConfigTier0_cff.genericTriggerEventPSet
genericTriggerEventPSet
Definition: SiStripSourceConfigTier0_cff.py:96
Tau3MuMonitor::tau1DPhi_
MonitorElement * tau1DPhi_
Definition: Tau3MuMonitor.cc:38
Tau3MuMonitor::folderName_
const std::string folderName_
Definition: Tau3MuMonitor.cc:26
edm::Handle
Definition: AssociativeIterator.h:50
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
Tau3MuMonitor::tau1DMass_
MonitorElement * tau1DMass_
Definition: Tau3MuMonitor.cc:39
Tau3MuMonitor::mass_binning_
MEbinning mass_binning_
Definition: Tau3MuMonitor.cc:45
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
TriggerDQMBase::MEbinning::xmax
double xmax
Definition: TriggerDQMBase.h:19
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
Tau3MuMonitor::genTriggerEventFlag_
std::unique_ptr< GenericTriggerEventFlag > genTriggerEventFlag_
Definition: Tau3MuMonitor.cc:47
Tau3MuMonitor::requireValidHLTPaths_
const bool requireValidHLTPaths_
Definition: Tau3MuMonitor.cc:28
Tau3MuMonitor::hltPathsAreValid_
bool hltPathsAreValid_
Definition: Tau3MuMonitor.cc:29
TriggerDQMBase::fillHistoPSetDescription
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
Definition: TriggerDQMBase.cc:108
edm::ParameterSet
Definition: ParameterSet.h:47
GenericTriggerEventFlag
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
Definition: GenericTriggerEventFlag.h:42
V0Monitor_cff.massPSet
massPSet
Definition: V0Monitor_cff.py:8
iEvent
int iEvent
Definition: GenABIO.cc:224
LumiMonitor_cff.histoPSet
histoPSet
Definition: LumiMonitor_cff.py:12
Tau3MuMonitor::pt_binning_
MEbinning pt_binning_
Definition: Tau3MuMonitor.cc:42
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TriggerDQMBase::getHistoPSet
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
Definition: TriggerDQMBase.cc:120
Tau3MuMonitor::eta_binning_
MEbinning eta_binning_
Definition: Tau3MuMonitor.cc:43
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
Tau3MuMonitor::validProduct_
bool validProduct_
Definition: Tau3MuMonitor.cc:32
Tau3MuMonitor::tau2DEtaPhi_
MonitorElement * tau2DEtaPhi_
Definition: Tau3MuMonitor.cc:40
dqm::implementation::IBooker::book2D
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:177
BPHMonitor_cff.phiPSet
phiPSet
Definition: BPHMonitor_cff.py:631
TriggerDQMBase::MEbinning::nbins
uint nbins
Definition: TriggerDQMBase.h:17
TriggerDQMBase::MEbinning::xmin
double xmin
Definition: TriggerDQMBase.h:18
Tau3MuMonitor::phi_binning_
MEbinning phi_binning_
Definition: Tau3MuMonitor.cc:44
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
Tau3MuMonitor::tau1DEta_
MonitorElement * tau1DEta_
Definition: Tau3MuMonitor.cc:37
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
dqm::impl::MonitorElement::setAxisTitle
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
Definition: MonitorElement.cc:791
edm::InputTag
Definition: InputTag.h:15
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98