19#ifndef BDSHITENERGYDEPOSITION_H
20#define BDSHITENERGYDEPOSITION_H
22#include "BDSHitEnergyDepositionExtra.hh"
25#include "G4THitsCollection.hh"
26#include "G4Allocator.hh"
43 G4double preStepKineticEnergy = 0,
50 G4double globalTimeIn = 0,
54 G4int turnsTakenIn = 1,
55 G4double stepLengthIn = 0,
56 G4int beamlineIndexIn = -1,
57 G4int postStepProcessType = -1,
58 G4int postStepProcessSubType = -1);
63 inline void*
operator new(size_t) ;
64 inline void operator delete(
void *aHit);
66 inline G4double GetEnergy()
const {
return energy;}
67 inline G4double GetWeight()
const {
return weight;}
68 inline G4double GetSHit()
const {
return sHit;}
69 inline G4double GetEnergyWeighted()
const {
return weight * energy;}
73 inline G4double
GetX()
const {
return extra ? extra->
X : 0;}
74 inline G4double
GetY()
const {
return extra ? extra->
Y : 0;}
75 inline G4double
GetZ()
const {
return extra ? extra->
Z : 0;}
76 inline G4double
Getx()
const {
return extra ? extra->
x : 0;}
77 inline G4double
Gety()
const {
return extra ? extra->
y : 0;}
78 inline G4double
Getz()
const {
return extra ? extra->
z : 0;}
80 inline G4int
GetPartID()
const {
return extra ? extra->partID : 0;}
81 inline G4int
GetTrackID()
const {
return extra ? extra->trackID : 0;}
82 inline G4int
GetParentID()
const {
return extra ? extra->parentID : 0;}
83 inline G4int
GetTurnsTaken()
const {
return extra ? extra->turnsTaken : 0;}
84 inline G4double
GetStepLength()
const {
return extra ? extra->stepLength : 0;}
110extern G4Allocator<BDSHitEnergyDeposition> BDSAllocatorEnergyDeposition;
112inline void* BDSHitEnergyDeposition::operator
new(size_t)
115 aHit=(
void*) BDSAllocatorEnergyDeposition.MallocSingle();
119inline void BDSHitEnergyDeposition::operator
delete(
void *aHit)
Information recorded for a single piece of energy deposition.
G4double GetZ() const
Accessor for extra piece of information.
G4int GetTurnsTaken() const
Accessor for extra piece of information.
G4int GetPartID() const
Accessor for extra piece of information.
G4int GetTrackID() const
Accessor for extra piece of information.
G4double GetY() const
Accessor for extra piece of information.
G4int GetBeamlineIndex() const
Accessor for extra piece of information.
G4double GetPreStepKineticEnergy() const
Accessor for extra piece of information.
G4int GetParentID() const
Accessor for extra piece of information.
G4double Getz() const
Accessor for extra piece of information.
G4double GetX() const
Accessor for extra piece of information.
G4double Getx() const
Accessor for extra piece of information.
G4double Gety() const
Accessor for extra piece of information.
G4int GetPostStepProcessType() const
Accessor for extra piece of information.
G4double GetGlobalTime() const
Accessor for extra piece of information.
G4int GetPostStepProcessSubType() const
Accessor for extra piece of information.
G4double GetStepLength() const
Accessor for extra piece of information.
virtual ~BDSHitEnergyDeposition()
Note this should not be inline when we use a G4Allocator.