Geant4  10.02.p03
GFlashHitMaker Class Reference

#include <GFlashHitMaker.hh>

Collaboration diagram for GFlashHitMaker:

Public Member Functions

 GFlashHitMaker ()
 
 ~GFlashHitMaker ()
 
void make (GFlashEnergySpot *aSpot, const G4FastTrack *aT)
 

Private Member Functions

 GFlashHitMaker (const GFlashHitMaker &)
 
GFlashHitMakeroperator= (const GFlashHitMaker &)
 

Private Attributes

G4TouchableHandle fTouchableHandle
 
G4NavigatorfpNavigator
 
G4bool fNaviSetup
 

Detailed Description

Definition at line 52 of file GFlashHitMaker.hh.

Constructor & Destructor Documentation

◆ GFlashHitMaker() [1/2]

GFlashHitMaker::GFlashHitMaker ( )

Definition at line 46 of file GFlashHitMaker.cc.

47 {
48  fTouchableHandle = new G4TouchableHistory(); // talk to ?@@@
49  fpNavigator = new G4Navigator();
50  fNaviSetup = false;
51 }
G4Navigator * fpNavigator
G4TouchableHandle fTouchableHandle

◆ ~GFlashHitMaker()

GFlashHitMaker::~GFlashHitMaker ( )

Definition at line 53 of file GFlashHitMaker.cc.

54 {
55  delete fpNavigator;
56 }
G4Navigator * fpNavigator

◆ GFlashHitMaker() [2/2]

GFlashHitMaker::GFlashHitMaker ( const GFlashHitMaker )
inlineprivate

Definition at line 69 of file GFlashHitMaker.hh.

69 {}

Member Function Documentation

◆ make()

void GFlashHitMaker::make ( GFlashEnergySpot aSpot,
const G4FastTrack aT 
)

Navigator

Definition at line 58 of file GFlashHitMaker.cc.

59 {
60  // Locate the spot
61  if (!fNaviSetup)
62  {
63  fpNavigator->
65  GetNavigatorForTracking()->GetWorldVolume() );
66  fpNavigator->
67  LocateGlobalPointAndUpdateTouchable(aSpot->GetPosition(),
68  fTouchableHandle(), false);
69  fNaviSetup = true;
70  }
71  else
72  {
73  fpNavigator->
74  LocateGlobalPointAndUpdateTouchable(aSpot->GetPosition(),
76  }
77 
78  //--------------------------------------
79  // Fills attribute of the G4Step needed
80  // by our sensitive detector:
81  //-------------------------------------
82  // set spot information:
83  G4GFlashSpot theSpot(aSpot, aT, fTouchableHandle);
85  //--------------------------------------
86  // Produce Hits
87  // call sensitive part: taken/adapted from the stepping:
88  // Send G4Step information to Hit/Dig if the volume is sensitive
89  //--------------G4TouchableHistory----------------------------------------
90 
91  G4VPhysicalVolume* pCurrentVolume = fTouchableHandle()->GetVolume();
92  G4VSensitiveDetector* pSensitive;
93  if( pCurrentVolume != 0 )
94  {
95  pSensitive = pCurrentVolume->GetLogicalVolume()->GetSensitiveDetector();
96  G4VGFlashSensitiveDetector * gflashSensitive =
97  dynamic_cast<G4VGFlashSensitiveDetector * > (pSensitive);
98  if( gflashSensitive )
99  {
100  gflashSensitive->Hit(&theSpot);
101  }
102  else if (( pSensitive ) &&
103  ( pCurrentVolume->GetLogicalVolume()->GetFastSimulationManager() )
104  ) // Using gflash without implementing the
105  // gflashSensitive detector interface -> not allowed!
106 
107  {
108  G4cerr << "ERROR - GFlashHitMaker::make()" << G4endl
109  << " It is required to implement the "<< G4endl
110  << " G4VGFlashSensitiveDetector interface in "<< G4endl
111  << " addition to the usual SensitiveDetector class."
112  << G4endl;
113  G4Exception("GFlashHitMaker::make()", "InvalidSetup", FatalException,
114  "G4VGFlashSensitiveDetector interface not implemented.");
115  }
116  }
117  else
118  {
119  #ifdef GFLASH_DEBUG
120  G4cout << "GFlashHitMaker::Out of volume "<< G4endl;
121  #endif
122  }
123 }
G4bool Hit(G4GFlashSpot *aSpot)
G4ThreeVector GetPosition() const
G4GLOB_DLL std::ostream G4cout
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
Definition: G4VTouchable.cc:44
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static G4TransportationManager * GetTransportationManager()
G4Navigator * fpNavigator
G4VSensitiveDetector * GetSensitiveDetector() const
G4FastSimulationManager * GetFastSimulationManager() const
#define G4endl
Definition: G4ios.hh:61
G4TouchableHandle fTouchableHandle
G4LogicalVolume * GetLogicalVolume() const
G4GLOB_DLL std::ostream G4cerr
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

GFlashHitMaker& GFlashHitMaker::operator= ( const GFlashHitMaker )
inlineprivate

Definition at line 70 of file GFlashHitMaker.hh.

71  {
72  return *this;
73  }

Member Data Documentation

◆ fNaviSetup

G4bool GFlashHitMaker::fNaviSetup
private

Definition at line 65 of file GFlashHitMaker.hh.

◆ fpNavigator

G4Navigator* GFlashHitMaker::fpNavigator
private

Definition at line 64 of file GFlashHitMaker.hh.

◆ fTouchableHandle

G4TouchableHandle GFlashHitMaker::fTouchableHandle
private

Definition at line 63 of file GFlashHitMaker.hh.


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