56 std::vector<std::vector<std::pair<double, double> > >
82 edm::LogInfo(
"EcalUncalibRecHitError") <<
" No alfa-beta file found. Using the deafult values.";
88 bool dyn_pede = ps.
getParameter<
bool>(
"UseDynamicPedestal");
95 LogDebug(
"EcalUncalibRecHitDebug") <<
"fetching gainRatios....";
97 LogDebug(
"EcalUncalibRecHitDebug") <<
"done.";
100 LogDebug(
"EcalUncalibRecHitDebug") <<
"fetching pedestals....";
102 LogDebug(
"EcalUncalibRecHitDebug") <<
"done.";
116 std::pair<double, double>
p(-1, -1);
119 ret = sscanf(
buffer,
"%d %d %f %f", &sm, &cry, &
a, &
b);
120 if ((
ret != 4) || (sm <= 0) || (sm > 36) || (cry <= 0) || (cry > 1700)) {
147 DetId detid(itdg->id());
151 pedIter = pedMap.
find(itdg->id());
152 if (pedIter != pedMap.
end()) {
155 edm::LogError(
"EcalUncalibRecHitWorkerFixedAlphaBetaFit") <<
"error!! could not find pedestals for channel: ";
161 edm::LogError(
"EcalUncalibRecHitWorkerFixedAlphaBetaFit") <<
"\n no uncalib rechit will be made for this digi!";
165 pedVec[0] = aped.mean_x12;
166 pedVec[1] = aped.mean_x6;
167 pedVec[2] = aped.mean_x1;
171 gainIter = gainMap.
find(itdg->id());
172 if (gainIter != gainMap.
end()) {
175 edm::LogError(
"EcalUncalibRecHitWorkerFixedAlphaBetaFit") <<
"error!! could not find gain ratios for channel: ";
181 edm::LogError(
"EcalUncalibRecHitWorkerFixedAlphaBetaFit") <<
"\n no uncalib rechit will be made for this digi!";
184 double gainRatios[3];
197 if ((
a == -1) && (
b == -1)) {
238 "EcalUncalibRecHitWorkerFixedAlphaBetaFit");
242 "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_
~EcalUncalibRecHitWorkerFixedAlphaBetaFit() override
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_