CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends
SiStripAPVRestorer Class Reference

#include <SiStripAPVRestorer.h>

Public Member Functions

std::vector< bool > & GetAPVFlags ()
 
RawDigiMapGetBaselineMap ()
 
std::map< uint16_t, DigiMap > & GetSmoothedPoints ()
 
void init (const edm::EventSetup &es)
 
int16_t inspect (const uint32_t &, const uint16_t &, std::vector< int16_t > &, const std::vector< std::pair< short, float > > &)
 
int16_t InspectAndRestore (const uint32_t &, const uint16_t &, std::vector< int16_t > &, std::vector< int16_t > &, const std::vector< std::pair< short, float > > &)
 
void LoadMeanCMMap (const edm::Event &)
 
void restore (const uint16_t &, std::vector< int16_t > &)
 
virtual ~SiStripAPVRestorer ()
 

Protected Member Functions

 SiStripAPVRestorer (const edm::ParameterSet &conf)
 

Private Member Functions

template<typename T >
int16_t AbnormalBaselineInspect (const uint16_t &, std::vector< T > &)
 
template<typename T >
int16_t BaselineAndSaturationInspect (const uint16_t &, std::vector< T > &)
 
void BaselineCleaner (const std::vector< int16_t > &, DigiMap &, const uint16_t &)
 
void BaselineFollower (DigiMap &, std::vector< int16_t > &, const float &)
 
template<typename T >
int16_t BaselineFollowerInspect (const uint16_t &, std::vector< T > &)
 
void BaselineFollowerRestore (const uint16_t &, const uint16_t &, const float &, std::vector< int16_t > &)
 
bool CheckBaseline (const std::vector< int16_t > &) const
 
void Cleaner_HighSlopeChecker (DigiMap &)
 
void Cleaner_LocalMinimumAdder (const std::vector< int16_t > &, DigiMap &, const uint16_t &)
 
void Cleaner_MonotonyChecker (DigiMap &)
 
void CreateCMMapCMstored (const edm::DetSetVector< SiStripProcessedRawDigi > &)
 
void CreateCMMapRealPed (const edm::DetSetVector< SiStripRawDigi > &)
 
bool FlatRegionsFinder (const std::vector< int16_t > &, DigiMap &, const uint16_t &)
 
void FlatRestore (const uint16_t &, const uint16_t &, std::vector< int16_t > &)
 
template<typename T >
int16_t NullInspect (const uint16_t &, std::vector< T > &)
 
float pairMedian (std::vector< std::pair< float, float > > &)
 

Private Attributes

bool ApplyBaselineCleaner_
 
bool ApplyBaselineRejection_
 
std::vector< std::string > apvFlags_
 
std::vector< bool > apvFlagsBool_
 
std::vector< bool > apvFlagsBoolOverride_
 
std::vector< bool > badAPVs_
 
RawDigiMap BaselineMap_
 
uint32_t CleaningSequence_
 
uint32_t consecThreshold_
 
double CutToAvoidSignal_
 
uint32_t DeltaCMThreshold_
 
uint32_t detId_
 
uint32_t deviation_
 
uint32_t distortionThreshold_
 
double filteredBaselineDerivativeSumSquare_
 
double filteredBaselineMax_
 
bool ForceNoRestore_
 
double fraction_
 
uint32_t hitStripThreshold_
 
edm::InputTag inputTag_
 
std::string InspectAlgo_
 
int32_t MeanCM_
 
CMMap MeanCMmap_
 
std::vector< float > median_
 
uint32_t minStripsToFit_
 
uint32_t noise_cache_id
 
edm::ESHandle< SiStripNoisesnoiseHandle
 
uint32_t nSaturatedStrip_
 
uint32_t nSigmaNoiseDerTh_
 
uint32_t nSmooth_
 
uint32_t pedestal_cache_id
 
edm::ESHandle< SiStripPedestalspedestalHandle
 
uint32_t quality_cache_id
 
edm::ESHandle< SiStripQualityqualityHandle
 
std::string RestoreAlgo_
 
double restoreThreshold_
 
bool SelfSelectRestoreAlgo_
 
int32_t slopeX_
 
int32_t slopeY_
 
std::map< uint16_t, DigiMapSmoothedMaps_
 
bool useRealMeanCM_
 

Friends

class SiStripRawProcessingFactory
 

Detailed Description

Definition at line 31 of file SiStripAPVRestorer.h.

Constructor & Destructor Documentation

virtual SiStripAPVRestorer::~SiStripAPVRestorer ( )
inlinevirtual

Definition at line 37 of file SiStripAPVRestorer.h.

37 {};
SiStripAPVRestorer::SiStripAPVRestorer ( const edm::ParameterSet conf)
protected

Definition at line 8 of file SiStripAPVRestorer.cc.

References apvFlags_, BaselineMap_, median_, and SmoothedMaps_.

8  :
10  ForceNoRestore_(conf.getParameter<bool>("ForceNoRestore")),
11  SelfSelectRestoreAlgo_(conf.getParameter<bool>("SelfSelectRestoreAlgo")),
12  InspectAlgo_(conf.getParameter<std::string>("APVInspectMode")),
13  RestoreAlgo_(conf.getParameter<std::string>("APVRestoreMode")),
14  useRealMeanCM_(conf.getParameter<bool>("useRealMeanCM")),
15  fraction_(conf.getParameter<double>("Fraction")),
16  deviation_(conf.getParameter<uint32_t>("Deviation")),
17  restoreThreshold_(conf.getParameter<double>("restoreThreshold")),
18  DeltaCMThreshold_(conf.getParameter<uint32_t>("DeltaCMThreshold")),
19  nSigmaNoiseDerTh_(conf.getParameter<uint32_t>("nSigmaNoiseDerTh")),
20  consecThreshold_(conf.getParameter<uint32_t>("consecThreshold")),
21  hitStripThreshold_(conf.getParameter<uint32_t>("hitStripThreshold")),
22  nSmooth_(conf.getParameter<uint32_t>("nSmooth")),
23  minStripsToFit_(conf.getParameter<uint32_t>("minStripsToFit")),
24  distortionThreshold_(conf.getParameter<uint32_t>("distortionThreshold")),
25  CutToAvoidSignal_(conf.getParameter<double>("CutToAvoidSignal")),
26  nSaturatedStrip_(conf.getParameter<uint32_t>("nSaturatedStrip")),
27  ApplyBaselineCleaner_(conf.getParameter<bool>("ApplyBaselineCleaner")),
28  slopeX_(conf.getParameter<int32_t>("slopeX")),
29  slopeY_(conf.getParameter<int32_t>("slopeY")),
30  CleaningSequence_(conf.getParameter<uint32_t>("CleaningSequence")),
31  ApplyBaselineRejection_(conf.getParameter<bool>("ApplyBaselineRejection")),
32  MeanCM_(conf.getParameter<int32_t>("MeanCM")),
33  filteredBaselineMax_(conf.getParameter<double>("filteredBaselineMax")),
34  filteredBaselineDerivativeSumSquare_(conf.getParameter<double>("filteredBaselineDerivativeSumSquare"))
35 
36 {
37  apvFlags_.clear();
38  median_.clear();
39  SmoothedMaps_.clear();
40  BaselineMap_.erase(BaselineMap_.begin(), BaselineMap_.end());
41 }
T getParameter(std::string const &) const
double filteredBaselineDerivativeSumSquare_
std::map< uint16_t, DigiMap > SmoothedMaps_
std::vector< std::string > apvFlags_
std::vector< float > median_

Member Function Documentation

template<typename T >
int16_t SiStripAPVRestorer::AbnormalBaselineInspect ( const uint16_t &  firstAPV,
std::vector< T > &  digis 
)
inlineprivate

Definition at line 225 of file SiStripAPVRestorer.cc.

References abs, sistrip::APV, apvFlags_, badAPVs_, detId_, deviation_, fraction_, MeanCM_, MeanCMmap_, min, qualityHandle, RestoreAlgo_, and useRealMeanCM_.

Referenced by inspect().

225  {
226 
227  SiStripQuality::Range detQualityRange = qualityHandle->getRange(detId_);
228 
229  typename std::vector<T>::iterator fs;
230 
231  int16_t nAPVflagged=0;
232 
233  CMMap::iterator itCMMap;
234  if(useRealMeanCM_) itCMMap = MeanCMmap_.find(detId_);
235 
236 
237  int devCount = 0, qualityCount = 0, minstrip = 0;
238  for(uint16_t APV=firstAPV ; APV< digis.size()/128 + firstAPV; ++APV){
239  apvFlags_.push_back( "" );
240  if(!badAPVs_[APV]){
241  float MeanAPVCM = MeanCM_;
242  if(useRealMeanCM_&&itCMMap!= MeanCMmap_.end()) MeanAPVCM =(itCMMap->second)[APV];
243  for (uint16_t istrip=APV*128; istrip<(APV+1)*128; ++istrip){
244  fs = digis.begin() + istrip-firstAPV*128;
245  if ( !qualityHandle->IsStripBad(detQualityRange,istrip) ){
246  qualityCount++;
247  if ( std::abs((int) *fs - MeanAPVCM) > (int)deviation_ ){
248  devCount++;
249  minstrip = std::min((int) *fs, minstrip);
250  }
251  }
252  }
253 
254  if( devCount > fraction_ * qualityCount ) {
255  apvFlags_[APV] = RestoreAlgo_; //specify any algo to make the restore
256  nAPVflagged++;
257  }
258  }
259  }
260 
261  return nAPVflagged;
262 
263 }
#define abs(x)
Definition: mlp_lapack.h:159
#define min(a, b)
Definition: mlp_lapack.h:161
std::vector< std::string > apvFlags_
edm::ESHandle< SiStripQuality > qualityHandle
std::vector< bool > badAPVs_
std::pair< ContainerIterator, ContainerIterator > Range
template<typename T >
int16_t SiStripAPVRestorer::BaselineAndSaturationInspect ( const uint16_t &  firstAPV,
std::vector< T > &  digis 
)
inlineprivate

Definition at line 185 of file SiStripAPVRestorer.cc.

References abs, sistrip::APV, apvFlags_, badAPVs_, DeltaCMThreshold_, detId_, MeanCM_, MeanCMmap_, median_, nSaturatedStrip_, RestoreAlgo_, strip(), and useRealMeanCM_.

Referenced by inspect().

185  {
186  std::vector<T> singleAPVdigi;
187  singleAPVdigi.clear();
188 
189 
190  int16_t nAPVflagged = 0;
191 
192  CMMap::iterator itCMMap;
193  if(useRealMeanCM_) itCMMap = MeanCMmap_.find(detId_);
194 
195  for(uint16_t APV=firstAPV ; APV< digis.size()/128 + firstAPV; ++APV){
196  apvFlags_.push_back( "" );
197  if(!badAPVs_[APV]){
198  float MeanAPVCM = MeanCM_;
199  if(useRealMeanCM_&&itCMMap!= MeanCMmap_.end()) MeanAPVCM =(itCMMap->second)[APV];
200 
201  singleAPVdigi.clear();
202 
203  uint16_t nSatStrip =0;
204  for(int16_t strip = (APV-firstAPV)*128; strip < (APV-firstAPV+1)*128; ++strip){
205  singleAPVdigi.push_back(digis[strip]);
206  if(digis[strip] >=1023) ++nSatStrip;
207  }
208 
209  float DeltaCM = median_[APV] -MeanAPVCM;
210 
211 
212  if(DeltaCM < 0 && std::abs(DeltaCM) > DeltaCMThreshold_&&nSatStrip>= nSaturatedStrip_){
213  apvFlags_[APV] = RestoreAlgo_; //specify any algo to make the restore
214  nAPVflagged++;
215  }
216  }
217  }
218 
219  return nAPVflagged;
220 }
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
#define abs(x)
Definition: mlp_lapack.h:159
std::vector< std::string > apvFlags_
std::vector< bool > badAPVs_
std::vector< float > median_
void SiStripAPVRestorer::BaselineCleaner ( const std::vector< int16_t > &  adcs,
DigiMap smoothedpoints,
const uint16_t &  APVn 
)
inlineprivate

Definition at line 473 of file SiStripAPVRestorer.cc.

References Cleaner_HighSlopeChecker(), Cleaner_LocalMinimumAdder(), Cleaner_MonotonyChecker(), and CleaningSequence_.

Referenced by FlatRegionsFinder().

473  {
474 
475  if(CleaningSequence_==0) { //default sequence used up to now
476  this->Cleaner_HighSlopeChecker(smoothedpoints);
477  this->Cleaner_LocalMinimumAdder(adcs, smoothedpoints, APVn);
478  }else if(CleaningSequence_==1){
479  this->Cleaner_LocalMinimumAdder(adcs, smoothedpoints, APVn);
480  this->Cleaner_HighSlopeChecker(smoothedpoints);
481  this->Cleaner_MonotonyChecker(smoothedpoints);
482  }else if(CleaningSequence_==2){
483  this->Cleaner_HighSlopeChecker(smoothedpoints);
484  }else if(CleaningSequence_==3){
485  this->Cleaner_LocalMinimumAdder(adcs, smoothedpoints, APVn);
486  this->Cleaner_HighSlopeChecker(smoothedpoints);
487  }else{
488  this->Cleaner_HighSlopeChecker(smoothedpoints);
489  this->Cleaner_LocalMinimumAdder(adcs, smoothedpoints, APVn);
490  }
491 
492 }
void Cleaner_MonotonyChecker(DigiMap &)
void Cleaner_HighSlopeChecker(DigiMap &)
void Cleaner_LocalMinimumAdder(const std::vector< int16_t > &, DigiMap &, const uint16_t &)
void SiStripAPVRestorer::BaselineFollower ( DigiMap smoothedpoints,
std::vector< int16_t > &  baseline,
const float &  median 
)
inlineprivate

Definition at line 631 of file SiStripAPVRestorer.cc.

References m, and minStripsToFit_.

Referenced by BaselineFollowerRestore().

631  {
632 
633  baseline.clear();
634  DigiMapIter itSmoothedpoints;
635 
636 
637  //if not enough points
638  if(smoothedpoints.size() < minStripsToFit_){
639  baseline.insert(baseline.begin(),128, median);
640  } else {
641  baseline.insert(baseline.begin(),128, 0);
642 
643  DigiMapIter itSmoothedpointsBegin, itSmoothedpointsEnd;
644  itSmoothedpointsBegin = smoothedpoints.begin();
645  itSmoothedpointsEnd = --(smoothedpoints.end());
646 
647 
648  uint16_t firstStripFlat = itSmoothedpointsBegin->first;
649  uint16_t lastStripFlat = itSmoothedpointsEnd->first;
650  int16_t firstStripFlatADC= itSmoothedpointsBegin->second;
651  int16_t lastStripFlatADC= itSmoothedpointsEnd->second;
652 
653  //adding here the costant line at the extremities
654  baseline.erase(baseline.begin(), baseline.begin()+firstStripFlat);
655  baseline.insert(baseline.begin(), firstStripFlat, firstStripFlatADC);
656 
657  baseline.erase(baseline.begin()+lastStripFlat, baseline.end());
658  baseline.insert(baseline.end(), 128 - lastStripFlat, lastStripFlatADC);
659 
660 
661  //IMPORTANT: the itSmoothedpointsEnd should be at least smaller than smoothedpoints.end() -1
662  for(itSmoothedpoints = itSmoothedpointsBegin; itSmoothedpoints != itSmoothedpointsEnd; ++itSmoothedpoints){
663  DigiMapIter itSmoothedpointsNext = itSmoothedpoints;
664  ++itSmoothedpointsNext;
665  float strip1 = itSmoothedpoints->first;
666  float strip2 = itSmoothedpointsNext->first;
667  float adc1 = itSmoothedpoints->second;
668  float adc2 = itSmoothedpointsNext->second;
669 
670  baseline[strip1] = adc1;
671  baseline[strip2] = adc2;
672  float m = (adc2 -adc1)/(strip2 -strip1);
673  uint16_t itStrip = strip1 +1;
674  float stripadc = adc1 + m;
675  while(itStrip < strip2){
676  baseline[itStrip] = stripadc;
677  ++itStrip;
678  stripadc+=m;
679  }
680 
681  }
682 
683  }
684 }
std::map< uint16_t, int16_t >::iterator DigiMapIter
template<typename T >
int16_t SiStripAPVRestorer::BaselineFollowerInspect ( const uint16_t &  firstAPV,
std::vector< T > &  digis 
)
inlineprivate

Definition at line 141 of file SiStripAPVRestorer.cc.

References abs, sistrip::APV, apvFlags_, badAPVs_, DeltaCMThreshold_, detId_, FlatRegionsFinder(), MeanCM_, MeanCMmap_, median_, SmoothedMaps_, strip(), and useRealMeanCM_.

Referenced by inspect().

141  {
142  std::vector<T> singleAPVdigi;
143  int16_t nAPVflagged = 0;
144 
145  CMMap::iterator itCMMap;
146  if(useRealMeanCM_) itCMMap = MeanCMmap_.find(detId_);
147 
148  for(uint16_t APV=firstAPV ; APV< digis.size()/128 + firstAPV; ++APV){
149 
150  DigiMap smoothedmap;
151  smoothedmap.erase(smoothedmap.begin(), smoothedmap.end());
152 
153  if(!badAPVs_[APV]){
154  float MeanAPVCM = MeanCM_;
155  if(useRealMeanCM_&&itCMMap!= MeanCMmap_.end()) MeanAPVCM =(itCMMap->second)[APV];
156 
157  singleAPVdigi.clear();
158  for(int16_t strip = (APV-firstAPV)*128; strip < (APV-firstAPV+1)*128; ++strip){
159  singleAPVdigi.push_back(digis[strip]);
160  }
161 
162 
163  float DeltaCM = median_[APV] - MeanAPVCM;
164 
165  //std::cout << "Delta CM: " << DeltaCM << " CM: " << median_[APV] << " detId " << (uint32_t) detId_ << std::endl;
166  if(DeltaCM < 0 && std::abs(DeltaCM) > DeltaCMThreshold_){
167 
168  bool isFlat = FlatRegionsFinder(singleAPVdigi,smoothedmap,APV);
169  if(!isFlat){
170  apvFlags_[APV]= "BaselineFollower"; //specify any algo to make the restore
171  nAPVflagged++;
172  }
173  }
174 
175  }
176  SmoothedMaps_.insert(SmoothedMaps_.end(), std::pair<uint16_t, DigiMap>(APV, smoothedmap));
177  }
178 
179  return nAPVflagged;
180 }
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
bool FlatRegionsFinder(const std::vector< int16_t > &, DigiMap &, const uint16_t &)
#define abs(x)
Definition: mlp_lapack.h:159
std::map< uint16_t, int16_t > DigiMap
std::map< uint16_t, DigiMap > SmoothedMaps_
std::vector< std::string > apvFlags_
std::vector< bool > badAPVs_
std::vector< float > median_
void SiStripAPVRestorer::BaselineFollowerRestore ( const uint16_t &  APVn,
const uint16_t &  firstAPV,
const float &  median,
std::vector< int16_t > &  digis 
)
inlineprivate

Definition at line 307 of file SiStripAPVRestorer.cc.

References ApplyBaselineRejection_, apvFlagsBoolOverride_, BaselineFollower(), BaselineMap_, CheckBaseline(), FlatRegionsFinder(), SmoothedMaps_, and strip().

Referenced by restore().

307  {
308  //typename std::vector<T>::iterator firstStrip(digis.begin() + APVn*128), lastStrip(firstStrip + 128), actualStrip;
309 
310 
311  std::vector<int16_t> baseline;
312  baseline.clear();
313  baseline.insert(baseline.begin(),128, 0);
314 
315 
316 
317 
318  //============================= Find Flat Regions & Interpolating the baseline & subtracting the baseline =================
319 
320  if(SmoothedMaps_.size()){
321  std::map<uint16_t, DigiMap >::iterator itSmootedMap = SmoothedMaps_.find(APVn);
322  this->BaselineFollower(itSmootedMap->second, baseline, median);
323  } else {
324  //median=0;
325  DigiMap smoothedpoints;
326  std::vector<int16_t> singleAPVdigi;
327  singleAPVdigi.clear();
328  for(int16_t strip = (APVn-firstAPV)*128; strip < (APVn-firstAPV+1)*128; ++strip) singleAPVdigi.push_back(digis[strip]);
329  this->FlatRegionsFinder(singleAPVdigi,smoothedpoints, APVn);
330  this->BaselineFollower(smoothedpoints, baseline, median);
331 
332  }
333 
335  if(CheckBaseline(baseline)) apvFlagsBoolOverride_[APVn] = true;
336  }
337 
338  //============================= subtracting the baseline =============================================
339 
340  for(int16_t itStrip= 0 ; itStrip< 128; ++itStrip){
341  digis[(APVn-firstAPV)*128+itStrip] -= baseline[itStrip] - median;
342  }
343 
344 
345  //============================= storing baseline to the map =============================================
346  BaselineMap_.insert(BaselineMap_.end(), std::pair< uint16_t, std::vector < int16_t> >(APVn, baseline));
347 
348 }
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
bool FlatRegionsFinder(const std::vector< int16_t > &, DigiMap &, const uint16_t &)
std::map< uint16_t, int16_t > DigiMap
std::map< uint16_t, DigiMap > SmoothedMaps_
bool CheckBaseline(const std::vector< int16_t > &) const
void BaselineFollower(DigiMap &, std::vector< int16_t > &, const float &)
std::vector< bool > apvFlagsBoolOverride_
bool SiStripAPVRestorer::CheckBaseline ( const std::vector< int16_t > &  baseline) const
private

Definition at line 687 of file SiStripAPVRestorer.cc.

References dtNoiseDBValidation_cfg::cerr, filteredBaselineDerivativeSumSquare_, filteredBaselineMax_, i, j, max(), and run_regression::test.

Referenced by BaselineFollowerRestore().

688 {
689  // The Savitzky-Golay (S-G) filter of any left length nL, right
690  // length nR, and order m, and with an optional opt equals the
691  // derivative order (0 for the magnitude, 1 for the first
692  // derivative, etc.) can be calculated using the following
693  // Mathematica code:
694  //
695  // SavitzkyGolay[m_?IntegerQ, {nL_?IntegerQ, nR_?IntegerQ},
696  // opt___] := Module[
697  // {a, d},
698  // d = If[opt === Null, 0, If[IntegerQ[opt], opt, 0]];
699  // a = Table[
700  // If[i == 0 && j == 0, 1, i^j], {i, -nL, nR}, {j, 0,
701  // m}]; (Inverse[Transpose[a].a].Transpose[a])[[d + 1]]];
702  //
703  // The following coefficients can be then calculated by:
704  //
705  // N[Join[Table[SavitzkyGolay[2, {k, 16}], {k, 0, 16}],
706  // Table[SavitzkyGolay[2, {16, k}], {k, 15, 0, -1}]]]
707 
708  // nLR = max(nL, nR)
709  static const size_t savitzky_golay_n_l_r = 16;
710  static const float savitzky_golay_coefficient
711  [2 * savitzky_golay_n_l_r + 1][2 * savitzky_golay_n_l_r + 1] = {
712  { 0.422085, 0.325077, 0.23839, 0.162023, 0.0959752, 0.0402477,
713  -0.00515996, -0.0402477, -0.0650155, -0.0794634, -0.0835913,
714  -0.0773994, -0.0608875, -0.0340557, 0.00309598, 0.0505676,
715  0.108359 },
716  { 0.315789, 0.254902, 0.19969, 0.150155, 0.106295, 0.0681115,
717  0.0356037, 0.00877193, -0.0123839, -0.0278638, -0.0376677,
718  -0.0417957, -0.0402477, -0.0330237, -0.0201238, -0.00154799,
719  0.0227038, 0.0526316 },
720  { 0.234586, 0.198496, 0.165207, 0.134719, 0.107032, 0.0821465,
721  0.0600619, 0.0407784, 0.024296, 0.0106148, -0.000265369,
722  -0.00834439, -0.0136223, -0.0160991, -0.0157747, -0.0126493,
723  -0.00672269, 0.00200501, 0.0135338 },
724  { 0.172078, 0.153076, 0.135099, 0.118148, 0.102221, 0.0873206,
725  0.073445, 0.0605947, 0.0487697, 0.0379699, 0.0281955,
726  0.0194463, 0.0117225, 0.00502392, -0.000649351, -0.00529733,
727  -0.00892003, -0.0115174, -0.0130895, -0.0136364 },
728  { 0.123659, 0.116431, 0.109144, 0.101798, 0.0943921, 0.0869268,
729  0.0794021, 0.0718179, 0.0641743, 0.0564712, 0.0487087,
730  0.0408868, 0.0330054, 0.0250646, 0.0170644, 0.00900473,
731  0.000885613, -0.00729294, -0.0155309, -0.0238283,
732  -0.0321852 },
733  { 0.0859684, 0.0868154, 0.0869565, 0.0863919, 0.0851214,
734  0.0831451, 0.080463, 0.0770751, 0.0729814, 0.0681818,
735  0.0626765, 0.0564653, 0.0495483, 0.0419255, 0.0335968,
736  0.0245624, 0.0148221, 0.00437606, -0.00677583, -0.0186335,
737  -0.0311971, -0.0444664 },
738  { 0.0565217, 0.0628458, 0.0680971, 0.0722756, 0.0753811,
739  0.0774139, 0.0783738, 0.0782609, 0.0770751, 0.0748165,
740  0.071485, 0.0670807, 0.0616036, 0.0550536, 0.0474308,
741  0.0387352, 0.0289667, 0.0181254, 0.00621118, -0.00677583,
742  -0.0208357, -0.0359684, -0.0521739 },
743  { 0.0334615, 0.0434281, 0.0521329, 0.0595759, 0.0657571,
744  0.0706765, 0.0743341, 0.07673, 0.0778641, 0.0777364,
745  0.0763469, 0.0736957, 0.0697826, 0.0646078, 0.0581712,
746  0.0504728, 0.0415126, 0.0312907, 0.0198069, 0.00706142,
747  -0.00694588, -0.022215, -0.0387458, -0.0565385 },
748  { 0.0153846, 0.0276923, 0.0386622, 0.0482943, 0.0565886,
749  0.0635452, 0.0691639, 0.0734448, 0.076388, 0.0779933,
750  0.0782609, 0.0771906, 0.0747826, 0.0710368, 0.0659532,
751  0.0595318, 0.0517726, 0.0426756, 0.0322408, 0.0204682,
752  0.00735786, -0.0070903, -0.0228763, -0.04, -0.0584615 },
753  { 0.001221, 0.0149451, 0.027326, 0.0383639, 0.0480586,
754  0.0564103, 0.0634188, 0.0690842, 0.0734066, 0.0763858,
755  0.078022, 0.078315, 0.077265, 0.0748718, 0.0711355,
756  0.0660562, 0.0596337, 0.0518681, 0.0427595, 0.0323077,
757  0.0205128, 0.00737485, -0.00710623, -0.0229304, -0.0400977,
758  -0.0586081 },
759  { -0.00985222, 0.00463138, 0.0178098, 0.029683, 0.0402509,
760  0.0495137, 0.0574713, 0.0641236, 0.0694708, 0.0735127,
761  0.0762494, 0.0776809, 0.0778073, 0.0766284, 0.0741442,
762  0.0703549, 0.0652604, 0.0588607, 0.0511557, 0.0421456,
763  0.0318302, 0.0202097, 0.0072839, -0.00694708, -0.0224833,
764  -0.0393247, -0.0574713 },
765  { -0.0184729, -0.00369458, 0.00984169, 0.0221359, 0.0331881,
766  0.0429982, 0.0515662, 0.0588923, 0.0649762, 0.0698181,
767  0.073418, 0.0757758, 0.0768915, 0.0767652, 0.0753968,
768  0.0727864, 0.0689339, 0.0638394, 0.0575028, 0.0499242,
769  0.0411035, 0.0310408, 0.019736, 0.00718917, -0.00659972,
770  -0.0216307, -0.0379037, -0.0554187 },
771  { -0.025139, -0.0103925, 0.00318873, 0.0156046, 0.0268552,
772  0.0369405, 0.0458605, 0.0536151, 0.0602045, 0.0656285,
773  0.0698872, 0.0729806, 0.0749086, 0.0756714, 0.0752688,
774  0.0737009, 0.0709677, 0.0670692, 0.0620054, 0.0557763,
775  0.0483818, 0.039822, 0.0300969, 0.0192065, 0.0071508,
776  -0.00607024, -0.0204566, -0.0360083, -0.0527253 },
777  { -0.0302419, -0.0157536, -0.00234785, 0.00997537, 0.021216,
778  0.0313741, 0.0404497, 0.0484427, 0.0553532, 0.0611811,
779  0.0659264, 0.0695892, 0.0721695, 0.0736672, 0.0740823,
780  0.0734149, 0.0716649, 0.0688324, 0.0649174, 0.0599198,
781  0.0538396, 0.0466769, 0.0384316, 0.0291038, 0.0186934,
782  0.00720046, -0.00537502, -0.0190331, -0.0337736,
783  -0.0495968 },
784  { -0.0340909, -0.0200147, -0.006937, 0.00514208, 0.0162226,
785  0.0263045, 0.0353878, 0.0434725, 0.0505587, 0.0566463,
786  0.0617353, 0.0658257, 0.0689175, 0.0710107, 0.0721054,
787  0.0722014, 0.0712989, 0.0693978, 0.0664981, 0.0625999,
788  0.057703, 0.0518076, 0.0449135, 0.0370209, 0.0281297,
789  0.01824, 0.0073516, -0.00453534, -0.0174209, -0.031305,
790  -0.0461877 },
791  { -0.0369318, -0.0233688, -0.0107221, 0.00100806, 0.0118218,
792  0.0217192, 0.0307001, 0.0387647, 0.0459128, 0.0521444,
793  0.0574597, 0.0618585, 0.0653409, 0.0679069, 0.0695565,
794  0.0702896, 0.0701063, 0.0690066, 0.0669905, 0.0640579,
795  0.0602089, 0.0554435, 0.0497617, 0.0431635, 0.0356488,
796  0.0272177, 0.0178702, 0.0076063, -0.00357405, -0.0156708,
797  -0.028684, -0.0426136 },
798  { -0.038961, -0.025974, -0.0138249, -0.00251362, 0.00795978,
799  0.0175953, 0.026393, 0.0343527, 0.0414747, 0.0477587,
800  0.0532049, 0.0578132, 0.0615836, 0.0645161, 0.0666108,
801  0.0678676, 0.0682866, 0.0678676, 0.0666108, 0.0645161,
802  0.0615836, 0.0578132, 0.0532049, 0.0477587, 0.0414747,
803  0.0343527, 0.026393, 0.0175953, 0.00795978, -0.00251362,
804  -0.0138249, -0.025974, -0.038961 },
805  { -0.0426136, -0.028684, -0.0156708, -0.00357405, 0.0076063,
806  0.0178702, 0.0272177, 0.0356488, 0.0431635, 0.0497617,
807  0.0554435, 0.0602089, 0.0640579, 0.0669905, 0.0690066,
808  0.0701063, 0.0702896, 0.0695565, 0.0679069, 0.0653409,
809  0.0618585, 0.0574597, 0.0521444, 0.0459128, 0.0387647,
810  0.0307001, 0.0217192, 0.0118218, 0.00100806, -0.0107221,
811  -0.0233688, -0.0369318 },
812  { -0.0461877, -0.031305, -0.0174209, -0.00453534, 0.0073516,
813  0.01824, 0.0281297, 0.0370209, 0.0449135, 0.0518076,
814  0.057703, 0.0625999, 0.0664981, 0.0693978, 0.0712989,
815  0.0722014, 0.0721054, 0.0710107, 0.0689175, 0.0658257,
816  0.0617353, 0.0566463, 0.0505587, 0.0434725, 0.0353878,
817  0.0263045, 0.0162226, 0.00514208, -0.006937, -0.0200147,
818  -0.0340909 },
819  { -0.0495968, -0.0337736, -0.0190331, -0.00537502, 0.00720046,
820  0.0186934, 0.0291038, 0.0384316, 0.0466769, 0.0538396,
821  0.0599198, 0.0649174, 0.0688324, 0.0716649, 0.0734149,
822  0.0740823, 0.0736672, 0.0721695, 0.0695892, 0.0659264,
823  0.0611811, 0.0553532, 0.0484427, 0.0404497, 0.0313741,
824  0.021216, 0.00997537, -0.00234785, -0.0157536, -0.0302419 },
825  { -0.0527253, -0.0360083, -0.0204566, -0.00607024, 0.0071508,
826  0.0192065, 0.0300969, 0.039822, 0.0483818, 0.0557763,
827  0.0620054, 0.0670692, 0.0709677, 0.0737009, 0.0752688,
828  0.0756714, 0.0749086, 0.0729806, 0.0698872, 0.0656285,
829  0.0602045, 0.0536151, 0.0458605, 0.0369405, 0.0268552,
830  0.0156046, 0.00318873, -0.0103925, -0.025139 },
831  { -0.0554187, -0.0379037, -0.0216307, -0.00659972, 0.00718917,
832  0.019736, 0.0310408, 0.0411035, 0.0499242, 0.0575028,
833  0.0638394, 0.0689339, 0.0727864, 0.0753968, 0.0767652,
834  0.0768915, 0.0757758, 0.073418, 0.0698181, 0.0649762,
835  0.0588923, 0.0515662, 0.0429982, 0.0331881, 0.0221359,
836  0.00984169, -0.00369458, -0.0184729 },
837  { -0.0574713, -0.0393247, -0.0224833, -0.00694708, 0.0072839,
838  0.0202097, 0.0318302, 0.0421456, 0.0511557, 0.0588607,
839  0.0652604, 0.0703549, 0.0741442, 0.0766284, 0.0778073,
840  0.0776809, 0.0762494, 0.0735127, 0.0694708, 0.0641236,
841  0.0574713, 0.0495137, 0.0402509, 0.029683, 0.0178098,
842  0.00463138, -0.00985222 },
843  { -0.0586081, -0.0400977, -0.0229304, -0.00710623, 0.00737485,
844  0.0205128, 0.0323077, 0.0427595, 0.0518681, 0.0596337,
845  0.0660562, 0.0711355, 0.0748718, 0.077265, 0.078315,
846  0.078022, 0.0763858, 0.0734066, 0.0690842, 0.0634188,
847  0.0564103, 0.0480586, 0.0383639, 0.027326, 0.0149451,
848  0.001221 },
849  { -0.0584615, -0.04, -0.0228763, -0.0070903, 0.00735786,
850  0.0204682, 0.0322408, 0.0426756, 0.0517726, 0.0595318,
851  0.0659532, 0.0710368, 0.0747826, 0.0771906, 0.0782609,
852  0.0779933, 0.076388, 0.0734448, 0.0691639, 0.0635452,
853  0.0565886, 0.0482943, 0.0386622, 0.0276923, 0.0153846 },
854  { -0.0565385, -0.0387458, -0.022215, -0.00694588, 0.00706142,
855  0.0198069, 0.0312907, 0.0415126, 0.0504728, 0.0581712,
856  0.0646078, 0.0697826, 0.0736957, 0.0763469, 0.0777364,
857  0.0778641, 0.07673, 0.0743341, 0.0706765, 0.0657571,
858  0.0595759, 0.0521329, 0.0434281, 0.0334615 },
859  { -0.0521739, -0.0359684, -0.0208357, -0.00677583, 0.00621118,
860  0.0181254, 0.0289667, 0.0387352, 0.0474308, 0.0550536,
861  0.0616036, 0.0670807, 0.071485, 0.0748165, 0.0770751,
862  0.0782609, 0.0783738, 0.0774139, 0.0753811, 0.0722756,
863  0.0680971, 0.0628458, 0.0565217 },
864  { -0.0444664, -0.0311971, -0.0186335, -0.00677583, 0.00437606,
865  0.0148221, 0.0245624, 0.0335968, 0.0419255, 0.0495483,
866  0.0564653, 0.0626765, 0.0681818, 0.0729814, 0.0770751,
867  0.080463, 0.0831451, 0.0851214, 0.0863919, 0.0869565,
868  0.0868154, 0.0859684 },
869  { -0.0321852, -0.0238283, -0.0155309, -0.00729294, 0.000885613,
870  0.00900473, 0.0170644, 0.0250646, 0.0330054, 0.0408868,
871  0.0487087, 0.0564712, 0.0641743, 0.0718179, 0.0794021,
872  0.0869268, 0.0943921, 0.101798, 0.109144, 0.116431,
873  0.123659 },
874  { -0.0136364, -0.0130895, -0.0115174, -0.00892003, -0.00529733,
875  -0.000649351, 0.00502392, 0.0117225, 0.0194463, 0.0281955,
876  0.0379699, 0.0487697, 0.0605947, 0.073445, 0.0873206,
877  0.102221, 0.118148, 0.135099, 0.153076, 0.172078 },
878  { 0.0135338, 0.00200501, -0.00672269, -0.0126493, -0.0157747,
879  -0.0160991, -0.0136223, -0.00834439, -0.000265369, 0.0106148,
880  0.024296, 0.0407784, 0.0600619, 0.0821465, 0.107032,
881  0.134719, 0.165207, 0.198496, 0.234586 },
882  { 0.0526316, 0.0227038, -0.00154799, -0.0201238, -0.0330237,
883  -0.0402477, -0.0417957, -0.0376677, -0.0278638, -0.0123839,
884  0.00877193, 0.0356037, 0.0681115, 0.106295, 0.150155,
885  0.19969, 0.254902, 0.315789 },
886  { 0.108359, 0.0505676, 0.00309598, -0.0340557, -0.0608875,
887  -0.0773994, -0.0835913, -0.0794634, -0.0650155, -0.0402477,
888  -0.00515996, 0.0402477, 0.0959752, 0.162023, 0.23839,
889  0.325077, 0.422085 }
890  };
891 
892  float filtered_baseline[128];
893  float filtered_baseline_derivative[127];
894 
895  // Zero filtered_baseline
896  memset(filtered_baseline, 0, 128 * sizeof(float));
897  // Filter the left edge using (nL, nR) = (0, 16) .. (15, 16) S-G
898  // filters
899  for (size_t i = 0; i < savitzky_golay_n_l_r; i++) {
900  for (size_t j = 0; j < savitzky_golay_n_l_r + 1 + i; j++) {
901  filtered_baseline[i] +=
902  savitzky_golay_coefficient[i][j] * baseline[j];
903  }
904  }
905  // Filter the middle section using the (nL, nR) = (16, 16) S-G
906  // filter, while taking advantage of the symmetry to save 16
907  // multiplications.
908  for (size_t i = savitzky_golay_n_l_r;
909  i < 128 - savitzky_golay_n_l_r; i++) {
910  filtered_baseline[i] =
911  savitzky_golay_coefficient
912  [savitzky_golay_n_l_r][savitzky_golay_n_l_r] * baseline[i];
913  for (size_t j = 0; j < savitzky_golay_n_l_r; j++) {
914  filtered_baseline[i] +=
915  savitzky_golay_coefficient[savitzky_golay_n_l_r][j] *
916  (baseline[i + j - savitzky_golay_n_l_r] +
917  baseline[i - j + savitzky_golay_n_l_r]);
918  }
919 #if 0
920  // Test that the indexing above is correct
921  float test = 0;
922  for (size_t j = 0; j < 2 * savitzky_golay_n_l_r + 1; j++) {
923  test +=
924  savitzky_golay_coefficient[savitzky_golay_n_l_r][j] *
925  baseline[i + j - savitzky_golay_n_l_r];
926  }
927  // test == filtered_baseline[i] should hold now
928 #endif
929  }
930  // Filter the right edge using (nL, nR) = (16, 15) .. (16, 0) S-G
931  // filters
932  for (size_t i = 128 - savitzky_golay_n_l_r; i < 128; i++) {
933  for (size_t j = 0; j < 128 - i + savitzky_golay_n_l_r; j++) {
934  filtered_baseline[i] +=
935  savitzky_golay_coefficient
936  [2 * savitzky_golay_n_l_r + i + 1 - 128][j] *
937  baseline[i + j - savitzky_golay_n_l_r];
938  }
939  }
940  // In lieu of a spearate S-G derivative filter, the finite
941  // difference is used here (since the output is sufficiently
942  // smooth).
943  for (size_t i = 0; i < 127; i++) {
944  filtered_baseline_derivative[i] =
945  filtered_baseline[i + 1] - filtered_baseline[i];
946  }
947 
948  // Calculate the maximum deviation between filtered and unfiltered
949  // baseline, plus the sum square of the derivative.
950 
951  double filtered_baseline_max = 0;
952  double filtered_baseline_derivative_sum_square = 0;
953 
954  for (size_t i = 0; i < 128; i++) {
955  const double d = filtered_baseline[i] - baseline[i];
956 
957  filtered_baseline_max =
958  std::max(filtered_baseline_max,
959  static_cast<double>(fabs(d)));
960  }
961  for (size_t i = 0; i < 127; i++) {
962  filtered_baseline_derivative_sum_square +=
963  filtered_baseline_derivative[i] *
964  filtered_baseline_derivative[i];
965  }
966 
967 #if 0
968  std::cerr << __FILE__ << ':' << __LINE__ << ": "
969  << filtered_baseline_max << ' '
970  << filtered_baseline_derivative_sum_square << std::endl;
971 #endif
972 
973  // Apply the cut
974  return !(filtered_baseline_max >= filteredBaselineMax_ ||
975  filtered_baseline_derivative_sum_square >= filteredBaselineDerivativeSumSquare_);
976 }
int i
Definition: DBlmapReader.cc:9
double filteredBaselineDerivativeSumSquare_
const T & max(const T &a, const T &b)
int j
Definition: DBlmapReader.cc:9
void SiStripAPVRestorer::Cleaner_HighSlopeChecker ( DigiMap smoothedpoints)
inlineprivate

Definition at line 599 of file SiStripAPVRestorer.cc.

References m.

Referenced by BaselineCleaner().

599  {
600  //Removing points in the slope is too high
601  //--------------------------------------------------------------------------------------------------
602 
603  if(smoothedpoints.size() < 4) return;
604  DigiMapIter itSmoothedpoints, itSmoothedpointsNext, itSmoothedpointsBegin, itSmoothedpointsEnd;
605  itSmoothedpoints=smoothedpoints.begin();
606  while (smoothedpoints.size() >2 && itSmoothedpoints != --(smoothedpoints.end()) ) { //while we are not at the last point
607  //if(smoothedpoints.size() <2) break;
608  // get info about current and next points
609  itSmoothedpointsNext = itSmoothedpoints;
610  ++itSmoothedpointsNext;
611  float strip1 = itSmoothedpoints->first;
612  float strip2 = itSmoothedpointsNext->first;
613  float adc1 = itSmoothedpoints->second;
614  float adc2 = itSmoothedpointsNext->second;
615  float m = (adc2 -adc1)/(strip2 -strip1);
616 
617  if (m>2) { // in case of large positive slope, remove next point and try again from same current point
618  smoothedpoints.erase(itSmoothedpointsNext);
619  } else if (m<-2) { // in case of large negative slope, remove current point and either...
620  // move to next point if we have reached the beginning (post-increment to avoid invalidating pointer during erase) or...
621  if(itSmoothedpoints==smoothedpoints.begin()) smoothedpoints.erase(itSmoothedpoints++);
622  // try again from the previous point if we have not reached the beginning
623  else smoothedpoints.erase(itSmoothedpoints--);
624  } else { // in case of a flat enough slope, continue on to the next point
625  itSmoothedpoints++;
626  }
627 
628  }
629 }
std::map< uint16_t, int16_t >::iterator DigiMapIter
void SiStripAPVRestorer::Cleaner_LocalMinimumAdder ( const std::vector< int16_t > &  adcs,
DigiMap smoothedpoints,
const uint16_t &  APVn 
)
inlineprivate

Definition at line 521 of file SiStripAPVRestorer.cc.

References abs, ecalMGPA::adc(), detId_, m, noiseHandle, slopeX_, slopeY_, and strip().

Referenced by BaselineCleaner().

521  {
522  SiStripNoises::Range detNoiseRange = noiseHandle->getRange(detId_);
523  //inserting extra point is case of local minimum
524  //--------------------------------------------------------------------------------------------------
525  // these should be reset now for the point-insertion that follows
526 
527  DigiMapIter itSmoothedpoints, itSmoothedpointsNext, itSmoothedpointsBegin, itSmoothedpointsEnd;
528  if(smoothedpoints.size() >= 2){
529 
530  itSmoothedpointsBegin = smoothedpoints.begin();
531  itSmoothedpointsEnd = --(smoothedpoints.end());
532  for(itSmoothedpoints = itSmoothedpointsBegin; itSmoothedpoints != itSmoothedpointsEnd; ++itSmoothedpoints){
533  itSmoothedpointsNext = itSmoothedpoints;
534  ++itSmoothedpointsNext;
535  float strip1 = itSmoothedpoints->first;
536  float strip2 = itSmoothedpointsNext->first;
537  float adc1 = itSmoothedpoints->second;
538  float adc2 = itSmoothedpointsNext->second;
539  float m = (adc2 -adc1)/(strip2 -strip1);
540 
541  //2,4
542  if((strip2 - strip1) >slopeX_ && abs(adc1 -adc2) >slopeY_){
543  float itStrip = 1;
544  float strip = itStrip + strip1;
545  while(strip < strip2){
546 
547  float adc = adcs[strip];
548  if( adc < (adc1 + m * itStrip - 2 * (float)noiseHandle->getNoiseFast(strip+APVn*128,detNoiseRange))){
549  //std::cout << "applying correction strip: " << strip + APVn*128 << " adc " << adc << " detId: " << detId_ << std::endl;
550  smoothedpoints.insert(itSmoothedpointsNext, std::pair<uint16_t, int16_t >(strip,adc));
551  ++itSmoothedpoints;
552  ++itSmoothedpointsNext;
553  itSmoothedpointsEnd = --(smoothedpoints.end());
554  }
555  ++itStrip;
556  ++strip;
557  }
558 
559 
560  }
561  }
562  }
563 
564 
565  itSmoothedpointsBegin = smoothedpoints.begin();
566  itSmoothedpointsEnd = --(smoothedpoints.end());
567  uint16_t firstStripFlat = itSmoothedpointsBegin->first;
568  uint16_t lastStripFlat = itSmoothedpointsEnd->first;
569  int16_t firstStripFlatADC= itSmoothedpointsBegin->second;
570  int16_t lastStripFlatADC= itSmoothedpointsEnd->second;
571 
572  itSmoothedpoints = itSmoothedpointsBegin;
573  if(firstStripFlat >3){
574  float strip = 0;
575  while(strip < firstStripFlat){
576  float adc = adcs[strip];
577  if( adc < ( firstStripFlatADC - 2 * (float)noiseHandle->getNoiseFast(strip+APVn*128,detNoiseRange))){
578  smoothedpoints.insert(itSmoothedpoints, std::pair<uint16_t, int16_t >(strip,adc));
579  ++itSmoothedpoints;
580  }
581  ++strip;
582  }
583  }
584 
585  itSmoothedpoints = itSmoothedpointsEnd;
586  if(lastStripFlat <125){
587  float strip = lastStripFlat+1;
588  while(strip < 128){
589  float adc = adcs[strip];
590  if( adc < ( lastStripFlatADC - 2 * (float)noiseHandle->getNoiseFast(strip+APVn*128,detNoiseRange))){
591  smoothedpoints.insert(smoothedpoints.end(), std::pair<uint16_t, int16_t >(strip,adc));
592  }
593  ++strip;
594  }
595  }
596 }
int adc(sample_type sample)
get the ADC sample (12 bits)
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
#define abs(x)
Definition: mlp_lapack.h:159
std::map< uint16_t, int16_t >::iterator DigiMapIter
edm::ESHandle< SiStripNoises > noiseHandle
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripNoises.h:41
void SiStripAPVRestorer::Cleaner_MonotonyChecker ( DigiMap smoothedpoints)
inlineprivate

Definition at line 495 of file SiStripAPVRestorer.cc.

References hitStripThreshold_.

Referenced by BaselineCleaner().

495  {
496 //Removing points without monotony
497  //--------------------------------------------------------------------------------------------------
498  if(smoothedpoints.size() < 3) return;
499  DigiMapIter itSmoothedpoints, itSmoothedpointsNext, itSmoothedpointsNextNext, itSmoothedpointsBegin, itSmoothedpointsEnd;
500 
501  itSmoothedpoints=smoothedpoints.begin();
502  while (smoothedpoints.size() > 3 && itSmoothedpoints != --(--(smoothedpoints.end()))) { //while we are not at the last point
503  // get info about current and next points
504  itSmoothedpointsNext = itSmoothedpoints;
505  ++itSmoothedpointsNext;
506  itSmoothedpointsNextNext = itSmoothedpointsNext;
507  ++itSmoothedpointsNextNext;
508  float adc1 = itSmoothedpoints->second;
509  float adc2 = itSmoothedpointsNext->second;
510  float adc3 = itSmoothedpointsNextNext->second;
511 
512  if((adc2-adc1) > hitStripThreshold_ && (adc2-adc3) > hitStripThreshold_){
513  smoothedpoints.erase(itSmoothedpointsNext);
514  }else {
515  ++itSmoothedpoints;
516  }
517 
518  }
519 }
std::map< uint16_t, int16_t >::iterator DigiMapIter
void SiStripAPVRestorer::CreateCMMapCMstored ( const edm::DetSetVector< SiStripProcessedRawDigi > &  Input)
private

Definition at line 1026 of file SiStripAPVRestorer.cc.

References edm::DetSetVector< T >::begin(), edm::DetSetVector< T >::end(), and MeanCMmap_.

Referenced by LoadMeanCMMap().

1026  {
1027 
1028  MeanCMmap_.erase(MeanCMmap_.begin(), MeanCMmap_.end());
1029  uint32_t detId;
1032  std::vector<float> MeanCMNValue;
1033 
1034  for(itInput = Input.begin(); itInput != Input.end(); ++itInput){
1035  detId = itInput->id;
1036  MeanCMNValue.clear();
1037  for(itCM = itInput->begin(); itCM != itInput->end(); ++itCM) MeanCMNValue.push_back(itCM->adc());
1038  MeanCMmap_.insert(std::pair<uint32_t, std::vector<float> >(detId,MeanCMNValue));
1039  }
1040 }
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:356
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:341
collection_type::const_iterator const_iterator
Definition: DetSet.h:34
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:106
void SiStripAPVRestorer::CreateCMMapRealPed ( const edm::DetSetVector< SiStripRawDigi > &  input)
private

Definition at line 998 of file SiStripAPVRestorer.cc.

References sistrip::APV, edm::DetSetVector< T >::begin(), edm::DetSetVector< T >::end(), MeanCMmap_, pedestalHandle, and strip().

Referenced by LoadMeanCMMap().

998  {
999 
1000  MeanCMmap_.erase(MeanCMmap_.begin(), MeanCMmap_.end());
1001 
1002  //std::cout<< "===============================================" << std::endl;
1003 
1005  rawDigis = input.begin(); rawDigis != input.end(); rawDigis++) {
1006  SiStripPedestals::Range detPedestalRange = pedestalHandle->getRange(rawDigis->id);
1007  std::vector<float> MeanCMDetSet;
1008  MeanCMDetSet.clear();
1009 
1010  for(uint16_t APV = 0; APV < rawDigis->size()/128; ++APV){
1011  uint16_t MinPed =0;
1012  for(uint16_t strip = APV*128; strip< (APV+1)*128; ++strip){
1013  uint16_t ped = (uint16_t)pedestalHandle->getPed(strip,detPedestalRange);
1014 
1015  if(ped < MinPed) MinPed = ped;
1016  }
1017  if(MinPed>128) MinPed=128;
1018  MeanCMDetSet.push_back(MinPed);
1019 
1020  }
1021  MeanCMmap_.insert(std::pair<uint32_t, std::vector<float> >(rawDigis->id,MeanCMDetSet));
1022 
1023  }
1024 }
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
std::pair< ContainerIterator, ContainerIterator > Range
edm::ESHandle< SiStripPedestals > pedestalHandle
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:356
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:341
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:106
bool SiStripAPVRestorer::FlatRegionsFinder ( const std::vector< int16_t > &  adcs,
DigiMap smoothedpoints,
const uint16_t &  APVn 
)
inlineprivate

Definition at line 374 of file SiStripAPVRestorer.cc.

References ecalMGPA::adc(), ApplyBaselineCleaner_, BaselineCleaner(), consecThreshold_, detId_, distortionThreshold_, max(), min, n, noiseHandle, nSigmaNoiseDerTh_, and nSmooth_.

Referenced by BaselineFollowerInspect(), and BaselineFollowerRestore().

374  {
375  SiStripNoises::Range detNoiseRange = noiseHandle->getRange(detId_);
376 
377  DigiMap consecpoints;
378  DigiMapIter itConsecpoints, itSmoothedpoints;
379  consecpoints.erase(consecpoints.begin(), consecpoints.end());
380  smoothedpoints.erase(smoothedpoints.begin(), smoothedpoints.end());
381 
382 
383  //============================= Height above local minimum ===============================
384  std::vector<float> adcsLocalMinSubtracted;
385  adcsLocalMinSubtracted.clear();
386  adcsLocalMinSubtracted.insert(adcsLocalMinSubtracted.begin(), 128,0);
387  for(uint32_t istrip=0; istrip<128; ++istrip) {
388  float localmin = 999.9;
389  for(uint16_t jstrip=std::max(0,(int)(istrip-nSmooth_/2)); jstrip<std::min(128,(int)(istrip+nSmooth_/2)); ++jstrip) {
390  float nextvalue = adcs[jstrip];
391  if(nextvalue < localmin) localmin=nextvalue;
392  }
393  adcsLocalMinSubtracted[istrip] = adcs[istrip] - localmin;
394  }
395 
396 
397  //============================= Find regions with stable slopes ========================
398  std::vector<uint16_t> nConsStrip;
399  nConsStrip.clear();
400 
401  //Creating maps with all the neighborhood strip and putting in a nCosntStip vector how many we have
402  uint16_t consecStrips=0;
403  for(uint32_t istrip=0; istrip<128; ++istrip) {
404  int16_t adc = adcs[istrip];
405 
406  //if( adcsLocalMinSubtracted[istrip] < nSigmaNoiseDerTh_ * (float)noiseHandle->getNoise(istrip+APVn*128,detNoiseRange) && (adc - median) < hitStripThreshold_){
407  if( adcsLocalMinSubtracted[istrip] < nSigmaNoiseDerTh_ * (float)noiseHandle->getNoiseFast(istrip+APVn*128,detNoiseRange)){
408  consecpoints.insert(consecpoints.end(), std::pair<uint16_t, int16_t >(istrip, adc));
409  ++consecStrips;
410  }else if (consecStrips >0){
411  nConsStrip.push_back(consecStrips);
412  consecStrips = 0;
413  }
414  }
415 
416  //to cope with the last flat region of the APV
417  if(consecStrips >0) nConsStrip.push_back(consecStrips);
418 
419  //removing from the map the fist and last points in wide flat regions and erasing from the map too small regions
420  itConsecpoints = consecpoints.begin();
421  float MinSmoothValue=20000., MaxSmoothValue=0.;
422  for(std::vector<uint16_t>::iterator itnConsStrip = nConsStrip.begin(); itnConsStrip < nConsStrip.end(); ++itnConsStrip){
423 
424  consecStrips = *itnConsStrip;
425  if(consecStrips >=consecThreshold_){
426  ++itConsecpoints; //skipping first point
427  uint16_t nFirstStrip = itConsecpoints->first;
428  uint16_t nLastStrip;
429  float smoothValue = 0.0;
430  float stripCount =1;
431  for(uint16_t n =0; n < consecStrips-2; ++n){
432  smoothValue += itConsecpoints->second;
433  if(stripCount == consecThreshold_){
434  smoothValue /= (float)stripCount;
435  nLastStrip = nFirstStrip + stripCount -1;
436  smoothedpoints.insert(smoothedpoints.end(), std::pair<uint16_t, int16_t >(nFirstStrip, smoothValue));
437  smoothedpoints.insert(smoothedpoints.end(), std::pair<uint16_t, int16_t >(nLastStrip, smoothValue));
438  if(smoothValue > MaxSmoothValue) MaxSmoothValue = smoothValue;
439  if(smoothValue < MinSmoothValue) MinSmoothValue = smoothValue;
440  nFirstStrip = nLastStrip+1;
441  smoothValue=0;
442  stripCount=0;
443  }
444  ++stripCount;
445  ++itConsecpoints;
446  }
447  ++itConsecpoints; //and putting the pointer to the new seies of point
448 
449  if(stripCount>1) {
450  //if(smoothValue>0){
451  --stripCount;
452  smoothValue /= (float)(stripCount);
453  nLastStrip = nFirstStrip + stripCount -1;
454  smoothedpoints.insert(smoothedpoints.end(), std::pair<uint16_t, int16_t >(nFirstStrip, smoothValue));
455  smoothedpoints.insert(smoothedpoints.end(), std::pair<uint16_t, int16_t >(nLastStrip, smoothValue));
456  if(smoothValue > MaxSmoothValue) MaxSmoothValue = smoothValue;
457  if(smoothValue < MinSmoothValue) MinSmoothValue = smoothValue;
458  }
459  } else{
460  for(int n =0; n< consecStrips ; ++n) ++itConsecpoints;
461  }
462  }
463 
464 
465  if( (MaxSmoothValue-MinSmoothValue) > distortionThreshold_){
466  if(ApplyBaselineCleaner_) this->BaselineCleaner(adcs, smoothedpoints, APVn);
467  return false;
468  }
469  return true;
470 }
int adc(sample_type sample)
get the ADC sample (12 bits)
std::map< uint16_t, int16_t > DigiMap
#define min(a, b)
Definition: mlp_lapack.h:161
std::map< uint16_t, int16_t >::iterator DigiMapIter
const T & max(const T &a, const T &b)
edm::ESHandle< SiStripNoises > noiseHandle
void BaselineCleaner(const std::vector< int16_t > &, DigiMap &, const uint16_t &)
std::pair< ContainerIterator, ContainerIterator > Range
Definition: SiStripNoises.h:41
void SiStripAPVRestorer::FlatRestore ( const uint16_t &  APVn,
const uint16_t &  firstAPV,
std::vector< int16_t > &  digis 
)
inlineprivate

Definition at line 353 of file SiStripAPVRestorer.cc.

References BaselineMap_.

Referenced by restore().

353  {
354 
355  std::vector<int16_t> baseline;
356  baseline.clear();
357  baseline.insert(baseline.begin(),128, 150);
358  baseline[0]=0; baseline[127]=0;
359  BaselineMap_.insert(BaselineMap_.end(), std::pair< uint16_t, std::vector < int16_t> >(APVn, baseline));
360 
361  for(int16_t itStrip= 0 ; itStrip< 128; ++itStrip){
362  digis[(APVn-firstAPV)*128+itStrip] = baseline[itStrip];
363  }
364 
365 
366 }
std::vector< bool > & SiStripAPVRestorer::GetAPVFlags ( )

Definition at line 1042 of file SiStripAPVRestorer.cc.

References apvFlags_, apvFlagsBool_, apvFlagsBoolOverride_, and i.

1042  {
1043  apvFlagsBool_.clear();
1044  for(size_t i =0; i < apvFlags_.size(); ++i){
1045  if(apvFlags_[i] != "" && !apvFlagsBoolOverride_[i]) apvFlagsBool_.push_back(true);
1046  else apvFlagsBool_.push_back(false);
1047  }
1048  return apvFlagsBool_;
1049 }
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > apvFlags_
std::vector< bool > apvFlagsBoolOverride_
std::vector< bool > apvFlagsBool_
RawDigiMap& SiStripAPVRestorer::GetBaselineMap ( )
inline

Definition at line 46 of file SiStripAPVRestorer.h.

References BaselineMap_.

46 {return BaselineMap_;}
std::map< uint16_t, DigiMap >& SiStripAPVRestorer::GetSmoothedPoints ( )
inline

Definition at line 48 of file SiStripAPVRestorer.h.

References SmoothedMaps_.

48 {return SmoothedMaps_;}
std::map< uint16_t, DigiMap > SmoothedMaps_
void SiStripAPVRestorer::init ( const edm::EventSetup es)

Definition at line 44 of file SiStripAPVRestorer.cc.

References edm::EventSetup::get(), noise_cache_id, noiseHandle, pedestal_cache_id, pedestalHandle, quality_cache_id, and qualityHandle.

44  {
45  uint32_t n_cache_id = es.get<SiStripNoisesRcd>().cacheIdentifier();
46  uint32_t q_cache_id = es.get<SiStripQualityRcd>().cacheIdentifier();
47  uint32_t p_cache_id = es.get<SiStripPedestalsRcd>().cacheIdentifier();
48 
49  if(n_cache_id != noise_cache_id) {
50  es.get<SiStripNoisesRcd>().get( noiseHandle );
51  noise_cache_id = n_cache_id;
52  } else {
53  noise_cache_id = n_cache_id;
54  }
55  if(q_cache_id != quality_cache_id) {
56  es.get<SiStripQualityRcd>().get( qualityHandle );
57  quality_cache_id = q_cache_id;
58  }else {
59  quality_cache_id = q_cache_id;
60  }
61 
62  if(p_cache_id != pedestal_cache_id) {
64  pedestal_cache_id = p_cache_id;
65  }else {
66  pedestal_cache_id = p_cache_id;
67  }
68 
69 }
edm::ESHandle< SiStripPedestals > pedestalHandle
edm::ESHandle< SiStripQuality > qualityHandle
edm::ESHandle< SiStripNoises > noiseHandle
const T & get() const
Definition: EventSetup.h:55
int16_t SiStripAPVRestorer::inspect ( const uint32_t &  detId,
const uint16_t &  firstAPV,
std::vector< int16_t > &  digis,
const std::vector< std::pair< short, float > > &  vmedians 
)

Definition at line 79 of file SiStripAPVRestorer.cc.

References AbnormalBaselineInspect(), sistrip::APV, apvFlags_, apvFlagsBool_, apvFlagsBoolOverride_, badAPVs_, BaselineAndSaturationInspect(), BaselineFollowerInspect(), BaselineMap_, detId_, edm::hlt::Exception, i, InspectAlgo_, median_, NullInspect(), qualityHandle, and SmoothedMaps_.

Referenced by InspectAndRestore().

79  {
80 
81  detId_ = detId;
82 
83  apvFlagsBool_.clear();
84  apvFlagsBoolOverride_.clear();
85  apvFlagsBoolOverride_.insert(apvFlagsBoolOverride_.begin(), 6, false);
86  apvFlags_.clear();
87  apvFlags_.insert(apvFlags_.begin(), 6, "");
88  median_.clear();
89  median_.insert(median_.begin(), 6, -999);
90  badAPVs_.clear();
91  badAPVs_.insert(badAPVs_.begin(), 6, false);
92  SmoothedMaps_.erase(SmoothedMaps_.begin(), SmoothedMaps_.end());
93  BaselineMap_.erase(BaselineMap_.begin(), BaselineMap_.end());
94 
95  for(size_t i=0; i< vmedians.size(); ++i){
96  short APV = vmedians[i].first;
97  median_[APV]= vmedians[i].second;
98  badAPVs_[APV] = qualityHandle->IsApvBad(detId_, APV);
99  }
100 
101  if(InspectAlgo_=="BaselineFollower") return this->BaselineFollowerInspect(firstAPV, digis);
102  if(InspectAlgo_=="AbnormalBaseline") return this->AbnormalBaselineInspect(firstAPV, digis);
103  if(InspectAlgo_=="Null") return this->NullInspect(firstAPV, digis);
104  if(InspectAlgo_=="BaselineAndSaturation") return this->BaselineAndSaturationInspect(firstAPV, digis);
105  throw cms::Exception("Unregistered Inspect Algorithm") << "SiStripAPVRestorer possibilities: (Null), (AbnormalBaseline),(BaselineFollower)";
106 
107 }
int16_t AbnormalBaselineInspect(const uint16_t &, std::vector< T > &)
int16_t BaselineFollowerInspect(const uint16_t &, std::vector< T > &)
int i
Definition: DBlmapReader.cc:9
std::map< uint16_t, DigiMap > SmoothedMaps_
std::vector< std::string > apvFlags_
edm::ESHandle< SiStripQuality > qualityHandle
int16_t NullInspect(const uint16_t &, std::vector< T > &)
int16_t BaselineAndSaturationInspect(const uint16_t &, std::vector< T > &)
std::vector< bool > apvFlagsBoolOverride_
std::vector< bool > badAPVs_
std::vector< bool > apvFlagsBool_
std::vector< float > median_
int16_t SiStripAPVRestorer::InspectAndRestore ( const uint32_t &  detId,
const uint16_t &  firstAPV,
std::vector< int16_t > &  rawDigisPedSubtracted,
std::vector< int16_t > &  processedRawDigi,
const std::vector< std::pair< short, float > > &  vmedians 
)

Definition at line 72 of file SiStripAPVRestorer.cc.

References inspect(), and restore().

72  {
73  int16_t nAPVFlagged = this->inspect(detId, firstAPV, rawDigisPedSubtracted, vmedians);
74  this->restore(firstAPV, processedRawDigi);
75  return nAPVFlagged;
76 }
void restore(const uint16_t &, std::vector< int16_t > &)
int16_t inspect(const uint32_t &, const uint16_t &, std::vector< int16_t > &, const std::vector< std::pair< short, float > > &)
void SiStripAPVRestorer::LoadMeanCMMap ( const edm::Event iEvent)

Definition at line 985 of file SiStripAPVRestorer.cc.

References CreateCMMapCMstored(), CreateCMMapRealPed(), edm::Event::getByLabel(), LaserDQM_cfg::input, and useRealMeanCM_.

985  {
986  if(useRealMeanCM_){
988  iEvent.getByLabel("siStripDigis","VirginRaw", input);
989  this->CreateCMMapRealPed(*input);
990  } else {
992  iEvent.getByLabel("MEANAPVCM",inputCM);
993  this->CreateCMMapCMstored(*inputCM);
994  }
995 }
void CreateCMMapRealPed(const edm::DetSetVector< SiStripRawDigi > &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
void CreateCMMapCMstored(const edm::DetSetVector< SiStripProcessedRawDigi > &)
template<typename T >
int16_t SiStripAPVRestorer::NullInspect ( const uint16_t &  firstAPV,
std::vector< T > &  digis 
)
inlineprivate

Definition at line 269 of file SiStripAPVRestorer.cc.

References sistrip::APV, apvFlags_, badAPVs_, detId_, qualityHandle, RestoreAlgo_, and restoreThreshold_.

Referenced by inspect().

269  {
270 
271  SiStripQuality::Range detQualityRange = qualityHandle->getRange(detId_);
272 
273  typename std::vector<T>::iterator fs;
274 
275  int16_t nAPVflagged = 0;
276 
277  for(uint16_t APV=firstAPV ; APV< digis.size()/128 + firstAPV; ++APV){
278  apvFlags_.push_back( "" );
279  if(!badAPVs_[APV]){
280  int zeroCount = 0, qualityCount = 0;
281  for (uint16_t istrip=APV*128; istrip<(APV+1)*128; ++istrip){
282  fs = digis.begin() + istrip-firstAPV*128;
283  if ( !qualityHandle->IsStripBad(detQualityRange,istrip) ){
284  qualityCount++;
285  if ( (int) *fs < 1 ) zeroCount++;
286  }
287  }
288 
289  if( zeroCount > restoreThreshold_ * qualityCount ) {
290  apvFlags_[APV] = RestoreAlgo_; //specify any algo to make the restore
291  nAPVflagged++;
292  }
293  }
294  }
295 
296  return nAPVflagged;
297 
298 }
std::vector< std::string > apvFlags_
edm::ESHandle< SiStripQuality > qualityHandle
std::vector< bool > badAPVs_
std::pair< ContainerIterator, ContainerIterator > Range
float SiStripAPVRestorer::pairMedian ( std::vector< std::pair< float, float > > &  )
private
void SiStripAPVRestorer::restore ( const uint16_t &  firstAPV,
std::vector< int16_t > &  digis 
)

Definition at line 110 of file SiStripAPVRestorer.cc.

References sistrip::APV, apvFlags_, BaselineFollowerRestore(), edm::hlt::Exception, FlatRestore(), ForceNoRestore_, median_, RestoreAlgo_, and SelfSelectRestoreAlgo_.

Referenced by InspectAndRestore().

110  {
111 
112  if(ForceNoRestore_) return;
113 
114  for( uint16_t APV=firstAPV; APV< digis.size()/128 + firstAPV; ++APV){
115  std::string algoToUse = *( apvFlags_.begin() + APV );
116 
117  if ( algoToUse != ""){
118  if(!SelfSelectRestoreAlgo_) algoToUse = RestoreAlgo_;
119 
120  if(algoToUse=="Flat"){
121  this->FlatRestore(APV, firstAPV, digis);
122  }else if(algoToUse=="BaselineFollower"){
123  this->BaselineFollowerRestore(APV, firstAPV, median_[APV], digis);
124  }else{
125  throw cms::Exception("Unregistered Restore Algorithm") << "SiStripAPVRestorer possibilities: (Flat), (BaselineFollower)";
126  }
127 
128 
129  }
130  }
131 
132 }
std::vector< std::string > apvFlags_
void BaselineFollowerRestore(const uint16_t &, const uint16_t &, const float &, std::vector< int16_t > &)
void FlatRestore(const uint16_t &, const uint16_t &, std::vector< int16_t > &)
std::vector< float > median_

Friends And Related Function Documentation

friend class SiStripRawProcessingFactory
friend

Definition at line 33 of file SiStripAPVRestorer.h.

Member Data Documentation

bool SiStripAPVRestorer::ApplyBaselineCleaner_
private

Definition at line 131 of file SiStripAPVRestorer.h.

Referenced by FlatRegionsFinder().

bool SiStripAPVRestorer::ApplyBaselineRejection_
private

Definition at line 135 of file SiStripAPVRestorer.h.

Referenced by BaselineFollowerRestore().

std::vector<std::string> SiStripAPVRestorer::apvFlags_
private
std::vector<bool> SiStripAPVRestorer::apvFlagsBool_
private

Definition at line 94 of file SiStripAPVRestorer.h.

Referenced by GetAPVFlags(), and inspect().

std::vector<bool> SiStripAPVRestorer::apvFlagsBoolOverride_
private

Definition at line 95 of file SiStripAPVRestorer.h.

Referenced by BaselineFollowerRestore(), GetAPVFlags(), and inspect().

std::vector<bool> SiStripAPVRestorer::badAPVs_
private
RawDigiMap SiStripAPVRestorer::BaselineMap_
private
uint32_t SiStripAPVRestorer::CleaningSequence_
private

Definition at line 134 of file SiStripAPVRestorer.h.

Referenced by BaselineCleaner().

uint32_t SiStripAPVRestorer::consecThreshold_
private

Definition at line 124 of file SiStripAPVRestorer.h.

Referenced by FlatRegionsFinder().

double SiStripAPVRestorer::CutToAvoidSignal_
private

Definition at line 129 of file SiStripAPVRestorer.h.

uint32_t SiStripAPVRestorer::DeltaCMThreshold_
private

Definition at line 121 of file SiStripAPVRestorer.h.

Referenced by BaselineAndSaturationInspect(), and BaselineFollowerInspect().

uint32_t SiStripAPVRestorer::detId_
private
uint32_t SiStripAPVRestorer::deviation_
private

Definition at line 119 of file SiStripAPVRestorer.h.

Referenced by AbnormalBaselineInspect().

uint32_t SiStripAPVRestorer::distortionThreshold_
private

Definition at line 128 of file SiStripAPVRestorer.h.

Referenced by FlatRegionsFinder().

double SiStripAPVRestorer::filteredBaselineDerivativeSumSquare_
private

Definition at line 138 of file SiStripAPVRestorer.h.

Referenced by CheckBaseline().

double SiStripAPVRestorer::filteredBaselineMax_
private

Definition at line 137 of file SiStripAPVRestorer.h.

Referenced by CheckBaseline().

bool SiStripAPVRestorer::ForceNoRestore_
private

Definition at line 108 of file SiStripAPVRestorer.h.

Referenced by restore().

double SiStripAPVRestorer::fraction_
private

Definition at line 118 of file SiStripAPVRestorer.h.

Referenced by AbnormalBaselineInspect().

uint32_t SiStripAPVRestorer::hitStripThreshold_
private

Definition at line 125 of file SiStripAPVRestorer.h.

Referenced by Cleaner_MonotonyChecker().

edm::InputTag SiStripAPVRestorer::inputTag_
private

Definition at line 105 of file SiStripAPVRestorer.h.

std::string SiStripAPVRestorer::InspectAlgo_
private

Definition at line 110 of file SiStripAPVRestorer.h.

Referenced by inspect().

int32_t SiStripAPVRestorer::MeanCM_
private
CMMap SiStripAPVRestorer::MeanCMmap_
private
std::vector<float> SiStripAPVRestorer::median_
private
uint32_t SiStripAPVRestorer::minStripsToFit_
private

Definition at line 127 of file SiStripAPVRestorer.h.

Referenced by BaselineFollower().

uint32_t SiStripAPVRestorer::noise_cache_id
private

Definition at line 88 of file SiStripAPVRestorer.h.

Referenced by init().

edm::ESHandle<SiStripNoises> SiStripAPVRestorer::noiseHandle
private

Definition at line 87 of file SiStripAPVRestorer.h.

Referenced by Cleaner_LocalMinimumAdder(), FlatRegionsFinder(), and init().

uint32_t SiStripAPVRestorer::nSaturatedStrip_
private

Definition at line 130 of file SiStripAPVRestorer.h.

Referenced by BaselineAndSaturationInspect().

uint32_t SiStripAPVRestorer::nSigmaNoiseDerTh_
private

Definition at line 123 of file SiStripAPVRestorer.h.

Referenced by FlatRegionsFinder().

uint32_t SiStripAPVRestorer::nSmooth_
private

Definition at line 126 of file SiStripAPVRestorer.h.

Referenced by FlatRegionsFinder().

uint32_t SiStripAPVRestorer::pedestal_cache_id
private

Definition at line 91 of file SiStripAPVRestorer.h.

Referenced by init().

edm::ESHandle<SiStripPedestals> SiStripAPVRestorer::pedestalHandle
private

Definition at line 90 of file SiStripAPVRestorer.h.

Referenced by CreateCMMapRealPed(), and init().

uint32_t SiStripAPVRestorer::quality_cache_id
private

Definition at line 85 of file SiStripAPVRestorer.h.

Referenced by init().

edm::ESHandle<SiStripQuality> SiStripAPVRestorer::qualityHandle
private

Definition at line 84 of file SiStripAPVRestorer.h.

Referenced by AbnormalBaselineInspect(), init(), inspect(), and NullInspect().

std::string SiStripAPVRestorer::RestoreAlgo_
private
double SiStripAPVRestorer::restoreThreshold_
private

Definition at line 120 of file SiStripAPVRestorer.h.

Referenced by NullInspect().

bool SiStripAPVRestorer::SelfSelectRestoreAlgo_
private

Definition at line 109 of file SiStripAPVRestorer.h.

Referenced by restore().

int32_t SiStripAPVRestorer::slopeX_
private

Definition at line 132 of file SiStripAPVRestorer.h.

Referenced by Cleaner_LocalMinimumAdder().

int32_t SiStripAPVRestorer::slopeY_
private

Definition at line 133 of file SiStripAPVRestorer.h.

Referenced by Cleaner_LocalMinimumAdder().

std::map<uint16_t, DigiMap> SiStripAPVRestorer::SmoothedMaps_
private
bool SiStripAPVRestorer::useRealMeanCM_
private