GGS(GenericGEANT4Simulation)Software  2.7.0
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
Public Member Functions | Protected Attributes
GGSPosHit Class Reference

Definition of GGS Position Hit. More...

#include <GGSPosHit.h>

Inheritance diagram for GGSPosHit:
Inheritance graph
[legend]
Collaboration diagram for GGSPosHit:
Collaboration graph
[legend]

Public Member Functions

 GGSPosHit ()
 Constructor.
 
 ~GGSPosHit ()
 Destructor.
 
 GGSPosHit (const GGSPosHit &right)
 Copy constructor. More...
 
const GGSPosHitoperator= (const GGSPosHit &right)
 Assignment operator. More...
 
bool operator== (const GGSPosHit &right) const
 Comparison operator. More...
 
void * operator new (size_t size)
 Operator new. More...
 
void operator delete (void *)
 Operator delete. More...
 
void SetEnergyDeposit (G4double eDep)
 Energy deposit setter. More...
 
void SetTime (G4double time)
 Time setter. More...
 
void SetPathLength (G4double path)
 Path length setter. More...
 
void SetStartPoint (G4ThreeVector pos)
 Start point setter. More...
 
void SetEndPoint (G4ThreeVector pos)
 End point setter. More...
 
void SetStartMomentum (G4ThreeVector mom)
 Start momentum setter. More...
 
void SetStartEnergy (G4double e)
 Start energy setter. More...
 
G4double GetEnergyDeposit () const
 Energy release getter. More...
 
G4double GetTime () const
 Time getter. More...
 
G4double GetPathLength () const
 Path length getter. More...
 
G4ThreeVector GetStartPoint () const
 Start point getter. More...
 
G4ThreeVector GetEndPoint () const
 End point getter. More...
 
G4ThreeVector GetStartMomentum () const
 Momentum getter. More...
 
G4double GetStartEnergy () const
 Start energy getter. More...
 
virtual void SetStep (const G4Step &step)
 

Protected Attributes

G4double _eDep
 
G4double _time
 
G4double _pathLength
 
G4ThreeVector _startPoint
 
G4ThreeVector _endPoint
 
G4ThreeVector _startMomentum
 
G4double _startEnergy
 

Detailed Description

Definition of GGS Position Hit.

A position hit is associated to a sensitive volume, a particle and a simulation step (position). Each position hit describes the energy released by a single particle traversing a sensitive volume during one simulation step. Note that if a particle passes through a sensitive volume without releasing energy (eg., a neutrino) the corresponding position hit will be generated anyway with zero energy release.

Definition at line 33 of file GGSPosHit.h.

Constructor & Destructor Documentation

GGSPosHit::GGSPosHit ( const GGSPosHit right)

Copy constructor.

Parameters
rightThe object to be copied into current one.

Definition at line 22 of file GGSPosHit.cpp.

22  : G4VHit() {
23  _eDep = right._eDep;
24  _time = right._time;
25  _pathLength = right._pathLength;
26  _startPoint = right._startPoint;
27  _endPoint = right._endPoint;
28  _startMomentum = right._startMomentum;
29  _startEnergy = right._startEnergy;
30 }

Member Function Documentation

G4ThreeVector GGSPosHit::GetEndPoint ( ) const
inline

End point getter.

Gets the end point of the step.

Returns
The exit point.

Definition at line 160 of file GGSPosHit.h.

160 { return _endPoint; }
G4double GGSPosHit::GetEnergyDeposit ( ) const
inline

Energy release getter.

Returns
The energy release.

Definition at line 132 of file GGSPosHit.h.

132 { return _eDep; }
G4double GGSPosHit::GetPathLength ( ) const
inline

Path length getter.

Returns
The total path length of particles traversing the volume.

Definition at line 144 of file GGSPosHit.h.

144 { return _pathLength; }
G4double GGSPosHit::GetStartEnergy ( ) const
inline

Start energy getter.

Returns
The energy of the particle at start point of the step.

Definition at line 174 of file GGSPosHit.h.

174 { return _startEnergy; }
G4ThreeVector GGSPosHit::GetStartMomentum ( ) const
inline

Momentum getter.

Gets the particle's momentum at the beginning of the step.

Returns
The entrance momentum.

Definition at line 168 of file GGSPosHit.h.

168 { return _startMomentum; }
G4ThreeVector GGSPosHit::GetStartPoint ( ) const
inline

Start point getter.

Gets the start point of the step.

Returns
The start point.

Definition at line 152 of file GGSPosHit.h.

152 { return _startPoint; }
G4double GGSPosHit::GetTime ( ) const
inline

Time getter.

Returns
The time of energy deposit.

Definition at line 138 of file GGSPosHit.h.

138 { return _time; }
void GGSPosHit::operator delete ( void *  aHit)
inline

Operator delete.

This implementation uses G4Allocator.

Parameters
aHitThe current hit to be deleted.
See Also
GGSPosHitAllocator.

Definition at line 209 of file GGSPosHit.h.

209 { GGSPosHitAllocator.FreeSingle((GGSPosHit *)aHit); }
Definition of GGS Position Hit.
Definition: GGSPosHit.h:33
G4Allocator< GGSPosHit > GGSPosHitAllocator
Alias for G4 template memory allocator for GGSPosHit.
Definition: GGSPosHit.cpp:7
void * GGSPosHit::operator new ( size_t  size)
inline

Operator new.

This implementation uses G4Allocator.

Parameters
sizeUnused (needed by the interface).
See Also
GGSPosHitAllocator.

Definition at line 201 of file GGSPosHit.h.

201  {
202  void *aHit;
203  aHit = (void *)GGSPosHitAllocator.MallocSingle();
204  return aHit;
205 }
G4Allocator< GGSPosHit > GGSPosHitAllocator
Alias for G4 template memory allocator for GGSPosHit.
Definition: GGSPosHit.cpp:7
const GGSPosHit & GGSPosHit::operator= ( const GGSPosHit right)

Assignment operator.

Parameters
rightThe object to be assigned to current one.
Returns
The new current object.

Definition at line 34 of file GGSPosHit.cpp.

34  {
35  if (this != &right) {
36  _eDep = right._eDep;
37  _time = right._time;
38  _pathLength = right._pathLength;
39  _startPoint = right._startPoint;
40  _endPoint = right._endPoint;
41  _startMomentum = right._startMomentum;
42  _startEnergy = right._startEnergy;
43  }
44  return *this;
45 }
bool GGSPosHit::operator== ( const GGSPosHit right) const

Comparison operator.

Parameters
rightRHS of comparison.
Returns
true if LHS==RHS.

Definition at line 49 of file GGSPosHit.cpp.

49  {
50  return ((_eDep == right._eDep) && (_time == right._time) && //
51  (_pathLength == right._pathLength) && //
52  (_startPoint == right._startPoint) && //
53  (_endPoint == right._endPoint) && //
54  (_startMomentum == right._startMomentum) && //
55  (_startEnergy == right._startEnergy));
56 }
void GGSPosHit::SetEndPoint ( G4ThreeVector  pos)
inline

End point setter.

Sets the particle's end point for this step.

Parameters
posThe end point.

Definition at line 112 of file GGSPosHit.h.

112 { _endPoint = pos; }
void GGSPosHit::SetEnergyDeposit ( G4double  eDep)
inline

Energy deposit setter.

Parameters
eDepEnergy deposit.

Definition at line 83 of file GGSPosHit.h.

83 { _eDep = eDep; }
void GGSPosHit::SetPathLength ( G4double  path)
inline

Path length setter.

Parameters
pathPath length.

Definition at line 95 of file GGSPosHit.h.

95 { _pathLength = path; }
void GGSPosHit::SetStartEnergy ( G4double  e)
inline

Start energy setter.

Parameters
eEnergy of the particle at start point of the step.

Definition at line 126 of file GGSPosHit.h.

126 { _startEnergy = e; }
void GGSPosHit::SetStartMomentum ( G4ThreeVector  mom)
inline

Start momentum setter.

Sets the particle's momentum at begin of step.

Parameters
momThe start momentum.

Definition at line 120 of file GGSPosHit.h.

120 { _startMomentum = mom; }
void GGSPosHit::SetStartPoint ( G4ThreeVector  pos)
inline

Start point setter.

Sets the particle's start point for this step.

Parameters
posThe entrance point.

Definition at line 103 of file GGSPosHit.h.

103 { _startPoint = pos; }
void GGSPosHit::SetStep ( const G4Step &  step)
virtual

Sets the position hit properties using data from the given step.

Parameters
stepThe current step.

Definition at line 60 of file GGSPosHit.cpp.

60  {
61  SetEnergyDeposit(step.GetTotalEnergyDeposit());
62  SetTime(step.GetPreStepPoint()->GetGlobalTime());
63  SetPathLength(step.GetStepLength());
64  SetStartPoint(step.GetPreStepPoint()->GetPosition());
65  SetEndPoint(step.GetPostStepPoint()->GetPosition());
66  SetStartMomentum(step.GetPreStepPoint()->GetMomentum());
67  SetStartEnergy(step.GetPreStepPoint()->GetKineticEnergy());
68 }
void SetStartEnergy(G4double e)
Start energy setter.
Definition: GGSPosHit.h:126
void SetEnergyDeposit(G4double eDep)
Energy deposit setter.
Definition: GGSPosHit.h:83
void SetStartPoint(G4ThreeVector pos)
Start point setter.
Definition: GGSPosHit.h:103
void SetEndPoint(G4ThreeVector pos)
End point setter.
Definition: GGSPosHit.h:112
void SetPathLength(G4double path)
Path length setter.
Definition: GGSPosHit.h:95
void SetTime(G4double time)
Time setter.
Definition: GGSPosHit.h:89
void SetStartMomentum(G4ThreeVector mom)
Start momentum setter.
Definition: GGSPosHit.h:120
void GGSPosHit::SetTime ( G4double  time)
inline

Time setter.

Parameters
timeThe time of first energy deposit.

Definition at line 89 of file GGSPosHit.h.

89 { _time = time; }

The documentation for this class was generated from the following files: