Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
10 static const std::vector<double> s_defaultVec(0);
26 if (m_featureMap.end() ==
iter) {
31 return (*iter).second;
37 if (m_vecFeatureMap.end() ==
iter) {
40 return (*iter).second;
46 if (std::isnan(
value)) {
47 throw std::runtime_error(
"TauFeature::addFeature: Given " +
name +
" value is NaN!");
49 if (std::isinf(
value)){
50 throw std::runtime_error(
"TauFeature::addFeature: Given " +
name +
" value is inf!");
52 std::pair<FeatureMapConstIter, bool>
result = m_featureMap.insert(make_pair(
name,
value));
58 const std::vector<double>&
value) {
59 std::pair<VectorFeatureMapConstIter, bool>
result = m_vecFeatureMap.insert(make_pair(
name,
value));
65 return m_featureMap.size();
70 return m_vecFeatureMap.size();
78 if (!(this->addFeature(
p.first,
p.second))) {
79 throw std::runtime_error(
"PanTau::TauFeature::add( PanTau::TauFeature* ): Error when adding scalar feature " +
p.first);
85 if (!(this->addVecFeature(
p.first,
p.second))) {
86 throw std::runtime_error(
"PanTau::TauFeature::add( PanTau::TauFeature* ): Error when adding vector feature " +
p.first);
VectorFeatureMap::const_iterator VectorFeatureMapConstIter
bool addFeature(const std::string &name, const double value)
adds a new feature
int nVecValues() const
returns the size of the m_vecFeatureMap
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
FeatureMap m_featureMap
The map containg all features.
int nValues() const
returns the size of the m_featureMap
FeatureMap::const_iterator FeatureMapConstIter
double value(const std::string &name, bool &isValid) const
returns the value of the feature given by its name
VectorFeatureMap m_vecFeatureMap
The map containg all features.
TauFeature()
Default constructor.
void add(PanTau::TauFeature *otherFeatures)
bool addVecFeature(const std::string &name, const std::vector< double > &value)
adds a new vector feature
virtual ~TauFeature()
Destructor.
const std::vector< double > & vecValue(const std::string &name) const
returns the value of a vector feature given by its name