Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
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 ( )

Definition at line 28 of file G4KineticTrackVector.cc.

29 {
30 }

Member Function Documentation

void G4KineticTrackVector::Boost ( G4ThreeVector Velocity)

Definition at line 50 of file G4KineticTrackVector.cc.

References CLHEP::HepLorentzVector::boost(), plottest35::c1, G4KineticTrack::Get4Momentum(), and G4KineticTrack::Set4Momentum().

Referenced by G4VLongitudinalStringDecay::LightFragmentationTest().

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
tuple c1
Definition: plottest35.py:14
void G4KineticTrackVector::BoostBeam ( G4ThreeVector BeamMom)

Definition at line 37 of file G4KineticTrackVector.cc.

References CLHEP::HepLorentzVector::boost(), plottest35::c1, G4KineticTrack::Get4Momentum(), G4KineticTrack::GetDefinition(), G4ParticleDefinition::GetPDGMass(), CLHEP::Hep3Vector::mag2(), G4KineticTrack::Set4Momentum(), and sqr().

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  }
G4ParticleDefinition * GetDefinition() const
HepLorentzVector & boost(double, double, double)
void Set4Momentum(const G4LorentzVector &a4Momentum)
G4double GetPDGMass() const
double mag2() const
T sqr(const T &x)
Definition: templates.hh:145
const G4LorentzVector & Get4Momentum() const
tuple c1
Definition: plottest35.py:14
void G4KineticTrackVector::Shift ( G4ThreeVector Pos)

Definition at line 63 of file G4KineticTrackVector.cc.

References plottest35::c1, G4KineticTrack::GetPosition(), and G4KineticTrack::SetPosition().

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

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