1 #include "../interface/Jet.hh"
5 #include "../interface/city.h"
6 #include "boost/format.hpp"
13 uncorrected_energy_(0.),
21 std::cout <<
"--JEC Factors--" << std::endl;
22 UFmap::const_iterator uf_it;
23 for (uf_it = jec_factors_.begin(); uf_it != jec_factors_.end(); ++uf_it) {
24 std::cout << boost::format(
"%-30s %-30s\n") %
25 UnHashJecFactor(uf_it->first) % uf_it->second;
34 UFmap::const_iterator iter = jec_factors_.find(
CityHash64(name));
35 if (iter != jec_factors_.end()) {
38 std::cerr <<
"Warning in <Jet::GetJecFactor>: JEC Factor \"" << name
39 <<
"\" not found" << std::endl;
49 UFmap::const_iterator iter = b_discriminators_.find(
CityHash64(name));
50 if (iter != b_discriminators_.end()) {
53 std::cerr <<
"Warning in <Jet::GetBDiscriminator>: Algorithm \"" << name
54 <<
"\" not found" << std::endl;
59 std::string Jet::UnHashJecFactor(std::size_t jec)
const {
61 static bool is_set =
false;
63 dict[
CityHash64(
"Uncorrected")] =
"Uncorrected";
68 dict[
CityHash64(
"L2L3Residual")] =
"L2L3Residual";
71 TSmap::const_iterator it = dict.find(jec);
72 if (it != dict.end()) {
75 std::cerr <<
"Warning in <Jet>: Unable to unhash \"" << jec
76 <<
"\", returning empty string" << std::endl;
81 std::string Jet::UnHashDiscr(std::size_t dis)
const {
83 static bool is_set =
false;
85 dict[
CityHash64(
"combinedSecondaryVertexBJetTags")] =
86 "combinedSecondaryVertexBJetTags";
87 dict[
CityHash64(
"pfCombinedSecondaryVertexV2BJetTags")] =
88 "pfCombinedSecondaryVertexV2BJetTags";
89 dict[
CityHash64(
"combinedSecondaryVertexMVABJetTags")] =
90 "combinedSecondaryVertexMVABJetTags";
91 dict[
CityHash64(
"jetBProbabilityBJetTags")] =
"jetBProbabilityBJetTags";
92 dict[
CityHash64(
"jetProbabilityBJetTags")] =
"jetProbabilityBJetTags";
93 dict[
CityHash64(
"simpleSecondaryVertexHighEffBJetTags")] =
94 "simpleSecondaryVertexHighEffBJetTags";
95 dict[
CityHash64(
"simpleSecondaryVertexHighPurBJetTags")] =
96 "simpleSecondaryVertexHighPurBJetTags";
97 dict[
CityHash64(
"softMuonBJetTags")] =
"softMuonBJetTags";
98 dict[
CityHash64(
"softMuonByIP3dBJetTags")] =
"softMuonByIP3dBJetTags";
99 dict[
CityHash64(
"softMuonByPtBJetTags")] =
"softMuonByPtBJetTags";
100 dict[
CityHash64(
"trackCountingHighEffBJetTags")] =
101 "trackCountingHighEffBJetTags";
102 dict[
CityHash64(
"trackCountingHighPurBJetTags")] =
103 "trackCountingHighPurBJetTags";
106 TSmap::const_iterator it = dict.find(dis);
107 if (it != dict.end()) {
110 std::cerr <<
"Warning in <Jet>: Unable to unhash \"" << dis
111 <<
"\", returning empty string" << std::endl;
uint64 CityHash64(const char *buf, size_t len)
float GetJecFactor(std::string const &name) const
Returns a specific correction factor if name is defined, otherwise returns zero.
void SetBDiscriminator(std::string const &name, float const &value)
Store a b-tagging discriminator, overwriting any existing value with label name
Stores a four-momentum, charge and identifier, and is the base class for most other physics objects...
void SetJecFactor(std::string const &name, float const &value)
Store a jet energy correction factor, overwriting any existing value with label name ...
virtual void Print() const
virtual void Print() const
float GetBDiscriminator(std::string const &name) const
Returns a specific discriminator value if name is defined, otherwise returns zero.