4 // See the class description in the header file.
6 #include "TG4VSensitiveDetector.h"
7 #include "TG4StepManager.h"
9 G4int TG4VSensitiveDetector::fgSDCounter = 0;
11 TG4VSensitiveDetector::TG4VSensitiveDetector(G4String sdName)
12 : G4VSensitiveDetector(sdName),
13 fStepManager(TG4StepManager::Instance())
19 TG4VSensitiveDetector::TG4VSensitiveDetector(G4String sdName, G4int id)
20 : G4VSensitiveDetector(sdName),
22 fStepManager(TG4StepManager::Instance())
29 TG4VSensitiveDetector::TG4VSensitiveDetector(
30 const TG4VSensitiveDetector& right)
31 : G4VSensitiveDetector(right)
35 fStepManager = right.fStepManager;
40 TG4VSensitiveDetector::TG4VSensitiveDetector()
41 : G4VSensitiveDetector("")
46 TG4VSensitiveDetector::~TG4VSensitiveDetector() {
52 TG4VSensitiveDetector& TG4VSensitiveDetector::operator=(
53 const TG4VSensitiveDetector &right)
55 // check assignement to self
56 if (this == &right) return *this;
58 // base class assignement
59 TG4VSensitiveDetector::operator=(right);
62 fStepManager = right.fStepManager;
69 G4bool TG4VSensitiveDetector::ProcessHits(G4Step* step, G4TouchableHistory*)
71 // Calls StepManager of associated AliModule.
74 // let AliModule process step
75 fStepManager->SetStep(step, kNormalStep);
76 UserProcessHits(step->GetTrack(), step);
81 G4bool TG4VSensitiveDetector::ProcessHitsOnBoundary(G4Step* step)
83 // Calls StepManager of associated AliModule
84 // when crossing a geometrical boundary.
87 fStepManager->SetStep(step, kBoundary);
88 UserProcessHits(step->GetTrack(), step);