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
MatchCandidateBenchmark Class Reference

To plot Candidate quantities. More...

#include <MatchCandidateBenchmark.h>

Inheritance diagram for MatchCandidateBenchmark:
Benchmark

Public Member Functions

void fillOne (const reco::Candidate &candidate, const reco::Candidate &matchedCandidate)
 fill histograms with a given particle More...
 
void fillOne (const reco::Candidate &candidate, const reco::Candidate &matchedCandidate, const edm::ParameterSet &parameterSet)
 
 MatchCandidateBenchmark (Mode mode)
 
void setup ()
 book histograms More...
 
void setup (const edm::ParameterSet &parameterSet)
 book histograms More...
 
virtual ~MatchCandidateBenchmark ()
 
- Public Member Functions inherited from Benchmark
 Benchmark (Mode mode=DEFAULT)
 
bool isInRange (float pt, float eta, float phi) const
 
virtual void setDirectory (TDirectory *dir)
 
void setParameters (Mode mode)
 
void setRange (float ptMin, float ptMax, float etaMin, float etaMax, float phiMin, float phiMax)
 
void write ()
 write to the TFile, in plain ROOT mode. No need to call this function in DQM mode More...
 
virtual ~Benchmark ()
 

Protected Attributes

TH2F * BRdelta_et_Over_et_VS_et_
 LEONARDO add these histos. More...
 
std::vector< TH1F * > BRpTRes_
 
TH2F * delta_et_Over_et_VS_et_
 
TH2F * delta_et_VS_et_
 
TH2F * delta_eta_VS_et_
 
TH2F * delta_phi_VS_et_
 
TH2F * ERdelta_et_Over_et_VS_et_
 
std::vector< TH1F * > ERpTRes_
 
bool histogramBooked_
 
std::vector< TH1F * > pTRes_
 
- 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

To plot Candidate quantities.

Definition at line 13 of file MatchCandidateBenchmark.h.

Constructor & Destructor Documentation

MatchCandidateBenchmark::MatchCandidateBenchmark ( Mode  mode)

Definition at line 18 of file MatchCandidateBenchmark.cc.

References BRdelta_et_Over_et_VS_et_, delta_et_Over_et_VS_et_, delta_et_VS_et_, delta_eta_VS_et_, delta_phi_VS_et_, ERdelta_et_Over_et_VS_et_, and histogramBooked_.

18  : Benchmark(mode) {
19 
21  delta_et_VS_et_ = 0;
22  delta_eta_VS_et_ = 0;
23  delta_phi_VS_et_ = 0;
24 
27  // pTRes are initialzied in the setup since ptBinsPS.size() is needed
28 
29  histogramBooked_ = false;
30 }
TH2F * BRdelta_et_Over_et_VS_et_
LEONARDO add these histos.
Benchmark(Mode mode=DEFAULT)
Definition: Benchmark.h:42
MatchCandidateBenchmark::~MatchCandidateBenchmark ( )
virtual

Definition at line 32 of file MatchCandidateBenchmark.cc.

32 {}

Member Function Documentation

void MatchCandidateBenchmark::fillOne ( const reco::Candidate candidate,
const reco::Candidate matchedCandidate 
)

fill histograms with a given particle

Definition at line 265 of file MatchCandidateBenchmark.cc.

References BRdelta_et_Over_et_VS_et_, delta_et_Over_et_VS_et_, delta_et_VS_et_, delta_eta_VS_et_, delta_phi_VS_et_, ERdelta_et_Over_et_VS_et_, reco::Candidate::eta(), histogramBooked_, Benchmark::isInRange(), reco::Candidate::phi(), and reco::Candidate::pt().

Referenced by PFCandidateMonitor::fill(), PFJetMonitor::fill(), PFCandidateManager::fill(), and PFMETMonitor::fillOne().

266  {
267 
268  if( !isInRange(cand.pt(), cand.eta(), cand.phi() ) ) return;
269 
270  if (histogramBooked_) {
271  if (delta_et_Over_et_VS_et_) delta_et_Over_et_VS_et_->Fill( matchedCand.pt(), (cand.pt() - matchedCand.pt())/matchedCand.pt() );
272  if ( fabs(cand.eta()) <= 1.4 )
273  if (BRdelta_et_Over_et_VS_et_) BRdelta_et_Over_et_VS_et_->Fill( matchedCand.pt(), (cand.pt() - matchedCand.pt())/matchedCand.pt() );
274  if ( fabs(cand.eta()) >= 1.6 && fabs(cand.eta()) <= 2.4 )
275  if (ERdelta_et_Over_et_VS_et_) ERdelta_et_Over_et_VS_et_->Fill( matchedCand.pt(), (cand.pt() - matchedCand.pt())/matchedCand.pt() );
276  if (delta_et_VS_et_) delta_et_VS_et_->Fill( matchedCand.pt(), cand.pt() - matchedCand.pt() );
277  if (delta_eta_VS_et_) delta_eta_VS_et_->Fill( matchedCand.pt(), cand.eta() - matchedCand.eta() );
278  if (delta_phi_VS_et_) delta_phi_VS_et_->Fill( matchedCand.pt(), cand.phi() - matchedCand.phi() );
279  /*
280  // TProfile
281  if (profile_delta_et_Over_et_VS_et_) {
282  profile_delta_et_Over_et_VS_et_->Fill( matchedCand.pt(), (cand.pt() - matchedCand.pt())/matchedCand.pt() );
283  profileRMS_delta_et_Over_et_VS_et_->Fill( matchedCand.pt(), (cand.pt() - matchedCand.pt())/matchedCand.pt() ); }
284  if (profile_delta_et_VS_et_) {
285  profile_delta_et_VS_et_->Fill( matchedCand.pt(), cand.pt() - matchedCand.pt() );
286  profileRMS_delta_et_VS_et_->Fill( matchedCand.pt(), cand.pt() - matchedCand.pt() ); }
287  if (profile_delta_eta_VS_et_) {
288  profile_delta_eta_VS_et_->Fill( matchedCand.pt(), cand.eta() - matchedCand.eta() );
289  profileRMS_delta_eta_VS_et_->Fill( matchedCand.pt(), cand.eta() - matchedCand.eta() ); }
290  if (profile_delta_phi_VS_et_) {
291  profile_delta_phi_VS_et_->Fill( matchedCand.pt(), cand.phi() - matchedCand.phi() );
292  profileRMS_delta_phi_VS_et_->Fill( matchedCand.pt(), cand.phi() - matchedCand.phi() ); }
293  */
294  }
295 }
TH2F * BRdelta_et_Over_et_VS_et_
LEONARDO add these histos.
bool isInRange(float pt, float eta, float phi) const
Definition: Benchmark.h:59
void MatchCandidateBenchmark::fillOne ( const reco::Candidate candidate,
const reco::Candidate matchedCandidate,
const edm::ParameterSet parameterSet 
)

Definition at line 297 of file MatchCandidateBenchmark.cc.

References BRdelta_et_Over_et_VS_et_, BRpTRes_, delta_et_Over_et_VS_et_, delta_et_VS_et_, delta_eta_VS_et_, delta_phi_VS_et_, ERdelta_et_Over_et_VS_et_, ERpTRes_, reco::Candidate::eta(), edm::ParameterSet::getParameter(), histogramBooked_, i, Benchmark::isInRange(), reco::Candidate::phi(), reco::Candidate::pt(), and pTRes_.

299  {
300  if( !isInRange(cand.pt(), cand.eta(), cand.phi() ) ) return;
301 
302  if (histogramBooked_) {
303 
304  std::vector<double> ptBinsPS = parameterSet.getParameter< std::vector<double> >( "VariablePtBins" );
305  edm::ParameterSet ptPS = parameterSet.getParameter<edm::ParameterSet>("PtHistoParameter");
306  std::vector<float> ptBins;
307  if (ptBinsPS.size() > 1) {
308  ptBins.reserve(ptBinsPS.size());
309  for (size_t i = 0; i < ptBinsPS.size(); i++) {
310  ptBins.push_back(ptBinsPS[i]);
311  }
312  } else {
313  Int_t nFixedBins = ptPS.getParameter<int32_t>("nBin");
314  ptBins.reserve(nFixedBins + 1);
315  for (Int_t i = 0; i <= nFixedBins; i++) {
316  ptBins.push_back( ptPS.getParameter<double>("xMin") + i*((ptPS.getParameter<double>("xMax") - ptPS.getParameter<double>("xMin")) / nFixedBins) );
317  }
318  ptBinsPS.resize(nFixedBins);
319  }
320 
321  edm::ParameterSet dptOvptPS = parameterSet.getParameter<edm::ParameterSet>("DeltaPtOvPtHistoParameter");
322  if (matchedCand.pt() > ptBins.at(0)) { // underflow problem
323  if (delta_et_Over_et_VS_et_) delta_et_Over_et_VS_et_->Fill( matchedCand.pt(), (cand.pt() - matchedCand.pt()) / matchedCand.pt() );
324  if ( fabs(cand.eta()) >= dptOvptPS.getParameter<double>("BREtaMin") && fabs(cand.eta()) <= dptOvptPS.getParameter<double>("BREtaMax"))
325  if (BRdelta_et_Over_et_VS_et_) BRdelta_et_Over_et_VS_et_->Fill( matchedCand.pt(), (cand.pt() - matchedCand.pt())/matchedCand.pt() );
326  if ( fabs(cand.eta()) >= dptOvptPS.getParameter<double>("EREtaMin") && fabs(cand.eta()) <= dptOvptPS.getParameter<double>("EREtaMax"))
327  if (ERdelta_et_Over_et_VS_et_) ERdelta_et_Over_et_VS_et_->Fill( matchedCand.pt(), (cand.pt() - matchedCand.pt())/matchedCand.pt() );
328  if (delta_et_VS_et_) delta_et_VS_et_->Fill( matchedCand.pt(), cand.pt() - matchedCand.pt() );
329  if (delta_eta_VS_et_) delta_eta_VS_et_->Fill( matchedCand.pt(), cand.eta() - matchedCand.eta() );
330  if (delta_phi_VS_et_) delta_phi_VS_et_->Fill( matchedCand.pt(), cand.phi() - matchedCand.phi() );
331  }
332  /*
333  // TProfile
334  if (profile_delta_et_Over_et_VS_et_) {
335  profile_delta_et_Over_et_VS_et_->Fill( matchedCand.pt(), (cand.pt() - matchedCand.pt())/matchedCand.pt() );
336  profileRMS_delta_et_Over_et_VS_et_->Fill( matchedCand.pt(), (cand.pt() - matchedCand.pt())/matchedCand.pt() ); }
337  if (profile_delta_et_VS_et_) {
338  profile_delta_et_VS_et_->Fill( matchedCand.pt(), cand.pt() - matchedCand.pt() );
339  profileRMS_delta_et_VS_et_->Fill( matchedCand.pt(), cand.pt() - matchedCand.pt() ); }
340  if (profile_delta_eta_VS_et_) {
341  profile_delta_eta_VS_et_->Fill( matchedCand.pt(), cand.eta() - matchedCand.eta() );
342  profileRMS_delta_eta_VS_et_->Fill( matchedCand.pt(), cand.eta() - matchedCand.eta() ); }
343  if (profile_delta_phi_VS_et_) {
344  profile_delta_phi_VS_et_->Fill( matchedCand.pt(), cand.phi() - matchedCand.phi() );
345  profileRMS_delta_phi_VS_et_->Fill( matchedCand.pt(), cand.phi() - matchedCand.phi() ); }
346  */
347 
348  for (size_t i = 0; i < pTRes_.size(); i++) {
349  if (matchedCand.pt() >= ptBins.at(i) && matchedCand.pt() < ptBins.at(i+1)) {
350  if (pTRes_[i]) pTRes_[i]->Fill( (cand.pt() - matchedCand.pt()) / matchedCand.pt() ) ;
351  if ( fabs(cand.eta()) >= dptOvptPS.getParameter<double>("BREtaMin") && fabs(cand.eta()) <= dptOvptPS.getParameter<double>("BREtaMax"))
352  if (BRpTRes_[i]) BRpTRes_[i]->Fill( (cand.pt() - matchedCand.pt()) / matchedCand.pt() ) ; // Fill Barrel
353  if ( fabs(cand.eta()) >= dptOvptPS.getParameter<double>("EREtaMin") && fabs(cand.eta()) <= dptOvptPS.getParameter<double>("EREtaMax"))
354  if (ERpTRes_[i]) ERpTRes_[i]->Fill( (cand.pt() - matchedCand.pt()) / matchedCand.pt() ) ; // Fill Endcap
355  }
356  }
357  }
358 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
TH2F * BRdelta_et_Over_et_VS_et_
LEONARDO add these histos.
std::vector< TH1F * > pTRes_
std::vector< TH1F * > BRpTRes_
std::vector< TH1F * > ERpTRes_
bool isInRange(float pt, float eta, float phi) const
Definition: Benchmark.h:59
void MatchCandidateBenchmark::setup ( void  )

book histograms

Definition at line 35 of file MatchCandidateBenchmark.cc.

References Benchmark::book2D(), BRdelta_et_Over_et_VS_et_, BRpTRes_, delta_et_Over_et_VS_et_, delta_et_VS_et_, delta_eta_VS_et_, delta_phi_VS_et_, Benchmark::DQMOFFLINE, ERdelta_et_Over_et_VS_et_, ERpTRes_, histogramBooked_, i, Benchmark::PhaseSpace::m, Benchmark::PhaseSpace::M, Benchmark::mode_, Benchmark::PhaseSpace::n, pTRes_, findQualityFiles::size, and Benchmark::VALIDATION.

Referenced by PFMETMonitor::setup(), PFCandidateMonitor::setup(), and PFJetMonitor::setup().

35  {
36  if (!histogramBooked_) {
37  PhaseSpace ptPS;
38  PhaseSpace dptOvptPS;
39  PhaseSpace dptPS;
40  PhaseSpace detaPS;
41  PhaseSpace dphiPS;
42  switch(mode_) {
43  case VALIDATION:
44  ptPS = PhaseSpace(100,0,1000);
45  dptOvptPS = PhaseSpace( 200, -1, 1);
46  dphiPS = PhaseSpace( 200, -1, 1);
47  detaPS = PhaseSpace( 200, -1, 1);
48  dptPS = PhaseSpace( 100, -100, 100);
49  break;
50  case DQMOFFLINE:
51  default:
52  ptPS = PhaseSpace(50,0,100);
53  dptOvptPS = PhaseSpace( 50, -1, 1);
54  dphiPS = PhaseSpace( 50, -1, 1);
55  detaPS = PhaseSpace( 50, -1, 1);
56  dptPS = PhaseSpace( 50, -50, 50);
57  break;
58  }
59  float ptBins[11] = {0, 1, 2, 5, 10, 20, 50, 100, 200, 400, 1000};
60  int size = sizeof(ptBins)/sizeof(*ptBins);
61 
62  delta_et_Over_et_VS_et_ = book2D("delta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}",
63  size, ptBins,
64  dptOvptPS.n, dptOvptPS.m, dptOvptPS.M );
65 
66  BRdelta_et_Over_et_VS_et_ = book2D("BRdelta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}",
67  size, ptBins,
68  dptOvptPS.n, dptOvptPS.m, dptOvptPS.M );
69  ERdelta_et_Over_et_VS_et_ = book2D("ERdelta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}",
70  size, ptBins,
71  dptOvptPS.n, dptOvptPS.m, dptOvptPS.M );
72 
73  delta_et_VS_et_ = book2D("delta_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}",
74  size, ptBins,
75  dptPS.n, dptPS.m, dptPS.M );
76 
77  delta_eta_VS_et_ = book2D("delta_eta_VS_et_", ";#E_{T, true} (GeV);#Delta#eta",
78  size, ptBins,
79  detaPS.n, detaPS.m, detaPS.M );
80 
81  delta_phi_VS_et_ = book2D("delta_phi_VS_et_", ";E_{T, true} (GeV);#Delta#phi",
82  size, ptBins,
83  dphiPS.n, dphiPS.m, dphiPS.M );
84  /*
85  // TProfile
86  profile_delta_et_Over_et_VS_et_ = bookProfile("profile_delta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}",
87  size, ptBins,
88  dptOvptPS.m, dptOvptPS.M, "" );
89 
90  profile_delta_et_VS_et_ = bookProfile("profile_delta_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}",
91  size, ptBins,
92  dptPS.m, dptPS.M, "" );
93 
94  profile_delta_eta_VS_et_ = bookProfile("profile_delta_eta_VS_et_", ";#E_{T, true} (GeV);#Delta#eta",
95  size, ptBins,
96  detaPS.m, detaPS.M, "" );
97 
98  profile_delta_phi_VS_et_ = bookProfile("profile_delta_phi_VS_et_", ";E_{T, true} (GeV);#Delta#phi",
99  size, ptBins,
100  dphiPS.m, dphiPS.M, "" );
101  // TProfile RMS
102  profileRMS_delta_et_Over_et_VS_et_ = bookProfile("profileRMS_delta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}",
103  size, ptBins,
104  dptOvptPS.m, dptOvptPS.M, "s" );
105 
106  profileRMS_delta_et_VS_et_ = bookProfile("profileRMS_delta_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}",
107  size, ptBins,
108  dptPS.m, dptPS.M, "s" );
109 
110  profileRMS_delta_eta_VS_et_ = bookProfile("profileRMS_delta_eta_VS_et_", ";#E_{T, true} (GeV);#Delta#eta",
111  size, ptBins,
112  detaPS.m, detaPS.M, "s" );
113 
114  profileRMS_delta_phi_VS_et_ = bookProfile("profileRMS_delta_phi_VS_et_", ";E_{T, true} (GeV);#Delta#phi",
115  size, ptBins,
116  dphiPS.m, dphiPS.M, "s" );
117  */
118  pTRes_.resize(size); BRpTRes_.resize(size); ERpTRes_.resize(size);
119  for (size_t i = 0; i < pTRes_.size(); i++) {
120  pTRes_[i] = 0; BRpTRes_[i] = 0; ERpTRes_[i] = 0; }
121 
122  histogramBooked_ = true;
123  }
124 }
int i
Definition: DBlmapReader.cc:9
TH2F * BRdelta_et_Over_et_VS_et_
LEONARDO add these histos.
std::vector< TH1F * > pTRes_
std::vector< TH1F * > BRpTRes_
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
std::vector< TH1F * > ERpTRes_
Mode mode_
Definition: Benchmark.h:96
tuple size
Write out results.
void MatchCandidateBenchmark::setup ( const edm::ParameterSet parameterSet)

book histograms

Definition at line 125 of file MatchCandidateBenchmark.cc.

References Benchmark::book1D(), Benchmark::book2D(), BRdelta_et_Over_et_VS_et_, BRpTRes_, delta_et_Over_et_VS_et_, delta_et_VS_et_, delta_eta_VS_et_, delta_phi_VS_et_, ERdelta_et_Over_et_VS_et_, ERpTRes_, edm::ParameterSet::getParameter(), histogramBooked_, i, and pTRes_.

125  {
126 
127  std::vector<double> ptBinsPS = parameterSet.getParameter< std::vector<double> >( "VariablePtBins" );
128  pTRes_.resize(ptBinsPS.size()-1); BRpTRes_.resize(ptBinsPS.size()-1); ERpTRes_.resize(ptBinsPS.size()-1);
129  if (pTRes_.size() > 0)
130  for (size_t i = 0; i < pTRes_.size(); i++) {
131  pTRes_[i] = 0; BRpTRes_[i] = 0; ERpTRes_[i] = 0; }
132 
133  if (!histogramBooked_) {
134 
135  edm::ParameterSet ptPS = parameterSet.getParameter<edm::ParameterSet>("PtHistoParameter");
136  edm::ParameterSet dptPS = parameterSet.getParameter<edm::ParameterSet>("DeltaPtHistoParameter");
137  edm::ParameterSet dptOvptPS = parameterSet.getParameter<edm::ParameterSet>("DeltaPtOvPtHistoParameter");
138  edm::ParameterSet detaPS = parameterSet.getParameter<edm::ParameterSet>("DeltaEtaHistoParameter");
139  edm::ParameterSet dphiPS = parameterSet.getParameter<edm::ParameterSet>("DeltaPhiHistoParameter");
140 
141  std::vector<float> ptBins;
142  if (ptBinsPS.size() > 1) {
143  ptBins.reserve(ptBinsPS.size());
144  for (size_t i = 0; i < ptBinsPS.size(); i++)
145  ptBins.push_back(ptBinsPS[i]);
146  } else {
147  Int_t nFixedBins = ptPS.getParameter<int32_t>("nBin");
148  ptBins.reserve(nFixedBins+1);
149  for (Int_t i = 0; i <= nFixedBins; i++)
150  ptBins.push_back(ptPS.getParameter<double>("xMin") + i*((ptPS.getParameter<double>("xMax") - ptPS.getParameter<double>("xMin")) / nFixedBins)) ;
151  ptBinsPS.resize(nFixedBins);
152  }
153 
154  if (dptOvptPS.getParameter<bool>("switchOn")) {
155  delta_et_Over_et_VS_et_ = book2D("delta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}",
156  ptBinsPS.size()-1, &(ptBins.front()),
157  dptOvptPS.getParameter<int32_t>("nBin"),
158  dptOvptPS.getParameter<double>("xMin"),
159  dptOvptPS.getParameter<double>("xMax"));
160  }
161  if (dptOvptPS.getParameter<bool>("slicingOn")) {
162  for (size_t i = 0; i < pTRes_.size(); i++) {
163  pTRes_[i] = book1D( TString::Format("Pt%d_%d", (int)ptBins[i], (int)ptBins[i+1]), ";#Deltap_{T}/p_{T};Entries",
164  dptOvptPS.getParameter<int32_t>("nBin"),
165  dptOvptPS.getParameter<double>("xMin"),
166  dptOvptPS.getParameter<double>("xMax"));
167  BRpTRes_[i] = book1D( TString::Format("BRPt%d_%d", (int)ptBins[i], (int)ptBins[i+1]), ";#Deltap_{T}/p_{T};Entries",
168  dptOvptPS.getParameter<int32_t>("nBin"),
169  dptOvptPS.getParameter<double>("xMin"),
170  dptOvptPS.getParameter<double>("xMax"));
171  ERpTRes_[i] = book1D( TString::Format("ERPt%d_%d", (int)ptBins[i], (int)ptBins[i+1]), ";#Deltap_{T}/p_{T};Entries",
172  dptOvptPS.getParameter<int32_t>("nBin"),
173  dptOvptPS.getParameter<double>("xMin"),
174  dptOvptPS.getParameter<double>("xMax"));
175  }
176  }
177  if (dptOvptPS.getParameter<bool>("BROn")) {
178  BRdelta_et_Over_et_VS_et_ = book2D("BRdelta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}",
179  ptBinsPS.size()-1, &(ptBins.front()),
180  dptOvptPS.getParameter<int32_t>("nBin"),
181  dptOvptPS.getParameter<double>("xMin"),
182  dptOvptPS.getParameter<double>("xMax"));
183  }
184  if (dptOvptPS.getParameter<bool>("EROn")) {
185  ERdelta_et_Over_et_VS_et_ = book2D("ERdelta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}",
186  ptBinsPS.size()-1, &(ptBins.front()),
187  dptOvptPS.getParameter<int32_t>("nBin"),
188  dptOvptPS.getParameter<double>("xMin"),
189  dptOvptPS.getParameter<double>("xMax"));
190  }
191 
192  if (dptPS.getParameter<bool>("switchOn")) {
193  delta_et_VS_et_ = book2D("delta_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}",
194  ptBinsPS.size()-1, &(ptBins.front()),
195  dptPS.getParameter<int32_t>("nBin"),
196  dptPS.getParameter<double>("xMin"),
197  dptPS.getParameter<double>("xMax"));
198  }
199 
200  if (detaPS.getParameter<bool>("switchOn")) {
201  delta_eta_VS_et_ = book2D("delta_eta_VS_et_", ";E_{T, true} (GeV);#Delta#eta",
202  ptBinsPS.size()-1, &(ptBins.front()),
203  detaPS.getParameter<int32_t>("nBin"),
204  detaPS.getParameter<double>("xMin"),
205  detaPS.getParameter<double>("xMax"));
206  }
207 
208  if (dphiPS.getParameter<bool>("switchOn")) {
209  delta_phi_VS_et_ = book2D("delta_phi_VS_et_", ";E_{T, true} (GeV);#Delta#phi",
210  ptBinsPS.size()-1, &(ptBins.front()),
211  dphiPS.getParameter<int32_t>("nBin"),
212  dphiPS.getParameter<double>("xMin"),
213  dphiPS.getParameter<double>("xMax"));
214  }
215  /*
216  // TProfile
217  if (dptOvptPS.getParameter<bool>("switchOn")) {
218  profile_delta_et_Over_et_VS_et_ = bookProfile("profile_delta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}",
219  ptBinsPS.size()-1, &(ptBins.front()),
220  dptOvptPS.getParameter<double>("xMin"),
221  dptOvptPS.getParameter<double>("xMax"), "" );
222  profileRMS_delta_et_Over_et_VS_et_ = bookProfile("profileRMS_delta_et_Over_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}",
223  ptBinsPS.size()-1, &(ptBins.front()),
224  dptOvptPS.getParameter<double>("xMin"),
225  dptOvptPS.getParameter<double>("xMax"), "s" );
226  }
227 
228  if (dptPS.getParameter<bool>("switchOn")) {
229  profile_delta_et_VS_et_ = bookProfile("profile_delta_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}",
230  ptBinsPS.size()-1, &(ptBins.front()),
231  dptPS.getParameter<double>("xMin"),
232  dptPS.getParameter<double>("xMax"), "" );
233  profileRMS_delta_et_VS_et_ = bookProfile("profileRMS_delta_et_VS_et_", ";E_{T, true} (GeV);#DeltaE_{T}",
234  ptBinsPS.size()-1, &(ptBins.front()),
235  dptPS.getParameter<double>("xMin"),
236  dptPS.getParameter<double>("xMax"), "s" );
237  }
238 
239  if (detaPS.getParameter<bool>("switchOn")) {
240  profile_delta_eta_VS_et_ = bookProfile("profile_delta_eta_VS_et_", ";E_{T, true} (GeV);#Delta#eta",
241  ptBinsPS.size()-1, &(ptBins.front()),
242  detaPS.getParameter<double>("xMin"),
243  detaPS.getParameter<double>("xMax"), "" );
244  profileRMS_delta_eta_VS_et_ = bookProfile("profileRMS_delta_eta_VS_et_", ";E_{T, true} (GeV);#Delta#eta",
245  ptBinsPS.size()-1, &(ptBins.front()),
246  detaPS.getParameter<double>("xMin"),
247  detaPS.getParameter<double>("xMax"), "s" );
248  }
249 
250  if (dphiPS.getParameter<bool>("switchOn")) {
251  profile_delta_phi_VS_et_ = bookProfile("profile_delta_phi_VS_et_", ";E_{T, true} (GeV);#Delta#phi",
252  ptBinsPS.size()-1, &(ptBins.front()),
253  dphiPS.getParameter<double>("xMin"),
254  dphiPS.getParameter<double>("xMax"), "" );
255  profileRMS_delta_phi_VS_et_ = bookProfile("profileRMS_delta_phi_VS_et_", ";E_{T, true} (GeV);#Delta#phi",
256  ptBinsPS.size()-1, &(ptBins.front()),
257  dphiPS.getParameter<double>("xMin"),
258  dphiPS.getParameter<double>("xMax"), "s" );
259  }*/
260 
261  histogramBooked_ = true;
262  }
263 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
TH2F * BRdelta_et_Over_et_VS_et_
LEONARDO add these histos.
std::vector< TH1F * > pTRes_
std::vector< TH1F * > BRpTRes_
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
std::vector< TH1F * > ERpTRes_
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

TH2F* MatchCandidateBenchmark::BRdelta_et_Over_et_VS_et_
protected

LEONARDO add these histos.

Definition at line 42 of file MatchCandidateBenchmark.h.

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

std::vector<TH1F*> MatchCandidateBenchmark::BRpTRes_
protected

Definition at line 45 of file MatchCandidateBenchmark.h.

Referenced by fillOne(), and setup().

TH2F* MatchCandidateBenchmark::delta_et_Over_et_VS_et_
protected

Definition at line 37 of file MatchCandidateBenchmark.h.

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

TH2F* MatchCandidateBenchmark::delta_et_VS_et_
protected

Definition at line 38 of file MatchCandidateBenchmark.h.

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

TH2F* MatchCandidateBenchmark::delta_eta_VS_et_
protected

Definition at line 39 of file MatchCandidateBenchmark.h.

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

TH2F* MatchCandidateBenchmark::delta_phi_VS_et_
protected

Definition at line 40 of file MatchCandidateBenchmark.h.

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

TH2F* MatchCandidateBenchmark::ERdelta_et_Over_et_VS_et_
protected

Definition at line 43 of file MatchCandidateBenchmark.h.

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

std::vector<TH1F*> MatchCandidateBenchmark::ERpTRes_
protected

Definition at line 46 of file MatchCandidateBenchmark.h.

Referenced by fillOne(), and setup().

bool MatchCandidateBenchmark::histogramBooked_
protected

Definition at line 48 of file MatchCandidateBenchmark.h.

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

std::vector<TH1F*> MatchCandidateBenchmark::pTRes_
protected

Definition at line 44 of file MatchCandidateBenchmark.h.

Referenced by fillOne(), and setup().