Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:38

0001 #ifndef CondFormats_SiStripObjects_PedestalsAnalysis_H
0002 #define CondFormats_SiStripObjects_PedestalsAnalysis_H
0003 
0004 #include "CondFormats/SiStripObjects/interface/CommissioningAnalysis.h"
0005 #include "DataFormats/SiStripCommon/interface/SiStripConstants.h"
0006 #include <sstream>
0007 #include <vector>
0008 #include <cstdint>
0009 
0010 /** 
0011     @class PedestalsAnalysis
0012     @author M. Wingham, R.Bainbridge
0013     @brief Histogram-based analysis for pedestal run.
0014 */
0015 class PedestalsAnalysis : public CommissioningAnalysis {
0016 public:
0017   // ---------- con(de)structors ----------
0018 
0019   PedestalsAnalysis(const uint32_t& key);
0020 
0021   PedestalsAnalysis();
0022 
0023   ~PedestalsAnalysis() override { ; }
0024 
0025   friend class PedestalsAlgorithm;
0026 
0027   // ---------- public interface ----------
0028 
0029   /** Identifies if analysis is valid or not. */
0030   bool isValid() const override;
0031 
0032   // Pedestal, noise and raw noise (128-strip vector per APV)
0033   inline const VVFloat& peds() const;
0034   inline const VVFloat& noise() const;
0035   inline const VVFloat& raw() const;
0036 
0037   // Dead and noisy strips (vector per APV)
0038   inline const VVInt& dead() const;
0039   inline const VVInt& noisy() const;
0040 
0041   // Mean and rms spread (value per APV)
0042   inline const VFloat& pedsMean() const;
0043   inline const VFloat& pedsSpread() const;
0044   inline const VFloat& noiseMean() const;
0045   inline const VFloat& noiseSpread() const;
0046   inline const VFloat& rawMean() const;
0047   inline const VFloat& rawSpread() const;
0048 
0049   // Max and min values (value per APV)
0050   inline const VFloat& pedsMax() const;
0051   inline const VFloat& pedsMin() const;
0052   inline const VFloat& noiseMax() const;
0053   inline const VFloat& noiseMin() const;
0054   inline const VFloat& rawMax() const;
0055   inline const VFloat& rawMin() const;
0056 
0057   // ---------- misc ----------
0058 
0059   /** Prints analysis results. */
0060   void print(std::stringstream&, uint32_t apv_number = 0) override;
0061 
0062   /** Overrides base method. */
0063   void summary(std::stringstream&) const override;
0064 
0065   /** Resets analysis member data. */
0066   void reset() override;
0067 
0068   // ---------- private member data ----------
0069 
0070 private:
0071   // VVFloats means: 1 vector per APV, 1 value per strip.
0072 
0073   /** Peds values. */
0074   VVFloat peds_;
0075 
0076   /** Noise values. */
0077   VVFloat noise_;
0078 
0079   /** Raw noise values. */
0080   VVFloat raw_;
0081 
0082   // VVInts means: 1 vector per APV, values are strip numbers.
0083 
0084   /** Dead strips. */
0085   VVInt dead_;
0086 
0087   /** Noisy strips. */
0088   VVInt noisy_;
0089 
0090   // VFloat: 1 value per APV
0091 
0092   /** Mean peds value. */
0093   VFloat pedsMean_;
0094 
0095   /** Rms spread in peds. */
0096   VFloat pedsSpread_;
0097 
0098   /** Mean noise value. */
0099   VFloat noiseMean_;
0100 
0101   /** Rms spread in noise. */
0102   VFloat noiseSpread_;
0103 
0104   /** Mean raw noise value. */
0105   VFloat rawMean_;
0106 
0107   /** Rms spread in raw noise. */
0108   VFloat rawSpread_;
0109 
0110   /** Max peds value. */
0111   VFloat pedsMax_;
0112 
0113   /** Min peds value. */
0114   VFloat pedsMin_;
0115 
0116   /** Max noise value. */
0117   VFloat noiseMax_;
0118 
0119   /** Min noise value. */
0120   VFloat noiseMin_;
0121 
0122   /** Max raw noise value. */
0123   VFloat rawMax_;
0124 
0125   /** Min raw noise value. */
0126   VFloat rawMin_;
0127 
0128   // true if legacy histogram naming is used
0129   bool legacy_;
0130 };
0131 
0132 // ---------- Inline methods ----------
0133 
0134 const PedestalsAnalysis::VVFloat& PedestalsAnalysis::peds() const { return peds_; }
0135 const PedestalsAnalysis::VVFloat& PedestalsAnalysis::noise() const { return noise_; }
0136 const PedestalsAnalysis::VVFloat& PedestalsAnalysis::raw() const { return raw_; }
0137 
0138 const PedestalsAnalysis::VVInt& PedestalsAnalysis::dead() const { return dead_; }
0139 const PedestalsAnalysis::VVInt& PedestalsAnalysis::noisy() const { return noisy_; }
0140 
0141 const PedestalsAnalysis::VFloat& PedestalsAnalysis::pedsMean() const { return pedsMean_; }
0142 const PedestalsAnalysis::VFloat& PedestalsAnalysis::pedsSpread() const { return pedsSpread_; }
0143 const PedestalsAnalysis::VFloat& PedestalsAnalysis::noiseMean() const { return noiseMean_; }
0144 const PedestalsAnalysis::VFloat& PedestalsAnalysis::noiseSpread() const { return noiseSpread_; }
0145 const PedestalsAnalysis::VFloat& PedestalsAnalysis::rawMean() const { return rawMean_; }
0146 const PedestalsAnalysis::VFloat& PedestalsAnalysis::rawSpread() const { return rawSpread_; }
0147 
0148 const PedestalsAnalysis::VFloat& PedestalsAnalysis::pedsMax() const { return pedsMax_; }
0149 const PedestalsAnalysis::VFloat& PedestalsAnalysis::pedsMin() const { return pedsMin_; }
0150 const PedestalsAnalysis::VFloat& PedestalsAnalysis::noiseMax() const { return noiseMax_; }
0151 const PedestalsAnalysis::VFloat& PedestalsAnalysis::noiseMin() const { return noiseMin_; }
0152 const PedestalsAnalysis::VFloat& PedestalsAnalysis::rawMax() const { return rawMax_; }
0153 const PedestalsAnalysis::VFloat& PedestalsAnalysis::rawMin() const { return rawMin_; }
0154 
0155 #endif  // CondFormats_SiStripObjects_PedestalsAnalysis_H