12 patJetCorrFactors_(
cfg.getParameter<
std::
string>(
"patJetCorrFactors")),
13 help_(
cfg.getParameter<
bool>(
"help")) {
14 hists_[
"Response"] = fs.
make<TH2F>(
"Response",
"response; #eta;p_{T}(reco)/p_{T}(gen)", 5, -3.3, 3.3, 100, 0.4, 1.6);
22 JetsToken_(iC.consumes<
std::vector<
pat::
Jet> >(Jets_)),
24 patJetCorrFactors_(
cfg.getParameter<
std::
string>(
"patJetCorrFactors")),
25 help_(
cfg.getParameter<
bool>(
"help")) {
26 hists_[
"Response"] = fs.
make<TH2F>(
"Response",
"response; #eta;p_{T}(reco)/p_{T}(gen)", 5, -3.3, 3.3, 100, 0.4, 1.6);
32 TFile*
file =
new TFile(
"myResponse" + TString(
jecLevel_) +
".root",
"RECREATE");
33 TProfile* prof =
hists_[
"Response"]->ProfileX();
49 for (std::vector<Jet>::const_iterator jet_it =
Jets->begin(); jet_it !=
Jets->end(); ++jet_it) {
53 std::cout <<
"\n \n number of available JEC sets: " << jet_it->availableJECSets().size() << std::endl;
54 for (
unsigned int k = 0;
k < jet_it->availableJECSets().size(); ++
k) {
55 std::cout <<
"\n \n available JEC Set: " << jet_it->availableJECSets()[
k] << std::endl;
57 std::cout <<
"\n \n*** You found out which JEC Sets exist! Now correct it in your config file." << std::endl;
58 std::cout <<
"\n \n number of available JEC levels " << jet_it->availableJECLevels().size() << std::endl;
59 for (
unsigned int k = 0;
k < jet_it->availableJECLevels().size(); ++
k) {
62 std::cout <<
"\n \n**** You did it correctly congratulations!!!! And you found out which JEC levels are saved "
63 "within the jets. Correct this in your configuration file."
68 if (jet_it->genParticlesSize() > 0) {
70 jet_it->correctedJet(
jecLevel_).pt() / jet_it->genParticle(0)->pt());
71 std::cout <<
"\n \n**** You did it correctly congratulations!!!! " << std::endl;