4 #ifndef EDepSim_HitSegment_h 5 #define EDepSim_HitSegment_h 10 #include <G4THitsCollection.hh> 11 #include <G4Allocator.hh> 12 #include <G4ThreeVector.hh> 13 #include <G4LorentzVector.hh> 15 #include <G4SystemOfUnits.hh> 16 #include <G4PhysicalConstants.hh> 30 namespace EDepSim {
class HitSegment;}
44 inline void*
operator new(size_t);
45 inline void operator delete(
void*);
48 virtual void AddStep(G4Step* theStep);
52 virtual bool SameHit(G4Step* theStep);
58 virtual void Draw(
const char*) {}
59 virtual void Print(
const char*)
const {}
117 double GetStartX(
void)
const {
return fStartX;}
123 double GetStartY(
void)
const {
return fStartY;}
129 double GetStartZ(
void)
const {
return fStartZ;}
135 double GetStartT(
void)
const {
return fStartT;}
141 double GetStopX(
void)
const {
return fStopX;}
147 double GetStopY(
void)
const {
return fStopY;}
153 double GetStopZ(
void)
const {
return fStopZ;}
159 double GetStopT(
void)
const {
return fStopT;}
236 inline void* EDepSim::HitSegment::operator
new(size_t) {
242 inline void EDepSim::HitSegment::operator
delete(
void *aHit) {
double fEnergyDeposit
The total energy deposit in this hit.
HitSegment(double maxSagitta=1 *CLHEP::mm, double maxLength=5 *CLHEP::mm)
virtual double GetLength() const
double GetTrackLength(void) const
virtual void Print(const char *) const
void ls(std::string="") const
Print the hit information.
int fPrimaryId
The track id of the primary particle.
std::vector< int > fContributors
G4Allocator< EDepSim::HitSegment > edepHitSegmentAllocator
virtual bool SameHit(G4Step *theStep)
const G4LorentzVector & GetStart() const
The position of the starting point.
int GetContributor(int i) const
G4LorentzVector fStart
The starting position of the segment.
Construct a module from components.
double fMaxSagitta
The sagitta tolerance for the segment.
std::vector< G4ThreeVector > fPath
double fMaxLength
The maximum length between the start and stop points of the segment.
double FindSeparation(G4Step *theStep)
int FindPrimaryId(G4Track *theTrack)
double GetSecondaryDeposit(void) const
int GetContributorCount() const
int GetPrimaryTrajectoryId(void) const
G4LorentzVector fStop
The stopping position of the segment.
const G4LorentzVector & GetStop() const
The position of the stopping point.
virtual void Draw(const char *)
static constexpr double mm
EDepSim::VolumeId fHitVolume
The G4 physical volume that contains the hit.
G4THitsCollection< EDepSim::HitSegment > HitSegmentCollection
std::vector< int > & GetContributors()
Provide public access to the contributors for internal G4 classes.
double FindSagitta(G4Step *theStep)
double GetEnergyDeposit(void) const
Get the total energy deposited in this hit.
virtual void AddStep(G4Step *theStep)
Add the effects of a part of a step to this hit.