11 static const std::string preFixStr{
"MuSim_"};
20#define IMPLEMENT_SETTER_GETTER( DTYPE, GETTER, SETTER) \
21 DTYPE MuonSimHit_v1::GETTER() const { \
22 static const SG::AuxElement::Accessor<DTYPE> acc{preFixStr + #GETTER}; \
26 void MuonSimHit_v1::SETTER(DTYPE value) { \
27 static const SG::AuxElement::Accessor<DTYPE> acc{preFixStr + #GETTER}; \
54 return std::sqrt(1. - std::min(std::pow(
mass() / (
e > std::numeric_limits<float>::epsilon() ?
e : 1.f), 2),1.));
58 lPos = std::move(
vec);
64 lPos = std::move(
vec);
70 auto link = std::make_unique<HepMcParticleLink>(acc_uniqueID(*
this),
71 acc_mcEventIndex(*
this),
81 acc_uniqueID(*
this) = link.
id();
89#undef IMPLEMENT_SETTER_GETTER
std::vector< size_t > vec
#define IMPLEMENT_SETTER_GETTER(DTYPE, GETTER, SETTER)
a link optimized in size for a GenParticle in a McEventCollection
int id() const
Return the id of the target particle.
static std::vector< index_type > getEventPositionInCollection(index_type index, const IProxyDict *sg)
Return a vector of the positions in the McEventCollection of the GenEvent(s) with a given event numbe...
Base class for elements of a container that can have aux data.
SG::Accessor< T, ALLOC > Accessor
static IProxyDict * store()
Fetch the current store.
void setGenParticleLink(const HepMcParticleLink &link)
Sets the link to the HepMC particle producing this hit.
CxxUtils::CachedUniquePtr< HepMcParticleLink > m_hepMCLink
void setLocalDirection(MeasVector< 3 > vec)
Sets the local direction of the traversing particle.
ConstVectorMap< 3 > localDirection() const
Returns the local direction of the traversing particle.
float beta() const
returns beta (fraction of speed of light)
void setIdentifier(const Identifier &id)
Sets the global ATLAS identifier.
float mass() const
Returns the rest-mass of the traversing particle.
Identifier identify() const
Returns the global ATLAS identifier of the SimHit.
ConstVectorMap< 3 > localPosition() const
Returns the local postion of the traversing particle.
const HepMcParticleLink & genParticleLink() const
Returns the link to the HepMC particle producing this hit.
MuonSimHit_v1 & operator=(const MuonSimHit_v1 &other)
void setLocalPosition(MeasVector< 3 > vec)
Sets the local position of the traversing particle.
std::unique_ptr< const HepMcParticleLink > releaseParticleLink()
Return the pointer to the HepMC particle link and resets the cache.
float kineticEnergy() const
Returns the kinetic energy of the traversing particle.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
SG::AuxElement::Accessor< std::array< float, N > > PosAccessor
xAOD Accessor to the position
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.
Eigen::Map< MeasVector< N > > VectorMap
Eigen::Map< const MeasVector< N > > ConstVectorMap