Geant4 10.7.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 ()
 
G4bool operator== (const G4VGFlashSensitiveDetector &right) const
 
G4bool 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 52 of file G4VGFlashSensitiveDetector.hh.

Constructor & Destructor Documentation

◆ G4VGFlashSensitiveDetector() [1/2]

G4VGFlashSensitiveDetector::G4VGFlashSensitiveDetector ( )
inline

Definition at line 57 of file G4VGFlashSensitiveDetector.hh.

57{}

◆ G4VGFlashSensitiveDetector() [2/2]

G4VGFlashSensitiveDetector::G4VGFlashSensitiveDetector ( const G4VGFlashSensitiveDetector )
inline

Definition at line 58 of file G4VGFlashSensitiveDetector.hh.

58{}

◆ ~G4VGFlashSensitiveDetector()

virtual G4VGFlashSensitiveDetector::~G4VGFlashSensitiveDetector ( )
inlinevirtual

Definition at line 66 of file G4VGFlashSensitiveDetector.hh.

66{}

Member Function Documentation

◆ Hit()

G4bool G4VGFlashSensitiveDetector::Hit ( G4GFlashSpot aSpot)
inline

Definition at line 75 of file G4VGFlashSensitiveDetector.hh.

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

Referenced by GFlashHitMaker::make().

◆ operator!=()

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

Definition at line 70 of file G4VGFlashSensitiveDetector.hh.

71 {return this != &right;}

◆ operator==()

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

Definition at line 68 of file G4VGFlashSensitiveDetector.hh.

69 {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: