34 desc.add<
double>(
"tRise", 0.2);
35 desc.add<
double>(
"tFall", 2.);
37 desc.add<std::vector<double>>(
"weights",
61 : tRise_(ps.getParameter<double>(
"tRise")),
62 tFall_(ps.getParameter<double>(
"tFall")),
63 weights_(ps.getParameter<
std::
vector<double>>(
"weights")),
65 ebUncalibRecHitCollectionToken_(
73 auto ebUncalibRechits = std::make_unique<EBUncalibratedRecHitCollection>();
75 for (
auto itdg = pdigis->
begin(); itdg != pdigis->
end(); ++itdg) {
82 std::vector<float> timetrace;
83 std::vector<float> adctrace;
96 adctrace.push_back(thisSample.
adc() * gratio);
100 if (thisSample.
gainId() == 1)
103 timetrace.push_back(
sample);
116 ebUncalibRechits->push_back(rhit);
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool get(ProductID const &oid, Handle< PROD > &result) const
int adc() const
get the ADC sample (12 bits)
void setJitterError(float jitterErr)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const edm::EDGetTokenT< EBDigiCollectionPh2 > ebDigiCollectionToken_
EcalUncalibRecHitPhase2WeightsProducer(const edm::ParameterSet &ps)
#define DEFINE_FWK_MODULE(type)
static constexpr const float * gains
void setAmplitudeError(float amplitudeerror)
const std::vector< double > weights_
const_iterator end() const
int gainId() const
get the gainId (2 bits)
const_iterator begin() const
The iterator returned can not safely be used across threads.
void setFlagBit(Flags flag)
const edm::EDPutTokenT< EBUncalibratedRecHitCollection > ebUncalibRecHitCollectionToken_
void produce(edm::Event &evt, const edm::EventSetup &es) override