Helper class that stores the information an Observer stores: i.e.
More...
#include <ObserverInfo.h>
|
| ClassDef (ObserverInfo, 2) |
| Needed to make the ROOT object storable.
|
|
Helper class that stores the information an Observer stores: i.e.
all the responses of the subfilters contained in a Filter.
Definition at line 24 of file ObserverInfo.h.
◆ ObserverInfo()
constructor
Definition at line 12 of file ObserverInfo.cc.
12 :
17{
18};
std::vector< SpacePointInfo > m_hits
stores the hits used in the filter, should have the order as used in the filter from outer to inner!
int m_mainMCParticleID
dominating mcParticleID.
double m_mainPurity
purity for the dominating particleID.
std::vector< FilterInfo > m_filterInfos
stores the information for each Filter
◆ ~ObserverInfo()
◆ addFilterInfo()
add a new filter info:
- Parameters
-
info | the filterinfo to be added |
Definition at line 86 of file ObserverInfo.h.
86{ m_filterInfos.push_back(info); };
◆ clear()
resets all member variables
Definition at line 32 of file ObserverInfo.h.
33 {
34 m_filterInfos.clear();
35 m_hits.clear();
36 m_mainPurity = 0;
37 m_mainMCParticleID = -666;
38 };
◆ getFilterAccepted()
bool getFilterAccepted |
( |
std::string const & | key | ) |
|
|
inline |
returns if the filter was accepted
- Parameters
-
key | name under which filter was stored |
Definition at line 70 of file ObserverInfo.h.
71 {
72 return getFilterInfo(key).getWasAccepted();
73 }
◆ getFilterInfo()
FilterInfo getFilterInfo |
( |
std::string const & | key | ) |
|
|
inline |
returns the filter info with the requested key
- Parameters
-
key | name of the key for that filter |
Definition at line 43 of file ObserverInfo.h.
44 {
45 for (int i = 0; i < (int) m_filterInfos.size(); i++)
46 if (m_filterInfos.at(i).getName() == key) return m_filterInfos.at(i);
47
48 return FilterInfo();
49 };
◆ getFilterName()
std::string getFilterName |
( |
int | i | ) |
|
|
inline |
function to access the filter infos directly, as indirect access seems not to work within the Draw of root:
- Parameters
-
i | the index under which the filter was stored in m_filterinfos |
Definition at line 54 of file ObserverInfo.h.
55 {
56 return (0 <= i && i < (int)m_filterInfos.size()) ? m_filterInfos[i].getName() : std::string("");
57 }
◆ getFilterResult()
double getFilterResult |
( |
std::string const & | key | ) |
|
|
inline |
returns the requested filter result
- Parameters
-
key | the key under which the filter was stored |
Definition at line 62 of file ObserverInfo.h.
63 {
64 return getFilterInfo(key).getResult();
65 }
◆ getFilterUsed()
double getFilterUsed |
( |
std::string const & | key | ) |
|
|
inline |
returns if the filter was used
- Parameters
-
key | key under which filter was stored |
Definition at line 78 of file ObserverInfo.h.
79 {
80 return getFilterInfo(key).getWasUsed();
81 }
◆ getHit()
Returns the i-th hit.
- Parameters
-
Definition at line 94 of file ObserverInfo.h.
95 {
96 if (i < 0 || i > (int)m_hits.size()) return SpacePointInfo();
97 else return m_hits[i];
98 };
◆ getHits()
returns the vector of spacepoints which have been used to evaluate the filters
Definition at line 89 of file ObserverInfo.h.
◆ getMainMCParticleID()
int getMainMCParticleID |
( |
| ) |
|
|
inline |
◆ getMainPurity()
returns the purity
Definition at line 114 of file ObserverInfo.h.
114{ return m_mainPurity; };
◆ setHits()
sets the hits the filter has been evaluated with
- Parameters
-
newHits | vector of spacepoint which have been used in this filter |
Definition at line 103 of file ObserverInfo.h.
103{ m_hits = newHits; };
◆ setMainMCParticleID()
void setMainMCParticleID |
( |
int | id | ) |
|
|
inline |
◆ setMainPurity()
void setMainPurity |
( |
double | val | ) |
|
|
inline |
sets the purity
- Parameters
-
val | new value of the purity |
Definition at line 119 of file ObserverInfo.h.
119{ m_mainPurity = val; };
◆ m_filterInfos
◆ m_hits
stores the hits used in the filter, should have the order as used in the filter from outer to inner!
Definition at line 125 of file ObserverInfo.h.
◆ m_mainMCParticleID
◆ m_mainPurity
The documentation for this class was generated from the following files: