CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
 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 ()
 book histograms More...
 
void setup (const edm::ParameterSet &parameterSet)
 book histograms More...
 
virtual ~PFJetMonitor ()
 
- 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 ()
 

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 }
 
- Static Public Attributes inherited from Benchmark
static DQMStoreDQM_ = 0
 
- Protected Member Functions inherited from Benchmark
TH1F * book1D (const char *histname, const char *title, int nbins, float xmin, float xmax)
 book a 1D histogram, either with DQM or plain root. More...
 
TH2F * book2D (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. More...
 
TH2F * book2D (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. More...
 
TProfile * bookProfile (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. More...
 
TProfile * bookProfile (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. 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().

15  :
16  Benchmark(mode),
17  candBench_(mode),
19  dRMax_(dRMax),
20  matchCharge_(matchCharge) {
21 
22  setRange( 0.0, 10e10, -10.0, 10.0, -3.14, 3.14);
23 
29 
30  deltaR_ = 0;
31 
32  createPFractionHistos_ = false;
33  histogramBooked_ = false;
34 }
bool histogramBooked_
Definition: PFJetMonitor.h:75
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:61
bool createPFractionHistos_
Definition: PFJetMonitor.h:74
TH2F * delta_frac_VS_frac_muon_
Definition: PFJetMonitor.h:64
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:62
TH2F * delta_frac_VS_frac_neutral_hadron_
Definition: PFJetMonitor.h:68
Benchmark(Mode mode=DEFAULT)
Definition: Benchmark.h:42
TH2F * delta_frac_VS_frac_photon_
Definition: PFJetMonitor.h:65
TH2F * delta_frac_VS_frac_electron_
Definition: PFJetMonitor.h:66
TH1F * deltaR_
Definition: PFJetMonitor.h:70
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:52
TH2F * delta_frac_VS_frac_charged_hadron_
Definition: PFJetMonitor.h:67
bool matchCharge_
Definition: PFJetMonitor.h:73
PFJetMonitor::~PFJetMonitor ( )
virtual

Definition at line 38 of file PFJetMonitor.cc.

38 {}

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

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

82  {
83 
84 
85  std::vector<int> matchIndices;
86  PFB::match( jetCollection, matchedJetCollection, matchIndices, matchCharge_, dRMax_ );
87 
88  for (unsigned int i = 0; i < (jetCollection).size(); i++) {
89  const reco::Jet& jet = jetCollection[i];
90 
91  if( !isInRange(jet.pt(), jet.eta(), jet.phi() ) ) continue;
92 
93  int iMatch = matchIndices[i];
94  assert(iMatch< static_cast<int>(matchedJetCollection.size()));
95 
96  if( iMatch!=-1 ) {
97  const reco::Candidate& matchedJet = matchedJetCollection[ iMatch ];
98  if( !isInRange( matchedJet.pt(), matchedJet.eta(), matchedJet.phi() ) ) continue;
99  float ptRes = (jet.pt() - matchedJet.pt())/matchedJet.pt();
100 
101  if (ptRes > maxVal) maxVal = ptRes;
102  if (ptRes < minVal) minVal = ptRes;
103 
104  candBench_.fillOne(jet);
105  matchCandBench_.fillOne(jet, matchedJetCollection[ iMatch ]);
106  if (createPFractionHistos_ && histogramBooked_) fillOne(jet, matchedJetCollection[ iMatch ]);
107  }
108  }
109 }
int i
Definition: DBlmapReader.cc:9
bool histogramBooked_
Definition: PFJetMonitor.h:75
void fillOne(const reco::Candidate &candidate, const reco::Candidate &matchedCandidate)
fill histograms with a given particle
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:61
void match(const C &candCollection, const M &matchedCandCollection, std::vector< int > &matchIndices, bool matchCharge=false, float dRMax=-1)
Definition: Matchers.h:14
virtual float eta() const =0
momentum pseudorapidity
void fillOne(const reco::Candidate &candidate)
fill histograms with a given particle
Base class for all types of Jets.
Definition: Jet.h:20
virtual float phi() const =0
momentum azimuthal angle
bool createPFractionHistos_
Definition: PFJetMonitor.h:74
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:62
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
virtual float pt() const =0
transverse momentum
void fillOne(const reco::Jet &jet, const reco::Jet &matchedJet)
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
virtual float pt() const GCC11_FINAL
transverse momentum
bool isInRange(float pt, float eta, float phi) const
Definition: Benchmark.h:59
tuple size
Write out results.
bool matchCharge_
Definition: PFJetMonitor.h:73
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 113 of file PFJetMonitor.h.

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

115  {
116 
117  std::vector<int> matchIndices;
118  PFB::match( jetCollection, matchedJetCollection, matchIndices, matchCharge_, dRMax_ );
119  // now matchIndices[i] stores the j-th closest matched jet
120 
121  for( unsigned i=0; i<jetCollection.size(); ++i) {
122  // Count the number of jets with a larger energy = pT
123  unsigned int highJets = 0;
124  for( unsigned j=0; j<jetCollection.size(); ++j) {
125  if (j != i && jetCollection[j].pt() > jetCollection[i].pt()) highJets++;
126  }
127  if ( onlyTwoJets_ && highJets > 1 ) continue;
128 
129  const reco::Jet& jet = jetCollection[i];
130 
131  if( !isInRange(jet.pt(), jet.eta(), jet.phi() ) ) continue;
132 
133  int iMatch = matchIndices[i];
134  assert( iMatch < static_cast<int>(matchedJetCollection.size()) );
135 
136  if( iMatch != -1 ) {
137  const reco::Candidate& matchedJet = matchedJetCollection[ iMatch ];
138  if ( !isInRange( matchedJet.pt(), matchedJet.eta(), matchedJet.phi() ) ) continue;
139 
140  float ptRes = (jet.pt() - matchedJet.pt()) / matchedJet.pt();
141 
142  jetpT = jet.pt();
143  if (ptRes > maxVal) maxVal = ptRes;
144  if (ptRes < minVal) minVal = ptRes;
145 
146  candBench_.fillOne(jet); // fill pt eta phi and charge histos for MATCHED candidate jet
147  matchCandBench_.fillOne(jet, matchedJetCollection[iMatch], parameterSet); // fill delta_x_VS_y histos for matched couple
148  if (createPFractionHistos_ && histogramBooked_) fillOne(jet, matchedJetCollection[iMatch]); // book and fill delta_frac_VS_frac histos for matched couple
149  }
150 
151  for( unsigned j=0; j<matchedJetCollection.size(); ++j) // for DeltaR spectrum
152  if (deltaR_) deltaR_->Fill( reco::deltaR( jetCollection[i], matchedJetCollection[j] ) ) ;
153  } // end loop on jetCollection
154 }
int i
Definition: DBlmapReader.cc:9
bool histogramBooked_
Definition: PFJetMonitor.h:75
void fillOne(const reco::Candidate &candidate, const reco::Candidate &matchedCandidate)
fill histograms with a given particle
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:61
void match(const C &candCollection, const M &matchedCandCollection, std::vector< int > &matchIndices, bool matchCharge=false, float dRMax=-1)
Definition: Matchers.h:14
virtual float eta() const =0
momentum pseudorapidity
void fillOne(const reco::Candidate &candidate)
fill histograms with a given particle
Base class for all types of Jets.
Definition: Jet.h:20
virtual float phi() const =0
momentum azimuthal angle
bool createPFractionHistos_
Definition: PFJetMonitor.h:74
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:62
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
virtual float pt() const =0
transverse momentum
int j
Definition: DBlmapReader.cc:9
bool onlyTwoJets_
Definition: PFJetMonitor.h:72
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
void fillOne(const reco::Jet &jet, const reco::Jet &matchedJet)
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
TH1F * deltaR_
Definition: PFJetMonitor.h:70
virtual float pt() const GCC11_FINAL
transverse momentum
bool isInRange(float pt, float eta, float phi) const
Definition: Benchmark.h:59
bool matchCharge_
Definition: PFJetMonitor.h:73
void PFJetMonitor::fillOne ( const reco::Jet jet,
const reco::Jet matchedJet 
)

Definition at line 148 of file PFJetMonitor.cc.

References reco::PFJet::chargedHadronMultiplicity(), gather_cfg::cout, 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(), pfJet, and reco::PFJet::photonMultiplicity().

Referenced by fill().

149  {
150  std::cout <<"\nfillone Jet histos" <<std::endl;
151 
152  const reco::PFJet* pfJet = dynamic_cast<const reco::PFJet*>(&jet);
153  const reco::PFJet* pfMatchedJet = dynamic_cast<const reco::PFJet*>(&matchedJet);
154  if (pfJet && pfMatchedJet && createPFractionHistos_) {
155  float del_frac_muon = -99.9;
156  float del_frac_elec = -99.9;
157  float del_frac_phot = -99.9;
158  float del_frac_ch_had = -99.9;
159  float del_frac_neu_had = -99.9;
160 
161  int mult_muon = pfMatchedJet->muonMultiplicity();
162  int mult_elec = pfMatchedJet->electronMultiplicity();
163  int mult_phot = pfMatchedJet->photonMultiplicity();
164  int mult_ch_had = pfMatchedJet->chargedHadronMultiplicity();
165  int mult_neu_had = pfMatchedJet->neutralHadronMultiplicity();
166 
167  if (mult_muon > 0) del_frac_muon = (pfJet->muonMultiplicity() - mult_muon)*1.0/mult_muon;
168  if (mult_elec > 0) del_frac_elec = (pfJet->electronMultiplicity() - mult_elec)*1.0/mult_elec;
169  if (mult_phot > 0) del_frac_phot = (pfJet->photonMultiplicity() - mult_phot)*1.0/mult_phot;
170  if (mult_ch_had > 0) del_frac_ch_had = (pfJet->chargedHadronMultiplicity() - mult_ch_had)*1.0/mult_ch_had;
171  if (mult_neu_had > 0) del_frac_neu_had = (pfJet->neutralHadronMultiplicity() - mult_neu_had)*1.0/mult_neu_had;
172 
173  delta_frac_VS_frac_muon_->Fill(mult_muon, del_frac_muon);
174  delta_frac_VS_frac_electron_->Fill(mult_elec, del_frac_elec);
175  delta_frac_VS_frac_photon_->Fill(mult_phot, del_frac_phot);
176  delta_frac_VS_frac_charged_hadron_->Fill(mult_ch_had, del_frac_ch_had);
177  delta_frac_VS_frac_neutral_hadron_->Fill(mult_neu_had, del_frac_neu_had);
178  }
179 }
int photonMultiplicity() const
photonMultiplicity
Definition: PFJet.h:127
bool createPFractionHistos_
Definition: PFJetMonitor.h:74
TH2F * delta_frac_VS_frac_muon_
Definition: PFJetMonitor.h:64
Jets made from PFObjects.
Definition: PFJet.h:21
TH2F * delta_frac_VS_frac_neutral_hadron_
Definition: PFJetMonitor.h:68
int neutralHadronMultiplicity() const
neutralHadronMultiplicity
Definition: PFJet.h:125
TH2F * delta_frac_VS_frac_photon_
Definition: PFJetMonitor.h:65
TH2F * delta_frac_VS_frac_electron_
Definition: PFJetMonitor.h:66
int chargedHadronMultiplicity() const
chargedHadronMultiplicity
Definition: PFJet.h:123
int muonMultiplicity() const
muonMultiplicity
Definition: PFJet.h:131
tuple cout
Definition: gather_cfg.py:121
TH2F * delta_frac_VS_frac_charged_hadron_
Definition: PFJetMonitor.h:67
int electronMultiplicity() const
electronMultiplicity
Definition: PFJet.h:129
void PFJetMonitor::setDirectory ( TDirectory *  dir)
virtual

set directory (to use in ROOT)

Reimplemented from Benchmark.

Definition at line 139 of file PFJetMonitor.cc.

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

139  {
141 
144 }
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:61
virtual void setDirectory(TDirectory *dir)
Definition: Benchmark.cc:19
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:62
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 64 of file PFJetMonitor.cc.

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

Referenced by PFJetDQMAnalyzer::PFJetDQMAnalyzer().

66  {
67  dRMax_ = dRMax;
68  matchCharge_ = matchCharge;
69  mode_ = mode;
70  createPFractionHistos_ = fracHistoFlag;
71 
72  setRange( ptmin, ptmax, etamin, etamax, phimin, phimax );
73 
76 }
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:61
bool createPFractionHistos_
Definition: PFJetMonitor.h:74
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:62
void setParameters(Mode mode)
Definition: Benchmark.h:50
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:52
double ptmin
Definition: HydjetWrapper.h:85
Mode mode_
Definition: Benchmark.h:96
bool matchCharge_
Definition: PFJetMonitor.h:73
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 79 of file PFJetMonitor.cc.

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

81  {
82  dRMax_ = dRMax;
84  matchCharge_ = matchCharge;
85  mode_ = mode;
86  createPFractionHistos_ = fracHistoFlag;
87 
88  setRange( ptmin, ptmax, etamin, etamax, phimin, phimax );
89 
92 }
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:61
bool onlyTwoJets
bool createPFractionHistos_
Definition: PFJetMonitor.h:74
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:62
bool onlyTwoJets_
Definition: PFJetMonitor.h:72
void setParameters(Mode mode)
Definition: Benchmark.h:50
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:52
double ptmin
Definition: HydjetWrapper.h:85
Mode mode_
Definition: Benchmark.h:96
bool matchCharge_
Definition: PFJetMonitor.h:73
void PFJetMonitor::setParameters ( const edm::ParameterSet parameterSet)

set the parameters accessing them from ParameterSet

Definition at line 43 of file PFJetMonitor.cc.

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

43  {
44 
45  dRMax_ = parameterSet.getParameter<double>( "deltaRMax" );
46  onlyTwoJets_ = parameterSet.getParameter<bool>( "onlyTwoJets" );
47  matchCharge_ = parameterSet.getParameter<bool>( "matchCharge" );
48  mode_ = (Benchmark::Mode) parameterSet.getParameter<int>( "mode" );
49  createPFractionHistos_ = parameterSet.getParameter<bool>( "CreatePFractionHistos" );
50 
51  setRange( parameterSet.getParameter<double>("ptMin"),
52  parameterSet.getParameter<double>("ptMax"),
53  parameterSet.getParameter<double>("etaMin"),
54  parameterSet.getParameter<double>("etaMax"),
55  parameterSet.getParameter<double>("phiMin"),
56  parameterSet.getParameter<double>("phiMax") );
57 
60 }
T getParameter(std::string const &) const
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:61
bool createPFractionHistos_
Definition: PFJetMonitor.h:74
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:62
bool onlyTwoJets_
Definition: PFJetMonitor.h:72
void setParameters(Mode mode)
Definition: Benchmark.h:50
void setRange(float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
Definition: Benchmark.h:52
Mode mode_
Definition: Benchmark.h:96
bool matchCharge_
Definition: PFJetMonitor.h:73
void PFJetMonitor::setup ( void  )

book histograms

Definition at line 120 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::beginJob().

120  {
121  candBench_.setup();
123 
125  delta_frac_VS_frac_muon_ = book2D("delta_frac_VS_frac_muon_", "#DeltaFraction_Vs_Fraction(muon)", 100, 0.0, 1.0, 100, -1.0, 1.0);
126  delta_frac_VS_frac_photon_ = book2D("delta_frac_VS_frac_photon_", "#DeltaFraction_Vs_Fraction(photon)", 100, 0.0, 1.0, 100, -1.0, 1.0);
127  delta_frac_VS_frac_electron_ = book2D("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_ = book2D("delta_frac_VS_frac_charged_hadron_", "#DeltaFraction_Vs_Fraction(charged hadron)", 100, 0.0, 1.0, 100, -1.0, 1.0);
129  delta_frac_VS_frac_neutral_hadron_ = book2D("delta_frac_VS_frac_neutral_hadron_", "#DeltaFraction_Vs_Fraction(neutral hadron)", 100, 0.0, 1.0, 100, -1.0, 1.0);
130 
131  histogramBooked_ = true;
132  }
133 
134 }
bool histogramBooked_
Definition: PFJetMonitor.h:75
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:61
void setup()
book histograms
void setup()
book histograms
bool createPFractionHistos_
Definition: PFJetMonitor.h:74
TH2F * delta_frac_VS_frac_muon_
Definition: PFJetMonitor.h:64
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:62
TH2F * delta_frac_VS_frac_neutral_hadron_
Definition: PFJetMonitor.h:68
TH2F * book2D(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.
Definition: Benchmark.cc:43
TH2F * delta_frac_VS_frac_photon_
Definition: PFJetMonitor.h:65
TH2F * delta_frac_VS_frac_electron_
Definition: PFJetMonitor.h:66
TH2F * delta_frac_VS_frac_charged_hadron_
Definition: PFJetMonitor.h:67
void PFJetMonitor::setup ( const edm::ParameterSet parameterSet)

book histograms

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

96  {
97  candBench_.setup(parameterSet);
98  matchCandBench_.setup(parameterSet);
99 
100  edm::ParameterSet dR = parameterSet.getParameter<edm::ParameterSet>("DeltaRHistoParameter");
101  if ( dR.getParameter<bool>("switchOn") )
102  deltaR_ = book1D("deltaR_", "#DeltaR;#DeltaR",
103  dR.getParameter<int32_t>("nBin"),
104  dR.getParameter<double>("xMin"),
105  dR.getParameter<double>("xMax"));
106 
108  delta_frac_VS_frac_muon_ = book2D("delta_frac_VS_frac_muon_", "#DeltaFraction_Vs_Fraction(muon)", 100, 0.0, 1.0, 100, -1.0, 1.0);
109  delta_frac_VS_frac_photon_ = book2D("delta_frac_VS_frac_photon_", "#DeltaFraction_Vs_Fraction(photon)", 100, 0.0, 1.0, 100, -1.0, 1.0);
110  delta_frac_VS_frac_electron_ = book2D("delta_frac_VS_frac_electron_", "#DeltaFraction_Vs_Fraction(electron)", 100, 0.0, 1.0, 100, -1.0, 1.0);
111  delta_frac_VS_frac_charged_hadron_ = book2D("delta_frac_VS_frac_charged_hadron_", "#DeltaFraction_Vs_Fraction(charged hadron)", 100, 0.0, 1.0, 100, -1.0, 1.0);
112  delta_frac_VS_frac_neutral_hadron_ = book2D("delta_frac_VS_frac_neutral_hadron_", "#DeltaFraction_Vs_Fraction(neutral hadron)", 100, 0.0, 1.0, 100, -1.0, 1.0);
113 
114  histogramBooked_ = true;
115  }
116 }
T getParameter(std::string const &) const
bool histogramBooked_
Definition: PFJetMonitor.h:75
CandidateBenchmark candBench_
Definition: PFJetMonitor.h:61
void setup()
book histograms
void setup()
book histograms
bool createPFractionHistos_
Definition: PFJetMonitor.h:74
TH2F * delta_frac_VS_frac_muon_
Definition: PFJetMonitor.h:64
MatchCandidateBenchmark matchCandBench_
Definition: PFJetMonitor.h:62
TH2F * delta_frac_VS_frac_neutral_hadron_
Definition: PFJetMonitor.h:68
TH2F * book2D(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.
Definition: Benchmark.cc:43
TH2F * delta_frac_VS_frac_photon_
Definition: PFJetMonitor.h:65
TH2F * delta_frac_VS_frac_electron_
Definition: PFJetMonitor.h:66
TH1F * deltaR_
Definition: PFJetMonitor.h:70
TH2F * delta_frac_VS_frac_charged_hadron_
Definition: PFJetMonitor.h:67
TH1F * book1D(const char *histname, const char *title, int nbins, float xmin, float xmax)
book a 1D histogram, either with DQM or plain root.
Definition: Benchmark.cc:25

Member Data Documentation

CandidateBenchmark PFJetMonitor::candBench_
protected

Definition at line 61 of file PFJetMonitor.h.

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

bool PFJetMonitor::createPFractionHistos_
protected

Definition at line 74 of file PFJetMonitor.h.

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

TH2F* PFJetMonitor::delta_frac_VS_frac_charged_hadron_
protected

Definition at line 67 of file PFJetMonitor.h.

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

TH2F* PFJetMonitor::delta_frac_VS_frac_electron_
protected

Definition at line 66 of file PFJetMonitor.h.

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

TH2F* PFJetMonitor::delta_frac_VS_frac_muon_
protected

Definition at line 64 of file PFJetMonitor.h.

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

TH2F* PFJetMonitor::delta_frac_VS_frac_neutral_hadron_
protected

Definition at line 68 of file PFJetMonitor.h.

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

TH2F* PFJetMonitor::delta_frac_VS_frac_photon_
protected

Definition at line 65 of file PFJetMonitor.h.

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

TH1F* PFJetMonitor::deltaR_
protected

Definition at line 70 of file PFJetMonitor.h.

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

float PFJetMonitor::dRMax_
protected

Definition at line 71 of file PFJetMonitor.h.

Referenced by fill(), and setParameters().

bool PFJetMonitor::histogramBooked_
protected

Definition at line 75 of file PFJetMonitor.h.

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

MatchCandidateBenchmark PFJetMonitor::matchCandBench_
protected

Definition at line 62 of file PFJetMonitor.h.

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

bool PFJetMonitor::matchCharge_
protected

Definition at line 73 of file PFJetMonitor.h.

Referenced by fill(), and setParameters().

bool PFJetMonitor::onlyTwoJets_
protected

Definition at line 72 of file PFJetMonitor.h.

Referenced by fill(), and setParameters().