|
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}; \
52 const float e = kineticEnergy();
53 return std::sqrt(1. -
std::min(
std::pow(
mass() / (
e > std::numeric_limits<float>::epsilon() ?
e : 1.
f), 2),1.));
69 const unsigned short eventIndex = acc_mcEventIndex(*
this);
72 std::unique_ptr<HepMcParticleLink> link = std::make_unique<HepMcParticleLink>();
85 acc_mcBarcode(*
this) = link.
barcode();
89 #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 barcode() const
Return the barcode of the target particle.
MuonSimHit_v1 & operator=(const MuonSimHit_v1 &other)
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
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.
void setExtendedBarCode(const ExtendedBarCode &extBarcode)
Alter the persistent part of the link.
Persistent representation of a link.
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
thread_local event_number_t eventIndex