CMS 3D CMS Logo

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

#include <PFJetMonitor.h>

Inheritance diagram for PFJetMonitor:
Benchmark

Public Member Functions

template<class T , class C >
void fill (const T &jetCollection, const C &matchedJetCollection, float &minVal, float &maxVal)
 fill histograms with all particle More...
 
template<class T , class C >
void fill (const T &candidateCollection, const C &matchedCandCollection, float &minVal, float &maxVal, float &jetpT, const edm::ParameterSet &parameterSet)
 
void fillOne (const reco::Jet &jet, const reco::Jet &matchedJet)
 
 PFJetMonitor (float dRMax=0.3, bool matchCharge=true, Benchmark::Mode mode=Benchmark::DEFAULT)
 
void setDirectory (TDirectory *dir) override
 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 fracHistoFlag=true)
 set the parameters locally More...
 
void setParameters (float dRMax, bool onlyTwoJets, bool matchCharge, Benchmark::Mode mode, float ptmin, float ptmax, float etamin, float etamax, float phimin, float phimax, bool fracHistoFlag=true)
 
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)
 
 ~PFJetMonitor () override
 
- 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 ()
 
virtual ~Benchmark ()(false)
 

Protected Attributes

CandidateBenchmark candBench_
 
bool createPFractionHistos_
 
TH2F * delta_frac_VS_frac_charged_hadron_
 
TH2F * delta_frac_VS_frac_electron_
 
TH2F * delta_frac_VS_frac_muon_
 
TH2F * delta_frac_VS_frac_neutral_hadron_
 
TH2F * delta_frac_VS_frac_photon_
 
TH1F * deltaR_
 
float dRMax_
 
bool histogramBooked_
 
MatchCandidateBenchmark matchCandBench_
 
bool matchCharge_
 
bool onlyTwoJets_
 
- 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 15 of file PFJetMonitor.h.

Constructor & Destructor Documentation

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

Definition at line 15 of file PFJetMonitor.cc.

References createPFractionHistos_, delta_frac_VS_frac_charged_hadron_, delta_frac_VS_frac_electron_, delta_frac_VS_frac_muon_, delta_frac_VS_frac_neutral_hadron_, delta_frac_VS_frac_photon_, deltaR_, histogramBooked_, and Benchmark::setRange().

17  setRange(0.0, 10e10, -10.0, 10.0, -3.14, 3.14);
18 
19  delta_frac_VS_frac_muon_ = nullptr;
24 
25  deltaR_ = nullptr;
26 
27  createPFractionHistos_ = false;
28  histogramBooked_ = false;
29 }
bool histogramBooked_
Definition: PFJetMonitor.h:84
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:70
bool createPFractionHistos_
Definition: PFJetMonitor.h:83
TH2F * delta_frac_VS_frac_muon_
Definition: PFJetMonitor.h:73
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:71
TH2F * delta_frac_VS_frac_neutral_hadron_
Definition: PFJetMonitor.h:77
Benchmark(Mode mode=DEFAULT)
Definition: Benchmark.h:34
TH2F * delta_frac_VS_frac_photon_
Definition: PFJetMonitor.h:74
TH2F * delta_frac_VS_frac_electron_
Definition: PFJetMonitor.h:75
TH1F * deltaR_
Definition: PFJetMonitor.h:79
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:41
TH2F * delta_frac_VS_frac_charged_hadron_
Definition: PFJetMonitor.h:76
bool matchCharge_
Definition: PFJetMonitor.h:82
PFJetMonitor::~PFJetMonitor ( )
override

Definition at line 34 of file PFJetMonitor.cc.

34 {}

Member Function Documentation

template<class T , class C >
void PFJetMonitor::fill ( const T jetCollection,
const C &  matchedJetCollection,
float &  minVal,
float &  maxVal 
)

fill histograms with all particle

Definition at line 89 of file PFJetMonitor.h.

References candBench_, createPFractionHistos_, dRMax_, reco::Candidate::eta(), reco::LeafCandidate::eta(), CandidateBenchmark::fillOne(), MatchCandidateBenchmark::fillOne(), fillOne(), histogramBooked_, mps_fire::i, Benchmark::isInRange(), metsig::jet, PFB::match(), matchCandBench_, matchCharge_, reco::Candidate::phi(), reco::LeafCandidate::phi(), reco::Candidate::pt(), reco::LeafCandidate::pt(), and findQualityFiles::size.

Referenced by PFJetDQMAnalyzer::analyze().

89  {
90  std::vector<int> matchIndices;
91  PFB::match(jetCollection, matchedJetCollection, matchIndices, matchCharge_, dRMax_);
92 
93  for (unsigned int i = 0; i < (jetCollection).size(); i++) {
94  const reco::Jet &jet = jetCollection[i];
95 
96  if (!isInRange(jet.pt(), jet.eta(), jet.phi()))
97  continue;
98 
99  int iMatch = matchIndices[i];
100  assert(iMatch < static_cast<int>(matchedJetCollection.size()));
101 
102  if (iMatch != -1) {
103  const reco::Candidate &matchedJet = matchedJetCollection[iMatch];
104  if (!isInRange(matchedJet.pt(), matchedJet.eta(), matchedJet.phi()))
105  continue;
106  float ptRes = (jet.pt() - matchedJet.pt()) / matchedJet.pt();
107 
108  if (ptRes > maxVal)
109  maxVal = ptRes;
110  if (ptRes < minVal)
111  minVal = ptRes;
112 
113  candBench_.fillOne(jet);
114  matchCandBench_.fillOne(jet, matchedJetCollection[iMatch]);
116  fillOne(jet, matchedJetCollection[iMatch]);
117  }
118  }
119 }
size
Write out results.
bool histogramBooked_
Definition: PFJetMonitor.h:84
double eta() const final
momentum pseudorapidity
void fillOne(const reco::Candidate &candidate, const reco::Candidate &matchedCandidate)
fill histograms with a given particle
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:70
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
Base class for all types of Jets.
Definition: Jet.h:20
double pt() const final
transverse momentum
bool createPFractionHistos_
Definition: PFJetMonitor.h:83
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:71
void fillOne(const reco::Jet &jet, const reco::Jet &matchedJet)
virtual double eta() const =0
momentum pseudorapidity
virtual double pt() const =0
transverse momentum
bool isInRange(float pt, float eta, float phi) const
Definition: Benchmark.h:50
double phi() const final
momentum azimuthal angle
virtual double phi() const =0
momentum azimuthal angle
bool matchCharge_
Definition: PFJetMonitor.h:82
template<class T , class C >
void PFJetMonitor::fill ( const T candidateCollection,
const C &  matchedCandCollection,
float &  minVal,
float &  maxVal,
float &  jetpT,
const edm::ParameterSet parameterSet 
)

Definition at line 122 of file PFJetMonitor.h.

References candBench_, createPFractionHistos_, reco::deltaR(), deltaR_, dRMax_, reco::Candidate::eta(), reco::LeafCandidate::eta(), CandidateBenchmark::fillOne(), MatchCandidateBenchmark::fillOne(), fillOne(), histogramBooked_, mps_fire::i, Benchmark::isInRange(), metsig::jet, PFB::match(), matchCandBench_, matchCharge_, onlyTwoJets_, reco::Candidate::phi(), reco::LeafCandidate::phi(), EnergyCorrector::pt, reco::Candidate::pt(), and reco::LeafCandidate::pt().

127  {
128  std::vector<int> matchIndices;
129  PFB::match(jetCollection, matchedJetCollection, matchIndices, matchCharge_, dRMax_);
130  // now matchIndices[i] stores the j-th closest matched jet
131 
132  for (unsigned i = 0; i < jetCollection.size(); ++i) {
133  // Count the number of jets with a larger energy = pT
134  unsigned int highJets = 0;
135  for (unsigned j = 0; j < jetCollection.size(); ++j) {
136  if (j != i && jetCollection[j].pt() > jetCollection[i].pt())
137  highJets++;
138  }
139  if (onlyTwoJets_ && highJets > 1)
140  continue;
141 
142  const reco::Jet &jet = jetCollection[i];
143 
144  if (!isInRange(jet.pt(), jet.eta(), jet.phi()))
145  continue;
146 
147  int iMatch = matchIndices[i];
148  assert(iMatch < static_cast<int>(matchedJetCollection.size()));
149 
150  if (iMatch != -1) {
151  const reco::Candidate &matchedJet = matchedJetCollection[iMatch];
152  if (!isInRange(matchedJet.pt(), matchedJet.eta(), matchedJet.phi()))
153  continue;
154 
155  float ptRes = (jet.pt() - matchedJet.pt()) / matchedJet.pt();
156 
157  jetpT = jet.pt();
158  if (ptRes > maxVal)
159  maxVal = ptRes;
160  if (ptRes < minVal)
161  minVal = ptRes;
162 
163  candBench_.fillOne(jet); // fill pt eta phi and charge histos for MATCHED candidate jet
165  matchedJetCollection[iMatch],
166  parameterSet); // fill delta_x_VS_y histos for matched couple
168  fillOne(jet,
169  matchedJetCollection[iMatch]); // book and fill delta_frac_VS_frac
170  // histos for matched couple
171  }
172 
173  for (unsigned j = 0; j < matchedJetCollection.size(); ++j) // for DeltaR spectrum
174  if (deltaR_)
175  deltaR_->Fill(reco::deltaR(jetCollection[i], matchedJetCollection[j]));
176  } // end loop on jetCollection
177 }
bool histogramBooked_
Definition: PFJetMonitor.h:84
double eta() const final
momentum pseudorapidity
void fillOne(const reco::Candidate &candidate, const reco::Candidate &matchedCandidate)
fill histograms with a given particle
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:70
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
Base class for all types of Jets.
Definition: Jet.h:20
double pt() const final
transverse momentum
bool createPFractionHistos_
Definition: PFJetMonitor.h:83
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:71
bool onlyTwoJets_
Definition: PFJetMonitor.h:81
void fillOne(const reco::Jet &jet, const reco::Jet &matchedJet)
constexpr 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
TH1F * deltaR_
Definition: PFJetMonitor.h:79
bool isInRange(float pt, float eta, float phi) const
Definition: Benchmark.h:50
double phi() const final
momentum azimuthal angle
virtual double phi() const =0
momentum azimuthal angle
bool matchCharge_
Definition: PFJetMonitor.h:82
void PFJetMonitor::fillOne ( const reco::Jet jet,
const reco::Jet matchedJet 
)

Definition at line 201 of file PFJetMonitor.cc.

References reco::PFJet::chargedHadronMultiplicity(), createPFractionHistos_, delta_frac_VS_frac_charged_hadron_, delta_frac_VS_frac_electron_, delta_frac_VS_frac_muon_, delta_frac_VS_frac_neutral_hadron_, delta_frac_VS_frac_photon_, reco::PFJet::electronMultiplicity(), metsig::jet, reco::PFJet::muonMultiplicity(), reco::PFJet::neutralHadronMultiplicity(), and reco::PFJet::photonMultiplicity().

Referenced by fill().

201  {
202  const reco::PFJet *pfJet = dynamic_cast<const reco::PFJet *>(&jet);
203  const reco::PFJet *pfMatchedJet = dynamic_cast<const reco::PFJet *>(&matchedJet);
204  if (pfJet && pfMatchedJet && createPFractionHistos_) {
205  float del_frac_muon = -99.9;
206  float del_frac_elec = -99.9;
207  float del_frac_phot = -99.9;
208  float del_frac_ch_had = -99.9;
209  float del_frac_neu_had = -99.9;
210 
211  int mult_muon = pfMatchedJet->muonMultiplicity();
212  int mult_elec = pfMatchedJet->electronMultiplicity();
213  int mult_phot = pfMatchedJet->photonMultiplicity();
214  int mult_ch_had = pfMatchedJet->chargedHadronMultiplicity();
215  int mult_neu_had = pfMatchedJet->neutralHadronMultiplicity();
216 
217  if (mult_muon > 0)
218  del_frac_muon = (pfJet->muonMultiplicity() - mult_muon) * 1.0 / mult_muon;
219  if (mult_elec > 0)
220  del_frac_elec = (pfJet->electronMultiplicity() - mult_elec) * 1.0 / mult_elec;
221  if (mult_phot > 0)
222  del_frac_phot = (pfJet->photonMultiplicity() - mult_phot) * 1.0 / mult_phot;
223  if (mult_ch_had > 0)
224  del_frac_ch_had = (pfJet->chargedHadronMultiplicity() - mult_ch_had) * 1.0 / mult_ch_had;
225  if (mult_neu_had > 0)
226  del_frac_neu_had = (pfJet->neutralHadronMultiplicity() - mult_neu_had) * 1.0 / mult_neu_had;
227 
228  delta_frac_VS_frac_muon_->Fill(mult_muon, del_frac_muon);
229  delta_frac_VS_frac_electron_->Fill(mult_elec, del_frac_elec);
230  delta_frac_VS_frac_photon_->Fill(mult_phot, del_frac_phot);
231  delta_frac_VS_frac_charged_hadron_->Fill(mult_ch_had, del_frac_ch_had);
232  delta_frac_VS_frac_neutral_hadron_->Fill(mult_neu_had, del_frac_neu_had);
233  }
234 }
int photonMultiplicity() const
photonMultiplicity
Definition: PFJet.h:131
bool createPFractionHistos_
Definition: PFJetMonitor.h:83
TH2F * delta_frac_VS_frac_muon_
Definition: PFJetMonitor.h:73
Jets made from PFObjects.
Definition: PFJet.h:21
TH2F * delta_frac_VS_frac_neutral_hadron_
Definition: PFJetMonitor.h:77
int neutralHadronMultiplicity() const
neutralHadronMultiplicity
Definition: PFJet.h:129
TH2F * delta_frac_VS_frac_photon_
Definition: PFJetMonitor.h:74
TH2F * delta_frac_VS_frac_electron_
Definition: PFJetMonitor.h:75
int chargedHadronMultiplicity() const
chargedHadronMultiplicity
Definition: PFJet.h:127
int muonMultiplicity() const
muonMultiplicity
Definition: PFJet.h:135
TH2F * delta_frac_VS_frac_charged_hadron_
Definition: PFJetMonitor.h:76
int electronMultiplicity() const
electronMultiplicity
Definition: PFJet.h:133
void PFJetMonitor::setDirectory ( TDirectory *  dir)
overridevirtual

set directory (to use in ROOT)

Reimplemented from Benchmark.

Definition at line 191 of file PFJetMonitor.cc.

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

191  {
193 
196 }
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:70
virtual void setDirectory(TDirectory *dir)
Definition: Benchmark.cc:14
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:71
dbl *** dir
Definition: mlp_gen.cc:35
void PFJetMonitor::setParameters ( float  dRMax,
bool  matchCharge,
Benchmark::Mode  mode,
float  ptmin,
float  ptmax,
float  etamin,
float  etamax,
float  phimin,
float  phimax,
bool  fracHistoFlag = true 
)

set the parameters locally

Definition at line 60 of file PFJetMonitor.cc.

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

Referenced by PFJetDQMAnalyzer::PFJetDQMAnalyzer().

69  {
70  dRMax_ = dRMax;
71  matchCharge_ = matchCharge;
72  mode_ = mode;
73  createPFractionHistos_ = fracHistoFlag;
74 
75  setRange(ptmin, ptmax, etamin, etamax, phimin, phimax);
76 
79 }
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:70
bool createPFractionHistos_
Definition: PFJetMonitor.h:83
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:71
void setParameters(Mode mode)
Definition: Benchmark.h:39
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:41
double ptmin
Definition: HydjetWrapper.h:90
Mode mode_
Definition: Benchmark.h:124
bool matchCharge_
Definition: PFJetMonitor.h:82
void PFJetMonitor::setParameters ( float  dRMax,
bool  onlyTwoJets,
bool  matchCharge,
Benchmark::Mode  mode,
float  ptmin,
float  ptmax,
float  etamin,
float  etamax,
float  phimin,
float  phimax,
bool  fracHistoFlag = true 
)

Definition at line 81 of file PFJetMonitor.cc.

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

91  {
92  dRMax_ = dRMax;
94  matchCharge_ = matchCharge;
95  mode_ = mode;
96  createPFractionHistos_ = fracHistoFlag;
97 
98  setRange(ptmin, ptmax, etamin, etamax, phimin, phimax);
99 
102 }
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:70
bool onlyTwoJets
bool createPFractionHistos_
Definition: PFJetMonitor.h:83
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:71
bool onlyTwoJets_
Definition: PFJetMonitor.h:81
void setParameters(Mode mode)
Definition: Benchmark.h:39
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:41
double ptmin
Definition: HydjetWrapper.h:90
Mode mode_
Definition: Benchmark.h:124
bool matchCharge_
Definition: PFJetMonitor.h:82
void PFJetMonitor::setParameters ( const edm::ParameterSet parameterSet)

set the parameters accessing them from ParameterSet

Definition at line 39 of file PFJetMonitor.cc.

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

39  {
40  dRMax_ = parameterSet.getParameter<double>("deltaRMax");
41  onlyTwoJets_ = parameterSet.getParameter<bool>("onlyTwoJets");
42  matchCharge_ = parameterSet.getParameter<bool>("matchCharge");
43  mode_ = (Benchmark::Mode)parameterSet.getParameter<int>("mode");
44  createPFractionHistos_ = parameterSet.getParameter<bool>("CreatePFractionHistos");
45 
46  setRange(parameterSet.getParameter<double>("ptMin"),
47  parameterSet.getParameter<double>("ptMax"),
48  parameterSet.getParameter<double>("etaMin"),
49  parameterSet.getParameter<double>("etaMax"),
50  parameterSet.getParameter<double>("phiMin"),
51  parameterSet.getParameter<double>("phiMax"));
52 
55 }
T getParameter(std::string const &) const
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:70
bool createPFractionHistos_
Definition: PFJetMonitor.h:83
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:71
bool onlyTwoJets_
Definition: PFJetMonitor.h:81
void setParameters(Mode mode)
Definition: Benchmark.h:39
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:41
Mode mode_
Definition: Benchmark.h:124
bool matchCharge_
Definition: PFJetMonitor.h:82
void PFJetMonitor::setup ( DQMStore::IBooker b)

book histograms

Definition at line 153 of file PFJetMonitor.cc.

References Benchmark::book2D(), candBench_, createPFractionHistos_, delta_frac_VS_frac_charged_hadron_, delta_frac_VS_frac_electron_, delta_frac_VS_frac_muon_, delta_frac_VS_frac_neutral_hadron_, delta_frac_VS_frac_photon_, histogramBooked_, matchCandBench_, CandidateBenchmark::setup(), and MatchCandidateBenchmark::setup().

Referenced by PFJetDQMAnalyzer::bookHistograms().

153  {
154  candBench_.setup(b);
156 
159  book2D(b, "delta_frac_VS_frac_muon_", "#DeltaFraction_Vs_Fraction(muon)", 100, 0.0, 1.0, 100, -1.0, 1.0);
161  book2D(b, "delta_frac_VS_frac_photon_", "#DeltaFraction_Vs_Fraction(photon)", 100, 0.0, 1.0, 100, -1.0, 1.0);
163  b, "delta_frac_VS_frac_electron_", "#DeltaFraction_Vs_Fraction(electron)", 100, 0.0, 1.0, 100, -1.0, 1.0);
165  "delta_frac_VS_frac_charged_hadron_",
166  "#DeltaFraction_Vs_Fraction(charged hadron)",
167  100,
168  0.0,
169  1.0,
170  100,
171  -1.0,
172  1.0);
174  "delta_frac_VS_frac_neutral_hadron_",
175  "#DeltaFraction_Vs_Fraction(neutral hadron)",
176  100,
177  0.0,
178  1.0,
179  100,
180  -1.0,
181  1.0);
182 
183  histogramBooked_ = true;
184  }
185 }
bool histogramBooked_
Definition: PFJetMonitor.h:84
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:70
void setup(DQMStore::IBooker &b)
book histograms
bool createPFractionHistos_
Definition: PFJetMonitor.h:83
TH2F * delta_frac_VS_frac_muon_
Definition: PFJetMonitor.h:73
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:71
TH2F * delta_frac_VS_frac_neutral_hadron_
Definition: PFJetMonitor.h:77
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
Definition: Benchmark.cc:23
TH2F * delta_frac_VS_frac_photon_
Definition: PFJetMonitor.h:74
TH2F * delta_frac_VS_frac_electron_
Definition: PFJetMonitor.h:75
TH2F * delta_frac_VS_frac_charged_hadron_
Definition: PFJetMonitor.h:76
void setup(DQMStore::IBooker &b)
book histograms
void PFJetMonitor::setup ( DQMStore::IBooker b,
const edm::ParameterSet parameterSet 
)

Definition at line 107 of file PFJetMonitor.cc.

References Benchmark::book1D(), Benchmark::book2D(), candBench_, createPFractionHistos_, delta_frac_VS_frac_charged_hadron_, delta_frac_VS_frac_electron_, delta_frac_VS_frac_muon_, delta_frac_VS_frac_neutral_hadron_, delta_frac_VS_frac_photon_, deltaR_, edm::ParameterSet::getParameter(), histogramBooked_, matchCandBench_, CandidateBenchmark::setup(), and MatchCandidateBenchmark::setup().

107  {
108  candBench_.setup(b, parameterSet);
109  matchCandBench_.setup(b, parameterSet);
110 
111  edm::ParameterSet dR = parameterSet.getParameter<edm::ParameterSet>("DeltaRHistoParameter");
112  if (dR.getParameter<bool>("switchOn")) {
113  deltaR_ = book1D(b,
114  "deltaR_",
115  "#DeltaR;#DeltaR",
116  dR.getParameter<int32_t>("nBin"),
117  dR.getParameter<double>("xMin"),
118  dR.getParameter<double>("xMax"));
119  }
122  book2D(b, "delta_frac_VS_frac_muon_", "#DeltaFraction_Vs_Fraction(muon)", 100, 0.0, 1.0, 100, -1.0, 1.0);
124  book2D(b, "delta_frac_VS_frac_photon_", "#DeltaFraction_Vs_Fraction(photon)", 100, 0.0, 1.0, 100, -1.0, 1.0);
126  b, "delta_frac_VS_frac_electron_", "#DeltaFraction_Vs_Fraction(electron)", 100, 0.0, 1.0, 100, -1.0, 1.0);
128  "delta_frac_VS_frac_charged_hadron_",
129  "#DeltaFraction_Vs_Fraction(charged hadron)",
130  100,
131  0.0,
132  1.0,
133  100,
134  -1.0,
135  1.0);
137  "delta_frac_VS_frac_neutral_hadron_",
138  "#DeltaFraction_Vs_Fraction(neutral hadron)",
139  100,
140  0.0,
141  1.0,
142  100,
143  -1.0,
144  1.0);
145 
146  histogramBooked_ = true;
147  }
148 }
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 through IBooker or plain root
Definition: Benchmark.cc:16
bool histogramBooked_
Definition: PFJetMonitor.h:84
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:70
void setup(DQMStore::IBooker &b)
book histograms
bool createPFractionHistos_
Definition: PFJetMonitor.h:83
TH2F * delta_frac_VS_frac_muon_
Definition: PFJetMonitor.h:73
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:71
TH2F * delta_frac_VS_frac_neutral_hadron_
Definition: PFJetMonitor.h:77
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
Definition: Benchmark.cc:23
TH2F * delta_frac_VS_frac_photon_
Definition: PFJetMonitor.h:74
TH2F * delta_frac_VS_frac_electron_
Definition: PFJetMonitor.h:75
TH1F * deltaR_
Definition: PFJetMonitor.h:79
TH2F * delta_frac_VS_frac_charged_hadron_
Definition: PFJetMonitor.h:76
void setup(DQMStore::IBooker &b)
book histograms

Member Data Documentation

CandidateBenchmark PFJetMonitor::candBench_
protected

Definition at line 70 of file PFJetMonitor.h.

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

bool PFJetMonitor::createPFractionHistos_
protected

Definition at line 83 of file PFJetMonitor.h.

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

TH2F* PFJetMonitor::delta_frac_VS_frac_charged_hadron_
protected

Definition at line 76 of file PFJetMonitor.h.

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

TH2F* PFJetMonitor::delta_frac_VS_frac_electron_
protected

Definition at line 75 of file PFJetMonitor.h.

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

TH2F* PFJetMonitor::delta_frac_VS_frac_muon_
protected

Definition at line 73 of file PFJetMonitor.h.

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

TH2F* PFJetMonitor::delta_frac_VS_frac_neutral_hadron_
protected

Definition at line 77 of file PFJetMonitor.h.

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

TH2F* PFJetMonitor::delta_frac_VS_frac_photon_
protected

Definition at line 74 of file PFJetMonitor.h.

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

TH1F* PFJetMonitor::deltaR_
protected

Definition at line 79 of file PFJetMonitor.h.

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

float PFJetMonitor::dRMax_
protected

Definition at line 80 of file PFJetMonitor.h.

Referenced by fill(), and setParameters().

bool PFJetMonitor::histogramBooked_
protected

Definition at line 84 of file PFJetMonitor.h.

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

MatchCandidateBenchmark PFJetMonitor::matchCandBench_
protected

Definition at line 71 of file PFJetMonitor.h.

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

bool PFJetMonitor::matchCharge_
protected

Definition at line 82 of file PFJetMonitor.h.

Referenced by fill(), and setParameters().

bool PFJetMonitor::onlyTwoJets_
protected

Definition at line 81 of file PFJetMonitor.h.

Referenced by fill(), and setParameters().