G4VGFlashSensitiveDetector Class Reference

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

Definition at line 56 of file G4VGFlashSensitiveDetector.hh.

00056 {}

G4VGFlashSensitiveDetector::G4VGFlashSensitiveDetector ( const G4VGFlashSensitiveDetector  )  [inline]

Definition at line 57 of file G4VGFlashSensitiveDetector.hh.

00057 {}

virtual G4VGFlashSensitiveDetector::~G4VGFlashSensitiveDetector (  )  [inline, virtual]

Definition at line 65 of file G4VGFlashSensitiveDetector.hh.

00065 {}


Member Function Documentation

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]

Definition at line 69 of file G4VGFlashSensitiveDetector.hh.

00070         {return this != &right;}

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

Definition at line 67 of file G4VGFlashSensitiveDetector.hh.

00068         {return this == &right;}

virtual G4bool G4VGFlashSensitiveDetector::ProcessHits ( G4GFlashSpot aSpot,
G4TouchableHistory ROhist 
) [protected, pure virtual]

Referenced by Hit().


The documentation for this class was generated from the following file:
Generated on Mon May 27 17:53:43 2013 for Geant4 by  doxygen 1.4.7