00001 // -*- C++ -*- 00002 // 00003 // Package: SiStripQuality 00004 // Class: SiStripHotStripAlgorithmFromClusterOccupancy 00005 // 00013 // 00014 // Original Author: Domenico GIORDANO 00015 // Created: Wed Oct 3 12:11:10 CEST 2007 00016 // $Id: SiStripHotStripAlgorithmFromClusterOccupancy.h,v 1.2 2007/11/02 21:06:38 giordano Exp $ 00017 // 00018 // 00019 00020 #ifndef CalibTracker_SiStripQuality_SiStripHotStripAlgorithmFromClusterOccupancy_H 00021 #define CalibTracker_SiStripQuality_SiStripHotStripAlgorithmFromClusterOccupancy_H 00022 00023 // system include files 00024 #include <memory> 00025 #include <vector> 00026 #include <sstream> 00027 00028 #include "TMath.h" 00029 00030 #include "CalibTracker/SiStripQuality/interface/SiStripQualityHistos.h" 00031 00032 class SiStripQuality; 00033 00034 class SiStripHotStripAlgorithmFromClusterOccupancy{ 00035 00036 public: 00037 typedef SiStrip::QualityHistosMap HistoMap; 00038 00039 00040 SiStripHotStripAlgorithmFromClusterOccupancy():prob_(1.E-7),MinNumEntries_(0),MinNumEntriesPerStrip_(0){}; 00041 virtual ~SiStripHotStripAlgorithmFromClusterOccupancy(); 00042 00043 void setProbabilityThreshold(long double prob){prob_=prob;} 00044 void setMinNumEntries(unsigned short m){MinNumEntries_=m;} 00045 void setMinNumEntriesPerStrip(unsigned short m){MinNumEntriesPerStrip_=m;} 00046 void extractBadStrips(SiStripQuality*,HistoMap&); 00047 00048 00049 private: 00050 00051 struct pHisto{ 00052 00053 pHisto():_NEntries(0),_NEmptyBins(0){}; 00054 TH1F* _th1f; 00055 int _NEntries; 00056 int _NEmptyBins; 00057 }; 00058 00059 void iterativeSearch(pHisto&,std::vector<unsigned int>&); 00060 void evaluatePoissonian(std::vector<long double>& , float& meanVal); 00061 00062 long double prob_; 00063 unsigned short MinNumEntries_; 00064 unsigned short MinNumEntriesPerStrip_; 00065 00066 SiStripQuality *pQuality; 00067 std::stringstream ss; 00068 }; 00069 #endif 00070