Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions
G4VGFlashSensitiveDetector Class Referenceabstract

#include <G4VGFlashSensitiveDetector.hh>

Inheritance diagram for G4VGFlashSensitiveDetector:
ExGflashSensitiveDetector

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::G4VGFlashSensitiveDetector ( )
inline

Definition at line 56 of file G4VGFlashSensitiveDetector.hh.

56 {}
G4VGFlashSensitiveDetector::G4VGFlashSensitiveDetector ( const G4VGFlashSensitiveDetector )
inline

Definition at line 57 of file G4VGFlashSensitiveDetector.hh.

57 {}
virtual G4VGFlashSensitiveDetector::~G4VGFlashSensitiveDetector ( )
inlinevirtual

Definition at line 65 of file G4VGFlashSensitiveDetector.hh.

65 {}

Member Function Documentation

G4bool G4VGFlashSensitiveDetector::Hit ( G4GFlashSpot aSpot)
inline

Definition at line 74 of file G4VGFlashSensitiveDetector.hh.

References G4VReadOutGeometry::CheckROVolume(), 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().

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());
103  tmpPoint->SetMomentumDirection(aSpot->GetOriginatorTrack()
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  }
G4TouchableHandle GetTouchableHandle() const
Definition: G4GFlashSpot.hh:62
const G4Track * GetPrimaryTrack() const
Definition: G4FastTrack.hh:208
void SetPosition(const G4ThreeVector &aValue)
void SetMomentumDirection(const G4ThreeVector &aValue)
G4StepPoint * GetPreStepPoint() const
const G4FastTrack * GetOriginatorTrack() const
Definition: G4GFlashSpot.hh:60
virtual G4bool ProcessHits(G4GFlashSpot *aSpot, G4TouchableHistory *ROhist)=0
bool G4bool
Definition: G4Types.hh:79
G4VReadOutGeometry * GetROgeometry() const
Definition: G4Step.hh:76
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
virtual G4bool CheckROVolume(G4Step *, G4TouchableHistory *&)
const G4ThreeVector & GetMomentumDirection() const
void SetTouchableHandle(const G4TouchableHandle &apValue)
G4ThreeVector GetPosition() const
Definition: G4GFlashSpot.hh:64
G4int G4VGFlashSensitiveDetector::operator!= ( const G4VGFlashSensitiveDetector right) const
inline

Definition at line 69 of file G4VGFlashSensitiveDetector.hh.

References right.

70  {return this != &right;}
G4int G4VGFlashSensitiveDetector::operator== ( const G4VGFlashSensitiveDetector right) const
inline

Definition at line 67 of file G4VGFlashSensitiveDetector.hh.

References right.

68  {return this == &right;}
virtual G4bool G4VGFlashSensitiveDetector::ProcessHits ( G4GFlashSpot aSpot,
G4TouchableHistory ROhist 
)
protectedpure virtual

Implemented in ExGflashSensitiveDetector.

Referenced by Hit().


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