ATLAS Offline Software
Loading...
Searching...
No Matches
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
12namespace PanTau {
13
18
19 class TauFeature {
20
21 typedef std::map<std::string, double> FeatureMap;
22 typedef FeatureMap::iterator FeatureMapIter;
23 typedef FeatureMap::const_iterator FeatureMapConstIter;
24 typedef std::map<std::string, const std::vector<double> > VectorFeatureMap;
25 typedef VectorFeatureMap::iterator VectorFeatureMapIter;
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
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition AtlasPID.h:878
Class containing features of a tau seed.
Definition TauFeature.h:19
int nValues() const
returns the size of the m_featureMap
std::map< std::string, double > FeatureMap
Definition TauFeature.h:21
FeatureMap m_featureMap
The map containg all features.
Definition TauFeature.h:61
VectorFeatureMap m_vecFeatureMap
The map containg all features.
Definition TauFeature.h:63
int nVecValues() const
returns the size of the m_vecFeatureMap
FeatureMap::iterator FeatureMapIter
Definition TauFeature.h:22
VectorFeatureMap::iterator VectorFeatureMapIter
Definition TauFeature.h:25
bool addFeature(const std::string &name, const double value)
adds a new feature
FeatureMap::const_iterator FeatureMapConstIter
Definition TauFeature.h:23
VectorFeatureMap::const_iterator VectorFeatureMapConstIter
Definition TauFeature.h:26
bool addVecFeature(const std::string &name, const std::vector< double > &value)
adds a new vector feature
TauFeature()
Default constructor.
double value(const std::string &name, bool &isValid) const
returns the value of the feature given by its name
void add(PanTau::TauFeature *otherFeatures)
const std::vector< double > & vecValue(const std::string &name) const
returns the value of a vector feature given by its name
std::map< std::string, const std::vector< double > > VectorFeatureMap
Definition TauFeature.h:24
virtual ~TauFeature()
Destructor.