Import Geant4 10.4.0 source tree
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
/// \file hadronic/Hadr00/src/DetectorConstruction.cc
|
||||
/// \brief Implementation of the DetectorConstruction class
|
||||
//
|
||||
// $Id: DetectorConstruction.cc 101905 2016-12-07 11:34:39Z gunter $
|
||||
// $Id: DetectorConstruction.cc 106244 2017-09-26 01:58:00Z gcosmo $
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -68,9 +68,9 @@
|
||||
|
||||
DetectorConstruction::DetectorConstruction()
|
||||
: G4VUserDetectorConstruction(),
|
||||
fTargetMaterial(0), fWorldMaterial(0),
|
||||
fLogicTarget(0), fLogicWorld(0),
|
||||
fDetectorMessenger(0)
|
||||
fTargetMaterial(nullptr), fWorldMaterial(nullptr),
|
||||
fLogicTarget(nullptr), fLogicWorld(nullptr),
|
||||
fDetectorMessenger(nullptr), fPhysList(nullptr)
|
||||
{
|
||||
fDetectorMessenger = new DetectorMessenger(this);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
/// \brief Implementation of the DetectorMessenger class
|
||||
//
|
||||
//
|
||||
// $Id: DetectorMessenger.cc 77254 2013-11-22 10:08:02Z gcosmo $
|
||||
// $Id: DetectorMessenger.cc 106244 2017-09-26 01:58:00Z gcosmo $
|
||||
//
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
@@ -52,6 +52,8 @@
|
||||
#include "G4UIcmdWithADoubleAndUnit.hh"
|
||||
#include "G4UIcmdWithoutParameter.hh"
|
||||
#include "HistoManager.hh"
|
||||
#include "G4RadioactiveDecayPhysics.hh"
|
||||
#include "G4VModularPhysicsList.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -73,6 +75,12 @@ DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
|
||||
fmat1Cmd->AvailableForStates(G4State_PreInit,G4State_Idle);
|
||||
fmat1Cmd->SetToBeBroadcasted(false);
|
||||
|
||||
fRDCmd = new G4UIcmdWithABool("/testhadr/RadDecay",this);
|
||||
fRDCmd->SetGuidance("Enable radioactive decay");
|
||||
fRDCmd->SetParameterName("RD",false);
|
||||
fRDCmd->AvailableForStates(G4State_PreInit);
|
||||
fRDCmd->SetToBeBroadcasted(false);
|
||||
|
||||
frCmd = new G4UIcmdWithADoubleAndUnit("/testhadr/TargetRadius",this);
|
||||
frCmd->SetGuidance("Set radius of the target");
|
||||
frCmd->SetParameterName("radius",false);
|
||||
@@ -97,6 +105,7 @@ DetectorMessenger::~DetectorMessenger()
|
||||
{
|
||||
delete fmatCmd;
|
||||
delete fmat1Cmd;
|
||||
delete fRDCmd;
|
||||
delete frCmd;
|
||||
delete flCmd;
|
||||
delete ftestDir;
|
||||
@@ -114,6 +123,11 @@ void DetectorMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
fDetector->SetTargetRadius(frCmd->GetNewDoubleValue(newValue));
|
||||
} else if( command == flCmd ) {
|
||||
fDetector->SetTargetLength(flCmd->GetNewDoubleValue(newValue));
|
||||
} else if( command == fRDCmd ) {
|
||||
if(fRDCmd->GetNewBoolValue(newValue)) {
|
||||
fDetector->GetPhysicsList()
|
||||
->RegisterPhysics(new G4RadioactiveDecayPhysics(1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user