5 #include <G4HCofThisEvent.hh> 7 #include <G4StepPoint.hh> 8 #include <G4VProcess.hh> 9 #include <G4TouchableHistory.hh> 10 #include <G4SDManager.hh> 11 #include <G4UnitsTable.hh> 13 #include <G4SystemOfUnits.hh> 14 #include <G4PhysicalConstants.hh> 22 :G4VSensitiveDetector(name),
23 fHits(NULL), fHCID(-1),
32 collectionName.insert(
"SegmentHits");
39 GetCollectionName(0));
42 G4String hcName = GetName() +
"/" + GetCollectionName(0);
43 fHCID = G4SDManager::GetSDMpointer()->GetCollectionID(hcName);
45 << GetName() <<
"/" << GetCollectionName(0)
53 G4TouchableHistory*) {
55 G4double energyDeposit = theStep->GetTotalEnergyDeposit();
56 if (energyDeposit <= 0.)
return true;
59 <<
" in " << theStep->GetTrack()->GetVolume()->GetName());
78 fHits->insert(currentHit);
81 currentHit->AddStep(theStep);
#define EDepSimLog(outStream)
int fLastHit
The last hit that was found.
void EndOfEvent(G4HCofThisEvent *)
G4bool ProcessHits(G4Step *, G4TouchableHistory *)
int fHCID
The hit collection id of fHits.
virtual bool SameHit(G4Step *theStep)
EDepSim::HitSegment::HitSegmentCollection * fHits
#define EDepSimTrace(outStream)
void Initialize(G4HCofThisEvent *)
static constexpr double mm
G4THitsCollection< EDepSim::HitSegment > HitSegmentCollection
double fMaximumHitLength
The maximum allowed length;.
double fMaximumHitSagitta
The maximum allowed sagitta;.