ATLAS Offline Software
Loading...
Searching...
No Matches
xAOD::MuonSimHit_v1 Class Reference

#include <MuonSimHit_v1.h>

Inheritance diagram for xAOD::MuonSimHit_v1:
Collaboration diagram for xAOD::MuonSimHit_v1:

Public Member Functions

 MuonSimHit_v1 ()=default
MuonSimHit_v1operator= (const MuonSimHit_v1 &other)
void setLocalPosition (MeasVector< 3 > vec)
 Sets the local position of the traversing particle.
ConstVectorMap< 3 > localPosition () const
 Returns the local postion of the traversing particle.
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 stepLength () const
 Returns the path length of the G4 step.
void setStepLength (const float length)
 Set the path length of the G4 step.
float mass () const
 Returns the rest-mass of the traversing particle.
void setMass (const float m)
 set the rest-mass of the traversing particle
float kineticEnergy () const
 Returns the kinetic energy of the traversing particle.
void setKineticEnergy (const float energy)
 Sets the kinetic energy of the traversing particle.
float beta () const
 returns beta (fraction of speed of light)
float globalTime () const
 Returns the time ellapsed since the collision of the traversing particle.
void setGlobalTime (const float time)
 Sets the time of the traversing particle.
int pdgId () const
 Returns the pdgID of the traversing particle.
int pdg_id () const
void setPdgId (int id)
 Sets the pdgID of the traversing particle.
Identifier identify () const
 Returns the global ATLAS identifier of the SimHit.
void setIdentifier (const Identifier &id)
 Sets the global ATLAS identifier.
float energyDeposit () const
 Returns the energy deposited by the traversing particle inside the gas volume.
void setEnergyDeposit (const float deposit)
 Sets the energy deposited by the traversing particle inside the gas volume.
const HepMcParticleLinkgenParticleLink () const
 Returns the link to the HepMC particle producing this hit.
std::unique_ptr< const HepMcParticleLinkreleaseParticleLink ()
 Return the pointer to the HepMC particle link and resets the cache.
void setGenParticleLink (const HepMcParticleLink &link)
 Sets the link to the HepMC particle producing this hit.

Private Attributes

CxxUtils::CachedUniquePtr< HepMcParticleLinkm_hepMCLink {}

Detailed Description

Definition at line 17 of file MuonSimHit_v1.h.

Constructor & Destructor Documentation

◆ MuonSimHit_v1()

xAOD::MuonSimHit_v1::MuonSimHit_v1 ( )
default

Member Function Documentation

◆ beta()

float xAOD::MuonSimHit_v1::beta ( ) const

returns beta (fraction of speed of light)

Definition at line 52 of file MuonSimHit_V1.cxx.

52 {
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.));
55}
float mass() const
Returns the rest-mass of the traversing particle.
float kineticEnergy() const
Returns the kinetic energy of the traversing particle.

◆ energyDeposit()

float xAOD::MuonSimHit_v1::energyDeposit ( ) const

Returns the energy deposited by the traversing particle inside the gas volume.

◆ genParticleLink()

const HepMcParticleLink & xAOD::MuonSimHit_v1::genParticleLink ( ) const

Returns the link to the HepMC particle producing this hit.

Definition at line 68 of file MuonSimHit_V1.cxx.

68 {
69 if (!m_hepMCLink) {
70 auto link = std::make_unique<HepMcParticleLink>(acc_uniqueID(*this),
71 acc_mcEventIndex(*this),
74 return *m_hepMCLink.set(std::move(link));
75 }
76 return (*m_hepMCLink);
77}
CxxUtils::CachedUniquePtr< HepMcParticleLink > m_hepMCLink
pointer & link(pointer p) const
Return a reference to the link for an element.

◆ globalTime()

float xAOD::MuonSimHit_v1::globalTime ( ) const

Returns the time ellapsed since the collision of the traversing particle.

◆ identify()

Identifier xAOD::MuonSimHit_v1::identify ( ) const

Returns the global ATLAS identifier of the SimHit.

Definition at line 42 of file MuonSimHit_V1.cxx.

42{ return Identifier{acc_Identifier(*this)}; }

◆ kineticEnergy()

float xAOD::MuonSimHit_v1::kineticEnergy ( ) const

Returns the kinetic energy of the traversing particle.

◆ localDirection()

ConstVectorMap< 3 > xAOD::MuonSimHit_v1::localDirection ( ) const

Returns the local direction of the traversing particle.

Definition at line 66 of file MuonSimHit_V1.cxx.

66{ return ConstVectorMap<3>{acc_localDir(*this).data()};}
Eigen::Map< const MeasVector< N > > ConstVectorMap

◆ localPosition()

ConstVectorMap< 3 > xAOD::MuonSimHit_v1::localPosition ( ) const

Returns the local postion of the traversing particle.

Definition at line 60 of file MuonSimHit_V1.cxx.

60{ return ConstVectorMap<3>{acc_localPos(*this).data()};}

◆ mass()

float xAOD::MuonSimHit_v1::mass ( ) const

Returns the rest-mass of the traversing particle.

◆ operator=()

MuonSimHit_v1 & xAOD::MuonSimHit_v1::operator= ( const MuonSimHit_v1 & other)

Definition at line 33 of file MuonSimHit_V1.cxx.

33 {
34 if (this != &other) {
35 static_cast<SG::AuxElement&>(*this) = other;
36#ifndef __CLING__
38#endif
39 }
40 return (*this);
41}
std::unique_ptr< const HepMcParticleLink > releaseParticleLink()
Return the pointer to the HepMC particle link and resets the cache.
AuxElement(SG::AuxVectorData *container, size_t index)
Base class for elements of a container that can have aux data.

◆ pdg_id()

int xAOD::MuonSimHit_v1::pdg_id ( ) const
inline

Definition at line 54 of file MuonSimHit_v1.h.

54{return pdgId();}; // alternate interface to match other EDM classes
int pdgId() const
Returns the pdgID of the traversing particle.

◆ pdgId()

int xAOD::MuonSimHit_v1::pdgId ( ) const

Returns the pdgID of the traversing particle.

◆ releaseParticleLink()

std::unique_ptr< const HepMcParticleLink > xAOD::MuonSimHit_v1::releaseParticleLink ( )

Return the pointer to the HepMC particle link and resets the cache.

Definition at line 84 of file MuonSimHit_V1.cxx.

84 {
85 return m_hepMCLink.release();
86}

◆ setEnergyDeposit()

void xAOD::MuonSimHit_v1::setEnergyDeposit ( const float deposit)

Sets the energy deposited by the traversing particle inside the gas volume.

◆ setGenParticleLink()

void xAOD::MuonSimHit_v1::setGenParticleLink ( const HepMcParticleLink & link)

Sets the link to the HepMC particle producing this hit.

Definition at line 78 of file MuonSimHit_V1.cxx.

78 {
80 acc_mcEventIndex(*this) = link.getEventPositionInCollection(SG::CurrentEventStore::store());
81 acc_uniqueID(*this) = link.id();
82}

◆ setGlobalTime()

void xAOD::MuonSimHit_v1::setGlobalTime ( const float time)

Sets the time of the traversing particle.

◆ setIdentifier()

void xAOD::MuonSimHit_v1::setIdentifier ( const Identifier & id)

Sets the global ATLAS identifier.

Definition at line 43 of file MuonSimHit_V1.cxx.

43{ acc_Identifier(*this) = id.get_compact(); }

◆ setKineticEnergy()

void xAOD::MuonSimHit_v1::setKineticEnergy ( const float energy)

Sets the kinetic energy of the traversing particle.

◆ setLocalDirection()

void xAOD::MuonSimHit_v1::setLocalDirection ( MeasVector< 3 > vec)

Sets the local direction of the traversing particle.

Definition at line 62 of file MuonSimHit_V1.cxx.

62 {
63 VectorMap<3> lPos{acc_localDir(*this).data()};
64 lPos = std::move(vec);
65}
std::vector< size_t > vec
Eigen::Map< MeasVector< N > > VectorMap

◆ setLocalPosition()

void xAOD::MuonSimHit_v1::setLocalPosition ( MeasVector< 3 > vec)

Sets the local position of the traversing particle.

Definition at line 56 of file MuonSimHit_V1.cxx.

56 {
57 VectorMap<3> lPos{acc_localPos(*this).data()};
58 lPos = std::move(vec);
59}

◆ setMass()

void xAOD::MuonSimHit_v1::setMass ( const float m)

set the rest-mass of the traversing particle

◆ setPdgId()

void xAOD::MuonSimHit_v1::setPdgId ( int id)

Sets the pdgID of the traversing particle.

◆ setStepLength()

void xAOD::MuonSimHit_v1::setStepLength ( const float length)

Set the path length of the G4 step.

◆ stepLength()

float xAOD::MuonSimHit_v1::stepLength ( ) const

Returns the path length of the G4 step.

Member Data Documentation

◆ m_hepMCLink

CxxUtils::CachedUniquePtr<HepMcParticleLink> xAOD::MuonSimHit_v1::m_hepMCLink {}
private

Definition at line 77 of file MuonSimHit_v1.h.

77{};

The documentation for this class was generated from the following files: