5#ifndef ACTSTRKFINDING_MEASUREMENTTOTRUTHASSOCIATIONALG_H
6#define ACTSTRKFINDING_MEASUREMENTTOTRUTHASSOCIATIONALG_H 1
12#include "Gaudi/Property.h"
18#include "Identifier/Identifier.h"
39using ActsUtils::operator<<;
47 : m_depositedEnergy(
a.m_depositedEnergy.createEmptyClone()),
48 m_particlesPerMeasurement(
a.m_particlesPerMeasurement.createEmptyClone()),
49 m_measurementsPerParticle(
a.m_measurementsPerParticle.createEmptyClone())
80 return m_ptr != other.m_ptr;
93 template <
typename Object>
97 template <
typename Object,
typename = std::
void_t<> >
101 template <
typename Object >
102 struct has_rdoList<Object,
std::void_t<rdoListFunc_t<Object> > > : std::true_type{};
122 template <
class T_TruthEventCollection>
126 template <
class T_TruthEventCollection>
130 template <
class T_SimDataCollection,
class T_SimDataIterator>
131 auto getSimDataDeposits(
const T_SimDataCollection &sim_data_collection, T_SimDataIterator sim_data_iter_for_identifier);
134 template <
class T_Deposit>
139 template <
class T_MeasurementCollection,
class T_SimDataCollection,
class T_TruthEventCollection,
bool IsDebug=false >
144 ISvcLocator *pSvcLocator);
148 virtual StatusCode
execute(
const EventContext &ctx)
const override;
152 {
this,
"Measurements",{},
"List of input measurement keys." };
154 {
this,
"SimData",{},
"List of input simulated data keys." };
159 {
this,
"AssociationMapOut",
"",
"Output association map from measurements to generator particles." };
162 {
this,
"DepositedEnergyMin", 0.,
"Only consider gnerator particles which"
163 " deposed more than this amount of energy (in MeV)" };
177 mutable std::array<std::atomic<std::size_t>,4> m_depositCounts
ATLAS_THREAD_SAFE {0u, 0u, 0u, 0u};
179 typename std::conditional<IsDebug, Dbg::Hist, Dbg::Empty>::type
m_stat;
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
const_iterator end() const
const_iterator begin() const
MeasurementToTruthAssociationAlg(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode execute(const EventContext &ctx) const override
Gaudi::Property< float > m_depositedEnergyMin
virtual StatusCode initialize() override
SG::WriteHandleKey< MeasurementToTruthParticleAssociation > m_associationOutKey
SG::ReadHandleKey< T_TruthEventCollection > m_truthEventCollectionKey
SG::ReadHandleKey< T_SimDataCollection > m_simDataKey
SG::ReadHandleKey< T_MeasurementCollection > m_measurementKey
std::conditional< IsDebug, Dbg::Hist, Dbg::Empty >::type m_stat
std::array< std::atomic< std::size_t >, kNCategories > m_statRDO ATLAS_THREAD_SAFE
virtual StatusCode finalize() override
Extend Stat helper by an equidistant binned histogram.
Simple class to gather statistics : min, max, mean, rms.
An algorithm that can be simultaneously executed in multiple threads.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
auto getRDOList(const T &a)
float getDepositedEnergy(const T_Deposit &)
auto getSimDataDeposits(const T_SimDataCollection &sim_data_collection, T_SimDataIterator sim_data_iter_for_identifier)
const char * getInTruthPropertyName()
auto makeDepositToTruthParticleMap(const T_TruthEventCollection *truth_particle_links)
decltype(std::declval< Object >().rdoList()) rdoListFunc_t
const_iterator & operator++()
const_iterator(const T *a_ptr)
bool operator!=(const const_iterator &other) const
Identifier operator*() const
Empty(const Empty &)=default
Dbg::StatHist m_depositedEnergy ATLAS_THREAD_SAFE
HistTemp(const HistTemp &a)