245 |
|
} |
246 |
|
} |
247 |
|
} |
248 |
+ |
cout << "found highest e jet" << endl; |
249 |
|
|
250 |
|
if (highest_e_jet == 0) { |
251 |
|
cerr << "No fatjets found!" << endl; exit(1); |
253 |
|
|
254 |
|
vector<const reco::Candidate *> particles = |
255 |
|
highest_e_jet->getJetConstituentsQuick(); |
256 |
< |
// cout << "found highest e jet" << endl; |
256 |
> |
cout << "found highest e jet" << endl; |
257 |
|
|
258 |
|
ostringstream oss; |
259 |
|
oss << "eta_phi_energy"<<evt.id().event() << flush; |
260 |
|
TH2D *histo = new TH2D(oss.str().c_str(), oss.str().c_str(), |
261 |
< |
600, |
261 |
> |
30, |
262 |
|
highest_e_jet->eta()-0.5, |
263 |
|
highest_e_jet->eta()+0.5, |
264 |
< |
600, |
264 |
> |
30, |
265 |
|
highest_e_jet->phi()-0.5, |
266 |
|
highest_e_jet->phi()+0.5); |
267 |
|
|
281 |
|
static_cast<double>(histo->GetYaxis()->GetNbins()); |
282 |
|
double Xlo = histo->GetXaxis()->GetXmin(); |
283 |
|
double Ylo = histo->GetYaxis()->GetXmin(); |
284 |
< |
vector< vector<double> > smeared(60, vector<double>(60, 0.0) ); |
284 |
> |
vector< vector<double> > smeared(30, vector<double>(30, 0.0) ); |
285 |
|
switch (smear_coord_) { |
286 |
|
case 1: |
287 |
|
for (int i = 0; i < particles.size(); i++) { |
289 |
|
double x = particles[i]->eta(); |
290 |
|
double y = particles[i]->phi(); |
291 |
|
// loop over bins and add Gaussian in proper angle to smeared |
292 |
< |
for (vector< vector<double> >::size_type i2 = 0; i2 < 60; i2++) { |
293 |
< |
for (vector< double >::size_type j2 = 0; j2 < 60; j2++) { |
292 |
> |
for (vector< vector<double> >::size_type i2 = 0; i2 < 30; i2++) { |
293 |
> |
for (vector< double >::size_type j2 = 0; j2 < 30; j2++) { |
294 |
|
double eta = static_cast<double>((signed int)i2) * XbinSize + |
295 |
|
Xlo; |
296 |
|
double phi0 = static_cast<double>((signed int)j2) * YbinSize + |
332 |
|
double x = particles[i]->eta(); |
333 |
|
double y = particles[i]->phi(); |
334 |
|
// loop over bins and add Gaussian to smeared |
335 |
< |
for (vector< vector<double> >::size_type i2 = 0; i2 < 60; i2++) { |
336 |
< |
for (vector< double >::size_type j2 = 0; j2 < 60; j2++) { |
335 |
> |
for (vector< vector<double> >::size_type i2 = 0; i2 < 30; i2++) { |
336 |
> |
for (vector< double >::size_type j2 = 0; j2 < 30; j2++) { |
337 |
|
double eta = static_cast<double>((signed int)i2) * XbinSize |
338 |
|
+ Xlo; |
339 |
|
double phi0 = static_cast<double>((signed int)j2) * YbinSize + |
362 |
|
} |
363 |
|
} |
364 |
|
// set histogram to match smear vector |
365 |
< |
for (int i = 1; i <= 60; i++) { |
366 |
< |
for (int j = 1; j <= 60; j++) { |
365 |
> |
for (int i = 1; i <= 30; i++) { |
366 |
> |
for (int j = 1; j <= 30; j++) { |
367 |
|
histo->SetBinContent(i, j, smeared[i-1][j-1]); |
368 |
|
} |
369 |
|
} |