11#include <framework/logging/Logger.h>
36 outer = std::numeric_limits<unsigned>::max();
37 inner = std::numeric_limits<unsigned>::max();
44 return ((
outer == std::numeric_limits<unsigned>::max())
45 or (
inner == std::numeric_limits<unsigned>::max()))
65 outer = std::numeric_limits<unsigned>::max();
66 center = std::numeric_limits<unsigned>::max();
67 inner = std::numeric_limits<unsigned>::max();
74 return ((
outer == std::numeric_limits<unsigned>::max())
75 or (
center == std::numeric_limits<unsigned>::max())
76 or (
inner == std::numeric_limits<unsigned>::max()))
97 outer = std::numeric_limits<unsigned>::max();
100 inner = std::numeric_limits<unsigned>::max();
107 return ((
outer == std::numeric_limits<unsigned>::max())
108 or (
outerCenter == std::numeric_limits<unsigned>::max())
109 or (
innerCenter == std::numeric_limits<unsigned>::max())
110 or (
inner == std::numeric_limits<unsigned>::max()))
118 template <
class SecIDSetType>
149 expNo(
std::numeric_limits<unsigned>::max()),
150 runNo(
std::numeric_limits<unsigned>::max()),
151 evtNo(
std::numeric_limits<unsigned>::max()),
152 trackNo(
std::numeric_limits<unsigned>::max()),
153 pdg(
std::numeric_limits<int>::max())
155 for (
auto name : filterNames) {
156 m_values.insert({name, std::numeric_limits<double>::max()});
157 B2DEBUG(26,
"FilterValueDataSet::constructor: filterName " << name <<
" has been added.");
159 B2DEBUG(25,
"FilterValueDataSet::constructor: " <<
m_values.size() <<
" filters have been added.");
165 auto it =
m_values.find(filterName);
167 B2ERROR(
"FilterValueDataSet::setValueOfFilter: filterName " << filterName
168 <<
"is not known, value " << value
169 <<
" will NOT be added!");
178 double* valuePtr =
nullptr;
179 auto it =
m_values.find(filterName);
181 valuePtr = &it->second;
182 }
else { B2WARNING(
"filter could not be found, returning nullptr instead!"); }
189 expNo = std::numeric_limits<unsigned>::max();
190 runNo = std::numeric_limits<unsigned>::max();
191 evtNo = std::numeric_limits<unsigned>::max();
192 trackNo = std::numeric_limits<unsigned>::max();
193 pdg = std::numeric_limits<int>::max();
196 entry.second = std::numeric_limits<double>::max();
204 if (
expNo == std::numeric_limits<unsigned>::max())
return false;
205 if (
runNo == std::numeric_limits<unsigned>::max())
return false;
206 if (
evtNo == std::numeric_limits<unsigned>::max())
return false;
207 if (
trackNo == std::numeric_limits<unsigned>::max())
return false;
208 if (
pdg == std::numeric_limits<int>::max())
return false;
210 if (entry.second == std::numeric_limits<double>::max())
return false;
contains the relevant information needed for filling a TTree containing train-data for the secMap.
std::map< std::string, double > m_values
map containing a value for each key==name of filter.
unsigned runNo
number of the run this dataset is taken from.
SecIDSetType secIDs
contains the secIDs.
double * getValuePtr(std::string filterName)
returns pointer to value of given filterName, nullptr if filterName has not been found.
int pdg
Pdg given by reference track.
unsigned trackNo
number of the reference track this dataset is taken from (its ID in the datastore).
unsigned evtNo
number of the event this dataset is taken from.
unsigned expNo
number of the experiment this dataset is taken from.
void setValueOfFilter(std::string filterName, double value)
for given filterName a value is set.
FilterValueDataSet(std::vector< std::string > filterNames)
constructor, expects to get a vector of names for filters.
void reset()
resets all values stored to std::numeric_limits< double>::max().
bool isValid()
checks if any value is still not set and returns false if that is the case.
allows to set outer and inner secID.
unsigned outer
id of outer sector.
void reset()
sets all values to outer = std::numeric_limits< unsigned>::max();
SecIDPair()
constructor - resets all values to outer = std::numeric_limits< unsigned>::max();
bool isValid()
checks if any value is still not set and returns false if that is the case.
unsigned inner
id of inner sector.
allows to set outer, outerCenter, innerCenter and inner secID.
unsigned outer
id of outer sector.
unsigned innerCenter
id of inner-center sector.
void reset()
sets all values to outer = std::numeric_limits< unsigned>::max();
unsigned outerCenter
id of outer-center sector.
SecIDQuadruplet()
constructor - resets all values to outer = std::numeric_limits< unsigned>::max();
bool isValid()
checks if any value is still not set and returns false if that is the case.
unsigned inner
id of inner sector.
allows to set outer, center and inner secID.
unsigned center
id of center sector.
unsigned outer
id of outer sector.
SecIDTriplet()
constructor - resets all values to outer = std::numeric_limits< unsigned>::max();
void reset()
sets all values to outer = std::numeric_limits< unsigned>::max();
bool isValid()
checks if any value is still not set and returns false if that is the case.
unsigned inner
id of inner sector.
Abstract base class for different kinds of events.