26 : reco_(conf.getParameter<
int>(
"firstSample"),
27 conf.getParameter<
int>(
"samplesToAdd"),
28 conf.getParameter<
bool>(
"correctForTimeslew"),
29 conf.getParameter<
bool>(
"correctForPhaseContainment"),
30 conf.getParameter<double>(
"correctionPhaseNS")),
32 firstSample_(conf.getParameter<
int>(
"firstSample")),
33 samplesToAdd_(conf.getParameter<
int>(
"samplesToAdd")),
34 maxADCvalue_(conf.getParameter<
int>(
"maxADCvalue")),
35 tsFromDB_(conf.getParameter<
bool>(
"tsFromDB")),
36 setSaturationFlag_(conf.getParameter<
bool>(
"setSaturationFlag")),
37 doSaturationCorr_(conf.getParameter<
bool>(
"doSaturationCorr")) {
41 if (!strcasecmp(subd.c_str(),
"CASTOR")) {
44 produces<CastorRecHitCollection>();
47 <<
"CastorSimpleReconstructor is not associated with CASTOR subdetector!" << std::endl;
68 <<
"Could not handle the CastorRecoParamsRcd correctly, using parameters from cfg file from this event " 69 "onwards... These parameters could be wrong for this run... please check" 80 edm::LogWarning(
"CastorSimpleReconstructor") <<
"Could not handle the CastorSaturationCorrsRcd correctly. We'll " 81 "not try the saturation correction from this event onwards..." 91 auto rec = std::make_unique<CastorRecHitCollection>();
94 for (i = digi->
begin(); i != digi->
end(); i++) {
117 double satCorrConst = 1.;
118 satCorrConst = saturationCorr->
getValue();
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void resetTimeSamples(int f, int t)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
constexpr uint32_t rawId() const
get the raw id
std::vector< T >::const_iterator const_iterator
const CastorCalibrations & getCastorCalibrations(const HcalGenericDetId &fId) const
CastorSimpleReconstructor(const edm::ParameterSet &ps)
const Item * getValues(DetId fId, bool throwOnFail=true) const
CastorRecHit reconstruct(const CastorDataFrame &digi, const CastorCoder &coder, const CastorCalibrations &calibs) const
CastorSimpleRecAlgo reco_
void produce(edm::Event &e, const edm::EventSetup &c) override
unsigned int samplesToAdd() const
const CastorQIEShape * getCastorShape() const
edm::EDGetTokenT< CastorDigiCollection > tok_input_
static const int SubdetectorId
const_iterator end() const
unsigned int firstSample() const
void recoverADCSaturation(CastorRecHit &rechit, const CastorCoder &coder, const CastorCalibrations &calibs, const CastorDataFrame &digi, const int &maxADCvalue, const double &satCorrConst) const
~CastorSimpleReconstructor() override
void checkADCSaturation(CastorRecHit &rechit, const CastorDataFrame &digi, const int &maxADCvalue) const
const_iterator begin() const
const CastorQIECoder * getCastorCoder(const HcalGenericDetId &fId) const