Download
|
User Forum
|
Contact Us
|
Bug Reports
Home
>
Examples
Loading...
Searching...
No Matches
extended
runAndEvent
RE01
src
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
//
26
/// \file runAndEvent/RE01/src/RE01TrackInformation.cc
27
/// \brief Implementation of the RE01TrackInformation class
28
//
29
//
30
//
31
32
#include "
RE01TrackInformation.hh
"
33
#include "G4ios.hh"
34
#include "G4SystemOfUnits.hh"
35
36
G4ThreadLocal
G4Allocator<RE01TrackInformation>
*
37
aTrackInformationAllocator
= 0;
38
39
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
40
RE01TrackInformation::RE01TrackInformation
()
41
:
G4VUserTrackInformation
()
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
fSuspendedStepID
= -1;
57
}
58
59
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
60
RE01TrackInformation::RE01TrackInformation
(
const
G4Track
* aTrack)
61
:
G4VUserTrackInformation
()
62
{
63
fOriginalTrackID
= aTrack->GetTrackID();
64
fParticleDefinition
= aTrack->GetDefinition();
65
fOriginalPosition
= aTrack->GetPosition();
66
fOriginalMomentum
= aTrack->GetMomentum();
67
fOriginalEnergy
= aTrack->GetTotalEnergy();
68
fOriginalTime
= aTrack->GetGlobalTime();
69
fTrackingStatus
= 1;
70
fSourceTrackID
= -1;
71
fSourceDefinition
= 0;
72
fSourcePosition
= G4ThreeVector(0.,0.,0.);
73
fSourceMomentum
= G4ThreeVector(0.,0.,0.);
74
fSourceEnergy
= 0.;
75
fSourceTime
= 0.;
76
fSuspendedStepID
= -1;
77
}
78
79
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
80
RE01TrackInformation
81
::RE01TrackInformation(
const
RE01TrackInformation
* aTrackInfo)
82
:
G4VUserTrackInformation
()
83
{
84
fOriginalTrackID
= aTrackInfo->
fOriginalTrackID
;
85
fParticleDefinition
= aTrackInfo->
fParticleDefinition
;
86
fOriginalPosition
= aTrackInfo->
fOriginalPosition
;
87
fOriginalMomentum
= aTrackInfo->
fOriginalMomentum
;
88
fOriginalEnergy
= aTrackInfo->
fOriginalEnergy
;
89
fOriginalTime
= aTrackInfo->
fOriginalTime
;
90
fTrackingStatus
= aTrackInfo->
fTrackingStatus
;
91
fSourceTrackID
= aTrackInfo->
fSourceTrackID
;
92
fSourceDefinition
= aTrackInfo->
fSourceDefinition
;
93
fSourcePosition
= aTrackInfo->
fSourcePosition
;
94
fSourceMomentum
= aTrackInfo->
fSourceMomentum
;
95
fSourceEnergy
= aTrackInfo->
fSourceEnergy
;
96
fSourceTime
= aTrackInfo->
fSourceTime
;
97
fSuspendedStepID
= -1;
98
}
99
100
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
101
RE01TrackInformation::~RE01TrackInformation
()
102
{;}
103
104
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
105
RE01TrackInformation
& RE01TrackInformation
106
::operator =(
const
RE01TrackInformation
& aTrackInfo)
107
{
108
fOriginalTrackID = aTrackInfo.
fOriginalTrackID
;
109
fParticleDefinition = aTrackInfo.
fParticleDefinition
;
110
fOriginalPosition = aTrackInfo.
fOriginalPosition
;
111
fOriginalMomentum = aTrackInfo.
fOriginalMomentum
;
112
fOriginalEnergy = aTrackInfo.
fOriginalEnergy
;
113
fOriginalTime = aTrackInfo.
fOriginalTime
;
114
fTrackingStatus = aTrackInfo.
fTrackingStatus
;
115
fSourceTrackID = aTrackInfo.
fSourceTrackID
;
116
fSourceDefinition = aTrackInfo.
fSourceDefinition
;
117
fSourcePosition = aTrackInfo.
fSourcePosition
;
118
fSourceMomentum = aTrackInfo.
fSourceMomentum
;
119
fSourceEnergy = aTrackInfo.
fSourceEnergy
;
120
fSourceTime = aTrackInfo.
fSourceTime
;
121
fSuspendedStepID = -1;
122
123
return
*
this
;
124
}
125
126
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
127
void
RE01TrackInformation::SetSourceTrackInformation
(
const
G4Track
* aTrack)
128
{
129
fSourceTrackID
= aTrack->GetTrackID();
130
fSourceDefinition
= aTrack->GetDefinition();
131
fSourcePosition
= aTrack->GetPosition();
132
fSourceMomentum
= aTrack->GetMomentum();
133
fSourceEnergy
= aTrack->GetTotalEnergy();
134
fSourceTime
= aTrack->GetGlobalTime();
135
}
136
137
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
138
void
RE01TrackInformation::Print
()
const
139
{
140
G4cout
141
<<
"Source track ID "
<<
fSourceTrackID
<<
" ("
142
<<
fSourceDefinition
->GetParticleName() <<
","
143
<<
fSourceEnergy
/GeV <<
"[GeV]) at "
<<
fSourcePosition
<< G4endl;
144
G4cout
145
<<
"Original primary track ID "
<<
fOriginalTrackID
<<
" ("
146
<<
fParticleDefinition
->GetParticleName() <<
","
147
<<
fOriginalEnergy
/GeV <<
"[GeV])"
<< G4endl;
148
}
149
aTrackInformationAllocator
G4ThreadLocal G4Allocator< RE01TrackInformation > * aTrackInformationAllocator
Definition
RE01TrackInformation.cc:37
RE01TrackInformation.hh
Definition of the RE01TrackInformation class.
G4Allocator
G4Track
G4VUserTrackInformation
RE01TrackInformation
Definition
Doxymodules_runAndEvent.h:36
RE01TrackInformation::fOriginalPosition
G4ThreeVector fOriginalPosition
Definition
RE01TrackInformation.hh:69
RE01TrackInformation::~RE01TrackInformation
virtual ~RE01TrackInformation()
Definition
RE01TrackInformation.cc:101
RE01TrackInformation::fSourcePosition
G4ThreeVector fSourcePosition
Definition
RE01TrackInformation.hh:86
RE01TrackInformation::fSourceMomentum
G4ThreeVector fSourceMomentum
Definition
RE01TrackInformation.hh:87
RE01TrackInformation::fSourceTime
G4double fSourceTime
Definition
RE01TrackInformation.hh:89
RE01TrackInformation::fParticleDefinition
G4ParticleDefinition * fParticleDefinition
Definition
RE01TrackInformation.hh:68
RE01TrackInformation::fSourceDefinition
G4ParticleDefinition * fSourceDefinition
Definition
RE01TrackInformation.hh:85
RE01TrackInformation::fOriginalTrackID
G4int fOriginalTrackID
Definition
RE01TrackInformation.hh:67
RE01TrackInformation::fOriginalTime
G4double fOriginalTime
Definition
RE01TrackInformation.hh:72
RE01TrackInformation::Print
virtual void Print() const
Definition
RE01TrackInformation.cc:138
RE01TrackInformation::SetSourceTrackInformation
void SetSourceTrackInformation(const G4Track *aTrack)
Definition
RE01TrackInformation.cc:127
RE01TrackInformation::fSourceTrackID
G4int fSourceTrackID
Definition
RE01TrackInformation.hh:84
RE01TrackInformation::fTrackingStatus
G4int fTrackingStatus
Definition
RE01TrackInformation.hh:74
RE01TrackInformation::fOriginalMomentum
G4ThreeVector fOriginalMomentum
Definition
RE01TrackInformation.hh:70
RE01TrackInformation::RE01TrackInformation
RE01TrackInformation()
Definition
RE01TrackInformation.cc:40
RE01TrackInformation::fSourceEnergy
G4double fSourceEnergy
Definition
RE01TrackInformation.hh:88
RE01TrackInformation::fSuspendedStepID
G4int fSuspendedStepID
Definition
RE01TrackInformation.hh:90
RE01TrackInformation::fOriginalEnergy
G4double fOriginalEnergy
Definition
RE01TrackInformation.hh:71
Generated on Tue Jan 30 2024 12:18:45 for Geant4 examples by
1.9.8
Applications
|
User Support
|
Publications
|
Collaboration