41 if ( !useAlphaBetaArray_ ) {
42 edm::LogInfo(
"EcalUncalibRecHitError") <<
" No alfa-beta file found. Using the deafult values.";
48 bool dyn_pede = ps.
getParameter<
bool>(
"UseDynamicPedestal");
58 LogDebug(
"EcalUncalibRecHitDebug") <<
"fetching gainRatios....";
60 LogDebug(
"EcalUncalibRecHitDebug") <<
"done." ;
63 LogDebug(
"EcalUncalibRecHitDebug") <<
"fetching pedestals....";
65 LogDebug(
"EcalUncalibRecHitDebug") <<
"done." ;
80 std::pair<double,double>
p(-1,-1);
82 while( !
file.getline(buffer,100).eof() ){
83 ret=sscanf(buffer,
"%d %d %f %f", &sm, &cry, &a, &b);
86 (cry<=0)||(cry>1700)){
121 pedIter = pedMap.
find(itdg->id());
122 if( pedIter != pedMap.
end() ) {
125 edm::LogError(
"EcalUncalibRecHitWorkerFixedAlphaBetaFit") <<
"error!! could not find pedestals for channel: ";
131 edm::LogError(
"EcalUncalibRecHitWorkerFixedAlphaBetaFit") <<
"\n no uncalib rechit will be made for this digi!";
141 gainIter = gainMap.
find(itdg->id());
142 if( gainIter != gainMap.
end() ) {
145 edm::LogError(
"EcalUncalibRecHitWorkerFixedAlphaBetaFit") <<
"error!! could not find gain ratios for channel: ";
151 edm::LogError(
"EcalUncalibRecHitWorkerFixedAlphaBetaFit") <<
"\n no uncalib rechit will be made for this digi!";
154 double gainRatios[3];
167 if ( ( a == -1 ) && ( b == -1 ) ) {
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void set(const edm::EventSetup &es)
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
std::vector< std::vector< std::pair< double, double > > > alphaBetaValues_
void push_back(T const &t)
edm::ESHandle< EcalGainRatios > pRatio
EcalUncalibRecHitFixedAlphaBetaAlgo< EEDataFrame > algoEE_
int ism() const
get the ECAL/SM id
virtual EcalUncalibratedRecHit makeRecHit(const C &dataFrame, const double *pedestals, const double *gainRatios, const EcalWeightSet::EcalWeightMatrix **weights, const EcalWeightSet::EcalChi2WeightMatrix **chi2Matrix)
Compute parameters.
std::string alphabetaFilename_
EcalPedestalsMap::const_iterator EcalPedestalsMapIterator
void SetMinAmpl(double ampl)
bool run(const edm::Event &evt, const EcalDigiCollection::const_iterator &digi, EcalUncalibratedRecHitCollection &result)
int ic() const
get ECAL/crystal number inside SM
EcalUncalibRecHitFixedAlphaBetaAlgo< EBDataFrame > algoEB_
std::vector< Item >::const_iterator const_iterator
float gain12Over6() const
void SetAlphaBeta(double alpha, double beta)
EcalUncalibRecHitWorkerFixedAlphaBetaFit(const edm::ParameterSet &ps, edm::ConsumesCollector &)
const_iterator find(uint32_t rawId) const
#define DEFINE_EDM_PLUGIN(factory, type, name)
const_iterator end() const
void SetDynamicPedestal(bool dyn_pede)
edm::ESHandle< EcalPedestals > pedHandle
tuple size
Write out results.