27 reco_(conf.getParameter<int>(
"firstSample"),conf.getParameter<int>(
"samplesToAdd"),conf.getParameter<bool>(
"correctForTimeslew"),
28 conf.getParameter<bool>(
"correctForPhaseContainment"),conf.getParameter<double>(
"correctionPhaseNS")),
30 inputLabel_(conf.getParameter<edm::InputTag>(
"digiLabel")),
31 firstSample_(conf.getParameter<int>(
"firstSample")),
32 samplesToAdd_(conf.getParameter<int>(
"samplesToAdd")),
33 tsFromDB_(conf.getParameter<bool>(
"tsFromDB")),
34 setSaturationFlag_(conf.getParameter<bool>(
"setSaturationFlag")),
35 maxADCvalue_(conf.getParameter<int>(
"maxADCvalue")),
36 doSaturationCorr_(conf.getParameter<bool>(
"doSaturationCorr"))
38 std::string subd=conf.
getParameter<std::string>(
"Subdetector");
39 if (!strcasecmp(subd.c_str(),
"CASTOR")) {
42 produces<CastorRecHitCollection>();
44 edm::LogWarning(
"CastorSimpleReconstructor") <<
"CastorSimpleReconstructor is not associated with CASTOR subdetector!" << std::endl;
71 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;
81 edm::LogWarning(
"CastorSimpleReconstructor") <<
"Could not handle the CastorSaturationCorrsRcd correctly. We'll not try the saturation correction from this event onwards..." << std::endl;
94 for (i=digi->begin(); i!=digi->end(); i++) {
103 const CastorQIECoder* channelCoder = conditions->getCastorCoder (cell);
117 double satCorrConst = 1.;
118 satCorrConst = saturationCorr->
getValue();
T getParameter(std::string const &) const
void resetTimeSamples(int f, int t)
std::vector< T >::const_iterator const_iterator
virtual void produce(edm::Event &e, const edm::EventSetup &c)
CastorSimpleReconstructor(const edm::ParameterSet &ps)
CastorRecHit reconstruct(const CastorDataFrame &digi, const CastorCoder &coder, const CastorCalibrations &calibs) const
edm::InputTag inputLabel_
uint32_t rawId() const
get the raw id
CastorSimpleRecAlgo reco_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
unsigned int samplesToAdd() const
static const int SubdetectorId
bool getByLabel(InputTag const &tag, Handle< PROD > &result) 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
virtual void beginRun(edm::Run &r, edm::EventSetup const &es)
void checkADCSaturation(CastorRecHit &rechit, const CastorDataFrame &digi, const int &maxADCvalue) const
virtual ~CastorSimpleReconstructor()