52 float ptBins[11] = {0, 1, 2, 5, 10, 20, 50, 100, 200, 400, 1000};
53 int size =
sizeof(ptBins) /
sizeof(*ptBins);
56 "delta_et_Over_et_VS_et_",
57 ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}",
65 "BRdelta_et_Over_et_VS_et_",
66 ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}",
73 "ERdelta_et_Over_et_VS_et_",
74 ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}",
82 book2D(b,
"delta_et_VS_et_",
";E_{T, true} (GeV);#DeltaE_{T}", size, ptBins, dptPS.
n, dptPS.
m, dptPS.
M);
85 book2D(b,
"delta_eta_VS_et_",
";#E_{T, true} (GeV);#Delta#eta", size, ptBins, detaPS.
n, detaPS.
m, detaPS.
M);
88 book2D(b,
"delta_phi_VS_et_",
";E_{T, true} (GeV);#Delta#phi", size, ptBins, dphiPS.
n, dphiPS.
m, dphiPS.
M);
120 for (
size_t i = 0;
i <
pTRes_.size();
i++) {
131 std::vector<double> ptBinsPS = parameterSet.
getParameter<std::vector<double>>(
"VariablePtBins");
132 pTRes_.resize(ptBinsPS.size() - 1);
133 BRpTRes_.resize(ptBinsPS.size() - 1);
134 ERpTRes_.resize(ptBinsPS.size() - 1);
136 for (
size_t i = 0;
i <
pTRes_.size();
i++) {
149 std::vector<float> ptBins;
150 if (ptBinsPS.size() > 1) {
151 ptBins.reserve(ptBinsPS.size());
152 for (
size_t i = 0;
i < ptBinsPS.size();
i++)
153 ptBins.push_back(ptBinsPS[
i]);
156 ptBins.reserve(nFixedBins + 1);
157 for (Int_t
i = 0;
i <= nFixedBins;
i++)
160 ptBinsPS.resize(nFixedBins);
163 if (dptOvptPS.getParameter<
bool>(
"switchOn")) {
165 "delta_et_Over_et_VS_et_",
166 ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}",
169 dptOvptPS.getParameter<int32_t>(
"nBin"),
170 dptOvptPS.getParameter<
double>(
"xMin"),
171 dptOvptPS.getParameter<
double>(
"xMax"));
173 if (dptOvptPS.getParameter<
bool>(
"slicingOn")) {
174 for (
size_t i = 0;
i <
pTRes_.size();
i++) {
176 TString::Format(
"Pt%d_%d", (
int)ptBins[
i], (
int)ptBins[i + 1]),
177 ";#Deltap_{T}/p_{T};Entries",
178 dptOvptPS.getParameter<int32_t>(
"nBin"),
179 dptOvptPS.getParameter<
double>(
"xMin"),
180 dptOvptPS.getParameter<
double>(
"xMax"));
182 TString::Format(
"BRPt%d_%d", (
int)ptBins[i], (
int)ptBins[i + 1]),
183 ";#Deltap_{T}/p_{T};Entries",
184 dptOvptPS.getParameter<int32_t>(
"nBin"),
185 dptOvptPS.getParameter<
double>(
"xMin"),
186 dptOvptPS.getParameter<
double>(
"xMax"));
188 TString::Format(
"ERPt%d_%d", (
int)ptBins[i], (
int)ptBins[i + 1]),
189 ";#Deltap_{T}/p_{T};Entries",
190 dptOvptPS.getParameter<int32_t>(
"nBin"),
191 dptOvptPS.getParameter<
double>(
"xMin"),
192 dptOvptPS.getParameter<
double>(
"xMax"));
195 if (dptOvptPS.getParameter<
bool>(
"BROn")) {
197 "BRdelta_et_Over_et_VS_et_",
198 ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}",
201 dptOvptPS.getParameter<int32_t>(
"nBin"),
202 dptOvptPS.getParameter<
double>(
"xMin"),
203 dptOvptPS.getParameter<
double>(
"xMax"));
205 if (dptOvptPS.getParameter<
bool>(
"EROn")) {
207 "ERdelta_et_Over_et_VS_et_",
208 ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}",
211 dptOvptPS.getParameter<int32_t>(
"nBin"),
212 dptOvptPS.getParameter<
double>(
"xMin"),
213 dptOvptPS.getParameter<
double>(
"xMax"));
216 if (dptPS.getParameter<
bool>(
"switchOn")) {
219 ";E_{T, true} (GeV);#DeltaE_{T}",
222 dptPS.getParameter<int32_t>(
"nBin"),
223 dptPS.getParameter<
double>(
"xMin"),
224 dptPS.getParameter<
double>(
"xMax"));
227 if (detaPS.getParameter<
bool>(
"switchOn")) {
230 ";E_{T, true} (GeV);#Delta#eta",
233 detaPS.getParameter<int32_t>(
"nBin"),
234 detaPS.getParameter<
double>(
"xMin"),
235 detaPS.getParameter<
double>(
"xMax"));
238 if (dphiPS.getParameter<
bool>(
"switchOn")) {
241 ";E_{T, true} (GeV);#Delta#phi",
244 dphiPS.getParameter<int32_t>(
"nBin"),
245 dphiPS.getParameter<
double>(
"xMin"),
246 dphiPS.getParameter<
double>(
"xMax"));
314 if (fabs(cand.
eta()) <= 1.4)
317 if (fabs(cand.
eta()) >= 1.6 && fabs(cand.
eta()) <= 2.4)
353 std::vector<double> ptBinsPS = parameterSet.
getParameter<std::vector<double>>(
"VariablePtBins");
355 std::vector<float> ptBins;
356 if (ptBinsPS.size() > 1) {
357 ptBins.reserve(ptBinsPS.size());
358 for (
size_t i = 0;
i < ptBinsPS.size();
i++) {
359 ptBins.push_back(ptBinsPS[
i]);
363 ptBins.reserve(nFixedBins + 1);
364 for (Int_t
i = 0;
i <= nFixedBins;
i++) {
365 ptBins.push_back(ptPS.getParameter<
double>(
"xMin") +
366 i * ((ptPS.getParameter<
double>(
"xMax") - ptPS.getParameter<
double>(
"xMin")) / nFixedBins));
368 ptBinsPS.resize(nFixedBins);
372 if (matchedCand.
pt() > ptBins.at(0)) {
408 for (
size_t i = 0;
i <
pTRes_.size();
i++) {
409 if (matchedCand.
pt() >= ptBins.at(
i) && matchedCand.
pt() < ptBins.at(
i + 1)) {
411 pTRes_[
i]->Fill((cand.
pt() - matchedCand.
pt()) / matchedCand.
pt());
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
void fillOne(const reco::Candidate &candidate, const reco::Candidate &matchedCandidate)
fill histograms with a given particle
std::vector< TH1F * > pTRes_
std::vector< TH1F * > BRpTRes_
TH2F * delta_et_Over_et_VS_et_
void setup(DQMStore::IBooker &b)
book histograms
TH2F * BRdelta_et_Over_et_VS_et_
MatchCandidateBenchmark(Mode mode)
TH2F * ERdelta_et_Over_et_VS_et_
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
virtual double eta() const =0
momentum pseudorapidity
virtual double pt() const =0
transverse momentum
std::vector< TH1F * > ERpTRes_
bool isInRange(float pt, float eta, float phi) const
~MatchCandidateBenchmark() override
virtual double phi() const =0
momentum azimuthal angle
ParameterSet const & parameterSet(Provenance const &provenance)