61 std::vector<edm::EDGetTokenT<DetIdCollection> >
toks_did_;
70 template <
typename CollectionType>
79 template <
class CollectionType>
82 int severityThreshold)
const {
83 output.reserve(input->size());
84 typename CollectionType::const_iterator
begin = input->begin();
85 typename CollectionType::const_iterator
end = input->end();
86 typename CollectionType::const_iterator
hit =
begin;
88 for (; hit !=
end; ++hit) {
94 const uint32_t& recHitFlag = hit->flags();
100 if (severityLevel > severityThreshold) {
101 output.push_back(*hit);
105 output.push_back(*hit);
122 : hbheTag(iConfig.getParameter<edm::
InputTag>(
"hbheTag")),
123 hoTag(iConfig.getParameter<edm::
InputTag>(
"hoTag")),
124 hfTag(iConfig.getParameter<edm::
InputTag>(
"hfTag")),
125 theHcalTopology_(nullptr),
126 theHcalChStatus(nullptr),
127 theHcalSevLvlComputer(nullptr) {
135 const unsigned nLabels = interestingDetIdCollections.size();
136 for (
unsigned i = 0;
i != nLabels;
i++)
137 toks_did_.push_back(consumes<DetIdCollection>(interestingDetIdCollections[
i]));
146 htopoToken_ = esConsumes<HcalTopology, HcalRecNumberingRecord>();
148 sevToken_ = esConsumes<HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd>();
183 toBeKept.insert(detId->begin(), detId->end());
186 auto hbhe_out = std::make_unique<HBHERecHitCollection>();
187 skim(hbhe, *hbhe_out);
190 auto hf_out = std::make_unique<HFRecHitCollection>();
194 auto ho_out = std::make_unique<HORecHitCollection>();
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::vector< edm::InputTag > interestingDetIdCollections
~HcalHitSelection() override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::set< DetId > toBeKept
const HcalChannelQuality * theHcalChStatus
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< HORecHitCollection > tok_ho_
const Item * getValues(DetId fId, bool throwOnFail=true) const
std::vector< edm::EDGetTokenT< DetIdCollection > > toks_did_
Log< level::Error, false > LogError
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > qualToken_
bool getMergePositionFlag() const
static std::string const input
bool getData(T &iHolder) const
const HcalSeverityLevelComputer * theHcalSevLvlComputer
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
void skim(const edm::Handle< CollectionType > &input, CollectionType &output, int severityThreshold=0) const
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > htopoToken_
void produce(edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< HFRecHitCollection > tok_hf_
T getParameter(std::string const &) const
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
const HcalTopology * theHcalTopology_
HcalHitSelection(const edm::ParameterSet &)
HcalDetId idFront(const HcalDetId &id) const
uint32_t getValue() const
edm::ESGetToken< HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd > sevToken_