21 static const unsigned int MAXBIN = 8;
25 static const float BINS[] = {30., 40., 50., 60., 70., 80., 100., 125., 150.};
73 : corrLevel_(
cfg.getParameter<
std::
string>(
"corrLevel")),
80 hists_[
"mult"] =
fs->make<TH1F>(
"mult",
"N_{Jet}", 15, 0., 15.);
82 hists_[
"pt"] =
fs->make<TH1F>(
"pt",
"p_{T}(Jet) [GeV]", 60, 0., 300.);
84 hists_[
"eta"] =
fs->make<TH1F>(
"eta",
"#eta (Jet)", 60, -3., 3.);
86 hists_[
"phi"] =
fs->make<TH1F>(
"phi",
"#phi (Jet)", 60, 3.2, 3.2);
88 hists_[
"mass"] =
fs->make<TH1F>(
"mass",
"M_{jj} [GeV]", 50, 0., 500.);
94 sprintf(
title,
"p_{T}^{rec}/p_{T}^{gen} [%i GeV - %i GeV]", (
int)
BINS[
idx], (
int)
BINS[
idx + 1]);
128 if (
jets->size() > 1) {
135 std::cout <<
"[" <<
idx <<
"] :: eta=" << std::setw(10) <<
jet->eta() <<
" phi=" << std::setw(10) <<
jet->phi()
136 <<
" size: " <<
jet->availableJECLevels().size() << std::endl;
137 for (
unsigned int idx = 0;
idx <
jet->availableJECLevels().size(); ++
idx) {
139 if (
jet->availableJECLevels()[
idx].find(
"L5Flavor") != std::string::npos ||
140 jet->availableJECLevels()[
idx].find(
"L7Parton") != std::string::npos) {
static const std::string kSharedResource
std::string corrLevel_
correction level for pat jet
double pt() const final
transverse momentum
std::string currentJECLevel() const
return the name of the current step of jet energy corrections
PatJetAnalyzer(const edm::ParameterSet &cfg)
default contructor
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
everything that needs to be done during the even loop
void fill(const std::string histName, double value) const
fill histogram if it had been booked before
edm::EDGetTokenT< edm::View< pat::Jet > > jetsToken_
pat jets
static const float BINS[]
#define DEFINE_FWK_MODULE(type)
Analysis-level calorimeter jet class.
Module to analyze pat::Jets in the context of a more complex exercise.
static const unsigned int MAXBIN
std::map< std::string, TH1F * > hists_
management of 1d histograms
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
bool booked(const std::string histName) const
check if histogram was booked
~PatJetAnalyzer() override
default destructor
void print(edm::View< pat::Jet >::const_iterator &jet, unsigned int idx)