|
|
Go to the documentation of this file. 1 #ifndef PhysicsTools_SelectorUtils_interface_PFJetIDSelectionFunctor_h
2 #define PhysicsTools_SelectorUtils_interface_PFJetIDSelectionFunctor_h
54 if (versionStr ==
"FIRSTDATA")
56 else if (versionStr ==
"RUNIISTARTUP")
58 else if (versionStr ==
"WINTER16")
60 else if (versionStr ==
"WINTER17")
62 else if (versionStr ==
"WINTER17PUPPI")
64 else if (versionStr ==
"SUMMER18")
66 else if (versionStr ==
"SUMMER18PUPPI")
68 else if (versionStr ==
"RUN2UL16CHS")
70 else if (versionStr ==
"RUN2UL16PUPPI")
72 else if (versionStr ==
"RUN2ULCHS")
74 else if (versionStr ==
"RUN2ULPUPPI")
79 if (qualityStr ==
"LOOSE")
81 else if (qualityStr ==
"TIGHT")
83 else if (qualityStr ==
"TIGHTLEPVETO")
92 set(
"CHF",
params.getParameter<
double>(
"CHF"));
94 set(
"NHF",
params.getParameter<
double>(
"NHF"));
99 set(
"CEF",
params.getParameter<
double>(
"CEF"));
102 set(
"NEF",
params.getParameter<
double>(
"NEF"));
104 set(
"NCH",
params.getParameter<
int>(
"NCH"));
105 if (
params.exists(
"nConstituents"))
106 set(
"nConstituents",
params.getParameter<
int>(
"nConstituents"));
108 if (
params.exists(
"NEF_FW"))
109 set(
"NEF_FW",
params.getParameter<
double>(
"NEF_FW"));
110 if (
params.exists(
"nNeutrals_FW"))
111 set(
"nNeutrals_FW",
params.getParameter<
int>(
"nNeutrals_FW"));
114 if (
params.exists(
"NHF_EC"))
115 set(
"NHF_EC",
params.getParameter<
double>(
"NHF_EC"));
116 if (
params.exists(
"NEF_EC"))
117 set(
"NEF_EC",
params.getParameter<
double>(
"NEF_EC"));
118 if (
params.exists(
"nNeutrals_EC"))
119 set(
"nNeutrals_EC",
params.getParameter<
int>(
"nNeutrals_EC"));
120 if (
params.exists(
"NEF_FW"))
121 set(
"NEF_FW",
params.getParameter<
double>(
"NEF_FW"));
122 if (
params.exists(
"nNeutrals_FW"))
123 set(
"nNeutrals_FW",
params.getParameter<
int>(
"nNeutrals_FW"));
126 set(
"MUF",
params.getParameter<
double>(
"MUF"));
130 if (
params.exists(
"NEF_EC_L"))
131 set(
"NEF_EC_L",
params.getParameter<
double>(
"NEF_EC_L"));
132 if (
params.exists(
"NEF_EC_U"))
133 set(
"NEF_EC_U",
params.getParameter<
double>(
"NEF_EC_U"));
134 if (
params.exists(
"nNeutrals_EC"))
135 set(
"nNeutrals_EC",
params.getParameter<
int>(
"nNeutrals_EC"));
136 if (
params.exists(
"NHF_FW"))
137 set(
"NHF_FW",
params.getParameter<
double>(
"NHF_FW"));
138 if (
params.exists(
"NEF_FW"))
139 set(
"NEF_FW",
params.getParameter<
double>(
"NEF_FW"));
140 if (
params.exists(
"nNeutrals_FW"))
141 set(
"nNeutrals_FW",
params.getParameter<
int>(
"nNeutrals_FW"));
144 set(
"MUF",
params.getParameter<
double>(
"MUF"));
148 if (
params.exists(
"NHF_EC"))
149 set(
"NHF_EC",
params.getParameter<
double>(
"NHF_EC"));
150 if (
params.exists(
"NHF_FW"))
151 set(
"NHF_FW",
params.getParameter<
double>(
"NHF_FW"));
152 if (
params.exists(
"NEF_FW"))
153 set(
"NEF_FW",
params.getParameter<
double>(
"NEF_FW"));
154 if (
params.exists(
"nNeutrals_FW_L"))
155 set(
"nNeutrals_FW_L",
params.getParameter<
int>(
"nNeutrals_FW_L"));
156 if (
params.exists(
"nNeutrals_FW_U"))
157 set(
"nNeutrals_FW_U",
params.getParameter<
int>(
"nNeutrals_FW_U"));
160 set(
"MUF",
params.getParameter<
double>(
"MUF"));
164 if (
params.exists(
"NHF_TR"))
165 set(
"NHF_TR",
params.getParameter<
double>(
"NHF_TR"));
166 if (
params.exists(
"NEF_TR"))
167 set(
"NEF_TR",
params.getParameter<
double>(
"NEF_TR"));
168 if (
params.exists(
"NHF_EC"))
169 set(
"NHF_EC",
params.getParameter<
double>(
"NHF_EC"));
170 if (
params.exists(
"NEF_EC_L"))
171 set(
"NEF_EC_L",
params.getParameter<
double>(
"NEF_EC_L"));
172 if (
params.exists(
"NEF_EC_U"))
173 set(
"NEF_EC_U",
params.getParameter<
double>(
"NEF_EC_U"));
174 if (
params.exists(
"nNeutrals_EC"))
175 set(
"nNeutrals_EC",
params.getParameter<
int>(
"nNeutrals_EC"));
176 if (
params.exists(
"NHF_FW"))
177 set(
"NHF_FW",
params.getParameter<
double>(
"NHF_FW"));
178 if (
params.exists(
"NEF_FW"))
179 set(
"NEF_FW",
params.getParameter<
double>(
"NEF_FW"));
180 if (
params.exists(
"nNeutrals_FW"))
181 set(
"nNeutrals_FW",
params.getParameter<
int>(
"nNeutrals_FW"));
184 set(
"MUF",
params.getParameter<
double>(
"MUF"));
188 if (
params.exists(
"NHF_TR"))
189 set(
"NHF_TR",
params.getParameter<
double>(
"NHF_TR"));
190 if (
params.exists(
"NEF_TR"))
191 set(
"NEF_TR",
params.getParameter<
double>(
"NEF_TR"));
192 if (
params.exists(
"nNeutrals_EC"))
193 set(
"nNeutrals_EC",
params.getParameter<
int>(
"nNeutrals_EC"));
194 if (
params.exists(
"NEF_FW"))
195 set(
"NEF_FW",
params.getParameter<
double>(
"NEF_FW"));
196 if (
params.exists(
"nNeutrals_FW_L"))
197 set(
"nNeutrals_FW_L",
params.getParameter<
int>(
"nNeutrals_FW_L"));
198 if (
params.exists(
"nNeutrals_FW_U"))
199 set(
"nNeutrals_FW_U",
params.getParameter<
int>(
"nNeutrals_FW_U"));
202 set(
"MUF",
params.getParameter<
double>(
"MUF"));
206 if (
params.exists(
"NHF_TR"))
207 set(
"NHF_TR",
params.getParameter<
double>(
"NHF_TR"));
208 if (
params.exists(
"NEF_TR"))
209 set(
"NEF_TR",
params.getParameter<
double>(
"NEF_TR"));
210 if (
params.exists(
"NCH_TR"))
211 set(
"NCH_TR",
params.getParameter<
int>(
"NCH_TR"));
212 if (
params.exists(
"NEF_EC_L"))
213 set(
"NEF_EC_L",
params.getParameter<
double>(
"NEF_EC_L"));
214 if (
params.exists(
"NEF_EC_U"))
215 set(
"NEF_EC_U",
params.getParameter<
double>(
"NEF_EC_U"));
216 if (
params.exists(
"nNeutrals_EC"))
217 set(
"nNeutrals_EC",
params.getParameter<
int>(
"nNeutrals_EC"));
218 if (
params.exists(
"NHF_FW"))
219 set(
"NHF_FW",
params.getParameter<
double>(
"NHF_FW"));
220 if (
params.exists(
"NEF_FW"))
221 set(
"NEF_FW",
params.getParameter<
double>(
"NEF_FW"));
222 if (
params.exists(
"nNeutrals_FW"))
223 set(
"nNeutrals_FW",
params.getParameter<
int>(
"nNeutrals_FW"));
226 set(
"MUF",
params.getParameter<
double>(
"MUF"));
227 if (
params.exists(
"MUF_TR"))
228 set(
"MUF_TR",
params.getParameter<
double>(
"MUF_TR"));
229 if (
params.exists(
"CEF_TR"))
230 set(
"CEF_TR",
params.getParameter<
double>(
"CEF_TR"));
234 if (
params.exists(
"NHF_TR"))
235 set(
"NHF_TR",
params.getParameter<
double>(
"NHF_TR"));
236 if (
params.exists(
"NEF_TR"))
237 set(
"NEF_TR",
params.getParameter<
double>(
"NEF_TR"));
238 if (
params.exists(
"NHF_EC"))
239 set(
"NHF_EC",
params.getParameter<
double>(
"NHF_EC"));
240 if (
params.exists(
"NHF_FW"))
241 set(
"NHF_FW",
params.getParameter<
double>(
"NHF_FW"));
242 if (
params.exists(
"NEF_FW"))
243 set(
"NEF_FW",
params.getParameter<
double>(
"NEF_FW"));
244 if (
params.exists(
"nNeutrals_FW_L"))
245 set(
"nNeutrals_FW_L",
params.getParameter<
int>(
"nNeutrals_FW_L"));
246 if (
params.exists(
"nNeutrals_FW_U"))
247 set(
"nNeutrals_FW_U",
params.getParameter<
int>(
"nNeutrals_FW_U"));
250 set(
"MUF",
params.getParameter<
double>(
"MUF"));
251 if (
params.exists(
"MUF_TR"))
252 set(
"MUF_TR",
params.getParameter<
double>(
"MUF_TR"));
253 if (
params.exists(
"CEF_TR"))
254 set(
"CEF_TR",
params.getParameter<
double>(
"CEF_TR"));
258 if (
params.exists(
"cutsToIgnore"))
276 if (
jet.currentJECLevel() ==
"Uncorrected" || !
jet.jecSetsAvailable())
321 int nconstituents = 0;
325 reco::PFJet const *pfJet = dynamic_cast<reco::PFJet const *>(&
jet);
326 pat::Jet const *patJet = dynamic_cast<pat::Jet const *>(&
jet);
329 if (patJet !=
nullptr) {
354 reco::PFJet const *pfsub = dynamic_cast<reco::PFJet const *>(&*isub);
355 pat::Jet const *patsub = dynamic_cast<pat::Jet const *>(&*isub);
385 chf = nhf = cef = nef = muf = 0.0;
389 else if (pfJet !=
nullptr) {
394 if (jetEnergyUncorrected > 0.) {
399 muf = pfJet->
muonEnergy() / jetEnergyUncorrected;
407 else if (basicJet !=
nullptr) {
417 reco::PFJet const *pfsub = dynamic_cast<reco::PFJet const *>(&*isub);
864 <<
"The LOOSE operating point is only supported for the WINTER16 JetID version -- defaulting to TIGHT";
875 set(
"nConstituents", 1);
878 set(
"nNeutrals_FW", 10);
882 set(
"nNeutrals_EC", 2);
884 set(
"nNeutrals_FW", 10);
894 set(
"nConstituents", 1);
897 set(
"nNeutrals_FW", 10);
901 set(
"nNeutrals_EC", 2);
903 set(
"nNeutrals_FW", 10);
905 set(
"NEF_EC_L", 0.02);
906 set(
"NEF_EC_U", 0.99);
907 set(
"nNeutrals_EC", 2);
910 set(
"nNeutrals_FW", 10);
915 set(
"nNeutrals_FW_L", 2);
916 set(
"nNeutrals_FW_U", 15);
921 set(
"NEF_EC_L", 0.02);
922 set(
"NEF_EC_U", 0.99);
923 set(
"nNeutrals_EC", 2);
926 set(
"nNeutrals_FW", 10);
933 set(
"nNeutrals_FW_L", 2);
934 set(
"nNeutrals_FW_U", 15);
940 set(
"NEF_EC_U", 0.99);
941 set(
"nNeutrals_EC", 1);
944 set(
"nNeutrals_FW", 10);
948 set(
"nNeutrals_EC", 1);
950 set(
"nNeutrals_FW_L", 2);
951 set(
"nNeutrals_FW_U", 999999);
956 set(
"NEF_EC_L", 0.01);
957 set(
"NEF_EC_U", 0.99);
958 set(
"nNeutrals_EC", 2);
961 set(
"nNeutrals_FW", 10);
965 set(
"NHF_EC", 0.9999);
968 set(
"nNeutrals_FW_L", 2);
969 set(
"nNeutrals_FW_U", 999999);
976 set(
"nConstituents", 1);
979 set(
"NEF_EC_L", 0.02);
980 set(
"NEF_EC_U", 0.99);
981 set(
"nNeutrals_EC", 2);
984 set(
"nNeutrals_FW", 10);
991 set(
"nNeutrals_FW_L", 2);
992 set(
"nNeutrals_FW_U", 15);
998 set(
"nNeutrals_EC", 2);
999 set(
"nNeutrals_FW", 10);
1000 set(
"NEF_FW", 0.90);
1004 set(
"NHF_EC", 0.99);
1005 set(
"NHF_FW", 0.02);
1006 set(
"NEF_FW", 0.90);
1007 set(
"nNeutrals_FW_L", 2);
1008 set(
"nNeutrals_FW_U", 15);
1012 set(
"NEF_EC", 0.01);
1013 set(
"NHF_EC", 0.98);
1014 set(
"nNeutrals_EC", 2);
1015 set(
"nNeutrals_FW", 10);
1016 set(
"NEF_FW", 0.90);
1022 set(
"NEF_TR", 0.99);
1026 set(
"NEF_EC_L", 0.02);
1027 set(
"NEF_EC_U", 0.99);
1028 set(
"nNeutrals_EC", 2);
1030 set(
"NEF_FW", 0.90);
1031 set(
"nNeutrals_FW", 10);
1036 set(
"NEF_TR", 0.99);
1039 set(
"NHF_EC", 0.99);
1040 set(
"NHF_FW", 0.02);
1041 set(
"NEF_FW", 0.90);
1042 set(
"nNeutrals_FW_L", 2);
1043 set(
"nNeutrals_FW_U", 15);
1048 set(
"NEF_TR", 0.99);
1050 set(
"NEF_EC_L", 0.);
1051 set(
"NEF_EC_U", 0.99);
1052 set(
"nNeutrals_EC", 1);
1054 set(
"NEF_FW", 0.90);
1055 set(
"nNeutrals_FW", 10);
1059 set(
"NHF_TR", 0.98);
1060 set(
"NEF_TR", 0.99);
1061 set(
"nNeutrals_EC", 1);
1062 set(
"NEF_FW", 0.90);
1063 set(
"nNeutrals_FW_L", 2);
1064 set(
"nNeutrals_FW_U", 999999);
1069 set(
"NEF_TR", 0.99);
1073 set(
"NEF_EC_L", 0.01);
1074 set(
"NEF_EC_U", 0.99);
1075 set(
"nNeutrals_EC", 2);
1077 set(
"NEF_FW", 0.90);
1078 set(
"nNeutrals_FW", 10);
1083 set(
"NEF_TR", 0.99);
1086 set(
"NHF_EC", 0.9999);
1087 set(
"NHF_FW", -1.0);
1088 set(
"NEF_FW", 0.90);
1089 set(
"nNeutrals_FW_L", 2);
1090 set(
"nNeutrals_FW_U", 999999);
ret
prodAgent to be discontinued
float muonEnergy() const
muonEnergy
void setIgnored(pat::strbitset &ret)
set ignored bits
Functor that operates on <T>
pat::strbitset bits_
the bitset indexed by strings
Base class for all types of Jets.
index_type indexNEF_EC_L_
pat::strbitset::index_type index_type
index_type indexNNeutrals_EC_
bool firstDataCuts(reco::Jet const &jet, pat::strbitset &ret, Version_t version_)
strbitset & set(bool val=true)
set method of all bits
pat::strbitset retInternal_
internal ret if users don't care about return bits
bool ignoreCut(std::string const &s) const
ignore the cut at index "s"
bool operator()(const reco::PFJet &jet, pat::strbitset &ret)
float neutralHadronEnergyFraction() const
neutralHadronEnergyFraction (relative to uncorrected jet energy)
index_type indexNConstituents_
PFJetIDSelectionFunctor(edm::ParameterSet const ¶ms, edm::ConsumesCollector &iC)
Log< level::Warning, false > LogWarning
PF Jet selector for pat::Jets.
PFJetIDSelectionFunctor(edm::ParameterSet const ¶ms)
const uint32_t *__restrict__ Quality * quality
float chargedHadronEnergy() const
chargedHadronEnergy
Jets made from CaloTowers.
Analysis-level calorimeter jet class.
float HFEMEnergy() const
HFEMEnergy.
PFJetIDSelectionFunctor(Version_t version, Quality_t quality)
float chargedHadronEnergy() const
chargedHadronEnergy
virtual void push_back(std::string const &s)
This is the registration of an individual cut string.
int chargedMultiplicity() const
chargedMultiplicity
float neutralEmEnergy() const
neutralEmEnergy
float chargedEmEnergy() const
chargedEmEnergy
index_type indexNNeutrals_FW_
int chargedMultiplicity() const
chargedMultiplicity
float neutralHadronEnergy() const
neutralHadronEnergy
bool operator()(const reco::PFJet &jet)
float photonEnergy() const
photonEnergy
pat::strbitset getBitTemplate() const
Get an empty bitset with the proper names.
float chargedEmEnergy() const
chargedEmEnergy
const_iterator end() const
last daughter const_iterator
float neutralEmEnergyFraction() const
neutralEmEnergyFraction (relative to uncorrected jet energy)
void passCut(pat::strbitset &ret, std::string const &s)
Passing cuts.
bool isBasicJet() const
check to see if the jet is no more than a reco::BasicJet
int neutralMultiplicity() const
neutralMultiplicity
index_type indexNEF_EC_U_
bool operator()(const pat::Jet &jet, pat::strbitset &ret) override
This provides the interface for base classes to select objects.
index_type indexNNeutrals_FW_L_
void setIgnoredCuts(std::vector< std::string > const &bitsToIgnore)
set the bits to ignore from a vector
bool isPFJet() const
check to see if the jet is a reco::PFJet
float chargedEmEnergyFraction() const
chargedEmEnergyFraction (relative to uncorrected jet energy)
float muonEnergy() const
muonEnergy
float chargedHadronEnergyFraction() const
chargedHadronEnergyFraction (relative to uncorrected jet energy)
int cut(index_type const &i, int val) const
Access the int cut values at index "s".
float neutralHadronEnergy() const
neutralHadronEnergy
float muonEnergyFraction() const
muonEnergyFraction (relative to corrected jet energy)
int neutralMultiplicity() const
neutralMultiplicity
PFJetIDSelectionFunctor()
Jets made from PFObjects.
float neutralEmEnergy() const
neutralEmEnergy
double energy() const final
energy
void set(std::string const &s, bool val=true)
Set a given selection cut, on or off.
index_type indexNNeutrals_FW_U_
Abs< T >::type abs(const T &t)
const_iterator begin() const
first daughter const_iterator
float electronEnergy() const
electronEnergy