Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4KineticTrackVector Class Reference

#include <G4KineticTrackVector.hh>

+ Inheritance diagram for G4KineticTrackVector:

Public Member Functions

 G4KineticTrackVector ()
 
void BoostBeam (G4ThreeVector &BeamMom)
 
void Boost (G4ThreeVector &Velocity)
 
void Shift (G4ThreeVector &Pos)
 

Detailed Description

Definition at line 38 of file G4KineticTrackVector.hh.

Constructor & Destructor Documentation

◆ G4KineticTrackVector()

G4KineticTrackVector::G4KineticTrackVector ( )

Definition at line 28 of file G4KineticTrackVector.cc.

29{
30}

Member Function Documentation

◆ Boost()

void G4KineticTrackVector::Boost ( G4ThreeVector Velocity)

Definition at line 50 of file G4KineticTrackVector.cc.

51 {
52 for(unsigned int c1 = 0; c1 < size(); c1++)
53 {
54 G4KineticTrack& KT =**(begin()+c1);
55 G4LorentzVector Mom = KT.Get4Momentum();
56 Mom.boost(Velocity);
57 KT.Set4Momentum(Mom);
58 }
59 }
HepLorentzVector & boost(double, double, double)
void Set4Momentum(const G4LorentzVector &a4Momentum)
const G4LorentzVector & Get4Momentum() const

Referenced by G4VLongitudinalStringDecay::LightFragmentationTest().

◆ BoostBeam()

void G4KineticTrackVector::BoostBeam ( G4ThreeVector BeamMom)

Definition at line 37 of file G4KineticTrackVector.cc.

38 {
39 for(unsigned int c1 = 0; c1 < size(); c1++)
40 {
41 G4KineticTrack& KT =**(begin()+c1);
42 G4LorentzVector Mom = KT.Get4Momentum();
43 G4ThreeVector Velocity = (1/std::sqrt(BeamMom.mag2() + sqr(KT.GetDefinition()->GetPDGMass())))*BeamMom;
44 Mom.boost(Velocity);
45 KT.Set4Momentum(Mom);
46 }
47 }
double mag2() const
G4ParticleDefinition * GetDefinition() const
T sqr(const T &x)
Definition: templates.hh:145

◆ Shift()

void G4KineticTrackVector::Shift ( G4ThreeVector Pos)

Definition at line 63 of file G4KineticTrackVector.cc.

64 {
65 for(unsigned int c1 = 0; c1 < size(); c1++)
66 {
67 G4KineticTrack& KT =**(begin()+c1);
68 KT.SetPosition(KT.GetPosition() + Pos);
69 }
70 }
void SetPosition(const G4ThreeVector aPosition)
const G4ThreeVector & GetPosition() const
ush Pos
Definition: deflate.h:82

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