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);
92 for (
size_t i = 0;
i <
pTRes_.size();
i++) {
103 const std::vector<double> &ptBinsPS = ps.
getParameter<std::vector<double> >(
"VariablePtBins");
104 if (ptBinsPS.size() > 1) {
105 ptBins_.reserve(ptBinsPS.size());
106 for (
size_t i = 0;
i < ptBinsPS.size();
i++)
110 ptBins_.reserve(nFixedBins + 1);
111 for (Int_t
i = 0;
i <= nFixedBins;
i++)
128 for (
size_t i = 0;
i <
pTRes_.size();
i++) {
135 if (dptOvptPS.getParameter<
bool>(
"switchOn")) {
137 "delta_et_Over_et_VS_et_",
138 ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}",
141 dptOvptPS.getParameter<int32_t>(
"nBin"),
142 dptOvptPS.getParameter<
double>(
"xMin"),
143 dptOvptPS.getParameter<
double>(
"xMax"));
145 if (dptOvptPS.getParameter<
bool>(
"slicingOn")) {
146 for (
size_t i = 0;
i <
pTRes_.size();
i++) {
149 ";#Deltap_{T}/p_{T};Entries",
150 dptOvptPS.getParameter<int32_t>(
"nBin"),
151 dptOvptPS.getParameter<
double>(
"xMin"),
152 dptOvptPS.getParameter<
double>(
"xMax"));
154 TString::Format(
"BRPt%d_%d", (
int)
ptBins_[i], (
int)
ptBins_[i + 1]),
155 ";#Deltap_{T}/p_{T};Entries",
156 dptOvptPS.getParameter<int32_t>(
"nBin"),
157 dptOvptPS.getParameter<
double>(
"xMin"),
158 dptOvptPS.getParameter<
double>(
"xMax"));
160 TString::Format(
"ERPt%d_%d", (
int)
ptBins_[i], (
int)
ptBins_[i + 1]),
161 ";#Deltap_{T}/p_{T};Entries",
162 dptOvptPS.getParameter<int32_t>(
"nBin"),
163 dptOvptPS.getParameter<
double>(
"xMin"),
164 dptOvptPS.getParameter<
double>(
"xMax"));
167 if (dptOvptPS.getParameter<
bool>(
"BROn")) {
169 "BRdelta_et_Over_et_VS_et_",
170 ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}",
173 dptOvptPS.getParameter<int32_t>(
"nBin"),
174 dptOvptPS.getParameter<
double>(
"xMin"),
175 dptOvptPS.getParameter<
double>(
"xMax"));
177 if (dptOvptPS.getParameter<
bool>(
"EROn")) {
179 "ERdelta_et_Over_et_VS_et_",
180 ";E_{T, true} (GeV);#DeltaE_{T}/E_{T}",
183 dptOvptPS.getParameter<int32_t>(
"nBin"),
184 dptOvptPS.getParameter<
double>(
"xMin"),
185 dptOvptPS.getParameter<
double>(
"xMax"));
188 if (dptPS.getParameter<
bool>(
"switchOn")) {
191 ";E_{T, true} (GeV);#DeltaE_{T}",
194 dptPS.getParameter<int32_t>(
"nBin"),
195 dptPS.getParameter<
double>(
"xMin"),
196 dptPS.getParameter<
double>(
"xMax"));
199 if (detaPS.getParameter<
bool>(
"switchOn")) {
202 ";E_{T, true} (GeV);#Delta#eta",
205 detaPS.getParameter<int32_t>(
"nBin"),
206 detaPS.getParameter<
double>(
"xMin"),
207 detaPS.getParameter<
double>(
"xMax"));
210 if (dphiPS.getParameter<
bool>(
"switchOn")) {
213 ";E_{T, true} (GeV);#Delta#phi",
216 dphiPS.getParameter<int32_t>(
"nBin"),
217 dphiPS.getParameter<
double>(
"xMin"),
218 dphiPS.getParameter<
double>(
"xMax"));
235 if (fabs(cand.
eta()) <= 1.4)
238 if (fabs(cand.
eta()) >= 1.6 && fabs(cand.
eta()) <= 2.4)
281 for (
size_t i = 0;
i <
pTRes_.size();
i++) {
284 pTRes_[
i]->Fill((cand.
pt() - matchedCand.
pt()) / matchedCand.
pt());
bool inEtaRange(double, bool)
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 ...
void fillOne(const reco::Candidate &candidate, const reco::Candidate &matchedCandidate)
fill histograms with a given particle
std::vector< TH1F * > pTRes_
virtual double pt() const =0
transverse momentum
bool inEndcapRange(double value)
void computePtBins(const edm::ParameterSet &, const edm::ParameterSet &)
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_
bool inBarrelRange(double value)
MatchCandidateBenchmark(Mode mode)
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Abs< T >::type abs(const T &t)
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 with DQM or plain root depending if DQM_ has been initialized in a child ...
std::vector< float > ptBins_
T getParameter(std::string const &) const
std::vector< TH1F * > ERpTRes_
bool isInRange(float pt, float eta, float phi) const
~MatchCandidateBenchmark() override
tuple size
Write out results.
virtual double phi() const =0
momentum azimuthal angle
virtual double eta() const =0
momentum pseudorapidity