#include <RE04Trajectory.hh>
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 90 of file RE04Trajectory.hh.
RE04Trajectory::RE04Trajectory |
( |
| ) |
|
Definition at line 48 of file RE04Trajectory.cc.
50 fPositionRecord(0), fTrackID(0), fParentID(0),
51 fPDGEncoding( 0 ), fPDGCharge(0.0), fParticleName(
""),
52 fInitialKineticEnergy( 0. ), fInitialMomentum(
G4ThreeVector() )
CLHEP::Hep3Vector G4ThreeVector
RE04Trajectory::RE04Trajectory |
( |
const G4Track * |
aTrack | ) |
|
Definition at line 56 of file RE04Trajectory.cc.
G4ParticleDefinition * GetDefinition() const
G4int GetParentID() const
std::vector< G4VTrajectoryPoint * > TrajectoryPointContainer
const G4ThreeVector & GetPosition() const
G4int GetPDGEncoding() const
const G4String & GetParticleName() const
G4double GetKineticEnergy() const
G4Material * GetMaterial() const
G4ThreeVector GetMomentum() const
G4double GetPDGCharge() const
Definition at line 73 of file RE04Trajectory.cc.
75 fParticleName = right.fParticleName;
76 fPDGCharge = right.fPDGCharge;
77 fPDGEncoding = right.fPDGEncoding;
78 fTrackID = right.fTrackID;
79 fParentID = right.fParentID;
80 fInitialKineticEnergy = right.fInitialKineticEnergy;
81 fInitialMomentum = right.fInitialMomentum;
84 for(
size_t i=0;i<right.fPositionRecord->size();i++)
std::vector< G4VTrajectoryPoint * > TrajectoryPointContainer
RE04Trajectory::~RE04Trajectory |
( |
| ) |
|
|
virtual |
Definition at line 93 of file RE04Trajectory.cc.
95 if (fPositionRecord) {
98 for(i=0;i<fPositionRecord->size();i++){
99 delete (*fPositionRecord)[i];
101 fPositionRecord->clear();
102 delete fPositionRecord;
void RE04Trajectory::AppendStep |
( |
const G4Step * |
aStep | ) |
|
|
virtual |
Implements G4VTrajectory.
Definition at line 205 of file RE04Trajectory.cc.
G4Material * GetMaterial() const
G4StepPoint * GetPreStepPoint() const
const G4ThreeVector & GetPosition() const
G4StepPoint * GetPostStepPoint() const
std::vector< G4AttValue > * RE04Trajectory::CreateAttValues |
( |
| ) |
const |
|
virtual |
Reimplemented from G4VTrajectory.
Definition at line 167 of file RE04Trajectory.cc.
169 std::vector<G4AttValue>* values =
new std::vector<G4AttValue>;
177 values->push_back(
G4AttValue(
"PN",fParticleName,
""));
static G4String ConvertToString(G4bool boolVal)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4GLOB_DLL std::ostream G4cout
virtual int GetPointEntries() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
void RE04Trajectory::DrawTrajectory |
( |
| ) |
const |
|
virtual |
Reimplemented from G4VTrajectory.
Definition at line 123 of file RE04Trajectory.cc.
126 std::map<G4String,G4AttDef>* store
131 (*store)[id] =
G4AttDef(
id,
"Track ID",
"Physics",
"",
"G4int");
134 (*store)[pid] =
G4AttDef(pid,
"Parent ID",
"Physics",
"",
"G4int");
137 (*store)[
pn] =
G4AttDef(
pn,
"Particle Name",
"Physics",
"",
"G4String");
140 (*store)[ch] =
G4AttDef(ch,
"Charge",
"Physics",
"e+",
"G4double");
143 (*store)[pdg] =
G4AttDef(pdg,
"PDG Encoding",
"Physics",
"",
"G4int");
147 G4AttDef(ike,
"Initial kinetic energy",
148 "Physics",
"G4BestUnit",
"G4double");
151 (*store)[iMom] =
G4AttDef(iMom,
"Initial momentum",
152 "Physics",
"G4BestUnit",
"G4ThreeVector");
156 G4AttDef(iMag,
"Initial momentum magnitude",
157 "Physics",
"G4BestUnit",
"G4double");
160 (*store)[ntp] =
G4AttDef(ntp,
"No. of points",
"Physics",
"",
"G4int");
std::map< G4String, G4AttDef > * GetInstance(const G4String &storeKey, G4bool &isNew)
virtual G4double RE04Trajectory::GetCharge |
( |
| ) |
const |
|
inlinevirtual |
virtual G4double RE04Trajectory::GetInitialKineticEnergy |
( |
| ) |
const |
|
inlinevirtual |
virtual G4ThreeVector RE04Trajectory::GetInitialMomentum |
( |
| ) |
const |
|
inlinevirtual |
virtual G4int RE04Trajectory::GetParentID |
( |
| ) |
const |
|
inlinevirtual |
virtual G4String RE04Trajectory::GetParticleName |
( |
| ) |
const |
|
inlinevirtual |
virtual G4int RE04Trajectory::GetPDGEncoding |
( |
| ) |
const |
|
inlinevirtual |
virtual int RE04Trajectory::GetPointEntries |
( |
| ) |
const |
|
inlinevirtual |
virtual G4int RE04Trajectory::GetTrackID |
( |
| ) |
const |
|
inlinevirtual |
Implements G4VTrajectory.
Definition at line 219 of file RE04Trajectory.cc.
221 if(!secondTrajectory)
return;
225 for(
G4int i=1;i<ent;i++)
228 fPositionRecord->push_back((*(seco->fPositionRecord))[i]);
231 delete (*seco->fPositionRecord)[0];
232 seco->fPositionRecord->clear();
virtual int GetPointEntries() const
void RE04Trajectory::operator delete |
( |
void * |
aTrajectory | ) |
|
|
inline |
Definition at line 166 of file RE04Trajectory.hh.
G4ThreadLocal G4Allocator< RE04Trajectory > * faTrajAllocator
void * RE04Trajectory::operator new |
( |
size_t |
| ) |
|
|
inline |
Definition at line 160 of file RE04Trajectory.hh.
G4ThreadLocal G4Allocator< RE04Trajectory > * faTrajAllocator
void RE04Trajectory::ShowTrajectory |
( |
std::ostream & |
os = G4cout | ) |
const |
|
virtual |
The documentation for this class was generated from the following files: