QwGeant4
QweakSimTrackHistory.cc
Go to the documentation of this file.
2 
3 // geant4 includes
4 #include "G4Track.hh"
5 #include "G4ParticleDefinition.hh"
6 
7 //ClassImp(QweakSimTrackHistory)
8 
10 {
11 }
12 
14 {
15 }
16 
17 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
18 void QweakSimTrackHistory::AddTrackInfo(const G4Track* aTrack)
19 {
20  sourceTrackID = aTrack->GetTrackID();
21  sourceDefinition = aTrack->GetDefinition();
22  sourcePosition = aTrack->GetPosition();
23  sourceMomentum = aTrack->GetMomentum();
24  sourceEnergy = aTrack->GetTotalEnergy();
25  sourceTime = aTrack->GetGlobalTime();
26 }
27 
28 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
30 {
31 // G4cout << "###### Calling QweakSimTrackHistory::Print() " << G4endl;
32 
33  G4cout << "########################################################################" << G4endl;
34  G4cout << "Source Track ID = " << sourceTrackID << G4endl;
35  G4cout << "Source Particle Name = " << sourceDefinition->GetParticleName() << G4endl;
36  G4cout << "Source Particle Energy [GeV] = " << sourceEnergy/GeV << G4endl;
37  G4cout << "Source Particle Position [mm] = " << sourcePosition << G4endl;
38  G4cout << "########################################################################" << G4endl;
39 
40 // G4cout << "###### Leaving QweakSimTrackHistory::Print() " << G4endl;
41 }
42 
43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45 {
46  //G4cout << G4endl << "###### Calling QweakSimTrackHistory::Initialize() " << G4endl << G4endl;
47 
48  sourceTrackID = -1;
49  sourceTrackID = -1;
50  sourceDefinition = 0;
51  sourcePosition = G4ThreeVector(0.,0.,0.);
52  sourceMomentum = G4ThreeVector(0.,0.,0.);
53  sourceEnergy = 0.;
54  sourceTime = 0.;
55 
56 
57  //G4cout << G4endl << "###### Leaving QweakSimTrackHistory::Initialize() " << G4endl << G4endl;
58 
59 }
void AddTrackInfo(const G4Track *aTrack)
G4ParticleDefinition * sourceDefinition