CMS 3D CMS Logo

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

#include <PFCandidateMonitor.h>

Inheritance diagram for PFCandidateMonitor:
Benchmark

Public Member Functions

template<class T , class C >
void fill (const T &candidateCollection, const C &matchedCandCollection, float &minVal, float &maxVal, const edm::ParameterSet &parameterSet)
 fill histograms with all particle More...
 
template<class T , class C , class M >
void fill (const T &candidateCollection, const C &matchedCandCollection, float &minVal, float &maxVal, const edm::ParameterSet &parameterSet, const M &muonMatchedCandCollection)
 
void fillOne (const reco::Candidate &cand)
 
 PFCandidateMonitor (float dRMax=0.3, bool matchCharge=true, Benchmark::Mode mode=Benchmark::DEFAULT)
 
void setDirectory (TDirectory *dir)
 set directory (to use in ROOT) More...
 
void setParameters (float dRMax, bool matchCharge, Benchmark::Mode mode, float ptmin, float ptmax, float etamin, float etamax, float phimin, float phimax, bool refHistoFlag)
 set the parameters locally More...
 
void setParameters (const edm::ParameterSet &parameterSet)
 set the parameters accessing them from ParameterSet More...
 
void setup (DQMStore::IBooker &b)
 book histograms More...
 
void setup (DQMStore::IBooker &b, const edm::ParameterSet &parameterSet)
 
virtual ~PFCandidateMonitor ()
 
- Public Member Functions inherited from Benchmark
 Benchmark (Mode mode=DEFAULT)
 
bool isInRange (float pt, float eta, float phi) const
 
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 ()(false)
 

Protected Attributes

CandidateBenchmark candBench_
 
bool createEfficiencyHistos_
 
bool createReferenceHistos_
 
TH1F * deltaR_
 
float dRMax_
 
TH1F * eta_gen_
 
TH1F * eta_ref_
 
bool histogramBooked_
 
MatchCandidateBenchmark matchCandBench_
 
bool matchCharge_
 
bool matching_done_
 
TH1F * phi_gen_
 
TH1F * phi_ref_
 
TH1F * pt_gen_
 
TH1F * pt_ref_
 
- 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 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 histogram, either with DQM or plain root depending if DQM_ has been initialized in a child analyzer or not. More...
 

Detailed Description

Definition at line 16 of file PFCandidateMonitor.h.

Constructor & Destructor Documentation

PFCandidateMonitor::PFCandidateMonitor ( float  dRMax = 0.3,
bool  matchCharge = true,
Benchmark::Mode  mode = Benchmark::DEFAULT 
)

Definition at line 16 of file PFCandidateMonitor.cc.

References createReferenceHistos_, deltaR_, eta_gen_, eta_ref_, histogramBooked_, phi_gen_, phi_ref_, pt_gen_, pt_ref_, and Benchmark::setRange().

16  :
17  Benchmark(mode),
18  candBench_(mode),
20  dRMax_(dRMax),
21  matchCharge_(matchCharge) {
22 
23  setRange( 0.0, 10e10, -10.0, 10.0, -3.14, 3.14);
24 
25  pt_gen_ = 0;
26  eta_gen_ = 0;
27  phi_gen_ = 0;
28 
29  pt_ref_ = 0;
30  eta_ref_ = 0;
31  phi_ref_ = 0;
32 
33  deltaR_ = 0;
34 
35  createReferenceHistos_ = false;
36  histogramBooked_ = false;
37 }
Benchmark(Mode mode=DEFAULT)
Definition: Benchmark.h:41
CandidateBenchmark candBench_
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:51
MatchCandidateBenchmark matchCandBench_
PFCandidateMonitor::~PFCandidateMonitor ( )
virtual

Definition at line 43 of file PFCandidateMonitor.cc.

43 {}

Member Function Documentation

template<class T , class C >
void PFCandidateMonitor::fill ( const T candidateCollection,
const C &  matchedCandCollection,
float &  minVal,
float &  maxVal,
const edm::ParameterSet parameterSet 
)

fill histograms with all particle

Definition at line 78 of file PFCandidateMonitor.h.

References candBench_, createEfficiencyHistos_, createReferenceHistos_, reco::deltaR(), deltaR_, dRMax_, stringResolutionProvider_cfi::eta, reco::Candidate::eta(), CandidateBenchmark::fillOne(), MatchCandidateBenchmark::fillOne(), fillOne(), i, Benchmark::isInRange(), j, PFB::match(), matchCandBench_, matchCharge_, matching_done_, phi, reco::Candidate::phi(), EnergyCorrector::pt, reco::Candidate::pt(), and findQualityFiles::size.

Referenced by PFCandidateDQMAnalyzer::analyze(), and PFMuonDQMAnalyzer::analyze().

80  {
81 
82  matching_done_ = false;
84  for( unsigned i=0; i<candCollection.size(); ++i) {
85  if( !isInRange(candCollection[i].pt(), candCollection[i].eta(), candCollection[i].phi() ) ) continue;
86  fillOne(candCollection[i]); // fill pt_gen, eta_gen and phi_gen histos for UNMATCHED generated candidate
87 
88  for( unsigned j=0; j<matchedCandCollection.size(); ++j) // for DeltaR spectrum
89  if (deltaR_) deltaR_->Fill( reco::deltaR( candCollection[i], matchedCandCollection[j] ) ) ;
90  }
91  }
92 
93  std::vector<int> matchIndices;
94  PFB::match( candCollection, matchedCandCollection, matchIndices, matchCharge_, dRMax_ );
95  //PFB::match( candCollection, matchedCandCollection, matchIndices, parameterSet, matchCharge_, dRMax_ );
96  // now matchIndices[i] stores the j-th closest matched jet
97  matching_done_ = true;
98 
99  for (unsigned int i = 0; i < (candCollection).size(); i++) {
100  const reco::Candidate& cand = candCollection[i];
101 
102  if( !isInRange(cand.pt(), cand.eta(), cand.phi() ) ) continue;
103 
104  int iMatch = matchIndices[i];
105  assert(iMatch< static_cast<int>(matchedCandCollection.size()));
106 
107  if( iMatch!=-1 ) {
108  const reco::Candidate& matchedCand = matchedCandCollection[ iMatch ];
109  if(!isInRange(matchedCand.pt(),matchedCand.eta(),matchedCand.phi() ) ) continue;
110  //std::cout <<"PFJet pT " <<cand.pt() <<" eta " <<cand.eta() <<" phi " <<cand.phi() ;
111  //std::cout <<"\nmatched genJet pT " <<matchedCand.pt() <<" eta " <<matchedCand.eta() <<" phi " <<matchedCand.phi() <<"\n" <<std::endl ;
112  float ptRes = (cand.pt() - matchedCand.pt()) / matchedCand.pt();
113 
114  if (ptRes > maxVal) maxVal = ptRes;
115  if (ptRes < minVal) minVal = ptRes;
116 
117  if ( !createEfficiencyHistos_ ) {
118  candBench_.fillOne(cand); // fill pt, eta phi and charge histos for MATCHED candidate
119  //matchCandBench_.fillOne(cand, matchedCand); // fill delta_x_VS_y histos for matched couple
120  matchCandBench_.fillOne(cand, matchedCand, parameterSet); // fill delta_x_VS_y histos for matched couple
121  if (createReferenceHistos_) fillOne(matchedCand); // fill pt_ref, eta_ref and phi_ref histos for MATCHED reference candidate
122  }
123  else {
124  candBench_.fillOne(matchedCand); // fill pt, eta phi and charge histos for MATCHED candidate
125  //matchCandBench_.fillOne(matchedCand, cand); // fill delta_x_VS_y histos for matched couple
126  matchCandBench_.fillOne(cand, matchedCand, parameterSet); // fill delta_x_VS_y histos for matched couple
127  if (createReferenceHistos_) fillOne(cand); // fill pt_ref, eta_ref and phi_ref histos for MATCHED reference candidate
128  }
129 
130  }
131  }
132 }
size
Write out results.
int i
Definition: DBlmapReader.cc:9
void fillOne(const reco::Candidate &candidate, const reco::Candidate &matchedCandidate)
fill histograms with a given particle
void match(const C &candCollection, const M &matchedCandCollection, std::vector< int > &matchIndices, bool matchCharge=false, float dRMax=-1)
Definition: Matchers.h:17
void fillOne(const reco::Candidate &candidate)
fill histograms with a given particle
int j
Definition: DBlmapReader.cc:9
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:28
virtual double eta() const =0
momentum pseudorapidity
virtual double pt() const =0
transverse momentum
CandidateBenchmark candBench_
void fillOne(const reco::Candidate &cand)
MatchCandidateBenchmark matchCandBench_
bool isInRange(float pt, float eta, float phi) const
Definition: Benchmark.h:58
virtual double phi() const =0
momentum azimuthal angle
template<class T , class C , class M >
void PFCandidateMonitor::fill ( const T candidateCollection,
const C &  matchedCandCollection,
float &  minVal,
float &  maxVal,
const edm::ParameterSet parameterSet,
const M &  muonMatchedCandCollection 
)

Definition at line 137 of file PFCandidateMonitor.h.

References candBench_, createEfficiencyHistos_, createReferenceHistos_, reco::deltaR(), deltaR_, dRMax_, stringResolutionProvider_cfi::eta, reco::Candidate::eta(), CandidateBenchmark::fillOne(), MatchCandidateBenchmark::fillOne(), fillOne(), i, Benchmark::isInRange(), j, PFB::match(), matchCandBench_, matchCharge_, matching_done_, phi, reco::Candidate::phi(), EnergyCorrector::pt, reco::Candidate::pt(), and findQualityFiles::size.

139  {
140 
141 
142  matching_done_ = false;
143  if ( createEfficiencyHistos_ ) {
144  for( unsigned i=0; i<candCollection.size(); ++i) {
145  if( !isInRange(candCollection[i].pt(), candCollection[i].eta(), candCollection[i].phi() ) ) continue;
146  fillOne(candCollection[i]); // fill pt_gen, eta_gen and phi_gen histos for UNMATCHED generated candidate
147 
148  for( unsigned j=0; j<matchedCandCollection.size(); ++j) // for DeltaR spectrum
149  if (deltaR_) deltaR_->Fill( reco::deltaR( candCollection[i], matchedCandCollection[j] ) ) ;
150  }
151  }
152 
153  std::vector<int> matchIndices;
154  //PFB::match( candCollection, matchedCandCollection, matchIndices, matchCharge_, dRMax_ );
155  //PFB::match( candCollection, matchedCandCollection, matchIndices, parameterSet, matchCharge_, dRMax_ );
156  PFB::match( candCollection, matchedCandCollection, matchIndices, parameterSet, muonMatchedCandCollection, matchCharge_, dRMax_ );
157  // now matchIndices[i] stores the j-th closest matched jet
158  matching_done_ = true;
159 
160  for (unsigned int i = 0; i < (candCollection).size(); i++) {
161  const reco::Candidate& cand = candCollection[i];
162 
163  if( !isInRange(cand.pt(), cand.eta(), cand.phi() ) ) continue;
164 
165  int iMatch = matchIndices[i];
166  assert(iMatch< static_cast<int>(matchedCandCollection.size()));
167 
168  if( iMatch!=-1 ) {
169  const reco::Candidate& matchedCand = matchedCandCollection[ iMatch ];
170  if(!isInRange(matchedCand.pt(),matchedCand.eta(),matchedCand.phi() ) ) continue;
171  //std::cout <<"PFJet pT " <<cand.pt() <<" eta " <<cand.eta() <<" phi " <<cand.phi() ;
172  //std::cout <<"\nmatched genJet pT " <<matchedCand.pt() <<" eta " <<matchedCand.eta() <<" phi " <<matchedCand.phi() <<"\n" <<std::endl ;
173  float ptRes = (cand.pt() - matchedCand.pt()) / matchedCand.pt();
174 
175  if (ptRes > maxVal) maxVal = ptRes;
176  if (ptRes < minVal) minVal = ptRes;
177 
178  if ( !createEfficiencyHistos_ ) {
179  candBench_.fillOne(cand); // fill pt, eta phi and charge histos for MATCHED candidate
180  matchCandBench_.fillOne(cand, matchedCand, parameterSet); // fill delta_x_VS_y histos for matched couple
181  if (createReferenceHistos_) fillOne(matchedCand); // fill pt_ref, eta_ref and phi_ref histos for MATCHED reference candidate
182  }
183  else {
184  candBench_.fillOne(matchedCand); // fill pt, eta phi and charge histos for MATCHED candidate
185  matchCandBench_.fillOne(cand, matchedCand, parameterSet); // fill delta_x_VS_y histos for matched couple
186  if (createReferenceHistos_) fillOne(cand); // fill pt_ref, eta_ref and phi_ref histos for MATCHED reference candidate
187  }
188 
189  }
190  }
191 }
size
Write out results.
int i
Definition: DBlmapReader.cc:9
void fillOne(const reco::Candidate &candidate, const reco::Candidate &matchedCandidate)
fill histograms with a given particle
void match(const C &candCollection, const M &matchedCandCollection, std::vector< int > &matchIndices, bool matchCharge=false, float dRMax=-1)
Definition: Matchers.h:17
void fillOne(const reco::Candidate &candidate)
fill histograms with a given particle
int j
Definition: DBlmapReader.cc:9
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:28
virtual double eta() const =0
momentum pseudorapidity
virtual double pt() const =0
transverse momentum
CandidateBenchmark candBench_
void fillOne(const reco::Candidate &cand)
MatchCandidateBenchmark matchCandBench_
bool isInRange(float pt, float eta, float phi) const
Definition: Benchmark.h:58
virtual double phi() const =0
momentum azimuthal angle
void PFCandidateMonitor::fillOne ( const reco::Candidate cand)

Definition at line 192 of file PFCandidateMonitor.cc.

References createEfficiencyHistos_, createReferenceHistos_, reco::Candidate::eta(), eta_gen_, eta_ref_, histogramBooked_, matching_done_, reco::Candidate::phi(), phi_gen_, phi_ref_, reco::Candidate::pt(), pt_gen_, and pt_ref_.

Referenced by fill().

192  {
193 
194  if (matching_done_) {
196  if (pt_ref_) pt_ref_->Fill( cand.pt() );
197  if (eta_ref_) eta_ref_->Fill( cand.eta() );
198  if (phi_ref_) phi_ref_->Fill( cand.phi() );
199  }
201  if (pt_gen_) pt_gen_->Fill( cand.pt() );
202  if (eta_gen_) eta_gen_->Fill( cand.eta() );
203  if (phi_gen_) phi_gen_->Fill( cand.phi() );
204  }
205 
206 }
virtual double eta() const =0
momentum pseudorapidity
virtual double pt() const =0
transverse momentum
virtual double phi() const =0
momentum azimuthal angle
void PFCandidateMonitor::setDirectory ( TDirectory *  dir)
virtual

set directory (to use in ROOT)

Reimplemented from Benchmark.

Definition at line 181 of file PFCandidateMonitor.cc.

References candBench_, matchCandBench_, and Benchmark::setDirectory().

181  {
183 
186 }
virtual void setDirectory(TDirectory *dir)
Definition: Benchmark.cc:18
CandidateBenchmark candBench_
MatchCandidateBenchmark matchCandBench_
dbl *** dir
Definition: mlp_gen.cc:35
void PFCandidateMonitor::setParameters ( float  dRMax,
bool  matchCharge,
Benchmark::Mode  mode,
float  ptmin,
float  ptmax,
float  etamin,
float  etamax,
float  phimin,
float  phimax,
bool  refHistoFlag 
)

set the parameters locally

Definition at line 72 of file PFCandidateMonitor.cc.

References candBench_, createReferenceHistos_, allElectronIsolations_cfi::dRMax, dRMax_, matchCandBench_, matchCharge_, ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, Benchmark::mode_, Benchmark::setParameters(), and Benchmark::setRange().

Referenced by PFCandidateDQMAnalyzer::PFCandidateDQMAnalyzer(), and PFMuonDQMAnalyzer::PFMuonDQMAnalyzer().

74  {
75  dRMax_ = dRMax;
76  matchCharge_ = matchCharge;
77  mode_ = mode;
78  createReferenceHistos_ = refHistoFlag;
79 
80  setRange( ptmin, ptmax, etamin, etamax, phimin, phimax );
81 
84 }
void setParameters(Mode mode)
Definition: Benchmark.h:49
CandidateBenchmark candBench_
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:51
double ptmin
Definition: HydjetWrapper.h:90
MatchCandidateBenchmark matchCandBench_
Mode mode_
Definition: Benchmark.h:105
void PFCandidateMonitor::setParameters ( const edm::ParameterSet parameterSet)

set the parameters accessing them from ParameterSet

Definition at line 49 of file PFCandidateMonitor.cc.

References candBench_, createEfficiencyHistos_, createReferenceHistos_, dRMax_, edm::ParameterSet::getParameter(), matchCandBench_, matchCharge_, Benchmark::mode_, Benchmark::setParameters(), and Benchmark::setRange().

49  {
50 
51  dRMax_ = parameterSet.getParameter<double>( "deltaRMax" );
52  matchCharge_ = parameterSet.getParameter<bool>( "matchCharge" );
53  mode_ = (Benchmark::Mode) parameterSet.getParameter<int>( "mode" );
54  createReferenceHistos_ = parameterSet.getParameter<bool>( "CreateReferenceHistos" );
55  createEfficiencyHistos_ = parameterSet.getParameter<bool>( "CreateEfficiencyHistos" );
56 
57  setRange( parameterSet.getParameter<double>("ptMin"),
58  parameterSet.getParameter<double>("ptMax"),
59  parameterSet.getParameter<double>("etaMin"),
60  parameterSet.getParameter<double>("etaMax"),
61  parameterSet.getParameter<double>("phiMin"),
62  parameterSet.getParameter<double>("phiMax") );
63 
66 }
T getParameter(std::string const &) const
void setParameters(Mode mode)
Definition: Benchmark.h:49
CandidateBenchmark candBench_
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:51
MatchCandidateBenchmark matchCandBench_
Mode mode_
Definition: Benchmark.h:105
void PFCandidateMonitor::setup ( DQMStore::IBooker b)

book histograms

Definition at line 149 of file PFCandidateMonitor.cc.

References Benchmark::book1D(), candBench_, createEfficiencyHistos_, createReferenceHistos_, eta_gen_, eta_ref_, histogramBooked_, Benchmark::PhaseSpace::m, Benchmark::PhaseSpace::M, matchCandBench_, Benchmark::PhaseSpace::n, phi_gen_, phi_ref_, pt_gen_, pt_ref_, CandidateBenchmark::setup(), and MatchCandidateBenchmark::setup().

Referenced by PFCandidateDQMAnalyzer::bookHistograms(), and PFMuonDQMAnalyzer::bookHistograms().

149  {
150  candBench_.setup(b);
152 
154  PhaseSpace ptPS(100,0,100);
155  PhaseSpace phiPS(360, -3.1416, 3.1416);
156  PhaseSpace etaPS(100, -5,5);
157 
158  pt_ref_ = book1D(b, "pt_ref_", "p_{T}_ref;p_{T} (GeV)", ptPS.n, ptPS.m, ptPS.M);
160  pt_gen_ = book1D(b, "pt_gen_", "p_{T}_gen;p_{T} (GeV)", ptPS.n, ptPS.m, ptPS.M);
161  }
162 
163  eta_ref_ = book1D(b, "eta_ref_", "#eta_ref;#eta", etaPS.n, etaPS.m, etaPS.M);
165  eta_gen_ = book1D(b, "eta_gen_", "#eta_gen;#eta", etaPS.n, etaPS.m, etaPS.M);
166  }
167 
168  phi_ref_ = book1D(b, "phi_ref_", "#phi_ref;#phi", phiPS.n, phiPS.m, phiPS.M);
170  phi_gen_ = book1D(b, "phi_gen_", "#phi_gen;#phi", phiPS.n, phiPS.m, phiPS.M);
171  }
172 
173  histogramBooked_ = true;
174  }
175 }
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 ...
Definition: Benchmark.cc:23
void setup(DQMStore::IBooker &b)
book histograms
CandidateBenchmark candBench_
MatchCandidateBenchmark matchCandBench_
void setup(DQMStore::IBooker &b)
book histograms
void PFCandidateMonitor::setup ( DQMStore::IBooker b,
const edm::ParameterSet parameterSet 
)

Definition at line 90 of file PFCandidateMonitor.cc.

References Benchmark::book1D(), candBench_, createEfficiencyHistos_, createReferenceHistos_, deltaR_, PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, eta_gen_, eta_ref_, edm::ParameterSet::getParameter(), histogramBooked_, matchCandBench_, phi_gen_, phi_ref_, pt_gen_, pt_ref_, CandidateBenchmark::setup(), and MatchCandidateBenchmark::setup().

90  {
91  candBench_.setup(b, parameterSet);
92  matchCandBench_.setup(b, parameterSet);
93 
95  edm::ParameterSet ptPS = parameterSet.getParameter<edm::ParameterSet>("PtHistoParameter");
96  edm::ParameterSet etaPS = parameterSet.getParameter<edm::ParameterSet>("EtaHistoParameter");
97  edm::ParameterSet phiPS = parameterSet.getParameter<edm::ParameterSet>("PhiHistoParameter");
98 
99  edm::ParameterSet dR = parameterSet.getParameter<edm::ParameterSet>("DeltaRHistoParameter");
100 
101  if (ptPS.getParameter<bool>("switchOn")) {
102  pt_ref_ = book1D(b, "pt_ref_", "p_{T}_ref;p_{T} (GeV)", ptPS.getParameter<int32_t>("nBin"),
103  ptPS.getParameter<double>("xMin"),
104  ptPS.getParameter<double>("xMax"));
106  pt_gen_ = book1D(b, "pt_gen_", "p_{T}_gen;p_{T} (GeV)", ptPS.getParameter<int32_t>("nBin"),
107  ptPS.getParameter<double>("xMin"),
108  ptPS.getParameter<double>("xMax") ) ;
109  }
110  }
111 
112  if (etaPS.getParameter<bool>("switchOn")) {
113  eta_ref_ = book1D(b, "eta_ref_", "#eta_ref;#eta", etaPS.getParameter<int32_t>("nBin"),
114  etaPS.getParameter<double>("xMin"),
115  etaPS.getParameter<double>("xMax"));
117  eta_gen_ = book1D(b, "eta_gen_", "#eta_gen;#eta", etaPS.getParameter<int32_t>("nBin"),
118  etaPS.getParameter<double>("xMin"),
119  etaPS.getParameter<double>("xMax") ) ;
120  }
121  }
122 
123  if (phiPS.getParameter<bool>("switchOn")) {
124  phi_ref_ = book1D(b, "phi_ref_", "#phi_ref;#phi", phiPS.getParameter<int32_t>("nBin"),
125  phiPS.getParameter<double>("xMin"),
126  phiPS.getParameter<double>("xMax"));
128  phi_gen_ = book1D(b, "phi_gen_", "#phi_gen;#phi", phiPS.getParameter<int32_t>("nBin"),
129  phiPS.getParameter<double>("xMin"),
130  phiPS.getParameter<double>("xMax") ) ;
131  }
132  }
133 
134  if ( createEfficiencyHistos_ && dR.getParameter<bool>("switchOn") ) {
135  deltaR_ = book1D(b, "deltaR_", "#DeltaR;#DeltaR",
136  dR.getParameter<int32_t>("nBin"),
137  dR.getParameter<double>("xMin"),
138  dR.getParameter<double>("xMax"));
139  }
140 
141  histogramBooked_ = true;
142  }
143 }
T getParameter(std::string const &) const
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 ...
Definition: Benchmark.cc:23
void setup(DQMStore::IBooker &b)
book histograms
CandidateBenchmark candBench_
MatchCandidateBenchmark matchCandBench_
void setup(DQMStore::IBooker &b)
book histograms

Member Data Documentation

CandidateBenchmark PFCandidateMonitor::candBench_
protected

Definition at line 55 of file PFCandidateMonitor.h.

Referenced by fill(), setDirectory(), setParameters(), and setup().

bool PFCandidateMonitor::createEfficiencyHistos_
protected

Definition at line 73 of file PFCandidateMonitor.h.

Referenced by fill(), fillOne(), setParameters(), and setup().

bool PFCandidateMonitor::createReferenceHistos_
protected

Definition at line 69 of file PFCandidateMonitor.h.

Referenced by fill(), fillOne(), PFCandidateMonitor(), setParameters(), and setup().

TH1F* PFCandidateMonitor::deltaR_
protected

Definition at line 66 of file PFCandidateMonitor.h.

Referenced by fill(), PFCandidateMonitor(), and setup().

float PFCandidateMonitor::dRMax_
protected

Definition at line 67 of file PFCandidateMonitor.h.

Referenced by fill(), and setParameters().

TH1F* PFCandidateMonitor::eta_gen_
protected

Definition at line 59 of file PFCandidateMonitor.h.

Referenced by fillOne(), PFCandidateMonitor(), and setup().

TH1F* PFCandidateMonitor::eta_ref_
protected

Definition at line 63 of file PFCandidateMonitor.h.

Referenced by fillOne(), PFCandidateMonitor(), and setup().

bool PFCandidateMonitor::histogramBooked_
protected

Definition at line 70 of file PFCandidateMonitor.h.

Referenced by fillOne(), PFCandidateMonitor(), and setup().

MatchCandidateBenchmark PFCandidateMonitor::matchCandBench_
protected

Definition at line 56 of file PFCandidateMonitor.h.

Referenced by fill(), setDirectory(), setParameters(), and setup().

bool PFCandidateMonitor::matchCharge_
protected

Definition at line 68 of file PFCandidateMonitor.h.

Referenced by fill(), and setParameters().

bool PFCandidateMonitor::matching_done_
protected

Definition at line 72 of file PFCandidateMonitor.h.

Referenced by fill(), and fillOne().

TH1F* PFCandidateMonitor::phi_gen_
protected

Definition at line 60 of file PFCandidateMonitor.h.

Referenced by fillOne(), PFCandidateMonitor(), and setup().

TH1F* PFCandidateMonitor::phi_ref_
protected

Definition at line 64 of file PFCandidateMonitor.h.

Referenced by fillOne(), PFCandidateMonitor(), and setup().

TH1F* PFCandidateMonitor::pt_gen_
protected

Definition at line 58 of file PFCandidateMonitor.h.

Referenced by fillOne(), PFCandidateMonitor(), and setup().

TH1F* PFCandidateMonitor::pt_ref_
protected

Definition at line 62 of file PFCandidateMonitor.h.

Referenced by fillOne(), PFCandidateMonitor(), and setup().