53 std::vector<HcalPhase1FlagLabels::HFStatusFlag>
getNoiseBits()
const;
60 std::vector<HcalPhase1FlagLabels::HFStatusFlag>
noiseBits_;
92 for (
auto const& hfhit : hfHits) {
93 float ene = hfhit.energy();
101 int hitFlags = hfhit.flags();
103 if ((hitFlags >> noiseBit) & 1) {
111 iEvent.
put(std::make_unique<bool>(pass));
113 LogDebug(
"HFNoisyHitsFilter") <<
"Passing filter? " << pass;
118 std::vector<HcalPhase1FlagLabels::HFStatusFlag>
result;
120 if (noise ==
"HFLongShort")
122 else if (noise ==
"HFS8S1Ratio")
124 else if (noise ==
"HFPET")
126 else if (noise ==
"HFSignalAsymmetry")
128 else if (noise ==
"HFAnomalousHit")
131 throw cms::Exception(
"Error") <<
"Couldn't find the bit index associated to this string: " << noise;
141 desc.
add<
double>(
"rechitPtThreshold", 20.);
142 desc.
add<std::vector<std::string>>(
"listOfNoises", {
"HFLongShort",
"HFS8S1Ratio",
"HFPET",
"HFSignalAsymmetry"});
143 desc.
add<
bool>(
"taggingMode",
false);
144 desc.
add<
bool>(
"debug",
false);
145 descriptions.
add(
"hfNoisyHitsFilter", desc);
HFNoisyHitsFilter(const edm::ParameterSet &)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geom_token_
~HFNoisyHitsFilter() override
const edm::EDGetTokenT< HFRecHitCollection > hfhits_token_
const std::vector< std::string > listOfNoises_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::vector< HcalPhase1FlagLabels::HFStatusFlag > noiseBits_
bool getData(T &iHolder) const
const double rechitPtThreshold_
#define DEFINE_FWK_MODULE(type)
bool filter(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
bool get(ProductID const &oid, Handle< PROD > &result) const
std::vector< HcalPhase1FlagLabels::HFStatusFlag > getNoiseBits() const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
et
define resolution functions of each parameter