CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
MatchMETBenchmarkAnalyzer Class Reference

#include <MatchMETBenchmarkAnalyzer.h>

Inheritance diagram for MatchMETBenchmarkAnalyzer:
BenchmarkAnalyzer MatchMETBenchmark one::DQMEDAnalyzer< T > Benchmark one::dqmimplementation::DQMBaseClass< T... >

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 &)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 ~BenchmarkAnalyzer () override
 Destructor. More...
 
- Public Member Functions inherited from one::DQMEDAnalyzer< T >
 DQMEDAnalyzer ()=default
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer< T... > &&)=delete
 
 ~DQMEDAnalyzer () override=default
 
- 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 ()
 
virtual ~Benchmark ()(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 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

- Public Types inherited from Benchmark
enum  Mode { DEFAULT, DQMOFFLINE, VALIDATION }
 
- 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 through IBooker or plain root 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 through IBooker or plain root 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 through IBooker or plain root 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, either through IBooker or plain root 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.

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_
T getParameter(std::string const &) const
MatchMETBenchmark(Mode mode)
edm::InputTag inputLabel_
input collection
edm::EDGetTokenT< edm::View< reco::MET > > myMatchColl_
BenchmarkAnalyzer()
Constructors.

Member Function Documentation

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

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:517
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 
)
override

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 21 of file MatchMETBenchmarkAnalyzer.h.

Referenced by MatchMETBenchmarkAnalyzer().

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

Definition at line 19 of file MatchMETBenchmarkAnalyzer.h.

Referenced by analyze(), and MatchMETBenchmarkAnalyzer().

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

Definition at line 20 of file MatchMETBenchmarkAnalyzer.h.

Referenced by analyze(), and MatchMETBenchmarkAnalyzer().