CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 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 std::vector< double > &binningX, 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 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 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
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (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
< GenericTriggerEventFlag
genTriggerEventFlag_
 
bool hltPathsAreValid_
 
MEbinning mass_binning_
 
MEbinning phi_binning_
 
MEbinning pt_binning_
 
const bool requireValidHLTPaths_
 
MonitorElementtau1DEta_
 
MonitorElementtau1DMass_
 
MonitorElementtau1DPhi_
 
MonitorElementtau1DPt_
 
MonitorElementtau2DEtaPhi_
 
edm::EDGetTokenT
< reco::CompositeCandidateCollection
tauToken_
 
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

Definition at line 15 of file Tau3MuMonitor.cc.

Definition at line 14 of file Tau3MuMonitor.cc.

Constructor & Destructor Documentation

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)) {}
MEbinning pt_binning_
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
const std::string folderName_
std::unique_ptr< GenericTriggerEventFlag > genTriggerEventFlag_
bool hltPathsAreValid_
static MEbinning getHistoPSet(const edm::ParameterSet &pset)
MEbinning mass_binning_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
MEbinning phi_binning_
MEbinning eta_binning_
edm::EDGetTokenT< reco::CompositeCandidateCollection > tauToken_
const bool requireValidHLTPaths_
Tau3MuMonitor::~Tau3MuMonitor ( )
throw (
)
override

Definition at line 66 of file Tau3MuMonitor.cc.

References genTriggerEventFlag_.

66  {
68  genTriggerEventFlag_.reset();
69  }
70 }
std::unique_ptr< GenericTriggerEventFlag > genTriggerEventFlag_

Member Function Documentation

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

Reimplemented from DQMEDAnalyzer.

Definition at line 131 of file Tau3MuMonitor.cc.

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

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 }
MonitorElement * tau1DEta_
MonitorElement * tau1DPt_
std::unique_ptr< GenericTriggerEventFlag > genTriggerEventFlag_
MonitorElement * tau1DMass_
void Fill(long long x)
bool hltPathsAreValid_
int iEvent
Definition: GenABIO.cc:224
MonitorElement * tau1DPhi_
bool isValid() const
Definition: HandleBase.h:70
MonitorElement * tau2DEtaPhi_
Log< level::Warning, false > LogWarning
edm::EDGetTokenT< reco::CompositeCandidateCollection > tauToken_
const bool requireValidHLTPaths_
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.

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.

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 }
MonitorElement * tau1DEta_
MonitorElement * tau1DPt_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MEbinning pt_binning_
const std::string folderName_
std::unique_ptr< GenericTriggerEventFlag > genTriggerEventFlag_
MonitorElement * tau1DMass_
bool hltPathsAreValid_
MonitorElement * tau1DPhi_
MEbinning mass_binning_
MonitorElement * tau2DEtaPhi_
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
MEbinning phi_binning_
MEbinning eta_binning_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
const bool requireValidHLTPaths_
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Tau3MuMonitor::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 168 of file Tau3MuMonitor.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), submitPVResolutionJobs::desc, TriggerDQMBase::fillHistoPSetDescription(), GenericTriggerEventFlag::fillPSetDescription(), HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

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 
180  fillHistoPSetDescription(ptPSet);
181  fillHistoPSetDescription(etaPSet);
182  fillHistoPSetDescription(phiPSet);
183  fillHistoPSetDescription(massPSet);
184  histoPSet.add<edm::ParameterSetDescription>("ptPSet", ptPSet);
185  histoPSet.add<edm::ParameterSetDescription>("etaPSet", etaPSet);
186  histoPSet.add<edm::ParameterSetDescription>("phiPSet", phiPSet);
187  histoPSet.add<edm::ParameterSetDescription>("massPSet", massPSet);
188  desc.add<edm::ParameterSetDescription>("histoPSet", histoPSet);
189 
190  edm::ParameterSetDescription genericTriggerEventPSet;
191  GenericTriggerEventFlag::fillPSetDescription(genericTriggerEventPSet);
192  desc.add<edm::ParameterSetDescription>("GenericTriggerEventPSet", genericTriggerEventPSet);
193 
194  descriptions.add("tau3muMonitoring", desc);
195 }
static void fillHistoPSetDescription(edm::ParameterSetDescription &pset)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillPSetDescription(edm::ParameterSetDescription &desc)

Member Data Documentation

MEbinning Tau3MuMonitor::eta_binning_
private

Definition at line 43 of file Tau3MuMonitor.cc.

Referenced by bookHistograms().

const std::string Tau3MuMonitor::folderName_
private

Definition at line 26 of file Tau3MuMonitor.cc.

Referenced by bookHistograms().

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

Definition at line 47 of file Tau3MuMonitor.cc.

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

bool Tau3MuMonitor::hltPathsAreValid_
private

Definition at line 29 of file Tau3MuMonitor.cc.

Referenced by analyze(), and bookHistograms().

MEbinning Tau3MuMonitor::mass_binning_
private

Definition at line 45 of file Tau3MuMonitor.cc.

Referenced by bookHistograms().

MEbinning Tau3MuMonitor::phi_binning_
private

Definition at line 44 of file Tau3MuMonitor.cc.

Referenced by bookHistograms().

MEbinning Tau3MuMonitor::pt_binning_
private

Definition at line 42 of file Tau3MuMonitor.cc.

Referenced by bookHistograms().

const bool Tau3MuMonitor::requireValidHLTPaths_
private

Definition at line 28 of file Tau3MuMonitor.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* Tau3MuMonitor::tau1DEta_
private

Definition at line 37 of file Tau3MuMonitor.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* Tau3MuMonitor::tau1DMass_
private

Definition at line 39 of file Tau3MuMonitor.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* Tau3MuMonitor::tau1DPhi_
private

Definition at line 38 of file Tau3MuMonitor.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* Tau3MuMonitor::tau1DPt_
private

Definition at line 36 of file Tau3MuMonitor.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* Tau3MuMonitor::tau2DEtaPhi_
private

Definition at line 40 of file Tau3MuMonitor.cc.

Referenced by analyze(), and bookHistograms().

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

Definition at line 34 of file Tau3MuMonitor.cc.

Referenced by analyze().

bool Tau3MuMonitor::validProduct_ = true
private

Definition at line 32 of file Tau3MuMonitor.cc.

Referenced by analyze().