CMS 3D CMS Logo

METBenchmark.cc
Go to the documentation of this file.
2 
4 
6 
7 #include <TFile.h>
8 #include <TH1.h>
9 #include <TH2.h>
10 #include <TROOT.h>
11 
12 using namespace std;
13 
15 
17  // std::cout << "FL: METBenchmark.cc: start setup()" << std::endl;
18 
19  PhaseSpace ptPS(100, 0, 200);
20  PhaseSpace pt2PS(100, 0, 7000);
21  PhaseSpace pxPS(100, -100., 100);
22  PhaseSpace phiPS(50, -3.1416, 3.1416);
23  PhaseSpace sumEtPS(100, 0, 3000);
24  PhaseSpace sumEt2PS(100, 0, 7000);
25  PhaseSpace sumEt3PS(50, 0, 200);
26  PhaseSpace etOverSumEtPS(100, 0.0, 1.0);
27 
28  switch (mode_) {
29  case DQMOFFLINE:
30  ptPS = PhaseSpace(200, 0, 200);
31  pxPS = PhaseSpace(200, -100., 100);
32  sumEtPS = PhaseSpace(200, 0, 200);
33  break;
34  default:
35  break;
36  }
37 
38  pt_ = book1D(b, "pt_", "pt_;p_{T} [GeV]", ptPS.n, ptPS.m, ptPS.M);
39  pt2_ = book1D(b, "pt2_", "pt2_;p_{T} [GeV]", pt2PS.n, pt2PS.m, pt2PS.M);
40  px_ = book1D(b, "px_", "px_;p_{X} [GeV]", pxPS.n, pxPS.m, pxPS.M);
41  py_ = book1D(b, "py_", "py_;p_{Y} [GeV]", pxPS.n, pxPS.m, pxPS.M);
42 
43  // might want to increase the number of bins, to match the size of the ECAL
44  // crystals
45  phi_ = book1D(b, "phi_", "phi_;#phi", phiPS.n, phiPS.m, phiPS.M);
46  sumEt_ = book1D(b, "sumEt_", "sumEt_;#SigmaE_{T} [GeV]", sumEtPS.n, sumEtPS.m, sumEtPS.M);
47  sumEt2_ = book1D(b, "sumEt2_", "sumEt2_;#SigmaE_{T} [GeV]", sumEt2PS.n, sumEt2PS.m, sumEt2PS.M);
48  etOverSumEt_ =
49  book1D(b, "etOverSumEt_", "etOverSumEt_;p_{T}/#SigmaE_{T}", etOverSumEtPS.n, etOverSumEtPS.m, etOverSumEtPS.M);
50 
51  mex_VS_sumEt_ = book2D(
52  b, "mex_VS_sumEt_", ";#SigmaE_{T} [GeV];p_{X} [GeV]", sumEt3PS.n, sumEt3PS.m, sumEt3PS.M, pxPS.n, pxPS.m, pxPS.M);
53 }
54 
56  if (!isInRange(cand.pt(), cand.eta(), cand.phi()))
57  return;
58 
59  pt_->Fill(cand.pt());
60  pt2_->Fill(cand.pt());
61  px_->Fill(cand.px());
62  py_->Fill(cand.py());
63  phi_->Fill(cand.phi());
64  sumEt_->Fill(cand.sumEt());
65  sumEt2_->Fill(cand.sumEt());
66  if (cand.sumEt() > 3.0)
67  etOverSumEt_->Fill(cand.pt() / cand.sumEt());
68  mex_VS_sumEt_->Fill(cand.sumEt(), cand.px());
69  mex_VS_sumEt_->Fill(cand.sumEt(), cand.py());
70 }
METBenchmark::~METBenchmark
~METBenchmark() override
Definition: METBenchmark.cc:14
METBenchmark::fillOne
void fillOne(const reco::MET &candidate)
fill histograms with a given particle
Definition: METBenchmark.cc:55
Benchmark::PhaseSpace::n
int n
Definition: Benchmark.h:25
DQMStore.h
Benchmark::PhaseSpace
Definition: Benchmark.h:23
reco::MET
Definition: MET.h:41
b
double b
Definition: hdecay.h:118
cand
Definition: decayParser.h:34
Benchmark::PhaseSpace::M
float M
Definition: Benchmark.h:27
Benchmark::PhaseSpace::m
float m
Definition: Benchmark.h:26
MET.h
std
Definition: JetResolutionObject.h:76
METBenchmark.h
dqm::implementation::IBooker
Definition: DQMStore.h:43
METBenchmark::setup
void setup(DQMStore::IBooker &b)
book histograms
Definition: METBenchmark.cc:16