00001 #ifndef CondFormats_SiStripObjects_PedsFullNoiseAnalysis_H 00002 #define CondFormats_SiStripObjects_PedsFullNoiseAnalysis_H 00003 00004 #include "CondFormats/SiStripObjects/interface/CommissioningAnalysis.h" 00005 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h" 00006 #include <boost/cstdint.hpp> 00007 #include <sstream> 00008 #include <vector> 00009 00015 class PedsFullNoiseAnalysis : public CommissioningAnalysis { 00016 00017 public: 00018 00019 // ---------- con(de)structors ---------- 00020 00021 PedsFullNoiseAnalysis( const uint32_t& key ); 00022 00023 PedsFullNoiseAnalysis(); 00024 00025 virtual ~PedsFullNoiseAnalysis() {;} 00026 00027 friend class PedestalsAlgorithm; 00028 friend class PedsFullNoiseAlgorithm; 00029 00030 // ---------- public interface ---------- 00031 00033 bool isValid() const; 00034 00035 // Pedestal, noise and raw noise (128-strip vector per APV) 00036 inline const VVFloat& peds() const; 00037 inline const VVFloat& noise() const; 00038 inline const VVFloat& raw() const; 00039 // KS Probability for each strip 00040 inline const VVFloat& ksProb() const; 00041 // KS Probability for each strip 00042 inline const VVFloat& chi2Prob() const; 00043 // Noise value calculated by a gaussian fit instead of RMS. 00044 inline const VVFloat& noiseGaus() const; 00045 // Noise value calculated by a gaussian fit instead of RMS. 00046 inline const VVFloat& noiseBin84() const; 00047 // Noise value calculated by RMS of ADC values. 00048 inline const VVFloat& noiseRMS() const; 00049 // The significance of noise of each strip compared to the apv 00050 inline const VVFloat& noiseSignif() const; 00051 00052 // Dead and noisy strips (vector per APV) 00053 inline const VVInt& dead() const; 00054 inline const VVInt& noisy() const; 00055 00056 // Mean and rms spread (value per APV) 00057 inline const VFloat& pedsMean() const; 00058 inline const VFloat& pedsSpread() const; 00059 inline const VFloat& noiseMean() const; 00060 inline const VFloat& noiseSpread() const; 00061 inline const VFloat& rawMean() const; 00062 inline const VFloat& rawSpread() const; 00063 00064 // Max and min values (value per APV) 00065 inline const VFloat& pedsMax() const; 00066 inline const VFloat& pedsMin() const; 00067 inline const VFloat& noiseMax() const; 00068 inline const VFloat& noiseMin() const; 00069 inline const VFloat& rawMax() const; 00070 inline const VFloat& rawMin() const; 00071 00072 // ---------- misc ---------- 00073 00075 void print( std::stringstream&, uint32_t apv_number = 0 ); 00076 00078 void summary( std::stringstream& ) const; 00079 00081 void reset(); 00082 00083 // ---------- private member data ---------- 00084 00085 private: 00086 00087 // VVFloats means: 1 vector per APV, 1 value per strip. 00088 00090 VVFloat peds_; 00091 00093 VVFloat noise_; 00094 00096 VVFloat raw_; 00097 00098 00099 VVFloat ksProb_; 00100 VVFloat chi2Prob_; 00101 VVFloat noiseGaus_; 00102 VVFloat noiseBin84_; 00103 VVFloat noiseRMS_; 00104 VVFloat noiseSignif_; 00105 // VVInts means: 1 vector per APV, values are strip numbers. 00106 00108 VVInt dead_; 00109 00111 VVInt noisy_; 00112 00113 // VFloat: 1 value per APV 00114 00116 VFloat pedsMean_; 00117 00119 VFloat pedsSpread_; 00120 00122 VFloat noiseMean_; 00123 00125 VFloat noiseSpread_; 00126 00128 VFloat rawMean_; 00129 00131 VFloat rawSpread_; 00132 00134 VFloat pedsMax_; 00135 00137 VFloat pedsMin_; 00138 00140 VFloat noiseMax_; 00141 00143 VFloat noiseMin_; 00144 00146 VFloat rawMax_; 00147 00149 VFloat rawMin_; 00150 00151 // true if legacy histogram naming is used 00152 bool legacy_; 00153 }; 00154 00155 // ---------- Inline methods ---------- 00156 00157 const PedsFullNoiseAnalysis::VVFloat& PedsFullNoiseAnalysis::peds() const { return peds_; } 00158 const PedsFullNoiseAnalysis::VVFloat& PedsFullNoiseAnalysis::noise() const { return noise_; } 00159 const PedsFullNoiseAnalysis::VVFloat& PedsFullNoiseAnalysis::raw() const { return raw_; } 00160 const PedsFullNoiseAnalysis::VVFloat& PedsFullNoiseAnalysis::ksProb() const { return ksProb_; } 00161 const PedsFullNoiseAnalysis::VVFloat& PedsFullNoiseAnalysis::chi2Prob() const { return chi2Prob_; } 00162 const PedsFullNoiseAnalysis::VVFloat& PedsFullNoiseAnalysis::noiseGaus() const { return noiseGaus_; } 00163 const PedsFullNoiseAnalysis::VVFloat& PedsFullNoiseAnalysis::noiseBin84() const { return noiseBin84_; } 00164 const PedsFullNoiseAnalysis::VVFloat& PedsFullNoiseAnalysis::noiseRMS() const { return noiseRMS_; } 00165 const PedsFullNoiseAnalysis::VVFloat& PedsFullNoiseAnalysis::noiseSignif() const { return noiseSignif_; } 00166 00167 const PedsFullNoiseAnalysis::VVInt& PedsFullNoiseAnalysis::dead() const { return dead_; } 00168 const PedsFullNoiseAnalysis::VVInt& PedsFullNoiseAnalysis::noisy() const { return noisy_; } 00169 00170 const PedsFullNoiseAnalysis::VFloat& PedsFullNoiseAnalysis::pedsMean() const { return pedsMean_; } 00171 const PedsFullNoiseAnalysis::VFloat& PedsFullNoiseAnalysis::pedsSpread() const { return pedsSpread_; } 00172 const PedsFullNoiseAnalysis::VFloat& PedsFullNoiseAnalysis::noiseMean() const { return noiseMean_; } 00173 const PedsFullNoiseAnalysis::VFloat& PedsFullNoiseAnalysis::noiseSpread() const { return noiseSpread_; } 00174 const PedsFullNoiseAnalysis::VFloat& PedsFullNoiseAnalysis::rawMean() const { return rawMean_; } 00175 const PedsFullNoiseAnalysis::VFloat& PedsFullNoiseAnalysis::rawSpread() const { return rawSpread_; } 00176 00177 const PedsFullNoiseAnalysis::VFloat& PedsFullNoiseAnalysis::pedsMax() const { return pedsMax_; } 00178 const PedsFullNoiseAnalysis::VFloat& PedsFullNoiseAnalysis::pedsMin() const { return pedsMin_; } 00179 const PedsFullNoiseAnalysis::VFloat& PedsFullNoiseAnalysis::noiseMax() const { return noiseMax_; } 00180 const PedsFullNoiseAnalysis::VFloat& PedsFullNoiseAnalysis::noiseMin() const { return noiseMin_; } 00181 const PedsFullNoiseAnalysis::VFloat& PedsFullNoiseAnalysis::rawMax() const { return rawMax_; } 00182 const PedsFullNoiseAnalysis::VFloat& PedsFullNoiseAnalysis::rawMin() const { return rawMin_; } 00183 #endif // CondFormats_SiStripObjects_PedsFullNoiseAnalysis_H