105 const std::vector<JME::Binning>&
bins =
resolution.getResolutionObject()->getDefinition().getBins();
109 const std::vector<JME::JetResolutionObject::Record> records =
resolution.getResolutionObject()->getRecords();
112 std::vector<float>
etas;
113 for (
const auto&
record : records) {
122 std::vector<float>
res;
123 for (std::size_t
i = 0;
i < 40;
i++) {
124 res.push_back(
i * 0.005);
131 for (
const auto&
jet : *
jets) {
133 std::cout <<
"New jet; pt=" <<
jet.pt() <<
" eta=" <<
jet.eta() <<
" phi=" <<
jet.phi()
134 <<
" e=" <<
jet.energy() <<
" rho=" << *
rho << std::endl;
178 std::cout <<
"Resolution with parameters_1: " <<
r << std::endl;
179 std::cout <<
"Resolution with parameters_2: " <<
resolution.getResolution(parameters_2) << std::endl;
180 std::cout <<
"Resolution with parameters_3: " <<
resolution.getResolution(parameters_3) << std::endl;
181 std::cout <<
"Resolution with parameters_4: " <<
resolution.getResolution(parameters_4) << std::endl;
182 std::cout <<
"Resolution with parameters_5: " <<
resolution.getResolution(parameters_5) << std::endl;
187 std::cout <<
"Resolution using shortcut : " <<
r2 << std::endl;
202 std::cout <<
"Scale factors (Nominal / Up / Down) : " << sf <<
" / " << sf_up <<
" / " << sf_down << std::endl;
static const std::string kSharedResource
std::string m_scale_factors_file
static const JetResolutionScaleFactor get(const edm::EventSetup &, const Token &)
T getParameter(std::string const &) const
JetParameters & setJetEta(float eta)
JetParameters & setRho(float rho)
JetParameters & set(const Binning &bin, float value)
void analyze(const edm::Event &, const edm::EventSetup &) override
T getUntrackedParameter(std::string const &, T const &) const
JME::JetResolution::Token m_resolutions_token
~JetResolutionDemo() override
edm::EDGetTokenT< double > m_rho_token
float getScaleFactor(const JetParameters ¶meters, Variation variation=Variation::NOMINAL, std::string uncertaintySource="") const
JME::JetResolutionScaleFactor::Token m_scale_factors_token
std::string m_resolutions_file
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< std::vector< pat::Jet > > m_jets_token
T * make(const Args &...args) const
make new ROOT object
JetParameters & setJetPt(float pt)
edm::Service< TFileService > fs
JetResolutionDemo(const edm::ParameterSet &)
static const JetResolution get(const edm::EventSetup &, const Token &)