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 ()
 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 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 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 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 16 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().

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  delta_frac_VS_frac_muon_ = nullptr;
30 
31  deltaR_ = nullptr;
32 
33  createPFractionHistos_ = false;
34  histogramBooked_ = false;
35 }
bool histogramBooked_
Definition: PFJetMonitor.h:72
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:58
bool createPFractionHistos_
Definition: PFJetMonitor.h:71
TH2F * delta_frac_VS_frac_muon_
Definition: PFJetMonitor.h:61
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:59
TH2F * delta_frac_VS_frac_neutral_hadron_
Definition: PFJetMonitor.h:65
Benchmark(Mode mode=DEFAULT)
Definition: Benchmark.h:41
TH2F * delta_frac_VS_frac_photon_
Definition: PFJetMonitor.h:62
TH2F * delta_frac_VS_frac_electron_
Definition: PFJetMonitor.h:63
TH1F * deltaR_
Definition: PFJetMonitor.h:67
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:51
TH2F * delta_frac_VS_frac_charged_hadron_
Definition: PFJetMonitor.h:64
bool matchCharge_
Definition: PFJetMonitor.h:70
PFJetMonitor::~PFJetMonitor ( )
override

Definition at line 41 of file PFJetMonitor.cc.

41 {}

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 78 of file PFJetMonitor.h.

References candBench_, createPFractionHistos_, dRMax_, reco::Candidate::eta(), reco::LeafCandidate::eta(), MatchCandidateBenchmark::fillOne(), CandidateBenchmark::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().

79  {
80 
81 
82  std::vector<int> matchIndices;
83  PFB::match( jetCollection, matchedJetCollection, matchIndices, matchCharge_, dRMax_ );
84 
85  for (unsigned int i = 0; i < (jetCollection).size(); i++) {
86  const reco::Jet& jet = jetCollection[i];
87 
88  if( !isInRange(jet.pt(), jet.eta(), jet.phi() ) ) continue;
89 
90  int iMatch = matchIndices[i];
91  assert(iMatch< static_cast<int>(matchedJetCollection.size()));
92 
93  if( iMatch != -1 ) {
94  const reco::Candidate& matchedJet = matchedJetCollection[ iMatch ];
95  if( !isInRange( matchedJet.pt(), matchedJet.eta(), matchedJet.phi() ) ) continue;
96  float ptRes = (jet.pt() - matchedJet.pt())/matchedJet.pt();
97 
98  if (ptRes > maxVal) maxVal = ptRes;
99  if (ptRes < minVal) minVal = ptRes;
100 
101  candBench_.fillOne(jet);
102  matchCandBench_.fillOne(jet, matchedJetCollection[ iMatch ]);
103  if (createPFractionHistos_ && histogramBooked_) fillOne(jet, matchedJetCollection[ iMatch ]);
104  }
105  }
106 }
size
Write out results.
bool histogramBooked_
Definition: PFJetMonitor.h:72
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:58
void match(const C &candCollection, const M &matchedCandCollection, std::vector< int > &matchIndices, bool matchCharge=false, float dRMax=-1)
Definition: Matchers.h:18
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:71
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:59
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:58
double phi() const final
momentum azimuthal angle
virtual double phi() const =0
momentum azimuthal angle
bool matchCharge_
Definition: PFJetMonitor.h:70
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 110 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().

112  {
113 
114  std::vector<int> matchIndices;
115  PFB::match( jetCollection, matchedJetCollection, matchIndices, matchCharge_, dRMax_ );
116  // now matchIndices[i] stores the j-th closest matched jet
117 
118  for( unsigned i=0; i<jetCollection.size(); ++i) {
119  // Count the number of jets with a larger energy = pT
120  unsigned int highJets = 0;
121  for( unsigned j=0; j<jetCollection.size(); ++j) {
122  if (j != i && jetCollection[j].pt() > jetCollection[i].pt()) highJets++;
123  }
124  if ( onlyTwoJets_ && highJets > 1 ) continue;
125 
126  const reco::Jet& jet = jetCollection[i];
127 
128  if( !isInRange(jet.pt(), jet.eta(), jet.phi() ) ) continue;
129 
130  int iMatch = matchIndices[i];
131  assert( iMatch < static_cast<int>(matchedJetCollection.size()) );
132 
133  if( iMatch != -1 ) {
134  const reco::Candidate& matchedJet = matchedJetCollection[ iMatch ];
135  if ( !isInRange( matchedJet.pt(), matchedJet.eta(), matchedJet.phi() ) ) continue;
136 
137  float ptRes = (jet.pt() - matchedJet.pt()) / matchedJet.pt();
138 
139  jetpT = jet.pt();
140  if (ptRes > maxVal) maxVal = ptRes;
141  if (ptRes < minVal) minVal = ptRes;
142 
143  candBench_.fillOne(jet); // fill pt eta phi and charge histos for MATCHED candidate jet
144  matchCandBench_.fillOne(jet, matchedJetCollection[iMatch], parameterSet); // fill delta_x_VS_y histos for matched couple
145  if (createPFractionHistos_ && histogramBooked_) fillOne(jet, matchedJetCollection[iMatch]); // book and fill delta_frac_VS_frac histos for matched couple
146  }
147 
148  for( unsigned j=0; j<matchedJetCollection.size(); ++j) // for DeltaR spectrum
149  if (deltaR_) deltaR_->Fill( reco::deltaR( jetCollection[i], matchedJetCollection[j] ) ) ;
150  } // end loop on jetCollection
151 }
bool histogramBooked_
Definition: PFJetMonitor.h:72
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:58
void match(const C &candCollection, const M &matchedCandCollection, std::vector< int > &matchIndices, bool matchCharge=false, float dRMax=-1)
Definition: Matchers.h:18
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:71
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:59
bool onlyTwoJets_
Definition: PFJetMonitor.h:69
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:67
bool isInRange(float pt, float eta, float phi) const
Definition: Benchmark.h:58
double phi() const final
momentum azimuthal angle
virtual double phi() const =0
momentum azimuthal angle
bool matchCharge_
Definition: PFJetMonitor.h:70
void PFJetMonitor::fillOne ( const reco::Jet jet,
const reco::Jet matchedJet 
)

Definition at line 162 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().

163  {
164 
165  const reco::PFJet* pfJet = dynamic_cast<const reco::PFJet*>(&jet);
166  const reco::PFJet* pfMatchedJet = dynamic_cast<const reco::PFJet*>(&matchedJet);
167  if (pfJet && pfMatchedJet && createPFractionHistos_) {
168  float del_frac_muon = -99.9;
169  float del_frac_elec = -99.9;
170  float del_frac_phot = -99.9;
171  float del_frac_ch_had = -99.9;
172  float del_frac_neu_had = -99.9;
173 
174  int mult_muon = pfMatchedJet->muonMultiplicity();
175  int mult_elec = pfMatchedJet->electronMultiplicity();
176  int mult_phot = pfMatchedJet->photonMultiplicity();
177  int mult_ch_had = pfMatchedJet->chargedHadronMultiplicity();
178  int mult_neu_had = pfMatchedJet->neutralHadronMultiplicity();
179 
180  if (mult_muon > 0) del_frac_muon = (pfJet->muonMultiplicity() - mult_muon)*1.0/mult_muon;
181  if (mult_elec > 0) del_frac_elec = (pfJet->electronMultiplicity() - mult_elec)*1.0/mult_elec;
182  if (mult_phot > 0) del_frac_phot = (pfJet->photonMultiplicity() - mult_phot)*1.0/mult_phot;
183  if (mult_ch_had > 0) del_frac_ch_had = (pfJet->chargedHadronMultiplicity() - mult_ch_had)*1.0/mult_ch_had;
184  if (mult_neu_had > 0) del_frac_neu_had = (pfJet->neutralHadronMultiplicity() - mult_neu_had)*1.0/mult_neu_had;
185 
186  delta_frac_VS_frac_muon_->Fill(mult_muon, del_frac_muon);
187  delta_frac_VS_frac_electron_->Fill(mult_elec, del_frac_elec);
188  delta_frac_VS_frac_photon_->Fill(mult_phot, del_frac_phot);
189  delta_frac_VS_frac_charged_hadron_->Fill(mult_ch_had, del_frac_ch_had);
190  delta_frac_VS_frac_neutral_hadron_->Fill(mult_neu_had, del_frac_neu_had);
191  }
192 }
int photonMultiplicity() const
photonMultiplicity
Definition: PFJet.h:131
bool createPFractionHistos_
Definition: PFJetMonitor.h:71
TH2F * delta_frac_VS_frac_muon_
Definition: PFJetMonitor.h:61
Jets made from PFObjects.
Definition: PFJet.h:21
TH2F * delta_frac_VS_frac_neutral_hadron_
Definition: PFJetMonitor.h:65
int neutralHadronMultiplicity() const
neutralHadronMultiplicity
Definition: PFJet.h:129
TH2F * delta_frac_VS_frac_photon_
Definition: PFJetMonitor.h:62
TH2F * delta_frac_VS_frac_electron_
Definition: PFJetMonitor.h:63
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:64
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 151 of file PFJetMonitor.cc.

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

151  {
153 
156 }
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:58
virtual void setDirectory(TDirectory *dir)
Definition: Benchmark.cc:18
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:59
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 70 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().

72  {
73  dRMax_ = dRMax;
74  matchCharge_ = matchCharge;
75  mode_ = mode;
76  createPFractionHistos_ = fracHistoFlag;
77 
78  setRange( ptmin, ptmax, etamin, etamax, phimin, phimax );
79 
82 }
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:58
bool createPFractionHistos_
Definition: PFJetMonitor.h:71
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:59
void setParameters(Mode mode)
Definition: Benchmark.h:49
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:51
double ptmin
Definition: HydjetWrapper.h:90
Mode mode_
Definition: Benchmark.h:105
bool matchCharge_
Definition: PFJetMonitor.h:70
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 85 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().

87  {
88  dRMax_ = dRMax;
90  matchCharge_ = matchCharge;
91  mode_ = mode;
92  createPFractionHistos_ = fracHistoFlag;
93 
94  setRange( ptmin, ptmax, etamin, etamax, phimin, phimax );
95 
98 }
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:58
bool onlyTwoJets
bool createPFractionHistos_
Definition: PFJetMonitor.h:71
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:59
bool onlyTwoJets_
Definition: PFJetMonitor.h:69
void setParameters(Mode mode)
Definition: Benchmark.h:49
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:51
double ptmin
Definition: HydjetWrapper.h:90
Mode mode_
Definition: Benchmark.h:105
bool matchCharge_
Definition: PFJetMonitor.h:70
void PFJetMonitor::setParameters ( const edm::ParameterSet parameterSet)

set the parameters accessing them from ParameterSet

Definition at line 47 of file PFJetMonitor.cc.

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

47  {
48 
49  dRMax_ = parameterSet.getParameter<double>( "deltaRMax" );
50  onlyTwoJets_ = parameterSet.getParameter<bool>( "onlyTwoJets" );
51  matchCharge_ = parameterSet.getParameter<bool>( "matchCharge" );
52  mode_ = (Benchmark::Mode) parameterSet.getParameter<int>( "mode" );
53  createPFractionHistos_ = parameterSet.getParameter<bool>( "CreatePFractionHistos" );
54 
55  setRange( parameterSet.getParameter<double>("ptMin"),
56  parameterSet.getParameter<double>("ptMax"),
57  parameterSet.getParameter<double>("etaMin"),
58  parameterSet.getParameter<double>("etaMax"),
59  parameterSet.getParameter<double>("phiMin"),
60  parameterSet.getParameter<double>("phiMax") );
61 
64 }
T getParameter(std::string const &) const
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:58
bool createPFractionHistos_
Definition: PFJetMonitor.h:71
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:59
bool onlyTwoJets_
Definition: PFJetMonitor.h:69
void setParameters(Mode mode)
Definition: Benchmark.h:49
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:51
Mode mode_
Definition: Benchmark.h:105
bool matchCharge_
Definition: PFJetMonitor.h:70
void PFJetMonitor::setup ( DQMStore::IBooker b)

book histograms

Definition at line 130 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().

130  {
131  candBench_.setup(b);
133 
135  delta_frac_VS_frac_muon_ = book2D(b, "delta_frac_VS_frac_muon_", "#DeltaFraction_Vs_Fraction(muon)", 100, 0.0, 1.0, 100, -1.0, 1.0);
136  delta_frac_VS_frac_photon_ = book2D(b, "delta_frac_VS_frac_photon_", "#DeltaFraction_Vs_Fraction(photon)", 100, 0.0, 1.0, 100, -1.0, 1.0);
137  delta_frac_VS_frac_electron_ = book2D(b, "delta_frac_VS_frac_electron_", "#DeltaFraction_Vs_Fraction(electron)", 100, 0.0, 1.0, 100, -1.0, 1.0);
138  delta_frac_VS_frac_charged_hadron_ = book2D(b, "delta_frac_VS_frac_charged_hadron_", "#DeltaFraction_Vs_Fraction(charged hadron)", 100, 0.0, 1.0, 100, -1.0, 1.0);
139  delta_frac_VS_frac_neutral_hadron_ = book2D(b, "delta_frac_VS_frac_neutral_hadron_", "#DeltaFraction_Vs_Fraction(neutral hadron)", 100, 0.0, 1.0, 100, -1.0, 1.0);
140 
141  histogramBooked_ = true;
142  }
143 
144 }
bool histogramBooked_
Definition: PFJetMonitor.h:72
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:58
void setup(DQMStore::IBooker &b)
book histograms
bool createPFractionHistos_
Definition: PFJetMonitor.h:71
TH2F * delta_frac_VS_frac_muon_
Definition: PFJetMonitor.h:61
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:59
TH2F * delta_frac_VS_frac_neutral_hadron_
Definition: PFJetMonitor.h:65
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 ...
Definition: Benchmark.cc:29
TH2F * delta_frac_VS_frac_photon_
Definition: PFJetMonitor.h:62
TH2F * delta_frac_VS_frac_electron_
Definition: PFJetMonitor.h:63
TH2F * delta_frac_VS_frac_charged_hadron_
Definition: PFJetMonitor.h:64
void setup(DQMStore::IBooker &b)
book histograms
void PFJetMonitor::setup ( DQMStore::IBooker b,
const edm::ParameterSet parameterSet 
)

Definition at line 104 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_, PATTauDiscriminationAgainstElectronDeadECAL_cfi::dR, edm::ParameterSet::getParameter(), histogramBooked_, matchCandBench_, CandidateBenchmark::setup(), and MatchCandidateBenchmark::setup().

104  {
105  candBench_.setup(b, parameterSet);
106  matchCandBench_.setup(b, parameterSet);
107 
108  edm::ParameterSet dR = parameterSet.getParameter<edm::ParameterSet>("DeltaRHistoParameter");
109  if ( dR.getParameter<bool>("switchOn") ) {
110  deltaR_ = book1D(b, "deltaR_", "#DeltaR;#DeltaR",
111  dR.getParameter<int32_t>("nBin"),
112  dR.getParameter<double>("xMin"),
113  dR.getParameter<double>("xMax"));
114  }
116  delta_frac_VS_frac_muon_ = book2D(b, "delta_frac_VS_frac_muon_", "#DeltaFraction_Vs_Fraction(muon)", 100, 0.0, 1.0, 100, -1.0, 1.0);
117  delta_frac_VS_frac_photon_ = book2D(b, "delta_frac_VS_frac_photon_", "#DeltaFraction_Vs_Fraction(photon)", 100, 0.0, 1.0, 100, -1.0, 1.0);
118  delta_frac_VS_frac_electron_ = book2D(b, "delta_frac_VS_frac_electron_", "#DeltaFraction_Vs_Fraction(electron)", 100, 0.0, 1.0, 100, -1.0, 1.0);
119  delta_frac_VS_frac_charged_hadron_ = book2D(b, "delta_frac_VS_frac_charged_hadron_", "#DeltaFraction_Vs_Fraction(charged hadron)", 100, 0.0, 1.0, 100, -1.0, 1.0);
120  delta_frac_VS_frac_neutral_hadron_ = book2D(b, "delta_frac_VS_frac_neutral_hadron_", "#DeltaFraction_Vs_Fraction(neutral hadron)", 100, 0.0, 1.0, 100, -1.0, 1.0);
121 
122  histogramBooked_ = true;
123  }
124 }
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
bool histogramBooked_
Definition: PFJetMonitor.h:72
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:58
void setup(DQMStore::IBooker &b)
book histograms
bool createPFractionHistos_
Definition: PFJetMonitor.h:71
TH2F * delta_frac_VS_frac_muon_
Definition: PFJetMonitor.h:61
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:59
TH2F * delta_frac_VS_frac_neutral_hadron_
Definition: PFJetMonitor.h:65
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 ...
Definition: Benchmark.cc:29
TH2F * delta_frac_VS_frac_photon_
Definition: PFJetMonitor.h:62
TH2F * delta_frac_VS_frac_electron_
Definition: PFJetMonitor.h:63
TH1F * deltaR_
Definition: PFJetMonitor.h:67
TH2F * delta_frac_VS_frac_charged_hadron_
Definition: PFJetMonitor.h:64
void setup(DQMStore::IBooker &b)
book histograms

Member Data Documentation

CandidateBenchmark PFJetMonitor::candBench_
protected

Definition at line 58 of file PFJetMonitor.h.

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

bool PFJetMonitor::createPFractionHistos_
protected

Definition at line 71 of file PFJetMonitor.h.

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

TH2F* PFJetMonitor::delta_frac_VS_frac_charged_hadron_
protected

Definition at line 64 of file PFJetMonitor.h.

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

TH2F* PFJetMonitor::delta_frac_VS_frac_electron_
protected

Definition at line 63 of file PFJetMonitor.h.

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

TH2F* PFJetMonitor::delta_frac_VS_frac_muon_
protected

Definition at line 61 of file PFJetMonitor.h.

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

TH2F* PFJetMonitor::delta_frac_VS_frac_neutral_hadron_
protected

Definition at line 65 of file PFJetMonitor.h.

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

TH2F* PFJetMonitor::delta_frac_VS_frac_photon_
protected

Definition at line 62 of file PFJetMonitor.h.

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

TH1F* PFJetMonitor::deltaR_
protected

Definition at line 67 of file PFJetMonitor.h.

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

float PFJetMonitor::dRMax_
protected

Definition at line 68 of file PFJetMonitor.h.

Referenced by fill(), and setParameters().

bool PFJetMonitor::histogramBooked_
protected

Definition at line 72 of file PFJetMonitor.h.

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

MatchCandidateBenchmark PFJetMonitor::matchCandBench_
protected

Definition at line 59 of file PFJetMonitor.h.

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

bool PFJetMonitor::matchCharge_
protected

Definition at line 70 of file PFJetMonitor.h.

Referenced by fill(), and setParameters().

bool PFJetMonitor::onlyTwoJets_
protected

Definition at line 69 of file PFJetMonitor.h.

Referenced by fill(), and setParameters().