42 edm::LogInfo(
"EcalUncalibRecHitError") <<
" No alfa-beta file found. Using the deafult values.";
48 bool dyn_pede = ps.
getParameter<
bool>(
"UseDynamicPedestal");
55 LogDebug(
"EcalUncalibRecHitDebug") <<
"fetching gainRatios....";
57 LogDebug(
"EcalUncalibRecHitDebug") <<
"done.";
60 LogDebug(
"EcalUncalibRecHitDebug") <<
"fetching pedestals....";
62 LogDebug(
"EcalUncalibRecHitDebug") <<
"done.";
76 std::pair<double, double>
p(-1, -1);
79 ret = sscanf(
buffer,
"%d %d %f %f", &sm, &cry, &
a, &
b);
80 if ((
ret != 4) || (sm <= 0) || (sm > 36) || (cry <= 0) || (cry > 1700)) {
107 DetId detid(itdg->id());
111 pedIter = pedMap.
find(itdg->id());
112 if (pedIter != pedMap.
end()) {
115 edm::LogError(
"EcalUncalibRecHitWorkerFixedAlphaBetaFit") <<
"error!! could not find pedestals for channel: ";
121 edm::LogError(
"EcalUncalibRecHitWorkerFixedAlphaBetaFit") <<
"\n no uncalib rechit will be made for this digi!";
125 pedVec[0] = aped.mean_x12;
126 pedVec[1] = aped.mean_x6;
127 pedVec[2] = aped.mean_x1;
131 gainIter = gainMap.
find(itdg->id());
132 if (gainIter != gainMap.
end()) {
135 edm::LogError(
"EcalUncalibRecHitWorkerFixedAlphaBetaFit") <<
"error!! could not find gain ratios for channel: ";
141 edm::LogError(
"EcalUncalibRecHitWorkerFixedAlphaBetaFit") <<
"\n no uncalib rechit will be made for this digi!";
144 double gainRatios[3];
157 if ((
a == -1) && (
b == -1)) {
198 "EcalUncalibRecHitWorkerFixedAlphaBetaFit");
202 "EcalUncalibRecHitWorkerFixedAlphaBetaFit");
T getParameter(std::string const &) const
ret
prodAgent to be discontinued
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > pedestalsToken_
EcalUncalibratedRecHit makeRecHit(const C &dataFrame, const double *pedestals, const double *gainRatios, const EcalWeightSet::EcalWeightMatrix **weights, const EcalWeightSet::EcalChi2WeightMatrix **chi2Matrix) override
Compute parameters.
Log< level::Error, false > LogError
edm::ESHandle< EcalGainRatios > pRatio
EcalUncalibRecHitFixedAlphaBetaAlgo< EEDataFrame > algoEE_
T getUntrackedParameter(std::string const &, T const &) const
std::string alphabetaFilename_
EcalPedestalsMap::const_iterator EcalPedestalsMapIterator
int ic() const
get ECAL/crystal number inside SM
void SetMinAmpl(double ampl)
int ism() const
get the ECAL/SM id
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
edm::ESGetToken< EcalGainRatios, EcalGainRatiosRcd > ratiosToken_
const_iterator find(uint32_t rawId) const
EcalUncalibRecHitFixedAlphaBetaAlgo< EBDataFrame > algoEB_
Log< level::Info, false > LogInfo
float gain12Over6() const
bool run(const edm::Event &evt, const EcalDigiCollection::const_iterator &digi, EcalUncalibratedRecHitCollection &result) override
std::vector< Item >::const_iterator const_iterator
EcalUncalibRecHitWorkerFixedAlphaBetaFit()
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
void SetAlphaBeta(double alpha, double beta)
#define DEFINE_EDM_PLUGIN(factory, type, name)
const_iterator end() const
void SetDynamicPedestal(bool dyn_pede)
void set(const edm::EventSetup &es) override
edm::ESHandle< EcalPedestals > pedHandle
edm::ParameterSetDescription getAlgoDescription() override
std::vector< std::vector< std::pair< double, double > > > alphaBetaValues_