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 | Protected Attributes
MatchMETBenchmarkAnalyzer Class Reference

#include <MatchMETBenchmarkAnalyzer.h>

Inheritance diagram for MatchMETBenchmarkAnalyzer:
BenchmarkAnalyzer MatchMETBenchmark DQMEDAnalyzer Benchmark edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
- 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 Benchmark
typedef dqm::legacy::DQMStore DQMStore
 
enum  Mode { DEFAULT, DQMOFFLINE, VALIDATION }
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 MatchMETBenchmarkAnalyzer (const edm::ParameterSet &parameterSet)
 
- Public Member Functions inherited from BenchmarkAnalyzer
 BenchmarkAnalyzer ()
 Constructors. More...
 
 BenchmarkAnalyzer (const edm::ParameterSet &)
 
 ~BenchmarkAnalyzer () override
 Destructor. More...
 
- 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 MatchMETBenchmark
void fillOne (const reco::MET &candidate, const reco::MET &matchedCandidate)
 fill histograms with a given particle More...
 
 MatchMETBenchmark (Mode mode)
 
void setup (DQMStore::IBooker &b)
 book histograms More...
 
 ~MatchMETBenchmark () override
 
- Public Member Functions inherited from Benchmark
 Benchmark (Mode mode=DEFAULT)
 
bool isInRange (float pt, float eta, float phi) const
 
virtual void setDirectory (TDirectory *dir)
 
void setParameters (Mode mode)
 
void setRange (float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
 
void write ()
 write to the TFile, in plain ROOT mode. No need to call this function in DQM mode More...
 
virtual ~Benchmark () noexcept(false)
 

Protected Attributes

edm::InputTag matchedInputLabel_
 
edm::EDGetTokenT< edm::View
< reco::MET > > 
myColl_
 
edm::EDGetTokenT< edm::View
< reco::MET > > 
myMatchColl_
 
- Protected Attributes inherited from BenchmarkAnalyzer
std::string benchmarkLabel_
 benchmark label More...
 
std::string eventInfoFolder_
 
edm::InputTag inputLabel_
 input collection More...
 
std::string outputFile_
 name of the output root file More...
 
std::string subsystemname_
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 
- Protected Attributes inherited from MatchMETBenchmark
TH2F * delta_et_Over_et_VS_et_
 
TH2F * delta_et_VS_et_
 
TH1F * delta_ex_
 
TH2F * delta_ex_VS_set_
 
TH2F * delta_phi_VS_et_
 
TH2F * delta_set_Over_set_VS_set_
 
TH2F * delta_set_VS_set_
 
TH2F * RecEt_VS_TrueEt_
 
TH2F * RecSet_Over_TrueSet_VS_TrueSet_
 
- Protected Attributes inherited from Benchmark
TDirectory * dir_
 
float etaMax_
 
float etaMin_
 
Mode mode_
 
float phiMax_
 
float phiMin_
 
float ptMax_
 
float ptMin_
 

Additional Inherited Members

- 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 &)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Member Functions inherited from Benchmark
TH1F * book1D (DQMStore::IBooker &b, const char *histname, const char *title, int nbins, float xmin, float xmax)
 book a 1D histogram, either with DQM or plain root depending if DQM_ has been initialized in a child analyzer or not. More...
 
TH2F * book2D (DQMStore::IBooker &b, const char *histname, const char *title, int nbinsx, float xmin, float xmax, int nbinsy, float ymin, float ymax)
 book a 2D histogram, either with DQM or plain root depending if DQM_ has been initialized in a child analyzer or not. More...
 
TH2F * book2D (DQMStore::IBooker &b, const char *histname, const char *title, int nbinsx, float *xbins, int nbinsy, float ymin, float ymax)
 book a 2D histogram, either with DQM or plain root depending if DQM_ has been initialized in a child analyzer or not. More...
 
TProfile * bookProfile (DQMStore::IBooker &b, const char *histname, const char *title, int nbinsx, float xmin, float xmax, float ymin, float ymax, const char *option)
 book a TProfile histogram, either with DQM or plain root depending if DQM_ has been initialized in a child analyzer or not. More...
 
TProfile * bookProfile (DQMStore::IBooker &b, const char *histname, const char *title, int nbinsx, float *xbins, float ymin, float ymax, const char *option)
 book a TProfile, either through IBooker or plain root More...
 

Detailed Description

Definition at line 11 of file MatchMETBenchmarkAnalyzer.h.

Member Typedef Documentation

Definition at line 13 of file MatchMETBenchmarkAnalyzer.h.

Constructor & Destructor Documentation

MatchMETBenchmarkAnalyzer::MatchMETBenchmarkAnalyzer ( const edm::ParameterSet parameterSet)

Definition at line 15 of file MatchMETBenchmarkAnalyzer.cc.

References edm::ParameterSet::getParameter(), BenchmarkAnalyzer::inputLabel_, matchedInputLabel_, myColl_, and myMatchColl_.

16  : BenchmarkAnalyzer(parameterSet), MatchMETBenchmark((Benchmark::Mode)parameterSet.getParameter<int>("mode")) {
17  matchedInputLabel_ = parameterSet.getParameter<edm::InputTag>("MatchCollection");
18 
19  myColl_ = consumes<View<MET>>(inputLabel_);
20  myMatchColl_ = consumes<View<MET>>(matchedInputLabel_);
21 }
edm::EDGetTokenT< edm::View< reco::MET > > myColl_
MatchMETBenchmark(Mode mode)
edm::InputTag inputLabel_
input collection
edm::EDGetTokenT< edm::View< reco::MET > > myMatchColl_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
BenchmarkAnalyzer()
Constructors.

Member Function Documentation

void MatchMETBenchmarkAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 30 of file MatchMETBenchmarkAnalyzer.cc.

References universalConfigTemplate::collection, MatchMETBenchmark::fillOne(), edm::Event::getByToken(), myColl_, and myMatchColl_.

30  {
32  iEvent.getByToken(myColl_, collection);
33 
34  Handle<View<MET>> matchedCollection;
35  iEvent.getByToken(myMatchColl_, matchedCollection);
36 
37  fillOne((*collection)[0], (*matchedCollection)[0]);
38 }
edm::EDGetTokenT< edm::View< reco::MET > > myColl_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
void fillOne(const reco::MET &candidate, const reco::MET &matchedCandidate)
fill histograms with a given particle
edm::EDGetTokenT< edm::View< reco::MET > > myMatchColl_
void MatchMETBenchmarkAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overridevirtual

Reimplemented from BenchmarkAnalyzer.

Definition at line 23 of file MatchMETBenchmarkAnalyzer.cc.

References BenchmarkAnalyzer::bookHistograms(), and MatchMETBenchmark::setup().

25  {
26  BenchmarkAnalyzer::bookHistograms(ibooker, iRun, iSetup);
27  setup(ibooker);
28 }
void setup(DQMStore::IBooker &b)
book histograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override

Member Data Documentation

edm::InputTag MatchMETBenchmarkAnalyzer::matchedInputLabel_
protected

Definition at line 23 of file MatchMETBenchmarkAnalyzer.h.

Referenced by MatchMETBenchmarkAnalyzer().

edm::EDGetTokenT<edm::View<reco::MET> > MatchMETBenchmarkAnalyzer::myColl_
protected

Definition at line 21 of file MatchMETBenchmarkAnalyzer.h.

Referenced by analyze(), and MatchMETBenchmarkAnalyzer().

edm::EDGetTokenT<edm::View<reco::MET> > MatchMETBenchmarkAnalyzer::myMatchColl_
protected

Definition at line 22 of file MatchMETBenchmarkAnalyzer.h.

Referenced by analyze(), and MatchMETBenchmarkAnalyzer().