ATLAS Offline Software
Loading...
Searching...
No Matches
IdentifiedProfileHistogram< SomeIDTag > Class Template Reference

#include <IdentifiedProfileHistogram.h>

Collaboration diagram for IdentifiedProfileHistogram< SomeIDTag >:

Public Member Functions

 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)
 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)
virtual ~IdentifiedProfileHistogram ()
const std::string & title () const
unsigned int numberOfBins () const
float lowerEdge () const
float upperEdge () const
float binWidth () const
const std::vector< int > & numberOfEntries (const SomeIDTag &ident) const
const std::vector< float > & content (const SomeIDTag &ident) const
const std::vector< float > & contentSquared (const SomeIDTag &ident) const
int numberOfIDs () const
const std::vector< float > abcissa () const
const std::vector< float > abcissaError () const
const std::vector< float > average (const SomeIDTag &ident) const
const std::vector< float > rms (const SomeIDTag &ident) const
const std::vector< float > averageError (const SomeIDTag &ident) const
float globalAverage (const SomeIDTag &ident) const
float globalRMS (const SomeIDTag &ident) const
float globalAverageError (const SomeIDTag &ident) const
int globalNumberOfEntries (const SomeIDTag &ident) const
int totalNumberOfEntries () const
bool fillEntry (const SomeIDTag &ident, const float &abcissa, const float &ordinate, const float &weight=1.0)

Private Attributes

unsigned int m_NumberOfBins
float m_LowerEdge
float m_BinWidth
std::vector< float > m_LowerLimit
std::vector< float > m_UpperLimit
ArrayStore< SomeIDTag, std::vector< int > > m_NumberOfEntries
ArrayStore< SomeIDTag, std::vector< float > > m_Content
ArrayStore< SomeIDTag, std::vector< float > > m_ContentSquared

Detailed Description

template<typename SomeIDTag>
class IdentifiedProfileHistogram< SomeIDTag >

Definition at line 34 of file IdentifiedProfileHistogram.h.

Constructor & Destructor Documentation

◆ IdentifiedProfileHistogram() [1/2]

template<typename SomeIDTag>
IdentifiedProfileHistogram< SomeIDTag >::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 )

◆ IdentifiedProfileHistogram() [2/2]

template<typename SomeIDTag>
IdentifiedProfileHistogram< SomeIDTag >::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 )

Definition at line 171 of file IdentifiedProfileHistogram.h.

175 :
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();
186 }
187}

◆ ~IdentifiedProfileHistogram()

template<typename SomeIDTag>
virtual IdentifiedProfileHistogram< SomeIDTag >::~IdentifiedProfileHistogram ( )
inlinevirtual

Definition at line 46 of file IdentifiedProfileHistogram.h.

46{}

Member Function Documentation

◆ abcissa()

template<typename SomeIDTag>
const std::vector< float > IdentifiedProfileHistogram< SomeIDTag >::abcissa ( ) const

Definition at line 190 of file IdentifiedProfileHistogram.h.

190 {
193 for (int i=1;i<m_NumberOfBins;i++)
195 return result;
196}

◆ abcissaError()

template<typename SomeIDTag>
const std::vector< float > IdentifiedProfileHistogram< SomeIDTag >::abcissaError ( ) const
inline

Definition at line 133 of file IdentifiedProfileHistogram.h.

133 {
134 const std::vector<float> result(m_NumberOfBins, m_BinWidth/sqrt(12.0)); // strictly only valid for weight=CONST
135 return result;
136}

◆ average()

template<typename SomeIDTag>
const std::vector< float > IdentifiedProfileHistogram< SomeIDTag >::average ( const SomeIDTag & ident) const

Definition at line 199 of file IdentifiedProfileHistogram.h.

199 {
201 if (!m_NumberOfEntries.existID(ident))
202// return result();
203 return result;
204 for (int i=0;i<m_NumberOfBins;i++)
206 return result;
207}
ArrayStore< SomeIDTag, std::vector< float > > m_Content

◆ averageError()

template<typename SomeIDTag>
const std::vector< float > IdentifiedProfileHistogram< SomeIDTag >::averageError ( const SomeIDTag & ident) const

Definition at line 221 of file IdentifiedProfileHistogram.h.

221 {
223 if (!m_NumberOfEntries.existID(ident))
224// return result();
225 return result;
226 for (int i=0;i<m_NumberOfBins;i++)
228 return result;
229}
ArrayStore< SomeIDTag, std::vector< float > > m_ContentSquared

◆ binWidth()

template<typename SomeIDTag>
float IdentifiedProfileHistogram< SomeIDTag >::binWidth ( ) const
inline

Definition at line 102 of file IdentifiedProfileHistogram.h.

102{return m_BinWidth;}

◆ content()

template<typename SomeIDTag>
const std::vector< float > & IdentifiedProfileHistogram< SomeIDTag >::content ( const SomeIDTag & ident) const
inline

Definition at line 108 of file IdentifiedProfileHistogram.h.

108{return m_Content[ident];}

◆ contentSquared()

template<typename SomeIDTag>
const std::vector< float > & IdentifiedProfileHistogram< SomeIDTag >::contentSquared ( const SomeIDTag & ident) const
inline

Definition at line 111 of file IdentifiedProfileHistogram.h.

111{return m_ContentSquared[ident];}

◆ fillEntry()

template<typename SomeIDTag>
bool IdentifiedProfileHistogram< SomeIDTag >::fillEntry ( const SomeIDTag & ident,
const float & abcissa,
const float & ordinate,
const float & weight = 1.0 )

◆ globalAverage()

template<typename SomeIDTag>
float IdentifiedProfileHistogram< SomeIDTag >::globalAverage ( const SomeIDTag & ident) const
inline

Definition at line 139 of file IdentifiedProfileHistogram.h.

139 {
140 return globalNumberOfEntries(ident)>0 ?
142}
int globalNumberOfEntries(const SomeIDTag &ident) const

◆ globalAverageError()

template<typename SomeIDTag>
float IdentifiedProfileHistogram< SomeIDTag >::globalAverageError ( const SomeIDTag & ident) const
inline

Definition at line 152 of file IdentifiedProfileHistogram.h.

152 {
153 return globalNumberOfEntries(ident)>0 ?
155}
float globalRMS(const SomeIDTag &ident) const

◆ globalNumberOfEntries()

template<typename SomeIDTag>
int IdentifiedProfileHistogram< SomeIDTag >::globalNumberOfEntries ( const SomeIDTag & ident) const
inline

Definition at line 126 of file IdentifiedProfileHistogram.h.

127{
128 return m_NumberOfEntries.existID(ident) ?
130}

◆ globalRMS()

template<typename SomeIDTag>
float IdentifiedProfileHistogram< SomeIDTag >::globalRMS ( const SomeIDTag & ident) const
inline

◆ lowerEdge()

template<typename SomeIDTag>
float IdentifiedProfileHistogram< SomeIDTag >::lowerEdge ( ) const
inline

Definition at line 96 of file IdentifiedProfileHistogram.h.

96{return m_LowerEdge;}

◆ numberOfBins()

template<typename SomeIDTag>
unsigned int IdentifiedProfileHistogram< SomeIDTag >::numberOfBins ( ) const
inline

Definition at line 93 of file IdentifiedProfileHistogram.h.

93{return m_NumberOfBins;}

◆ numberOfEntries()

template<typename SomeIDTag>
const std::vector< int > & IdentifiedProfileHistogram< SomeIDTag >::numberOfEntries ( const SomeIDTag & ident) const
inline

Definition at line 105 of file IdentifiedProfileHistogram.h.

105{return m_NumberOfEntries[ident];}

◆ numberOfIDs()

template<typename SomeIDTag>
int IdentifiedProfileHistogram< SomeIDTag >::numberOfIDs ( ) const
inline

Definition at line 114 of file IdentifiedProfileHistogram.h.

114{return m_NumberOfEntries.numberOfIDs();}

◆ rms()

template<typename SomeIDTag>
const std::vector< float > IdentifiedProfileHistogram< SomeIDTag >::rms ( const SomeIDTag & ident) const

Definition at line 210 of file IdentifiedProfileHistogram.h.

210 {
212 if (!m_NumberOfEntries.existID(ident))
213// return result();
214 return result;
215 for (int i=0;i<m_NumberOfBins;i++)
217 return result;
218}

◆ title()

template<typename SomeIDTag>
const std::string & IdentifiedProfileHistogram< SomeIDTag >::title ( ) const
inline

Definition at line 90 of file IdentifiedProfileHistogram.h.

90{return m_NumberOfEntries.tag();}

◆ totalNumberOfEntries()

template<typename SomeIDTag>
int IdentifiedProfileHistogram< SomeIDTag >::totalNumberOfEntries ( ) const
inline

Definition at line 117 of file IdentifiedProfileHistogram.h.

118{
119 int i=0;
121 i=std::accumulate(m_NumberOfEntries[itr->first].begin(),m_NumberOfEntries[itr->first].end(),i);
122 return i;
123}

◆ upperEdge()

template<typename SomeIDTag>
float IdentifiedProfileHistogram< SomeIDTag >::upperEdge ( ) const
inline

Definition at line 99 of file IdentifiedProfileHistogram.h.

Member Data Documentation

◆ m_BinWidth

template<typename SomeIDTag>
float IdentifiedProfileHistogram< SomeIDTag >::m_BinWidth
private

Definition at line 78 of file IdentifiedProfileHistogram.h.

◆ m_Content

template<typename SomeIDTag>
ArrayStore<SomeIDTag, std::vector<float> > IdentifiedProfileHistogram< SomeIDTag >::m_Content
private

Definition at line 82 of file IdentifiedProfileHistogram.h.

◆ m_ContentSquared

template<typename SomeIDTag>
ArrayStore<SomeIDTag, std::vector<float> > IdentifiedProfileHistogram< SomeIDTag >::m_ContentSquared
private

Definition at line 83 of file IdentifiedProfileHistogram.h.

◆ m_LowerEdge

template<typename SomeIDTag>
float IdentifiedProfileHistogram< SomeIDTag >::m_LowerEdge
private

Definition at line 77 of file IdentifiedProfileHistogram.h.

◆ m_LowerLimit

template<typename SomeIDTag>
std::vector<float> IdentifiedProfileHistogram< SomeIDTag >::m_LowerLimit
private

Definition at line 79 of file IdentifiedProfileHistogram.h.

◆ m_NumberOfBins

template<typename SomeIDTag>
unsigned int IdentifiedProfileHistogram< SomeIDTag >::m_NumberOfBins
private

Definition at line 76 of file IdentifiedProfileHistogram.h.

◆ m_NumberOfEntries

template<typename SomeIDTag>
ArrayStore<SomeIDTag, std::vector<int> > IdentifiedProfileHistogram< SomeIDTag >::m_NumberOfEntries
private

Definition at line 81 of file IdentifiedProfileHistogram.h.

◆ m_UpperLimit

template<typename SomeIDTag>
std::vector<float> IdentifiedProfileHistogram< SomeIDTag >::m_UpperLimit
private

Definition at line 80 of file IdentifiedProfileHistogram.h.


The documentation for this class was generated from the following file: