44 if ( !useAlphaBetaArray_ ) {
45 edm::LogInfo(
"EcalUncalibRecHitError") <<
" No alfa-beta file found. Using the deafult values.";
51 bool dyn_pede = ps.
getParameter<
bool>(
"UseDynamicPedestal");
61 LogDebug(
"EcalUncalibRecHitDebug") <<
"fetching gainRatios....";
63 LogDebug(
"EcalUncalibRecHitDebug") <<
"done." ;
66 LogDebug(
"EcalUncalibRecHitDebug") <<
"fetching pedestals....";
68 LogDebug(
"EcalUncalibRecHitDebug") <<
"done." ;
83 std::pair<double,double>
p(-1,-1);
85 while( !
file.getline(buffer,100).eof() ){
86 ret=sscanf(buffer,
"%d %d %f %f", &sm, &cry, &a, &b);
89 (cry<=0)||(cry>1700)){
120 DetId detid( itdg->id() );
124 pedIter = pedMap.
find(itdg->id());
125 if( pedIter != pedMap.
end() ) {
128 edm::LogError(
"EcalUncalibRecHitWorkerFixedAlphaBetaFit") <<
"error!! could not find pedestals for channel: ";
134 edm::LogError(
"EcalUncalibRecHitWorkerFixedAlphaBetaFit") <<
"\n no uncalib rechit will be made for this digi!";
144 gainIter = gainMap.
find(itdg->id());
145 if( gainIter != gainMap.
end() ) {
148 edm::LogError(
"EcalUncalibRecHitWorkerFixedAlphaBetaFit") <<
"error!! could not find gain ratios for channel: ";
154 edm::LogError(
"EcalUncalibRecHitWorkerFixedAlphaBetaFit") <<
"\n no uncalib rechit will be made for this digi!";
157 double gainRatios[3];
170 if ( ( a == -1 ) && ( b == -1 ) ) {
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
tuple ret
prodAgent to be discontinued
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)
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
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
EcalUncalibRecHitWorkerFixedAlphaBetaFit()
void SetAlphaBeta(double alpha, double beta)
const_iterator find(uint32_t rawId) const
#define DEFINE_EDM_PLUGIN(factory, type, name)
const_iterator end() const
void SetDynamicPedestal(bool dyn_pede)
edm::ParameterSetDescription getAlgoDescription()
edm::ESHandle< EcalPedestals > pedHandle
tuple size
Write out results.