74 factor_(iConfig.getParameter<double>(
"revertFactor")),
79 produces<CastorRecHitCollection>();
115 if (!rechits.
isValid())
edm::LogWarning(
"CastorRecHitCorrector") <<
"No valid CastorRecHitCollection found, please check the InputLabel...";
119 auto rec = std::make_unique<CastorRecHitCollection>();
121 for (
unsigned int i=0;
i<rechits->
size();
i++) {
130 correctedenergy *= calibrations.
gain(capid);
137 for (
auto channel : channels) {
138 if (channel.rawId() == detcell.
rawId()) {
140 if (mydigistatus->
getValue() == 2989) {
148 rec->emplace_back(rechit.
id(),correctedenergy,
time);
constexpr float energy() const
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< CastorRecHitCollection > tok_input_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void produce(edm::Event &, const edm::EventSetup &) override
constexpr uint32_t rawId() const
get the raw id
std::vector< DetId > getAllChannels() const
const CastorCalibrations & getCastorCalibrations(const HcalGenericDetId &fId) const
~RecHitCorrector() override
const Item * getValues(DetId fId, bool throwOnFail=true) const
HcalCastorDetId id() const
get the id
RecHitCorrector(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
uint32_t getValue() const
constexpr float time() const
double gain(int fCapId) const
get gain for capid=0..3
T const * product() const