Import Geant4 10.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-12-09 12:35:28 +01:00
parent 4ec577e5c4
commit a3452e42ac
3514 changed files with 210500 additions and 89628 deletions
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4VUserDetectorConstruction.cc 92599 2015-09-07 07:11:43Z gcosmo $
// $Id: G4VUserDetectorConstruction.cc 101679 2016-11-21 09:30:00Z gcosmo $
//
#include "G4VUserDetectorConstruction.hh"
@@ -37,6 +37,7 @@
#include "G4SDManager.hh"
#include "G4MultiSensitiveDetector.hh"
#include <assert.h>
#include <sstream>
G4VUserDetectorConstruction::G4VUserDetectorConstruction()
{;}
@@ -241,7 +242,8 @@ void G4VUserDetectorConstruction::SetSensitiveDetector
{
assert(logVol!=nullptr&&aSD!=nullptr);
G4SDManager::GetSDMpointer()->AddNewDetector(aSD);
//The aSD has already been added by user to the manager if needed
//G4SDManager::GetSDMpointer()->AddNewDetector(aSD);
//New Logic: allow for "multiple" SDs being attached to a single LV.
//To do that we use a special proxy SD called G4MultiSensitiveDetector
@@ -255,7 +257,9 @@ void G4VUserDetectorConstruction::SetSensitiveDetector
if ( msd != nullptr ) {
msd->AddSD(aSD);
} else {
const G4String msdname = "/MultiSD_"+logVol->GetName();
std::ostringstream mn;
mn<<"/MultiSD_"<<logVol->GetName()<<"_"<<logVol;
const G4String msdname = mn.str();
msd = new G4MultiSensitiveDetector(msdname);
//We need to register the proxy to have correct handling of IDs
G4SDManager::GetSDMpointer()->AddNewDetector(msd);