Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:38

0001 #ifndef CondFormats_SiStripObjects_PedsOnlyAnalysis_H
0002 #define CondFormats_SiStripObjects_PedsOnlyAnalysis_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 PedsOnlyAnalysis
0012     @author M. Wingham, R.Bainbridge
0013     @brief Histogram-based analysis for pedestal run.
0014 */
0015 class PedsOnlyAnalysis : public CommissioningAnalysis {
0016 public:
0017   // ---------- con(de)structors ----------
0018 
0019   PedsOnlyAnalysis(const uint32_t& key);
0020 
0021   PedsOnlyAnalysis();
0022 
0023   ~PedsOnlyAnalysis() override { ; }
0024 
0025   friend class PedsOnlyAlgorithm;
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& raw() const;
0035 
0036   // Mean and rms spread (value per APV)
0037   inline const VFloat& pedsMean() const;
0038   inline const VFloat& pedsSpread() const;
0039   inline const VFloat& rawMean() const;
0040   inline const VFloat& rawSpread() const;
0041 
0042   // Max and min values (value per APV)
0043   inline const VFloat& pedsMax() const;
0044   inline const VFloat& pedsMin() const;
0045   inline const VFloat& rawMax() const;
0046   inline const VFloat& rawMin() const;
0047 
0048   // ---------- misc ----------
0049 
0050   /** Prints analysis results. */
0051   void print(std::stringstream&, uint32_t apv_number = 0) override;
0052 
0053   /** Overrides base method. */
0054   void summary(std::stringstream&) const override;
0055 
0056   /** Resets analysis member data. */
0057   void reset() override;
0058 
0059   // ---------- private member data ----------
0060 
0061 private:
0062   // VVFloats means: 1 vector per APV, 1 value per strip.
0063 
0064   /** Peds values. */
0065   VVFloat peds_;
0066 
0067   /** Raw noise values. */
0068   VVFloat raw_;
0069 
0070   // VFloat: 1 value per APV
0071 
0072   /** Mean peds value. */
0073   VFloat pedsMean_;
0074 
0075   /** Rms spread in peds. */
0076   VFloat pedsSpread_;
0077 
0078   /** Mean raw noise value. */
0079   VFloat rawMean_;
0080 
0081   /** Rms spread in raw noise. */
0082   VFloat rawSpread_;
0083 
0084   /** Max peds value. */
0085   VFloat pedsMax_;
0086 
0087   /** Min peds value. */
0088   VFloat pedsMin_;
0089 
0090   /** Max raw noise value. */
0091   VFloat rawMax_;
0092 
0093   /** Min raw noise value. */
0094   VFloat rawMin_;
0095 
0096   // true if legacy histogram naming is used
0097   bool legacy_;
0098 };
0099 
0100 // ---------- Inline methods ----------
0101 
0102 const PedsOnlyAnalysis::VVFloat& PedsOnlyAnalysis::peds() const { return peds_; }
0103 const PedsOnlyAnalysis::VVFloat& PedsOnlyAnalysis::raw() const { return raw_; }
0104 
0105 const PedsOnlyAnalysis::VFloat& PedsOnlyAnalysis::pedsMean() const { return pedsMean_; }
0106 const PedsOnlyAnalysis::VFloat& PedsOnlyAnalysis::pedsSpread() const { return pedsSpread_; }
0107 const PedsOnlyAnalysis::VFloat& PedsOnlyAnalysis::rawMean() const { return rawMean_; }
0108 const PedsOnlyAnalysis::VFloat& PedsOnlyAnalysis::rawSpread() const { return rawSpread_; }
0109 
0110 const PedsOnlyAnalysis::VFloat& PedsOnlyAnalysis::pedsMax() const { return pedsMax_; }
0111 const PedsOnlyAnalysis::VFloat& PedsOnlyAnalysis::pedsMin() const { return pedsMin_; }
0112 const PedsOnlyAnalysis::VFloat& PedsOnlyAnalysis::rawMax() const { return rawMax_; }
0113 const PedsOnlyAnalysis::VFloat& PedsOnlyAnalysis::rawMin() const { return rawMin_; }
0114 
0115 #endif  // CondFormats_SiStripObjects_PedsOnlyAnalysis_H