|
|
Go to the documentation of this file.
101 const std::vector<JME::Binning>&
bins =
resolution.getResolutionObject()->getDefinition().getBins();
105 const std::vector<JME::JetResolutionObject::Record> records =
resolution.getResolutionObject()->getRecords();
108 std::vector<float>
etas;
109 for (
const auto&
record : records) {
118 std::vector<float>
res;
119 for (std::size_t
i = 0;
i < 40;
i++) {
120 res.push_back(
i * 0.005);
127 for (
const auto&
jet : *
jets) {
129 std::cout <<
"New jet; pt=" <<
jet.pt() <<
" eta=" <<
jet.eta() <<
" phi=" <<
jet.phi()
130 <<
" e=" <<
jet.energy() <<
" rho=" << *
rho << std::endl;
174 std::cout <<
"Resolution with parameters_1: " <<
r << std::endl;
175 std::cout <<
"Resolution with parameters_2: " <<
resolution.getResolution(parameters_2) << std::endl;
176 std::cout <<
"Resolution with parameters_3: " <<
resolution.getResolution(parameters_3) << std::endl;
177 std::cout <<
"Resolution with parameters_4: " <<
resolution.getResolution(parameters_4) << std::endl;
178 std::cout <<
"Resolution with parameters_5: " <<
resolution.getResolution(parameters_5) << std::endl;
183 std::cout <<
"Resolution using shortcut : " <<
r2 << std::endl;
198 std::cout <<
"Scale factors (Nominal / Up / Down) : " << sf <<
" / " << sf_up <<
" / " << sf_down << std::endl;
JetResolutionDemo(const edm::ParameterSet &)
JetParameters & setJetEta(float eta)
float getScaleFactor(const JetParameters ¶meters, Variation variation=Variation::NOMINAL, std::string uncertaintySource="") const
T getUntrackedParameter(std::string const &, T const &) const
JetParameters & set(const Binning &bin, float value)
void analyze(const edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
JetParameters & setJetPt(float pt)
~JetResolutionDemo() override
edm::EDGetTokenT< double > m_rho_token
JetParameters & setRho(float rho)
std::string m_resolutions_file
edm::EDGetTokenT< std::vector< pat::Jet > > m_jets_token
T getParameter(std::string const &) const
static const JetResolutionScaleFactor get(const edm::EventSetup &, const std::string &)
static const JetResolution get(const edm::EventSetup &, const std::string &)
T * make(const Args &... args) const
make new ROOT object
edm::Service< TFileService > fs
std::string m_scale_factors_file