User trajectory class.
More...
#include <Doxymodules_runAndEvent.h>
User trajectory class.
- new, delete and "==" operators are overwritten
- get functions G4int GetTrackID() const, G4int GetParentID() const, G4String GetParticleName() const, G4double GetCharge() const, G4int GetPDGEncoding() const, G4double GetInitialKineticEnergy() const and G4ThreeVector GetInitialMomentum() const
- void ShowTrajectory(std::ostream& os=G4cout) const invokes the default implementation
- void DrawTrajectory() const invokes the default implementation
- void AppendStep(const G4Step* aStep) adds a user trajectory point object, RE04TrajectoryPoint
- int GetPointEntries() const returns the number of point entries
- G4VTrajectoryPoint* GetPoint(G4int i) const gets the i-th trajectory point
- void MergeTrajectory(G4VTrajectory* secondTrajectory) adds a trajectory to a TrajectoryPointContainer, fPositionRecord
- G4ParticleDefinition* GetParticleDefinition() get a particle definition from G4ParticleTable
- const std::map<G4String,G4AttDef>* GetAttDefs() const defines the track ID, the parent ID, the particle name, the charge, the PDG encoding, the initial kinetic energy, the initial momentum, the initial momentum magnitude and the number of points as attiributes
- std::vector<G4AttValue>* CreateAttValues() const sets and returns the attributes
Definition at line 91 of file Doxymodules_runAndEvent.h.
◆ RE04Trajectory() [1/3]
RE04Trajectory::RE04Trajectory |
( |
| ) |
|
Definition at line 47 of file RE04Trajectory.cc.
52{;}
G4double fInitialKineticEnergy
TrajectoryPointContainer * fPositionRecord
G4ThreeVector fInitialMomentum
◆ RE04Trajectory() [2/3]
RE04Trajectory::RE04Trajectory |
( |
const G4Track * |
aTrack | ) |
|
Definition at line 55 of file RE04Trajectory.cc.
56{
59 fPDGCharge = fpParticleDefinition->GetPDGCharge();
66
68 aTrack->GetPosition(),aTrack->GetMaterial()));
69}
std::vector< G4VTrajectoryPoint * > TrajectoryPointContainer
◆ RE04Trajectory() [3/3]
Definition at line 72 of file RE04Trajectory.cc.
73{
82
83 for(
size_t i=0;i<
right.fPositionRecord->size();i++)
84 {
88 }
89}
◆ ~RE04Trajectory()
RE04Trajectory::~RE04Trajectory |
( |
| ) |
|
|
virtual |
Definition at line 92 of file RE04Trajectory.cc.
93{
95
96 size_t i;
98 delete (*fPositionRecord)[i];
99 }
102 }
103}
◆ operator new()
void * RE04Trajectory::operator new |
( |
size_t |
| ) |
|
|
inline |
Definition at line 159 of file RE04Trajectory.hh.
160{
163}
G4ThreadLocal G4Allocator< RE04Trajectory > * faTrajAllocator
◆ operator delete()
void RE04Trajectory::operator delete |
( |
void * |
aTrajectory | ) |
|
|
inline |
◆ operator==()
◆ GetTrackID()
virtual G4int RE04Trajectory::GetTrackID |
( |
| ) |
const |
|
inlinevirtual |
◆ GetParentID()
virtual G4int RE04Trajectory::GetParentID |
( |
| ) |
const |
|
inlinevirtual |
◆ GetParticleName()
virtual G4String RE04Trajectory::GetParticleName |
( |
| ) |
const |
|
inlinevirtual |
◆ GetCharge()
virtual G4double RE04Trajectory::GetCharge |
( |
| ) |
const |
|
inlinevirtual |
◆ GetPDGEncoding()
virtual G4int RE04Trajectory::GetPDGEncoding |
( |
| ) |
const |
|
inlinevirtual |
◆ GetInitialKineticEnergy()
virtual G4double RE04Trajectory::GetInitialKineticEnergy |
( |
| ) |
const |
|
inlinevirtual |
◆ GetInitialMomentum()
virtual G4ThreeVector RE04Trajectory::GetInitialMomentum |
( |
| ) |
const |
|
inlinevirtual |
◆ ShowTrajectory()
void RE04Trajectory::ShowTrajectory |
( |
std::ostream & |
os = G4cout | ) |
const |
|
virtual |
Definition at line 106 of file RE04Trajectory.cc.
107{
108
109 G4VTrajectory::ShowTrajectory(os);
110
111}
◆ DrawTrajectory()
void RE04Trajectory::DrawTrajectory |
( |
| ) |
const |
|
virtual |
Definition at line 114 of file RE04Trajectory.cc.
115{
116
117 G4VTrajectory::DrawTrajectory();
118
119}
◆ AppendStep()
void RE04Trajectory::AppendStep |
( |
const G4Step * |
aStep | ) |
|
|
virtual |
Definition at line 204 of file RE04Trajectory.cc.
205{
207 aStep->GetPostStepPoint()->GetPosition(),
208 aStep->GetPreStepPoint()->GetMaterial() ));
209}
◆ GetPointEntries()
virtual int RE04Trajectory::GetPointEntries |
( |
| ) |
const |
|
inlinevirtual |
◆ GetPoint()
◆ MergeTrajectory()
void RE04Trajectory::MergeTrajectory |
( |
G4VTrajectory * |
secondTrajectory | ) |
|
|
virtual |
Definition at line 218 of file RE04Trajectory.cc.
219{
220 if(!secondTrajectory) return;
221
224 for(G4int i=1;i<ent;i++)
225
226 {
228
229 }
232}
virtual int GetPointEntries() const
◆ GetParticleDefinition()
◆ GetAttDefs()
Definition at line 122 of file RE04Trajectory.cc.
123{
124 G4bool isNew;
125 std::map<G4String,G4AttDef>* store
126 = G4AttDefStore::GetInstance("RE04Trajectory",isNew);
127 if (isNew) {
128
130 (*store)[id] =
G4AttDef(
id,
"Track ID",
"Physics",
"",
"G4int");
131
133 (*store)[pid] =
G4AttDef(pid,
"Parent ID",
"Physics",
"",
"G4int");
134
136 (*store)[pn] =
G4AttDef(pn,
"Particle Name",
"Physics",
"",
"G4String");
137
139 (*store)[ch] =
G4AttDef(ch,
"Charge",
"Physics",
"e+",
"G4double");
140
142 (*store)[pdg] =
G4AttDef(pdg,
"PDG Encoding",
"Physics",
"",
"G4int");
143
145 (*store)[ike] =
146 G4AttDef(ike,
"Initial kinetic energy",
147 "Physics","G4BestUnit","G4double");
148
150 (*store)[iMom] =
G4AttDef(iMom,
"Initial momentum",
151 "Physics","G4BestUnit","G4ThreeVector");
152
154 (*store)[iMag] =
155 G4AttDef(iMag,
"Initial momentum magnitude",
156 "Physics","G4BestUnit","G4double");
157
159 (*store)[ntp] =
G4AttDef(ntp,
"No. of points",
"Physics",
"",
"G4int");
160
161 }
162 return store;
163}
◆ CreateAttValues()
std::vector< G4AttValue > * RE04Trajectory::CreateAttValues |
( |
| ) |
const |
|
virtual |
Definition at line 166 of file RE04Trajectory.cc.
167{
168 std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
169
170 values->push_back
172
173 values->push_back
175
177
178 values->push_back
180
181 values->push_back
183
184 values->push_back
186
187 values->push_back
189
190 values->push_back
192
193 values->push_back
195
196#ifdef G4ATTDEBUG
198#endif
199
200 return values;
201}
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
◆ fPositionRecord
◆ fTrackID
G4int RE04Trajectory::fTrackID |
|
private |
◆ fParentID
G4int RE04Trajectory::fParentID |
|
private |
◆ fPDGEncoding
G4int RE04Trajectory::fPDGEncoding |
|
private |
◆ fPDGCharge
G4double RE04Trajectory::fPDGCharge |
|
private |
◆ fParticleName
◆ fInitialKineticEnergy
G4double RE04Trajectory::fInitialKineticEnergy |
|
private |
◆ fInitialMomentum
G4ThreeVector RE04Trajectory::fInitialMomentum |
|
private |
The documentation for this class was generated from the following files: