|
|
Go to the documentation of this file.
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")),
79 hists_[
"mult"] = fs->
make<TH1F>(
"mult",
"N_{Jet}", 15, 0., 15.);
81 hists_[
"pt"] = fs->
make<TH1F>(
"pt",
"p_{T}(Jet) [GeV]", 60, 0., 300.);
83 hists_[
"eta"] = fs->
make<TH1F>(
"eta",
"#eta (Jet)", 60, -3., 3.);
85 hists_[
"phi"] = fs->
make<TH1F>(
"phi",
"#phi (Jet)", 60, 3.2, 3.2);
87 hists_[
"mass"] = fs->
make<TH1F>(
"mass",
"M_{jj} [GeV]", 50, 0., 500.);
93 sprintf(
title,
"p_{T}^{rec}/p_{T}^{gen} [%i GeV - %i GeV]", (
int)
BINS[
idx], (
int)
BINS[
idx + 1]);
127 if (
jets->size() > 1) {
134 std::cout <<
"[" <<
idx <<
"] :: eta=" << std::setw(10) <<
jet->eta() <<
" phi=" << std::setw(10) <<
jet->phi()
135 <<
" size: " <<
jet->availableJECLevels().size() << std::endl;
136 for (
unsigned int idx = 0;
idx <
jet->availableJECLevels().size(); ++
idx) {
138 if (
jet->availableJECLevels()[
idx].find(
"L5Flavor") != std::string::npos ||
139 jet->availableJECLevels()[
idx].find(
"L7Parton") != std::string::npos) {
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
everything that needs to be done during the even loop
double pt() const final
transverse momentum
PatJetAnalyzer(const edm::ParameterSet &cfg)
default contructor
void print(edm::View< pat::Jet >::const_iterator &jet, unsigned int idx)
Analysis-level calorimeter jet class.
#define DEFINE_FWK_MODULE(type)
std::map< std::string, TH1F * > hists_
management of 1d histograms
bool booked(const std::string histName) const
check if histogram was booked
std::string currentJECLevel() const
return the name of the current step of jet energy corrections
static const unsigned int MAXBIN
Module to analyze pat::Jets in the context of a more complex exercise.
~PatJetAnalyzer() override
default destructor
std::string corrLevel_
correction level for pat jet
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
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
T * make(const Args &... args) const
make new ROOT object
static const float BINS[]