00001 #ifndef CaloSimAlgos_CaloValidationStatistics_h 00002 #define CaloSimAlgos_CaloValidationStatistics_h 00003 00009 #include <string> 00010 #include <iosfwd> 00011 00012 class CaloValidationStatistics 00013 { 00014 public: 00015 CaloValidationStatistics(std::string name, float expectedMean, float expectedRMS); 00017 ~CaloValidationStatistics(); 00018 00019 void addEntry(float value, float weight=1.); 00020 00021 std::string name() const {return name_;} 00022 00023 float mean() const; 00024 00025 float RMS() const; 00026 00027 float weightedMean() const; 00028 00029 float expectedMean() const {return expectedMean_;} 00030 00031 float expectedRMS() const {return expectedRMS_;} 00032 00033 int nEntries() const {return n_;} 00034 00035 private: 00036 00037 std::string name_; 00038 float expectedMean_; 00039 float expectedRMS_; 00040 float sum_; 00041 float sumOfSquares_; 00042 float weightedSum_; 00043 float sumOfWeights_; 00044 int n_; 00045 }; 00046 00047 std::ostream & operator<<(std::ostream & os, const CaloValidationStatistics & stat); 00048 00049 #endif 00050