#include <G4VGFlashSensitiveDetector.hh>
Public Member Functions | |
G4VGFlashSensitiveDetector () | |
G4VGFlashSensitiveDetector (const G4VGFlashSensitiveDetector &) | |
virtual | ~G4VGFlashSensitiveDetector () |
G4int | operator== (const G4VGFlashSensitiveDetector &right) const |
G4int | operator!= (const G4VGFlashSensitiveDetector &right) const |
G4bool | Hit (G4GFlashSpot *aSpot) |
Protected Member Functions | |
virtual G4bool | ProcessHits (G4GFlashSpot *aSpot, G4TouchableHistory *ROhist)=0 |
Definition at line 51 of file G4VGFlashSensitiveDetector.hh.
G4VGFlashSensitiveDetector::G4VGFlashSensitiveDetector | ( | ) | [inline] |
G4VGFlashSensitiveDetector::G4VGFlashSensitiveDetector | ( | const G4VGFlashSensitiveDetector & | ) | [inline] |
virtual G4VGFlashSensitiveDetector::~G4VGFlashSensitiveDetector | ( | ) | [inline, virtual] |
G4bool G4VGFlashSensitiveDetector::Hit | ( | G4GFlashSpot * | aSpot | ) | [inline] |
Definition at line 74 of file G4VGFlashSensitiveDetector.hh.
References FatalException, G4Exception(), G4Track::GetMomentumDirection(), G4GFlashSpot::GetOriginatorTrack(), G4GFlashSpot::GetPosition(), G4Step::GetPreStepPoint(), G4FastTrack::GetPrimaryTrack(), G4VSensitiveDetector::GetROgeometry(), G4GFlashSpot::GetTouchableHandle(), G4VSensitiveDetector::isActive(), ProcessHits(), G4StepPoint::SetMomentumDirection(), G4StepPoint::SetPosition(), and G4StepPoint::SetTouchableHandle().
Referenced by GFlashHitMaker::make().
00075 { 00076 // This is the public method invoked by GFlashHitMaker for generating 00077 // hits. The actual user's implementation for generating hits must be 00078 // implemented in GenerateHits() virtual protected method. 00079 00080 G4bool result = true; 00081 G4VSensitiveDetector * This 00082 = dynamic_cast<G4VSensitiveDetector *>(this); 00083 if(!This) 00084 { 00085 G4Exception("G4VGFlashSensitiveDetector::Hit()", 00086 "InvalidSetup", FatalException, 00087 "Needs also to inherit from G4VSensitiveDetector!"); 00088 return false; 00089 } 00090 if(This->isActive()) 00091 { 00092 G4VReadOutGeometry * ROgeometry = 0; 00093 G4TouchableHistory* ROhis = 0; 00094 00095 if(This) ROgeometry = This->GetROgeometry(); 00096 if(ROgeometry) 00097 { 00098 // fake pre-step point for touchable from read-out geometry. 00099 G4Step fakeStep; 00100 G4StepPoint * tmpPoint = fakeStep.GetPreStepPoint(); 00101 tmpPoint->SetTouchableHandle(aSpot->GetTouchableHandle()); 00102 tmpPoint->SetPosition(aSpot->GetPosition()); 00103 tmpPoint->SetMomentumDirection(aSpot->GetOriginatorTrack() 00104 ->GetPrimaryTrack()->GetMomentumDirection()); 00105 result = ROgeometry->CheckROVolume(&fakeStep, ROhis); 00106 } 00107 if(result) result = ProcessHits(aSpot, ROhis); 00108 } 00109 else 00110 { 00111 result = false; 00112 } 00113 return result; 00114 }
G4int G4VGFlashSensitiveDetector::operator!= | ( | const G4VGFlashSensitiveDetector & | right | ) | const [inline] |
G4int G4VGFlashSensitiveDetector::operator== | ( | const G4VGFlashSensitiveDetector & | right | ) | const [inline] |
virtual G4bool G4VGFlashSensitiveDetector::ProcessHits | ( | G4GFlashSpot * | aSpot, | |
G4TouchableHistory * | ROhist | |||
) | [protected, pure virtual] |
Referenced by Hit().