59 float ptBins[11] = {0, 1, 2, 5, 10, 20, 50, 100, 200, 400, 1000};
64 dptOvptPS.
n, dptOvptPS.
m, dptOvptPS.
M );
68 dptOvptPS.
n, dptOvptPS.
m, dptOvptPS.
M );
71 dptOvptPS.
n, dptOvptPS.
m, dptOvptPS.
M );
75 dptPS.
n, dptPS.
m, dptPS.
M );
79 detaPS.
n, detaPS.
m, detaPS.
M );
83 dphiPS.
n, dphiPS.
m, dphiPS.
M );
119 for (
size_t i = 0;
i <
pTRes_.size();
i++) {
127 std::vector<double> ptBinsPS = parameterSet.
getParameter< std::vector<double> >(
"VariablePtBins" );
130 for (
size_t i = 0;
i <
pTRes_.size();
i++) {
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]);
148 ptBins.reserve(nFixedBins+1);
149 for (Int_t
i = 0;
i <= nFixedBins;
i++)
151 ptBinsPS.resize(nFixedBins);
154 if (dptOvptPS.getParameter<
bool>(
"switchOn")) {
156 ptBinsPS.size()-1, &(ptBins.front()),
157 dptOvptPS.getParameter<int32_t>(
"nBin"),
158 dptOvptPS.getParameter<
double>(
"xMin"),
159 dptOvptPS.getParameter<
double>(
"xMax"));
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"));
177 if (dptOvptPS.getParameter<
bool>(
"BROn")) {
179 ptBinsPS.size()-1, &(ptBins.front()),
180 dptOvptPS.getParameter<int32_t>(
"nBin"),
181 dptOvptPS.getParameter<
double>(
"xMin"),
182 dptOvptPS.getParameter<
double>(
"xMax"));
184 if (dptOvptPS.getParameter<
bool>(
"EROn")) {
186 ptBinsPS.size()-1, &(ptBins.front()),
187 dptOvptPS.getParameter<int32_t>(
"nBin"),
188 dptOvptPS.getParameter<
double>(
"xMin"),
189 dptOvptPS.getParameter<
double>(
"xMax"));
192 if (dptPS.getParameter<
bool>(
"switchOn")) {
194 ptBinsPS.size()-1, &(ptBins.front()),
195 dptPS.getParameter<int32_t>(
"nBin"),
196 dptPS.getParameter<
double>(
"xMin"),
197 dptPS.getParameter<
double>(
"xMax"));
200 if (detaPS.getParameter<
bool>(
"switchOn")) {
202 ptBinsPS.size()-1, &(ptBins.front()),
203 detaPS.getParameter<int32_t>(
"nBin"),
204 detaPS.getParameter<
double>(
"xMin"),
205 detaPS.getParameter<
double>(
"xMax"));
208 if (dphiPS.getParameter<
bool>(
"switchOn")) {
210 ptBinsPS.size()-1, &(ptBins.front()),
211 dphiPS.getParameter<int32_t>(
"nBin"),
212 dphiPS.getParameter<
double>(
"xMin"),
213 dphiPS.getParameter<
double>(
"xMax"));
272 if ( fabs(cand.
eta()) <= 1.4 )
274 if ( fabs(cand.
eta()) >= 1.6 && fabs(cand.
eta()) <= 2.4 )
304 std::vector<double> ptBinsPS = parameterSet.
getParameter< std::vector<double> >(
"VariablePtBins" );
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]);
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) );
318 ptBinsPS.resize(nFixedBins);
322 if (matchedCand.
pt() > ptBins.at(0)) {
348 for (
size_t i = 0;
i <
pTRes_.size();
i++) {
349 if (matchedCand.
pt() >= ptBins.at(
i) && matchedCand.
pt() < ptBins.at(
i+1)) {
virtual ~MatchCandidateBenchmark()
T getParameter(std::string const &) const
void fillOne(const reco::Candidate &candidate, const reco::Candidate &matchedCandidate)
fill histograms with a given particle
virtual float eta() const =0
momentum pseudorapidity
void setup()
book histograms
TH2F * delta_et_Over_et_VS_et_
virtual float phi() const =0
momentum azimuthal angle
TH2F * BRdelta_et_Over_et_VS_et_
LEONARDO add these histos.
std::vector< TH1F * > pTRes_
std::vector< TH1F * > BRpTRes_
virtual float pt() const =0
transverse momentum
MatchCandidateBenchmark(Mode mode)
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.
TH2F * ERdelta_et_Over_et_VS_et_
std::vector< TH1F * > ERpTRes_
bool isInRange(float pt, float eta, float phi) const
tuple size
Write out results.
ParameterSet const & parameterSet(Provenance const &provenance)
TH1F * book1D(const char *histname, const char *title, int nbins, float xmin, float xmax)
book a 1D histogram, either with DQM or plain root.