|
DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Go to the documentation of this file.
13 #ifndef DDG4_GEANT4FASTSIMSPOT_H
14 #define DDG4_GEANT4FASTSIMSPOT_H
20 #include <G4Version.hh>
22 #if G4VERSION_NUMBER < 1070
24 #include <G4ThreeVector.hh>
30 G4FastHit(
const G4ThreeVector& aPosition, G4double aEnergy)
32 G4FastHit(
const G4ThreeVector& aPosition, G4double aEnergy, G4bool )
51 #include <G4FastHit.hh>
55 #include <G4FastTrack.hh>
56 #include <G4ThreeVector.hh>
57 #include <G4TouchableHandle.hh>
97 {
return primary->GetParticleDefinition(); }
100 {
return track->GetPrimaryTrackLocalDirection(); }
103 {
return track->GetPrimaryTrackLocalMomentum(); }
106 {
return track->GetPrimaryTrackLocalPosition(); }
119 const G4FastTrack*
track {
nullptr };
126 const G4FastTrack* trk,
128 : hit(h), track(trk), primary(trk->GetPrimaryTrack()), touchable(t)
134 const G4FastTrack* trk)
135 : hit(h), track(trk), primary(trk->GetPrimaryTrack())
141 auto mom =
track->GetPrimaryTrackLocalMomentum();
142 return track->GetInverseAffineTransformation()->TransformPoint(mom);
147 auto dir =
track->GetPrimaryTrackLocalDirection();
148 return track->GetInverseAffineTransformation()->TransformPoint(dir);
153 auto pos =
track->GetPrimaryTrackLocalPosition();
154 return track->GetInverseAffineTransformation()->TransformPoint(pos);
159 auto pos =
track->GetPrimaryTrackLocalPosition();
160 auto dir =
track->GetPrimaryTrackLocalDirection();
161 return track->GetEnvelopeSolid()->DistanceToOut(pos, dir);
167 #endif // DDG4_GEANT4FASTSIMSPOT_H
~Geant4FastSimSpot()=default
Default destructor.
G4ThreeVector trackPosition() const
Primary track position.
const G4FastTrack * track
double kineticEnergy() const
Primary track kinetic energy.
void SetPosition(const G4ThreeVector &aPosition)
Set position.
double energy() const
Energy deposit of the spot.
virtual ~G4FastHit()=default
Spot definition for fast simulation and GFlash.
G4ThreeVector particleLocalMomentum() const
Particle's local momentum in the region's envelope solid.
G4ThreeVector particleLocalDirection() const
Particle's local direction in the region's envelope solid.
G4ThreeVector fPosition
position
G4ThreeVector hitPosition() const
Spot's hit position.
G4FastHit(const G4ThreeVector &aPosition, G4double aEnergy, G4bool)
G4FastHit(const G4ThreeVector &aPosition, G4double aEnergy)
void SetEnergy(const G4double &aEnergy)
Set energy.
G4ThreeVector particleLocalPosition() const
Particle's local position in the region's envelope solid.
double distanceToOut() const
Distance to exit point from the region's envelope solid.
G4ThreeVector particleMomentum() const
Particle's global momentum in the region's envelope solid.
G4VPhysicalVolume * volume() const
Access the physical volume of the hit.
Geant4FastSimSpot()=delete
Default constructor disabled.
G4ThreeVector particlePosition() const
Particle's global position in the region's envelope solid.
Namespace for the AIDA detector description toolkit.
G4ThreeVector particleDirection() const
Particle's global direction in the region's envelope solid.
G4double GetEnergy() const
Get energy.
G4ThreeVector GetPosition() const
Get position.
G4ThreeVector trackMomentum() const
Primary track momentum.
const G4ParticleDefinition * trackDefinition() const
Primary track particle definition.