Import Geant4 10.6.0 source tree
This commit is contained in:
@@ -15,7 +15,10 @@ committal in the CVS repository !
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
|
||||
Oct 30st, 2019, A. Zaborowska (gflash-V10-05-01)
|
||||
- Add possibility to use sensitive detector from parallel world.
|
||||
|
||||
Jan 31st, 2019, I.Hrivnacova (gflash-V10-05-00)
|
||||
- Merged GitHub PR #4: all Boolean operators now return G4bool.
|
||||
|
||||
|
||||
@@ -56,13 +56,16 @@ class GFlashHitMaker
|
||||
~GFlashHitMaker();
|
||||
|
||||
void make(GFlashEnergySpot * aSpot, const G4FastTrack * aT );
|
||||
inline void SetNameOfWorldWithSD(const G4String& aName) {fWorldWithSdName = aName;};
|
||||
|
||||
private:
|
||||
|
||||
G4TouchableHandle fTouchableHandle;
|
||||
G4Navigator *fpNavigator;
|
||||
G4bool fNaviSetup;
|
||||
|
||||
/// Name of the world containing the sensitive detector. If empty, default mass world is used.
|
||||
G4String fWorldWithSdName;
|
||||
|
||||
private:
|
||||
|
||||
GFlashHitMaker(const GFlashHitMaker & ) {}
|
||||
|
||||
@@ -47,6 +47,7 @@ GFlashHitMaker::GFlashHitMaker()
|
||||
fTouchableHandle = new G4TouchableHistory(); // talk to ?@@@
|
||||
fpNavigator = new G4Navigator();
|
||||
fNaviSetup = false;
|
||||
fWorldWithSdName = "";
|
||||
}
|
||||
|
||||
GFlashHitMaker::~GFlashHitMaker()
|
||||
@@ -59,9 +60,14 @@ void GFlashHitMaker::make(GFlashEnergySpot * aSpot, const G4FastTrack * aT)
|
||||
// Locate the spot
|
||||
if (!fNaviSetup)
|
||||
{
|
||||
fpNavigator->
|
||||
SetWorldVolume(G4TransportationManager::GetTransportationManager()->
|
||||
GetNavigatorForTracking()->GetWorldVolume() );
|
||||
// Choose the world volume that contains the sensitive detector based on its name (empty name for mass geometry)
|
||||
G4VPhysicalVolume* worldWithSD = nullptr;
|
||||
if(fWorldWithSdName.empty()) {
|
||||
worldWithSD = G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume();
|
||||
} else {
|
||||
worldWithSD = G4TransportationManager::GetTransportationManager()->GetParallelWorld(fWorldWithSdName);
|
||||
}
|
||||
fpNavigator->SetWorldVolume(worldWithSD);
|
||||
fpNavigator->
|
||||
LocateGlobalPointAndUpdateTouchable(aSpot->GetPosition(),
|
||||
fTouchableHandle(), false);
|
||||
|
||||
Reference in New Issue
Block a user