Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VGFlashSensitiveDetector Class Referenceabstract

#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
 

Detailed Description

Definition at line 51 of file G4VGFlashSensitiveDetector.hh.

Constructor & Destructor Documentation

◆ G4VGFlashSensitiveDetector() [1/2]

G4VGFlashSensitiveDetector::G4VGFlashSensitiveDetector ( )
inline

Definition at line 56 of file G4VGFlashSensitiveDetector.hh.

56{}

◆ G4VGFlashSensitiveDetector() [2/2]

G4VGFlashSensitiveDetector::G4VGFlashSensitiveDetector ( const G4VGFlashSensitiveDetector )
inline

Definition at line 57 of file G4VGFlashSensitiveDetector.hh.

57{}

◆ ~G4VGFlashSensitiveDetector()

virtual G4VGFlashSensitiveDetector::~G4VGFlashSensitiveDetector ( )
inlinevirtual

Definition at line 65 of file G4VGFlashSensitiveDetector.hh.

65{}

Member Function Documentation

◆ Hit()

G4bool G4VGFlashSensitiveDetector::Hit ( G4GFlashSpot aSpot)
inline

Definition at line 74 of file G4VGFlashSensitiveDetector.hh.

75 {
76 // This is the public method invoked by GFlashHitMaker for generating
77 // hits. The actual user's implementation for generating hits must be
78 // implemented in GenerateHits() virtual protected method.
79
80 G4bool result = true;
82 = dynamic_cast<G4VSensitiveDetector *>(this);
83 if(!This)
84 {
85 G4Exception("G4VGFlashSensitiveDetector::Hit()",
86 "InvalidSetup", FatalException,
87 "Needs also to inherit from G4VSensitiveDetector!");
88 return false;
89 }
90 if(This->isActive())
91 {
92 G4VReadOutGeometry * ROgeometry = 0;
93 G4TouchableHistory* ROhis = 0;
94
95 if(This) ROgeometry = This->GetROgeometry();
96 if(ROgeometry)
97 {
98 // fake pre-step point for touchable from read-out geometry.
99 G4Step fakeStep;
100 G4StepPoint * tmpPoint = fakeStep.GetPreStepPoint();
101 tmpPoint->SetTouchableHandle(aSpot->GetTouchableHandle());
102 tmpPoint->SetPosition(aSpot->GetPosition());
105 result = ROgeometry->CheckROVolume(&fakeStep, ROhis);
106 }
107 if(result) result = ProcessHits(aSpot, ROhis);
108 }
109 else
110 {
111 result = false;
112 }
113 return result;
114 }
@ FatalException
bool G4bool
Definition: G4Types.hh:67
const G4Track * GetPrimaryTrack() const
Definition: G4FastTrack.hh:208
G4ThreeVector GetPosition() const
Definition: G4GFlashSpot.hh:64
const G4FastTrack * GetOriginatorTrack() const
Definition: G4GFlashSpot.hh:60
G4TouchableHandle GetTouchableHandle() const
Definition: G4GFlashSpot.hh:62
void SetTouchableHandle(const G4TouchableHandle &apValue)
void SetPosition(const G4ThreeVector &aValue)
void SetMomentumDirection(const G4ThreeVector &aValue)
Definition: G4Step.hh:78
G4StepPoint * GetPreStepPoint() const
const G4ThreeVector & GetMomentumDirection() const
virtual G4bool ProcessHits(G4GFlashSpot *aSpot, G4TouchableHistory *ROhist)=0
virtual G4bool CheckROVolume(G4Step *, G4TouchableHistory *&)
G4VReadOutGeometry * GetROgeometry() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

Referenced by GFlashHitMaker::make().

◆ operator!=()

G4int G4VGFlashSensitiveDetector::operator!= ( const G4VGFlashSensitiveDetector right) const
inline

Definition at line 69 of file G4VGFlashSensitiveDetector.hh.

70 {return this != &right;}

◆ operator==()

G4int G4VGFlashSensitiveDetector::operator== ( const G4VGFlashSensitiveDetector right) const
inline

Definition at line 67 of file G4VGFlashSensitiveDetector.hh.

68 {return this == &right;}

◆ ProcessHits()

virtual G4bool G4VGFlashSensitiveDetector::ProcessHits ( G4GFlashSpot aSpot,
G4TouchableHistory ROhist 
)
protectedpure virtual

Referenced by Hit().


The documentation for this class was generated from the following file: