19#include "BDSGlobalConstants.hh"
20#include "BDSSDTerminator.hh"
23#include "G4TouchableHistory.hh"
24#include "G4VTouchable.hh"
32BDSSDTerminator::BDSSDTerminator(G4String name)
33 :G4VSensitiveDetector(name)
39BDSSDTerminator::~BDSSDTerminator()
44void BDSSDTerminator::Initialize(G4HCofThisEvent* )
50G4bool BDSSDTerminator::ProcessHits(G4Step* aStep, G4TouchableHistory*)
52 G4Track* theTrack = aStep->GetTrack();
53 G4int parentID = theTrack->GetParentID();
54 G4double trackLength = theTrack->GetTrackLength();
56 G4cout << __METHOD_NAME__ <<
"parentID: " << parentID << G4endl;
57 G4cout << __METHOD_NAME__ <<
"track lenth (mm): " << trackLength << G4endl;
60 if ((parentID == 0) && (trackLength > 1000) && aStep->GetPreStepPoint()->GetStepStatus() == fGeomBoundary)
67 G4cout << __METHOD_NAME__ <<
"Incrementing turn number " << G4endl;
68 G4cout << __METHOD_NAME__ <<
"Primary particle - incrementing turn number" << G4endl;
69 G4cout << __METHOD_NAME__ <<
"Track length is : " << trackLength <<
" m" << G4endl;
77 std::ios_base::fmtflags ff = G4cout.flags();
78 G4cout <<
"Turn: " << std::right << std::setw(4) << std::fixed
79 << turnstaken <<
" / " << std::left
94 {G4cout << __METHOD_NAME__ <<
"not incrementing turn number" << G4endl;}
100void BDSSDTerminator::EndOfEvent(G4HCofThisEvent* )
void IncrementTurnNumber()
Setter.
static BDSGlobalConstants * Instance()
Access method.
void ResetTurnNumber()
Setter.
G4int moduloTurns
Cache of print turn number on these turns.
static G4int eventNumber
Externally accessible counter for event number. Set in BeginOfEventAction.
G4int moduloEvents
Cache of print turn number on these events.