61 std::vector<edm::EDGetTokenT<DetIdCollection> >
toks_did_;
70 template <
typename CollectionType>
76 template <
class CollectionType>
79 int severityThreshold)
const {
80 output.reserve(input->size());
81 typename CollectionType::const_iterator
begin = input->begin();
82 typename CollectionType::const_iterator
end = input->end();
83 typename CollectionType::const_iterator
hit =
begin;
85 for (; hit !=
end; ++hit) {
91 const uint32_t& recHitFlag = hit->flags();
97 if (severityLevel > severityThreshold) {
98 output.push_back(*hit);
102 output.push_back(*hit);
130 const unsigned nLabels = interestingDetIdCollections.size();
131 for (
unsigned i = 0;
i != nLabels;
i++)
132 toks_did_.push_back(consumes<DetIdCollection>(interestingDetIdCollections[
i]));
137 produces<HFRecHitCollection>(hfTag.
label());
138 produces<HORecHitCollection>(hoTag.
label());
178 auto hbhe_out = std::make_unique<HBHERecHitCollection>();
179 skim(hbhe, *hbhe_out);
182 auto hf_out = std::make_unique<HFRecHitCollection>();
186 auto ho_out = std::make_unique<HORecHitCollection>();
T getParameter(std::string const &) const
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_iterator end() const
edm::ESHandle< HcalChannelQuality > theHcalChStatus
edm::EDGetTokenT< HORecHitCollection > tok_ho_
const Item * getValues(DetId fId, bool throwOnFail=true) const
std::vector< edm::EDGetTokenT< DetIdCollection > > toks_did_
bool getMergePositionFlag() const
static std::string const input
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
void skim(const edm::Handle< CollectionType > &input, CollectionType &output, int severityThreshold=0) const
void produce(edm::Event &, const edm::EventSetup &) override
const_iterator begin() const
edm::EDGetTokenT< HFRecHitCollection > tok_hf_
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
const HcalTopology * theHcalTopology_
edm::ESHandle< HcalSeverityLevelComputer > theHcalSevLvlComputer
HcalHitSelection(const edm::ParameterSet &)
HcalDetId idFront(const HcalDetId &id) const
uint32_t getValue() const
T const * product() const