ATLAS Offline Software
MuonSimHit_v1.h
Go to the documentation of this file.
1 
2 /*
3  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
4 */
5 #ifndef XAODMUONSIMHIT_VERSION_MUONSIMHIT_V1_H
6 #define XAODMUONSIMHIT_VERSION_MUONSIMHIT_V1_H
7 
9 
10 #include <Identifier/Identifier.h>
14 
15 namespace xAOD {
16 
17 
18 class MuonSimHit_v1 : public SG::AuxElement {
19  public:
20 
21  MuonSimHit_v1() = default;
23 
28 
33 
35  float stepLength() const;
37  void setStepLength(const float length);
39  float mass() const;
41  void setMass(const float m);
43  float kineticEnergy() const;
45  void setKineticEnergy(const float energy);
47  float beta() const;
49  float globalTime() const;
51  void setGlobalTime(const float time);
52 
54  int pdgId() const;
55  int pdg_id() const {return pdgId();}; // alternate interface to match other EDM classes
57  void setPdgId(int id);
58 
60  Identifier identify() const;
62  void setIdentifier(const Identifier& id);
63 
65  float energyDeposit() const;
67  void setEnergyDeposit(const float deposit);
68 
69 
70 
72  const HepMcParticleLink& genParticleLink() const;
74  void setGenParticleLink(const HepMcParticleLink& link);
75 private:
76 
77 # ifdef __CLING__
78  // If Cling sees the declaration below, then we get mysterious
79  // errors during auto-parsing. On the other hand, if we hide
80  // it completely, then we can run into memory corruption problems
81  // if instances of this class are created from Python,
82  // since Cling will then be allocating a block of the wrong size
83  // (see !63818). However, everything dealing with this member
84  // is out-of-line (including ctors/dtor/assignment), and it also
85  // declared as transient. Thus, for the Cling case, we can replace
86  // it with padding of the correct size.
88 # else
90 # endif
91 
92 
93 
94 };
95 }
98 #endif
xAOD::MuonSimHit_v1
Definition: MuonSimHit_v1.h:18
xAOD::MuonSimHit_v1::setIdentifier
void setIdentifier(const Identifier &id)
Sets the global ATLAS identifier.
Definition: xAODMuonSimHit_V1.cxx:43
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
xAOD::MuonSimHit_v1::stepLength
float stepLength() const
Returns the path length of the G4 step.
xAOD::MuonSimHit_v1::identify
Identifier identify() const
Returns the global ATLAS identifier of the SimHit.
Definition: xAODMuonSimHit_V1.cxx:42
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:483
xAOD::MuonSimHit_v1::setPdgId
void setPdgId(int id)
Sets the pdgID of the traversing particle.
CxxUtils::CachedUniquePtrT
Cached pointer with atomic update.
Definition: CachedUniquePtr.h:54
xAOD::MuonSimHit_v1::globalTime
float globalTime() const
Returns the time ellapsed since the collision of the traversing particle.
xAOD::other
@ other
Definition: TrackingPrimitives.h:510
xAOD::MuonSimHit_v1::m_hepMCLink
CxxUtils::CachedUniquePtr< HepMcParticleLink > m_hepMCLink
Definition: MuonSimHit_v1.h:89
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::MuonSimHit_v1::setLocalPosition
void setLocalPosition(MeasVector< 3 > vec)
Sets the local position of the traversing particle.
Definition: xAODMuonSimHit_V1.cxx:56
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:9
xAOD::MuonSimHit_v1::setGenParticleLink
void setGenParticleLink(const HepMcParticleLink &link)
Sets the link to the HepMC particle producing this hit.
Definition: xAODMuonSimHit_V1.cxx:78
xAOD::MuonSimHit_v1::pdgId
int pdgId() const
Returns the pdgID of the traversing particle.
xAOD::MuonSimHit_v1::MuonSimHit_v1
MuonSimHit_v1()=default
xAOD::MuonSimHit_v1::setMass
void setMass(const float m)
set the rest-mass of the traversing particle
xAOD::MuonSimHit_v1::beta
float beta() const
returns beta (fraction of speed of light)
Definition: xAODMuonSimHit_V1.cxx:52
xAOD::MuonSimHit_v1::operator=
MuonSimHit_v1 & operator=(const MuonSimHit_v1 &other)
Definition: xAODMuonSimHit_V1.cxx:33
GeoPrimitives.h
xAOD::MuonSimHit_v1::pdg_id
int pdg_id() const
Definition: MuonSimHit_v1.h:55
xAOD::MuonSimHit_v1::kineticEnergy
float kineticEnergy() const
Returns the kinetic energy of the traversing particle.
xAOD::MuonSimHit_v1::setKineticEnergy
void setKineticEnergy(const float energy)
Sets the kinetic energy of the traversing particle.
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
xAOD::MuonSimHit_v1::genParticleLink
const HepMcParticleLink & genParticleLink() const
Returns the link to the HepMC particle producing this hit.
Definition: xAODMuonSimHit_V1.cxx:68
CachedUniquePtr.h
Cached unique_ptr with atomic update.
xAOD::MuonSimHit_v1::localDirection
ConstVectorMap< 3 > localDirection() const
Returns the local direction of the traversing particle.
Definition: xAODMuonSimHit_V1.cxx:66
MeasurementDefs.h
xAOD::MuonSimHit_v1::setStepLength
void setStepLength(const float length)
Set the path length of the G4 step.
xAOD::MeasVector
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.
Definition: MeasurementDefs.h:53
DATAVECTOR_BASE
DATAVECTOR_BASE(xAOD::MuonSimHit_v1, SG::AuxElement)
xAOD::MuonSimHit_v1::setEnergyDeposit
void setEnergyDeposit(const float deposit)
Sets the energy deposited by the traversing particle inside the gas volume.
xAOD::MuonSimHit_v1::setLocalDirection
void setLocalDirection(MeasVector< 3 > vec)
Sets the local direction of the traversing particle.
Definition: xAODMuonSimHit_V1.cxx:62
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
xAOD::MuonSimHit_v1::localPosition
ConstVectorMap< 3 > localPosition() const
Returns the local postion of the traversing particle.
Definition: xAODMuonSimHit_V1.cxx:60
xAOD::MuonSimHit_v1::energyDeposit
float energyDeposit() const
Returns the energy deposited by the traversing particle inside the gas volume.
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26
xAOD::MuonSimHit_v1::mass
float mass() const
Returns the rest-mass of the traversing particle.
xAOD::MuonSimHit_v1::setGlobalTime
void setGlobalTime(const float time)
Sets the time of the traversing particle.
xAOD::ConstVectorMap
Eigen::Map< const MeasVector< N > > ConstVectorMap
Definition: MeasurementDefs.h:60
Identifier
Definition: IdentifierFieldParser.cxx:14