185 return doubleObservablesMap;
198 return stringVariablesMap;
216 static std::unique_ptr<GTrueInfoData>
create(
const std::shared_ptr<GOptions>& gopts) {
218 auto true_info_data = std::make_unique<GTrueInfoData>(gopts, hit);
219 auto counter = globalTrueInfoDataCounter.fetch_add(1, std::memory_order_relaxed);
221 true_info_data->includeVariable(
"totalEDeposited", counter * 0.1);
222 true_info_data->includeVariable(
"avgTime", counter * 1.0);
223 true_info_data->includeVariable(
"avgx", counter * 0.01);
224 true_info_data->includeVariable(
"avgy", counter * 0.02);
225 true_info_data->includeVariable(
"avgz", counter * 0.03);
228 true_info_data->includeVariable(
"hitn", counter);
230 return true_info_data;
235 std::map<std::string, double> doubleObservablesMap;
238 std::map<std::string, std::string> stringVariablesMap;
241 std::vector<GIdentifier> gidentity;
244 static std::atomic<int> globalTrueInfoDataCounter;
static GHit * create(const std::shared_ptr< GOptions > &gopts)
Container for true (simulation-level) observables for one hit.
void includeVariable(const std::string &varName, double var)
Store/overwrite a numeric "true" observable for this hit.
void accumulateVariable(const std::string &vname, double value)
Accumulate a numeric observable into this object (run-level integration).
std::map< std::string, double > getDoubleVariablesMap() const
Get a copy of all numeric truth observables.
GTrueInfoData(const std::shared_ptr< GOptions > &gopts, const GHit *ghit)
Construct true-hit data by copying identity from a hit.
static std::unique_ptr< GTrueInfoData > create(const std::shared_ptr< GOptions > &gopts)
Test/example factory: create a true-hit object with deterministic dummy data.
std::map< std::string, std::string > getStringVariablesMap() const
Get a copy of all string truth observables.
std::string getIdentityString() const
Return a human-readable identity string for debugging and labeling.
constexpr const char * GTRUEDATA_LOGGER
Logger domain name used by GTrueInfoData (controls verbosity/category in GLogger).
GOptions defineOptions()
Defines GOptions for the true-data logger domain.