58 : reco_(conf.getParameter<
int>(
"firstSample"),
59 conf.getParameter<
int>(
"samplesToAdd"),
60 conf.getParameter<
bool>(
"correctForTimeslew"),
61 conf.getParameter<
bool>(
"correctForPhaseContainment"),
62 conf.getParameter<double>(
"correctionPhaseNS")),
64 firstSample_(conf.getParameter<
int>(
"firstSample")),
65 samplesToAdd_(conf.getParameter<
int>(
"samplesToAdd")),
66 maxADCvalue_(conf.getParameter<
int>(
"maxADCvalue")),
67 tsFromDB_(conf.getParameter<
bool>(
"tsFromDB")),
68 setSaturationFlag_(conf.getParameter<
bool>(
"setSaturationFlag")),
69 doSaturationCorr_(conf.getParameter<
bool>(
"doSaturationCorr")) {
74 if (!strcasecmp(subd.c_str(),
"CASTOR")) {
77 produces<CastorRecHitCollection>();
80 <<
"CastorSimpleReconstructor is not associated with CASTOR subdetector!" << std::endl;
86 tok_satCorr_ = esConsumes<CastorSaturationCorrs, CastorSaturationCorrsRcd>();
106 <<
"Could not handle the CastorRecoParamsRcd correctly, using parameters from cfg file from this event " 107 "onwards... These parameters could be wrong for this run... please check" 118 edm::LogWarning(
"CastorSimpleReconstructor") <<
"Could not handle the CastorSaturationCorrsRcd correctly. We'll " 119 "not try the saturation correction from this event onwards..." 129 auto rec = std::make_unique<CastorRecHitCollection>();
155 double satCorrConst = 1.;
156 satCorrConst = saturationCorr->
getValue();
T getParameter(std::string const &) const
void resetTimeSamples(int f, int t)
const Item * getValues(DetId fId, bool throwOnFail=true) const
void recoverADCSaturation(CastorRecHit &rechit, const CastorCoder &coder, const CastorCalibrations &calibs, const CastorDataFrame &digi, const int &maxADCvalue, const double &satCorrConst) const
std::vector< T >::const_iterator const_iterator
CastorSimpleReconstructor(const edm::ParameterSet &ps)
edm::ESGetToken< CastorSaturationCorrs, CastorSaturationCorrsRcd > tok_satCorr_
unsigned int samplesToAdd() const
unsigned int firstSample() const
CastorSimpleRecAlgo reco_
void produce(edm::Event &e, const edm::EventSetup &c) override
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< CastorDigiCollection > tok_input_
const_iterator begin() const
static const int SubdetectorId
const_iterator end() const
edm::ESGetToken< CastorRecoParams, CastorRecoParamsRcd > tok_recoParams_
edm::ESGetToken< CastorDbService, CastorDbRecord > tok_conditions_
constexpr uint32_t rawId() const
get the raw id
~CastorSimpleReconstructor() override
void checkADCSaturation(CastorRecHit &rechit, const CastorDataFrame &digi, const int &maxADCvalue) const
CastorRecHit reconstruct(const CastorDataFrame &digi, const CastorCoder &coder, const CastorCalibrations &calibs) const
Log< level::Warning, false > LogWarning