Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE01TrackInformation.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
28 //
29 //
30 // $Id$
31 //
32 
33 #include "RE01TrackInformation.hh"
34 #include "G4ios.hh"
35 #include "G4SystemOfUnits.hh"
36 
38 
39 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
42 {
43  fOriginalTrackID = 0;
44  fParticleDefinition = 0;
45  fOriginalPosition = G4ThreeVector(0.,0.,0.);
46  fOriginalMomentum = G4ThreeVector(0.,0.,0.);
47  fOriginalEnergy = 0.;
48  fOriginalTime = 0.;
49  fTrackingStatus = 1;
50  fSourceTrackID = -1;
51  fSourceDefinition = 0;
52  fSourcePosition = G4ThreeVector(0.,0.,0.);
53  fSourceMomentum = G4ThreeVector(0.,0.,0.);
54  fSourceEnergy = 0.;
55  fSourceTime = 0.;
56 }
57 
58 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
61 {
62  fOriginalTrackID = aTrack->GetTrackID();
63  fParticleDefinition = aTrack->GetDefinition();
64  fOriginalPosition = aTrack->GetPosition();
65  fOriginalMomentum = aTrack->GetMomentum();
66  fOriginalEnergy = aTrack->GetTotalEnergy();
67  fOriginalTime = aTrack->GetGlobalTime();
68  fTrackingStatus = 1;
69  fSourceTrackID = -1;
70  fSourceDefinition = 0;
71  fSourcePosition = G4ThreeVector(0.,0.,0.);
72  fSourceMomentum = G4ThreeVector(0.,0.,0.);
73  fSourceEnergy = 0.;
74  fSourceTime = 0.;
75 }
76 
77 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
81 {
82  fOriginalTrackID = aTrackInfo->fOriginalTrackID;
83  fParticleDefinition = aTrackInfo->fParticleDefinition;
84  fOriginalPosition = aTrackInfo->fOriginalPosition;
85  fOriginalMomentum = aTrackInfo->fOriginalMomentum;
86  fOriginalEnergy = aTrackInfo->fOriginalEnergy;
87  fOriginalTime = aTrackInfo->fOriginalTime;
88  fTrackingStatus = aTrackInfo->fTrackingStatus;
89  fSourceTrackID = aTrackInfo->fSourceTrackID;
90  fSourceDefinition = aTrackInfo->fSourceDefinition;
91  fSourcePosition = aTrackInfo->fSourcePosition;
92  fSourceMomentum = aTrackInfo->fSourceMomentum;
93  fSourceEnergy = aTrackInfo->fSourceEnergy;
94  fSourceTime = aTrackInfo->fSourceTime;
95 }
96 
97 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
99 {;}
100 
101 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
104 {
105  fOriginalTrackID = aTrackInfo.fOriginalTrackID;
106  fParticleDefinition = aTrackInfo.fParticleDefinition;
107  fOriginalPosition = aTrackInfo.fOriginalPosition;
108  fOriginalMomentum = aTrackInfo.fOriginalMomentum;
109  fOriginalEnergy = aTrackInfo.fOriginalEnergy;
110  fOriginalTime = aTrackInfo.fOriginalTime;
111  fTrackingStatus = aTrackInfo.fTrackingStatus;
112  fSourceTrackID = aTrackInfo.fSourceTrackID;
113  fSourceDefinition = aTrackInfo.fSourceDefinition;
114  fSourcePosition = aTrackInfo.fSourcePosition;
115  fSourceMomentum = aTrackInfo.fSourceMomentum;
116  fSourceEnergy = aTrackInfo.fSourceEnergy;
117  fSourceTime = aTrackInfo.fSourceTime;
118 
119  return *this;
120 }
121 
122 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
124 {
125  fSourceTrackID = aTrack->GetTrackID();
126  fSourceDefinition = aTrack->GetDefinition();
127  fSourcePosition = aTrack->GetPosition();
128  fSourceMomentum = aTrack->GetMomentum();
129  fSourceEnergy = aTrack->GetTotalEnergy();
130  fSourceTime = aTrack->GetGlobalTime();
131 }
132 
133 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
135 {
136  G4cout
137  << "Source track ID " << fSourceTrackID << " ("
138  << fSourceDefinition->GetParticleName() << ","
139  << fSourceEnergy/GeV << "[GeV]) at " << fSourcePosition << G4endl;
140  G4cout
141  << "Original primary track ID " << fOriginalTrackID << " ("
142  << fParticleDefinition->GetParticleName() << ","
143  << fOriginalEnergy/GeV << "[GeV])" << G4endl;
144 }
145