20#include "BDSGlobalConstants.hh"
21#include "BDSSDTerminator.hh"
24#include "G4TouchableHistory.hh"
25#include "G4VTouchable.hh"
33BDSSDTerminator::BDSSDTerminator(G4String name)
34 :G4VSensitiveDetector(name)
40BDSSDTerminator::~BDSSDTerminator()
45void BDSSDTerminator::Initialize(G4HCofThisEvent* )
51G4bool BDSSDTerminator::ProcessHits(G4Step* aStep, G4TouchableHistory*)
53 G4Track* theTrack = aStep->GetTrack();
54 G4int parentID = theTrack->GetParentID();
55 G4double trackLength = theTrack->GetTrackLength();
57 G4cout << __METHOD_NAME__ <<
"parentID: " << parentID << G4endl;
58 G4cout << __METHOD_NAME__ <<
"track lenth (mm): " << trackLength << G4endl;
61 if ((parentID == 0) && (trackLength > 1000) && aStep->GetPreStepPoint()->GetStepStatus() == fGeomBoundary)
68 G4cout << __METHOD_NAME__ <<
"Incrementing turn number " << G4endl;
69 G4cout << __METHOD_NAME__ <<
"Primary particle - incrementing turn number" << G4endl;
70 G4cout << __METHOD_NAME__ <<
"Track length is : " << trackLength <<
" m" << G4endl;
78 std::ios_base::fmtflags ff = G4cout.flags();
79 G4cout <<
"Turn: " << std::right << std::setw(4) << std::fixed
80 << turnstaken <<
" / " << std::left
95 {G4cout << __METHOD_NAME__ <<
"not incrementing turn number" << G4endl;}
101void 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.