|
gdynamicDigitization
|
Helper container for representing touchable “modifier” information. More...
#include <gdynamicdigitization.h>
Public Member Functions | |
| GTouchableModifiers (const std::vector< std::string > &touchableNames) | |
| Constructs the container and declares supported touchable names. | |
| void | insertIdAndWeight (const std::string &touchableName, int idValue, double weight) |
| Inserts a new (id, weight) pair for the specified touchable. | |
| void | insertIdWeightAndTime (const std::string &touchableName, int idValue, double weight, double time) |
| Inserts a new (id, weight, time) triplet for the specified touchable. | |
| void | assignOverallWeight (const std::string &touchableName, double totalWeight) |
| Normalizes modifier weights by dividing by a provided total. | |
| bool | isWeightsOnly () const |
| Returns whether the container currently reports weights-only modifiers. | |
| std::vector< double > | getModifierWeightsVector (const std::string &touchableName) |
| Returns the weights vector for a touchable. | |
| std::vector< double > | getModifierWeightsAndTimeVector (const std::string &touchableName) |
| Returns the weights-and-times vector for a touchable. | |
Some digitization routines need to create one or more derived touchables from a single touchable, weighted by occupancy, energy, time, or similar criteria.
This helper stores modifier payloads in one of two mutually exclusive representations:
Definition at line 40 of file gdynamicdigitization.h.
|
explicit |
Declaring touchable names up-front ensures the internal maps contain keys for all expected touchables.
| touchableNames | List of touchable names for which modifiers may be recorded. |
Definition at line 83 of file gdynamicdigitization.cc.
| void GTouchableModifiers::assignOverallWeight | ( | const std::string & | touchableName, |
| double | totalWeight ) |
| touchableName | Name of the touchable whose modifiers are to be normalized. |
| totalWeight | Denominator for normalization (must be non-zero). |
Definition at line 107 of file gdynamicdigitization.cc.
|
inline |
| touchableName | Touchable name key. |
Definition at line 138 of file gdynamicdigitization.h.
|
inline |
| touchableName | Touchable name key. |
Definition at line 125 of file gdynamicdigitization.h.
| void GTouchableModifiers::insertIdAndWeight | ( | const std::string & | touchableName, |
| int | idValue, | ||
| double | weight ) |
| touchableName | Name of the touchable to modify. |
| idValue | Identifier value associated with the modifier entry. |
| weight | Unnormalized weight (caller may later normalize with assignOverallWeight()). |
Definition at line 91 of file gdynamicdigitization.cc.
| void GTouchableModifiers::insertIdWeightAndTime | ( | const std::string & | touchableName, |
| int | idValue, | ||
| double | weight, | ||
| double | time ) |
| touchableName | Name of the touchable to modify. |
| idValue | Identifier value associated with the modifier entry. |
| weight | Unnormalized weight (caller may later normalize with assignOverallWeight()). |
| time | Time associated with this modifier entry (time unit follows project conventions). |
Definition at line 98 of file gdynamicdigitization.cc.
|
inline |
Definition at line 114 of file gdynamicdigitization.h.