Geant4
10.02.p03
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: RE01TrackInformation.cc 75295 2013-10-30 09:32:52Z gcosmo $
31
//
32
33
#include "
RE01TrackInformation.hh
"
34
#include "
G4ios.hh
"
35
#include "
G4SystemOfUnits.hh
"
36
37
G4ThreadLocal
G4Allocator<RE01TrackInformation>
*
aTrackInformationAllocator
= 0;
38
//G4Allocator<RE01TrackInformation> aTrackInformationAllocator;
39
40
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
41
RE01TrackInformation::RE01TrackInformation
()
42
: G4VUserTrackInformation()
43
{
44
fOriginalTrackID
= 0;
45
fParticleDefinition
= 0;
46
fOriginalPosition
=
G4ThreeVector
(0.,0.,0.);
47
fOriginalMomentum
=
G4ThreeVector
(0.,0.,0.);
48
fOriginalEnergy
= 0.;
49
fOriginalTime
= 0.;
50
fTrackingStatus
= 1;
51
fSourceTrackID
= -1;
52
fSourceDefinition
= 0;
53
fSourcePosition
=
G4ThreeVector
(0.,0.,0.);
54
fSourceMomentum
=
G4ThreeVector
(0.,0.,0.);
55
fSourceEnergy
= 0.;
56
fSourceTime
= 0.;
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
}
77
78
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
79
RE01TrackInformation
80
::RE01TrackInformation
(
const
RE01TrackInformation
* aTrackInfo)
81
: G4VUserTrackInformation()
82
{
83
fOriginalTrackID
= aTrackInfo->
fOriginalTrackID
;
84
fParticleDefinition
= aTrackInfo->
fParticleDefinition
;
85
fOriginalPosition
= aTrackInfo->
fOriginalPosition
;
86
fOriginalMomentum
= aTrackInfo->
fOriginalMomentum
;
87
fOriginalEnergy
= aTrackInfo->
fOriginalEnergy
;
88
fOriginalTime
= aTrackInfo->
fOriginalTime
;
89
fTrackingStatus
= aTrackInfo->
fTrackingStatus
;
90
fSourceTrackID
= aTrackInfo->
fSourceTrackID
;
91
fSourceDefinition
= aTrackInfo->
fSourceDefinition
;
92
fSourcePosition
= aTrackInfo->
fSourcePosition
;
93
fSourceMomentum
= aTrackInfo->
fSourceMomentum
;
94
fSourceEnergy
= aTrackInfo->
fSourceEnergy
;
95
fSourceTime
= aTrackInfo->
fSourceTime
;
96
}
97
98
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
99
RE01TrackInformation::~RE01TrackInformation
()
100
{;}
101
102
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
103
RE01TrackInformation
&
RE01TrackInformation
104
::operator =
(
const
RE01TrackInformation
& aTrackInfo)
105
{
106
fOriginalTrackID
= aTrackInfo.
fOriginalTrackID
;
107
fParticleDefinition
= aTrackInfo.
fParticleDefinition
;
108
fOriginalPosition
= aTrackInfo.
fOriginalPosition
;
109
fOriginalMomentum
= aTrackInfo.
fOriginalMomentum
;
110
fOriginalEnergy
= aTrackInfo.
fOriginalEnergy
;
111
fOriginalTime
= aTrackInfo.
fOriginalTime
;
112
fTrackingStatus
= aTrackInfo.
fTrackingStatus
;
113
fSourceTrackID
= aTrackInfo.
fSourceTrackID
;
114
fSourceDefinition
= aTrackInfo.
fSourceDefinition
;
115
fSourcePosition
= aTrackInfo.
fSourcePosition
;
116
fSourceMomentum
= aTrackInfo.
fSourceMomentum
;
117
fSourceEnergy
= aTrackInfo.
fSourceEnergy
;
118
fSourceTime
= aTrackInfo.
fSourceTime
;
119
120
return
*
this
;
121
}
122
123
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
124
void
RE01TrackInformation::SetSourceTrackInformation
(
const
G4Track* aTrack)
125
{
126
fSourceTrackID
= aTrack->GetTrackID();
127
fSourceDefinition
= aTrack->GetDefinition();
128
fSourcePosition
= aTrack->GetPosition();
129
fSourceMomentum
= aTrack->GetMomentum();
130
fSourceEnergy
= aTrack->GetTotalEnergy();
131
fSourceTime
= aTrack->GetGlobalTime();
132
}
133
134
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
135
void
RE01TrackInformation::Print
()
const
136
{
137
G4cout
138
<<
"Source track ID "
<<
fSourceTrackID
<<
" ("
139
<<
fSourceDefinition
->
GetParticleName
() <<
","
140
<<
fSourceEnergy
/
GeV
<<
"[GeV]) at "
<<
fSourcePosition
<<
G4endl
;
141
G4cout
142
<<
"Original primary track ID "
<<
fOriginalTrackID
<<
" ("
143
<<
fParticleDefinition
->
GetParticleName
() <<
","
144
<<
fOriginalEnergy
/
GeV
<<
"[GeV])"
<<
G4endl
;
145
}
146
aTrackInformationAllocator
G4ThreadLocal G4Allocator< RE01TrackInformation > * aTrackInformationAllocator
Definition:
RE01TrackInformation.cc:37
RE01TrackInformation::fOriginalTime
G4double fOriginalTime
Definition:
RE01TrackInformation.hh:71
G4ThreeVector
CLHEP::Hep3Vector G4ThreeVector
Definition:
G4ThreeVector.hh:42
RE01TrackInformation.hh
Definition of the RE01TrackInformation class.
RE01TrackInformation::fTrackingStatus
G4int fTrackingStatus
Definition:
RE01TrackInformation.hh:73
RE01TrackInformation::fSourceTrackID
G4int fSourceTrackID
Definition:
RE01TrackInformation.hh:83
RE01TrackInformation
Definition:
RE01TrackInformation.hh:43
RE01TrackInformation::fSourceMomentum
G4ThreeVector fSourceMomentum
Definition:
RE01TrackInformation.hh:86
RE01TrackInformation::fOriginalEnergy
G4double fOriginalEnergy
Definition:
RE01TrackInformation.hh:70
RE01TrackInformation::fOriginalTrackID
G4int fOriginalTrackID
Definition:
RE01TrackInformation.hh:66
G4ThreadLocal
#define G4ThreadLocal
Definition:
tls.hh:89
RE01TrackInformation::RE01TrackInformation
RE01TrackInformation()
Definition:
RE01TrackInformation.cc:41
RE01TrackInformation::SetSourceTrackInformation
void SetSourceTrackInformation(const G4Track *aTrack)
Definition:
RE01TrackInformation.cc:124
G4ParticleDefinition::GetParticleName
const G4String & GetParticleName() const
Definition:
G4ParticleDefinition.hh:120
G4cout
G4GLOB_DLL std::ostream G4cout
RE01TrackInformation::fParticleDefinition
G4ParticleDefinition * fParticleDefinition
Definition:
RE01TrackInformation.hh:67
RE01TrackInformation::fSourceTime
G4double fSourceTime
Definition:
RE01TrackInformation.hh:88
RE01TrackInformation::Print
virtual void Print() const
Definition:
RE01TrackInformation.cc:135
GeV
static const double GeV
Definition:
G4SIunits.hh:214
RE01TrackInformation::~RE01TrackInformation
virtual ~RE01TrackInformation()
Definition:
RE01TrackInformation.cc:99
RE01TrackInformation::fSourcePosition
G4ThreeVector fSourcePosition
Definition:
RE01TrackInformation.hh:85
RE01TrackInformation::fOriginalPosition
G4ThreeVector fOriginalPosition
Definition:
RE01TrackInformation.hh:68
RE01TrackInformation::operator=
RE01TrackInformation & operator=(const RE01TrackInformation &right)
Definition:
RE01TrackInformation.cc:104
G4Allocator
Definition:
G4Allocator.hh:67
G4ios.hh
RE01TrackInformation::fSourceEnergy
G4double fSourceEnergy
Definition:
RE01TrackInformation.hh:87
G4endl
#define G4endl
Definition:
G4ios.hh:61
G4SystemOfUnits.hh
RE01TrackInformation::fSourceDefinition
G4ParticleDefinition * fSourceDefinition
Definition:
RE01TrackInformation.hh:84
RE01TrackInformation::fOriginalMomentum
G4ThreeVector fOriginalMomentum
Definition:
RE01TrackInformation.hh:69
Geant4
Geant4.10.02.p03
examples
extended
runAndEvent
RE01
src
RE01TrackInformation.cc
Generated by
1.8.13