 |
ATLAS Offline Software
|
Go to the documentation of this file.
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}; \
53 const float e = kineticEnergy();
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();
85 #undef IMPLEMENT_SETTER_GETTER
void setIdentifier(const Identifier &id)
Sets the global ATLAS identifier.
Identifier identify() const
Returns the global ATLAS identifier of the SimHit.
Helper class to provide type-safe access to aux data.
Base class for elements of a container that can have aux data.
CxxUtils::CachedUniquePtr< HepMcParticleLink > m_hepMCLink
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
void setLocalPosition(MeasVector< 3 > vec)
Sets the local position of the traversing particle.
std::vector< size_t > vec
#define IMPLEMENT_SETTER_GETTER(DTYPE, GETTER, SETTER)
void setGenParticleLink(const HepMcParticleLink &link)
Sets the link to the HepMC particle producing this hit.
int id() const
Return the id of the target particle.
MuonSimHit_v1 & operator=(const MuonSimHit_v1 &other)
a link optimized in size for a GenParticle in a McEventCollection
const HepMcParticleLink & genParticleLink() const
Returns the link to the HepMC particle producing this hit.
ConstVectorMap< 3 > localDirection() const
Returns the local direction of the traversing particle.
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.
index_type eventIndex() const
Return the event number of the referenced GenEvent.
void setLocalDirection(MeasVector< 3 > vec)
Sets the local direction of the traversing particle.
Eigen::Map< MeasVector< N > > VectorMap
ConstVectorMap< 3 > localPosition() const
Returns the local postion of the traversing particle.
constexpr int pow(int base, int exp) noexcept
Eigen::Map< const MeasVector< N > > ConstVectorMap