26 reco_(conf.getParameter<
int>(
"firstSample"),conf.getParameter<
int>(
"samplesToAdd"),conf.getParameter<
bool>(
"correctForTimeslew"),
27 conf.getParameter<
bool>(
"correctForPhaseContainment"),conf.getParameter<double>(
"correctionPhaseNS")),
29 firstSample_(conf.getParameter<
int>(
"firstSample")),
30 samplesToAdd_(conf.getParameter<
int>(
"samplesToAdd")),
31 maxADCvalue_(conf.getParameter<
int>(
"maxADCvalue")),
32 tsFromDB_(conf.getParameter<
bool>(
"tsFromDB")),
33 setSaturationFlag_(conf.getParameter<
bool>(
"setSaturationFlag")),
34 doSaturationCorr_(conf.getParameter<
bool>(
"doSaturationCorr"))
40 if (!strcasecmp(subd.c_str(),
"CASTOR")) {
43 produces<CastorRecHitCollection>();
45 edm::LogWarning(
"CastorSimpleReconstructor") <<
"CastorSimpleReconstructor is not associated with CASTOR subdetector!" << std::endl;
68 edm::LogWarning(
"CastorSimpleReconstructor") <<
"Could not handle the CastorRecoParamsRcd correctly, using parameters from cfg file from this event onwards... These parameters could be wrong for this run... please check" << std::endl;
78 edm::LogWarning(
"CastorSimpleReconstructor") <<
"Could not handle the CastorSaturationCorrsRcd correctly. We'll not try the saturation correction from this event onwards..." << std::endl;
88 auto rec = std::make_unique<CastorRecHitCollection>();
91 for (i=digi->
begin(); i!=digi->
end(); i++) {
114 double satCorrConst = 1.;
115 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