ATLAS Offline Software
TauFeature.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef PANTAUALGS_TAUFEATURE_H
6 #define PANTAUALGS_TAUFEATURE_H
7 
8 #include <string>
9 #include <map>
10 #include <vector>
11 
12 namespace PanTau {
13 
19  class TauFeature {
20 
21  typedef std::map<std::string, double> FeatureMap;
23  typedef FeatureMap::const_iterator FeatureMapConstIter;
24  typedef std::map<std::string, const std::vector<double> > VectorFeatureMap;
26  typedef VectorFeatureMap::const_iterator VectorFeatureMapConstIter;
27 
28  public:
30  TauFeature();
31 
33  virtual ~TauFeature();
34 
36  double value(const std::string& name, bool& isValid) const;
37 
39  const std::vector<double>& vecValue(const std::string& name) const;
40 
42  bool addFeature(const std::string& name,
43  const double value);
44 
46  bool addVecFeature(const std::string& name,
47  const std::vector<double>& value);
48 
50  int nValues() const;
51 
53  int nVecValues() const;
54 
55 
56  void add(PanTau::TauFeature* otherFeatures);
57 
58  protected:
59 
64 
65  };
66 
67 }
68 
69 #endif // PANTAUALGS_TAUFEATURE_H
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
PanTau::TauFeature::VectorFeatureMapIter
VectorFeatureMap::iterator VectorFeatureMapIter
Definition: TauFeature.h:25
PanTau::TauFeature::VectorFeatureMapConstIter
VectorFeatureMap::const_iterator VectorFeatureMapConstIter
Definition: TauFeature.h:26
PanTau::TauFeature::addFeature
bool addFeature(const std::string &name, const double value)
adds a new feature
Definition: TauFeature.cxx:44
PanTau::TauFeature::nVecValues
int nVecValues() const
returns the size of the m_vecFeatureMap
Definition: TauFeature.cxx:69
PanTau::TauFeature
Definition: TauFeature.h:19
isValid
bool isValid(const T &p)
Definition: AtlasPID.h:225
PanTau::TauFeature::m_featureMap
FeatureMap m_featureMap
The map containg all features.
Definition: TauFeature.h:61
PanTau::TauFeature::nValues
int nValues() const
returns the size of the m_featureMap
Definition: TauFeature.cxx:64
PanTau::TauFeature::FeatureMapConstIter
FeatureMap::const_iterator FeatureMapConstIter
Definition: TauFeature.h:23
PanTau::TauFeature::value
double value(const std::string &name, bool &isValid) const
returns the value of the feature given by its name
Definition: TauFeature.cxx:23
PanTau::TauFeature::FeatureMap
std::map< std::string, double > FeatureMap
Definition: TauFeature.h:21
PanTau::TauFeature::m_vecFeatureMap
VectorFeatureMap m_vecFeatureMap
The map containg all features.
Definition: TauFeature.h:63
PanTau::TauFeature::TauFeature
TauFeature()
Default constructor.
Definition: TauFeature.cxx:12
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
PanTau::TauFeature::FeatureMapIter
FeatureMap::iterator FeatureMapIter
Definition: TauFeature.h:22
PanTau::TauFeature::add
void add(PanTau::TauFeature *otherFeatures)
Definition: TauFeature.cxx:74
PanTau::TauFeature::VectorFeatureMap
std::map< std::string, const std::vector< double > > VectorFeatureMap
Definition: TauFeature.h:24
PanTau
xAOD EDM
Definition: Reconstruction/PanTau/PanTauAlgs/PanTauAlgs/HelperFunctions.h:18
PanTau::TauFeature::addVecFeature
bool addVecFeature(const std::string &name, const std::vector< double > &value)
adds a new vector feature
Definition: TauFeature.cxx:57
PanTau::TauFeature::~TauFeature
virtual ~TauFeature()
Destructor.
PanTau::TauFeature::vecValue
const std::vector< double > & vecValue(const std::string &name) const
returns the value of a vector feature given by its name
Definition: TauFeature.cxx:35