5#ifndef TRT_CALIBDATA__IDENTIFIEDPROFILEHISTOGRAM_H
6#define TRT_CALIBDATA__IDENTIFIEDPROFILEHISTOGRAM_H
27#include "CLHEP/Matrix/SymMatrix.h"
28#include "CLHEP/Matrix/Vector.h"
29#include <CLHEP/Matrix/Matrix.h>
33template <
typename SomeIDTag>
39 const float& a_loweredge,
const float& a_upperedge,
40 const float& a_lowerlimit = 0.0,
const float& a_upperlimit = 0.0);
42 const float& a_loweredge,
const float& a_upperedge,
43 const std::vector<float>& a_lowerlimit,
const std::vector<float>& a_upperlimit );
49 const std::string&
title()
const;
55 const std::vector<float>&
content(
const SomeIDTag& ident)
const;
62 const std::vector<float>
average(
const SomeIDTag& ident)
const;
63 const std::vector<float>
rms(
const SomeIDTag& ident)
const;
64 const std::vector<float>
averageError(
const SomeIDTag& ident)
const;
72 bool fillEntry(
const SomeIDTag& ident,
const float&
abcissa,
const float& ordinate,
const float& weight = 1.0);
89template <
typename SomeIDTag>
92template <
typename SomeIDTag>
95template <
typename SomeIDTag>
98template <
typename SomeIDTag>
101template <
typename SomeIDTag>
104template <
typename SomeIDTag>
107template <
typename SomeIDTag>
110template <
typename SomeIDTag>
113template <
typename SomeIDTag>
116template <
typename SomeIDTag>
125template <
typename SomeIDTag>
132template <
typename SomeIDTag>
138template <
typename SomeIDTag>
144template <
typename SomeIDTag>
151template <
typename SomeIDTag>
157#ifndef TRT_ALIGNDATA__IDENTIFIEDPROFILEHISTOGRAM_ICC
158#define TRT_ALIGNDATA__IDENTIFIEDPROFILEHISTOGRAM_ICC
160template <
typename SomeIDTag>
162 const unsigned int& a_numberofbins,
163 const float& a_loweredge,
const float& a_upperedge,
164 const float& a_lowerlimit,
const float& a_upperlimit) :
166 m_BinWidth((a_upperedge-a_loweredge)/(float)a_numberofbins),
170template <
typename SomeIDTag>
172 const unsigned int& a_numberofbins,
173 const float& a_loweredge,
const float& a_upperedge,
174 const std::vector<float>& a_lowerlimit,
175 const std::vector<float>& a_upperlimit ) :
177 m_BinWidth((a_upperedge-a_loweredge)/(float)a_numberofbins),
179 if (a_lowerlimit.size()!=a_upperlimit.size()&& a_lowerlimit.size()!=a_numberofbins) {
180 std::cout<<
"Inconsistent vector(s) of limits passed to IdentifiedProfileHistogram: "
181 << a_title <<
" -- limits ignored..." <<std::endl;
182 m_LowerLimit.clear();
183 m_UpperLimit.clear();
184 std::fill_n(std::back_inserter(m_LowerLimit), m_NumberOfBins, 0.0);
185 std::fill_n(std::back_inserter(m_UpperLimit), m_NumberOfBins, 0.0);
189template <
typename SomeIDTag>
198template <
typename SomeIDTag>
209template <
typename SomeIDTag>
220template <
typename SomeIDTag>
231template <
typename SomeIDTag>
Access and manipulate an indexed storage.
virtual ~IdentifiedProfileHistogram()
float globalAverage(const SomeIDTag &ident) const
const std::vector< float > & contentSquared(const SomeIDTag &ident) const
int totalNumberOfEntries() const
IdentifiedProfileHistogram(const std::string &a_title, const unsigned int &a_numberofbins, const float &a_loweredge, const float &a_upperedge, const std::vector< float > &a_lowerlimit, const std::vector< float > &a_upperlimit)
unsigned int numberOfBins() const
float globalAverageError(const SomeIDTag &ident) const
const std::string & title() const
ArrayStore< Identifier, std::vector< int > > m_NumberOfEntries
ArrayStore< Identifier, std::vector< float > > m_Content
int globalNumberOfEntries(const SomeIDTag &ident) const
IdentifiedProfileHistogram(const std::string &a_title, const unsigned int &a_numberofbins, const float &a_loweredge, const float &a_upperedge, const float &a_lowerlimit=0.0, const float &a_upperlimit=0.0)
ArrayStore< Identifier, std::vector< float > > m_ContentSquared
const std::vector< float > abcissaError() const
std::vector< float > m_UpperLimit
unsigned int m_NumberOfBins
const std::vector< float > average(const SomeIDTag &ident) const
const std::vector< int > & numberOfEntries(const SomeIDTag &ident) const
const std::vector< float > averageError(const SomeIDTag &ident) const
const std::vector< float > & content(const SomeIDTag &ident) const
std::vector< float > m_LowerLimit
float globalRMS(const SomeIDTag &ident) const
const std::vector< float > abcissa() const
const std::vector< float > rms(const SomeIDTag &ident) const
bool fillEntry(const SomeIDTag &ident, const float &abcissa, const float &ordinate, const float &weight=1.0)