Commit f3b0e4bb authored by Chad Lantz's avatar Chad Lantz
Browse files

Compiles and runs in forced position mode. Geometry doesn't display in GUI for unknown reasons

parent 2fff9125
......@@ -41,10 +41,10 @@ option(ANALYSIS_HH_ "Build with ROOT" 1)
add_definitions(-DG4UI_USE -DG4VIS_USE -DANALYSIS_HH_)
if(useROOT)
if(useROOT)
EXECUTE_PROCESS(COMMAND root-config --cflags OUTPUT_VARIABLE ROOT_CXX_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ROOT_CXX_FLAGS}")
endif(useROOT)
endif(useROOT)
include_directories(${PROJECT_SOURCE_DIR}/MonteCarlo/include ${ROOT_INCLUDE_DIR})
......@@ -82,6 +82,7 @@ set(EXAMPLE_SCRIPTS
run1.mac
run2.mac
vis.mac
geometry.mac
)
foreach(_script ${EXAMPLE_SCRIPTS})
......@@ -102,5 +103,3 @@ add_custom_target( DEPENDS zdc)
# Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
#
install(TARGETS zdc DESTINATION bin)
/Detector/Cluster false
/Detector/Optical true
/Detector/ForcePosition true
#/Detector/ConfigFile Alignment_2018.xml
/Detector/SetWorldDimensions 2. 2. 4. m
/Detector/ZDC/Add
/Detector/ZDC/Position 0. 0. 0. mm
/Detector/ZDC/FiberDiameters 1.5 0. 0. mm
/Detector/ZDC/AbsorberDimensions 90. 180. 11. mm
/Detector/ZDC/nAbsorbers 11
/Detector/ZDC/HousingThickness 5. mm
/Detector/ZDC/GapThickness 2. mm
/Detector/ZDC/Optical true
/Detector/ZDC/CheckOverlaps false
/Detector/ZDC/HousingMaterial aluminum
/Detector/ZDC/AbsorberMaterial pure
/Detector/ZDC/Duplicate 0
/Detector/ZDC/Position 0. 0. 153/2. mm
......@@ -113,12 +113,12 @@ public:
virtual G4VPhysicalVolume* ManualConstruction();
virtual void LoadConfigurationFile( G4String _inFile = "" );
virtual void SetConfigFileName ( G4String _name ){ m_configFileName = _name; }
virtual void LoadAlignmentFile( G4String _inFile = "" );
virtual void SetRunNumber( G4int _run ){ m_runNumber = _run; }
virtual Survey* GetSurvey( G4String name );
virtual void AddZDC( G4ThreeVector* position = NULL );
virtual void AddRPD( G4ThreeVector* position = NULL );
virtual void DuplicateZDC(G4int module);
virtual void DuplicateRPD(G4int module);
inline G4int GetnZDCs(){return m_ZDCvec.size();}
inline G4int GetnRPDs(){return m_RPDvec.size();}
inline G4bool GetClusterFlag(){return CLUSTER;}
......@@ -126,27 +126,43 @@ public:
inline G4bool GetOpticalFlag(){return OPTICAL;}
inline void SetOpticalFlag( G4bool arg ){OPTICAL = arg;}
inline void ForcePosition ( G4bool arg ){ForceDetectorPosition = arg;}
inline void SetCurrentZDC ( G4int arg ){currentZDC = arg;}
inline void SetCurrentRPD ( G4int arg ){currentZDC = arg;}
//For manual positioning ZDCs
inline void SetZDCPosition ( G4ThreeVector* vec ){ m_ZDCvec.at(currentZDC)->SetPosition(vec); }
inline void SetZDCFiberDimensions ( G4ThreeVector* vec ){ m_ZDCvec.at(currentZDC)->SetFiberDiameters(vec); }
inline void SetZDCAbsorberDimensions( G4ThreeVector* vec ){ m_ZDCvec.at(currentZDC)->SetAbsorberDimensions(vec);}
inline void SetZDCnAbsorbers ( G4int arg ){ m_ZDCvec.at(currentZDC)->SetnAbsorbers(arg); }
inline void SetZDCHousingThickness ( G4double arg ){ m_ZDCvec.at(currentZDC)->SetHousingThickness(arg); }
inline void SetZDCGapThickness ( G4double arg ){ m_ZDCvec.at(currentZDC)->SetGapThickness(arg); }
//Manual World Volume
inline void SetWorldDimensions ( G4ThreeVector* vec ){ m_WorldDimensions = vec; }
//For manual ZDCs
inline void SetZDCPosition ( G4ThreeVector* vec ){ m_ZDCvec.at(currentZDC-1)->SetPosition(vec); }
inline void SetZDCFiberDiameters ( G4ThreeVector* vec ){ m_ZDCvec.at(currentZDC-1)->SetFiberDiameters(vec); }
inline void SetZDCAbsorberDimensions( G4ThreeVector* vec ){ m_ZDCvec.at(currentZDC-1)->SetAbsorberDimensions(vec); }
inline void SetZDCnAbsorbers ( G4int arg ){ m_ZDCvec.at(currentZDC-1)->SetnAbsorbers(arg); }
inline void SetZDCHousingThickness ( G4double arg ){ m_ZDCvec.at(currentZDC-1)->SetHousingThickness(arg); }
inline void SetZDCGapThickness ( G4double arg ){ m_ZDCvec.at(currentZDC-1)->SetGapThickness(arg); }
inline void SetZDCOpticalFlag ( G4bool arg ){ m_ZDCvec.at(currentZDC-1)->SetOpticalFlag(arg); }
inline void SetZDCOverlapsFlag ( G4bool arg ){ m_ZDCvec.at(currentZDC-1)->SetOverlapsFlag(arg); }
inline void SetZDCHousingMaterial ( G4String arg ){ m_ZDCvec.at(currentZDC-1)->SetHousingMaterial(arg); }
inline void SetZDCAbsorberMaterial ( G4String arg ){ m_ZDCvec.at(currentZDC-1)->SetAbsorberMaterial(arg);}
inline void SetCurrentZDC ( G4int arg ){ currentZDC = arg; }
virtual void DuplicateZDC ( G4int module );
//For manual RPDs
inline void SetRPDPosition ( G4ThreeVector* vec ){ m_RPDvec.at(currentRPD-1)->SetPosition(vec); }
inline void SetRPDFiberDimensions ( G4ThreeVector* vec ){ m_RPDvec.at(currentRPD-1)->SetFiberDiameters(vec); }
inline void SetRPDHousingThickness ( G4double arg ){ m_RPDvec.at(currentRPD-1)->SetHousingThickness(arg);}
inline void SetRPDFiberPitch ( G4double arg ){ m_RPDvec.at(currentRPD-1)->SetFiberPitch(arg); }
inline void SetRPDTileSize ( G4double arg ){ m_RPDvec.at(currentRPD-1)->SetTileSize(arg); }
inline void SetRPDMinWallThickness ( G4double arg ){ m_RPDvec.at(currentRPD-1)->SetMinWallThickness(arg);}
inline void SetRPDDetectorType ( G4String arg ){ m_RPDvec.at(currentRPD-1)->SetDetectorType(arg); }
inline void SetRPDOpticalFlag ( G4bool arg ){ m_RPDvec.at(currentRPD-1)->SetOpticalFlag(arg); }
inline void SetRPDOverlapsFlag ( G4bool arg ){ m_RPDvec.at(currentRPD-1)->SetOverlapsFlag(arg); }
inline void SetCurrentRPD ( G4int arg ){ currentRPD = arg; }
virtual void DuplicateRPD ( G4int module );
//For manual positioning RPDs
inline void SetRPDPosition ( G4ThreeVector* vec ){ m_RPDvec.at(currentRPD)->SetPosition(vec); }
inline void SetRPDFiberDimensions ( G4ThreeVector* vec ){ m_RPDvec.at(currentRPD)->SetFiberDiameters(vec); }
inline void SetRPDHousingThickness ( G4double arg ){ m_RPDvec.at(currentRPD)->SetHousingThickness(arg);}
inline void SetRPDFiberPitch ( G4double arg ){ m_RPDvec.at(currentRPD)->SetFiberPitch(arg); }
inline void SetRPDTileSize ( G4double arg ){ m_RPDvec.at(currentRPD)->SetTileSize(arg); }
protected:
G4ThreeVector* m_WorldDimensions;
G4String m_configFileName;
Materials* m_materials;
/* World objects */
......
......@@ -58,36 +58,49 @@ class DetectorMessenger: public G4UImessenger{
DetectorConstruction* fDetector;
G4UIdirectory* fDetDir;
G4UIdirectory* fRPDDir;
G4UIdirectory* fZDCDir;
G4UIcmdWithABool* fClusterCmd;
G4UIcmdWithAString* fConfigFileCmd;
G4UIcmdWithABool* fOpticalCmd;
G4UIcmdWithABool* fOverlapsCmd;
G4UIcmdWithABool* fForcePositionCmd;
G4UIcmdWithAnInteger* fSetRunNumberCmd;
G4UIcmdWithAString* fConfigFileCmd;
G4UIcmdWithAString* fPrintDebugCmd;
G4UIcmdWith3VectorAndUnit* fSetWorldDimensionsCmd;
//ZDC Commands
G4UIcmdWithoutParameter* fZDCAddCmd;
G4UIcmdWith3VectorAndUnit* fZDCPositionCmd;
G4UIcmdWith3VectorAndUnit* fZDCAbsorberDimensionsCmd;
G4UIcmdWith3VectorAndUnit* fZDCFiberDiametersCmd;
G4UIcmdWithAnInteger* fZDCSetCurrentCmd;
G4UIcmdWith3VectorAndUnit* fZDCAbsorberDimensionsCmd;
G4UIcmdWithAnInteger* fZDCnAbsorbersCmd;
G4UIcmdWithADoubleAndUnit* fZDCHousingThicknessCmd;
G4UIcmdWithADoubleAndUnit* fZDCGapThicknessCmd;
G4UIcmdWithABool* fZDCOpticalFlagCmd;
G4UIcmdWithABool* fZDCOverlapsFlagCmd;
G4UIcmdWithAString* fZDCHousingMaterialCmd;
G4UIcmdWithAString* fZDCAbsorberMaterialCmd;
G4UIcmdWithAnInteger* fZDCSetCurrentCmd;
G4UIcmdWithAnInteger* fZDCDuplicateCmd;
G4UIcmdWithADouble* fZDCHousingThicknessCmd;
G4UIcmdWithADouble* fZDCGapThicknessCmd;
//RPD commands
G4UIcmdWithoutParameter* fRPDAddCmd;
G4UIcmdWith3VectorAndUnit* fRPDFiberDiameterssCmd;
G4UIcmdWith3VectorAndUnit* fRPDPositionCmd;
G4UIcmdWithADouble* fRPDHousingThicknessCmd;
G4UIcmdWithADouble* fRPDSetFiberPitchCmd;
G4UIcmdWithADouble* fRPDSetTileSizeCmd;
G4UIcmdWithAnInteger* fRPDDuplicateCmd;
G4UIcmdWith3VectorAndUnit* fRPDFiberDiametersCmd;
G4UIcmdWithADoubleAndUnit* fRPDHousingThicknessCmd;
G4UIcmdWithADoubleAndUnit* fRPDSetFiberPitchCmd;
G4UIcmdWithADoubleAndUnit* fRPDSetTileSizeCmd;
G4UIcmdWithADoubleAndUnit* fRPDMinWallThicknessCmd;
G4UIcmdWithAString* fRPDTypeCmd;
G4UIcmdWithABool* fRPDOpticalFlagCmd;
G4UIcmdWithABool* fRPDOverlapsFlagCmd;
G4UIcmdWithAnInteger* fRPDSetCurrentCmd;
G4UIcmdWithAnInteger* fRPDDuplicateCmd;
};
......
......@@ -56,13 +56,13 @@ public:
virtual void Construct();
virtual void ConstructCMSDetector();
virtual void ConstructPrototypeDetector();
virtual void ConstructPanFluteDetector();
virtual void DefineMaterials();
inline void SetPosition ( G4ThreeVector* vec ){ m_pos = vec; }
inline void SetFiberDiameters ( G4ThreeVector* vec ){ m_fiberDiam = vec; }
inline void SetPosition ( G4ThreeVector* vec ){ delete m_pos; m_pos = vec; }
inline void SetFiberDiameters ( G4ThreeVector* vec ){ delete m_fiberDiam; m_fiberDiam = vec; }
inline void SetHousingThickness ( G4double arg ){ m_HousingThickness = arg; }
inline void SetFiberPitch ( G4double arg ){ m_fiberPitch = arg; }
inline void SetTileSize ( G4double arg ){ m_tileSize = arg; }
......
......@@ -56,14 +56,14 @@ public:
virtual void ConstructDetector();
inline void SetPosition ( G4ThreeVector* vec ){ m_pos = vec; }
inline void SetFiberDiameters ( G4ThreeVector* vec ){ m_fiberDiam = vec; }
inline void SetAbsorberDimensions( G4ThreeVector* vec ){ m_absDim = vec; }
inline void SetnAbsorbers ( G4int arg ){ m_nAbsorbers = arg; }
inline void SetHousingThickness ( G4double arg ){ m_HousingThickness = arg; }
inline void SetGapThickness ( G4double arg ){ m_GapThickness = arg; }
inline void SetOpticalFlag ( G4bool arg ){ OPTICAL = arg; }
inline void SetOverlapsFlag ( G4bool arg ){ CHECK_OVERLAPS = arg; }
inline void SetPosition ( G4ThreeVector* vec ){ delete m_pos; m_pos = vec; }
inline void SetFiberDiameters ( G4ThreeVector* vec ){ delete m_fiberDiam; m_fiberDiam = vec; }
inline void SetAbsorberDimensions( G4ThreeVector* vec ){ delete m_absDim; m_absDim = vec; }
inline void SetnAbsorbers ( G4int arg ){ m_nAbsorbers = arg; }
inline void SetHousingThickness ( G4double arg ){ m_HousingThickness = arg; }
inline void SetGapThickness ( G4double arg ){ m_GapThickness = arg; }
inline void SetOpticalFlag ( G4bool arg ){ OPTICAL = arg; }
inline void SetOverlapsFlag ( G4bool arg ){ CHECK_OVERLAPS = arg; }
virtual void SetHousingMaterial ( G4String material );
virtual void SetAbsorberMaterial ( G4String material );
......
......@@ -69,7 +69,7 @@
DetectorConstruction::DetectorConstruction()
: G4VUserDetectorConstruction(), m_solidWorld(NULL), m_logicWorld(NULL),
m_physWorld(NULL),CLUSTER(false),OPTICAL(false)
m_physWorld(NULL),CLUSTER(false),OPTICAL(false), ForceDetectorPosition(false)
{
new DetectorMessenger(this);
currentRPD = -1;
......@@ -121,13 +121,55 @@ G4VPhysicalVolume* DetectorConstruction::ManualConstruction(){
<< " PLACING DETECTORS MANUALLY " << std::endl
<< "******************************************" << std::endl;
/*
//################################ World volume construction
m_materials->UseOpticalMaterials(OPTICAL); //set this an an option later ARIC!
m_materials->DefineOpticalProperties();
printf( "Building world with x %5.1f y %5.1f z %5.1f\n",
m_WorldDimensions->x(), m_WorldDimensions->y(), m_WorldDimensions->z() );
m_solidWorld =
new G4Box("World", //its name
0.5*m_WorldDimensions->x(), //its size
0.5*m_WorldDimensions->y(),
0.5*m_WorldDimensions->z() );
m_logicWorld =
new G4LogicalVolume(m_solidWorld, //its solid
m_materials->Air, //its material
"World"); //its name
m_physWorld =
new G4PVPlacement(0, //no rotation
G4ThreeVector(), //at (0,0,0)
m_logicWorld, //its logical volume
"World", //its name
0, //its mother volume
false, //no boolean operation
0, //copy number
false); //overlaps checking
Make this do the thing using DetectorMessenger Commands
and member vectors
*/
G4VisAttributes* boxVisAtt_world = new G4VisAttributes(G4Colour(0.5,0.5,0.5));
m_logicWorld ->SetVisAttributes(boxVisAtt_world);
G4ThreeVector* pos;
std::cout << "ZDC vector size = " << m_ZDCvec.size() << std::endl;
for(ModTypeZDC* zdc : m_ZDCvec){
pos = zdc->GetPosition();
printf( "ZDC%d center = (%f,%f,%f)\n", zdc->GetModNum(), pos->x(), pos->y(), pos->z() );
zdc->Construct();
}
std::cout << "before RPD construction" << std::endl;
for(ModTypeRPD* rpd : m_RPDvec){
pos = rpd->GetPosition();
printf( "RPD%d center = (%f,%f,%f)", rpd->GetModNum(), pos->x(), pos->y(), pos->z() );
rpd->Construct();
}
std::cout << "after rpd construction" << std::endl;
return m_physWorld;
}
......@@ -343,7 +385,7 @@ void DetectorConstruction::LoadConfigurationFile( G4String _inFile ){
if(_inFile = ""){
_inFile = std::getenv("JZCaPA");
_inFile += "Utils/Survey_2018.xml";
_inFile += "/Utils/Survey_2018.xml";
}
m_XMLparser = new XMLSettingsReader();
......@@ -397,7 +439,7 @@ void DetectorConstruction::LoadAlignmentFile( G4String _inFile ){
if( _inFile = ""){
_inFile = std::getenv("JZCaPA");
_inFile += "Utils/Alignment_2018.xml";
_inFile += "/Utils/Alignment_2018.xml";
}
m_XMLparser = new XMLSettingsReader();
......@@ -454,36 +496,44 @@ Survey* DetectorConstruction::GetSurvey(G4String name){
* Add a ZDC module
*/
void DetectorConstruction::AddZDC(G4ThreeVector* position){
int newModNum = m_ZDCvec.size();
uint newModNum = m_ZDCvec.size()+1;
m_ZDCvec.push_back(new ModTypeZDC(newModNum, m_logicWorld, position ));
currentZDC = newModNum;
printf("Added ZDC%d\n", newModNum);
}
/*
* Add an RPD module
*/
void DetectorConstruction::AddRPD(G4ThreeVector* position){
int newModNum = m_ZDCvec.size();
uint newModNum = m_RPDvec.size()+1;
m_RPDvec.push_back(new ModTypeRPD(newModNum, m_logicWorld, position ));
currentRPD = newModNum;
printf("Added RPD%d\n", newModNum);
}
/*
* Duplicate a ZDC module
*/
void DetectorConstruction::DuplicateZDC( G4int module ){
if((unsigned)module <= m_ZDCvec.size() ){
uint newModNum = m_ZDCvec.size()+1;
if((unsigned)module >= newModNum ){
printf("\n\n Cannot duplicate. ZDC%d does not exist \n\n",module);
}
int nextZDCindex = m_ZDCvec.size();
m_ZDCvec.push_back( new ModTypeZDC( nextZDCindex, m_ZDCvec.at(module) ) );
m_ZDCvec.push_back( new ModTypeZDC( newModNum, m_ZDCvec.at(module-1) ) );
currentZDC = newModNum;
printf("Duplicate ZDC%d built from ZDC%d\n", newModNum, module);
}
/*
* Duplicate an RPD module
*/
void DetectorConstruction::DuplicateRPD( G4int module ){
if((unsigned)module <= m_RPDvec.size() ){
uint newModNum = m_RPDvec.size()+1;
if((unsigned)module >= newModNum ){
printf("\n\n Cannot duplicate. RPD%d does not exist \n\n",module);
}
int nextRPDindex = m_RPDvec.size();
m_RPDvec.push_back( new ModTypeRPD( nextRPDindex, m_RPDvec.at(module) ) );
m_RPDvec.push_back( new ModTypeRPD( newModNum, m_RPDvec.at(module-1) ) );
currentRPD = newModNum;
printf("Duplicate RPD%d built from RPD%d\n", newModNum, module);
}
......@@ -37,6 +37,7 @@
#include "G4UIcommand.hh"
#include "G4UIparameter.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithABool.hh"
#include "G4UIcmdWithADouble.hh"
#include "G4UIcmdWithAnInteger.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
......@@ -47,6 +48,225 @@
DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
:G4UImessenger(),fDetector(Det)
{
fDetDir = new G4UIdirectory("/Detector/");
fDetDir->SetGuidance("Geometry creation and modification");
fRPDDir = new G4UIdirectory("/Detector/ZDC/");
fRPDDir->SetGuidance("ZDC creation and modification");
fZDCDir = new G4UIdirectory("/Detector/RPD/");
fZDCDir->SetGuidance("RPD creation and modification");
fClusterCmd = new G4UIcmdWithABool("/Detector/Cluster", this);
fClusterCmd->SetGuidance("Set cluster flag");
fClusterCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fClusterCmd->SetDefaultValue(true);
fClusterCmd->SetToBeBroadcasted(false);
fOpticalCmd = new G4UIcmdWithABool("/Detector/Optical", this);
fOpticalCmd->SetGuidance("Set optical flag");
fOpticalCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fOpticalCmd->SetDefaultValue(true);
fOpticalCmd->SetToBeBroadcasted(false);
fOverlapsCmd = new G4UIcmdWithABool("/Detector/Overlaps", this);
fOverlapsCmd->SetGuidance("Set check overlaps flag for current ZDC");
fOverlapsCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fOverlapsCmd->SetDefaultValue(true);
fOverlapsCmd->SetToBeBroadcasted(false);
fForcePositionCmd = new G4UIcmdWithABool("/Detector/ForcePosition", this);
fForcePositionCmd->SetGuidance("Force detector positions");
fForcePositionCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fForcePositionCmd->SetDefaultValue(true);
fForcePositionCmd->SetToBeBroadcasted(false);
fSetRunNumberCmd = new G4UIcmdWithAnInteger("/Detector/RunNumber", this);
fSetRunNumberCmd->SetGuidance("Set run number if loading configuration from file");
fSetRunNumberCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fSetRunNumberCmd->SetToBeBroadcasted(false);
fConfigFileCmd = new G4UIcmdWithAString("/Detector/ConfigFile", this);
fConfigFileCmd->SetGuidance("Set configuration file name");
fConfigFileCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fConfigFileCmd->SetToBeBroadcasted(false);
fPrintDebugCmd = new G4UIcmdWithAString("/Detector/PrintDebugStatement", this);
fPrintDebugCmd->SetGuidance("Print a string to the console to help debug");
fPrintDebugCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fPrintDebugCmd->SetDefaultValue("DEBUG");
fPrintDebugCmd->SetToBeBroadcasted(false);
fSetWorldDimensionsCmd = new G4UIcmdWith3VectorAndUnit("/Detector/SetWorldDimensions", this);
fSetWorldDimensionsCmd->SetGuidance("Set world volume dimensions");
fSetWorldDimensionsCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fSetWorldDimensionsCmd->SetToBeBroadcasted(false);
fSetWorldDimensionsCmd->SetParameterName("X","Y","Z",true);
fSetWorldDimensionsCmd->SetDefaultValue(G4ThreeVector(2.,2.,4.));
fSetWorldDimensionsCmd->SetDefaultUnit("m");
//ZDC commands
fZDCAddCmd = new G4UIcmdWithoutParameter("/Detector/ZDC/Add", this);
fZDCAddCmd->SetGuidance("Add a ZDC to the world");
fZDCAddCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fZDCAddCmd->SetToBeBroadcasted(false);
fZDCPositionCmd = new G4UIcmdWith3VectorAndUnit("/Detector/ZDC/Position", this);
fZDCPositionCmd->SetGuidance("Set current ZDC position");
fZDCPositionCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fZDCPositionCmd->SetToBeBroadcasted(false);
fZDCPositionCmd->SetParameterName("X","Y","Z",true);
fZDCPositionCmd->SetDefaultValue(G4ThreeVector(0.,0.,0.));
fZDCPositionCmd->SetDefaultUnit("mm");
fZDCFiberDiametersCmd = new G4UIcmdWith3VectorAndUnit("/Detector/ZDC/FiberDiameters", this);
fZDCFiberDiametersCmd->SetGuidance("Set current ZDC fiber core, cladding, and buffer diameters");
fZDCFiberDiametersCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fZDCFiberDiametersCmd->SetToBeBroadcasted(false);
fZDCFiberDiametersCmd->SetParameterName("Core","Cladding","Buffer",true);
fZDCFiberDiametersCmd->SetDefaultValue(G4ThreeVector(0.,0.,0.));
fZDCFiberDiametersCmd->SetDefaultUnit("mm");
fZDCAbsorberDimensionsCmd = new G4UIcmdWith3VectorAndUnit("/Detector/ZDC/AbsorberDimensions", this);
fZDCAbsorberDimensionsCmd->SetGuidance("Set current ZDC absorber dimensions");
fZDCAbsorberDimensionsCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fZDCAbsorberDimensionsCmd->SetToBeBroadcasted(false);
fZDCAbsorberDimensionsCmd->SetParameterName("X","Y","Z",true);
fZDCAbsorberDimensionsCmd->SetDefaultValue(G4ThreeVector(0.,0.,0.));
fZDCAbsorberDimensionsCmd->SetDefaultUnit("mm");
fZDCnAbsorbersCmd = new G4UIcmdWithAnInteger("/Detector/ZDC/nAbsorbers", this);
fZDCnAbsorbersCmd->SetGuidance("Set number of absorbers in the current ZDC");
fZDCnAbsorbersCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fZDCnAbsorbersCmd->SetDefaultValue(11);
fZDCnAbsorbersCmd->SetToBeBroadcasted(false);
fZDCHousingThicknessCmd =
new G4UIcmdWithADoubleAndUnit("/Detector/ZDC/HousingThickness",this);
fZDCHousingThicknessCmd->SetGuidance("Set housing thickness of the current ZDC");
fZDCHousingThicknessCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fZDCHousingThicknessCmd->SetToBeBroadcasted(false);
fZDCHousingThicknessCmd->SetDefaultUnit("mm");
fZDCGapThicknessCmd =
new G4UIcmdWithADoubleAndUnit("/Detector/ZDC/GapThickness",this);
fZDCGapThicknessCmd->SetGuidance("Set radiator gap thickness of the current ZDC");
fZDCGapThicknessCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fZDCGapThicknessCmd->SetToBeBroadcasted(false);
fZDCGapThicknessCmd->SetDefaultUnit("mm");
fZDCOpticalFlagCmd = new G4UIcmdWithABool("/Detector/ZDC/Optical", this);
fZDCOpticalFlagCmd->SetGuidance("Set optical flag for current ZDC");
fZDCOpticalFlagCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fZDCOpticalFlagCmd->SetDefaultValue(true);
fZDCOpticalFlagCmd->SetToBeBroadcasted(false);
fZDCOverlapsFlagCmd = new G4UIcmdWithABool("/Detector/ZDC/CheckOverlaps", this);
fZDCOverlapsFlagCmd->SetGuidance("Set check overlaps flag for current ZDC");
fZDCOverlapsFlagCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fZDCOverlapsFlagCmd->SetDefaultValue(true);
fZDCOverlapsFlagCmd->SetToBeBroadcasted(false);
fZDCHousingMaterialCmd = new G4UIcmdWithAString("/Detector/ZDC/HousingMaterial", this);
fZDCHousingMaterialCmd->SetGuidance("Set current ZDC housing material");
fZDCHousingMaterialCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fZDCHousingMaterialCmd->SetToBeBroadcasted(false);
fZDCAbsorberMaterialCmd = new G4UIcmdWithAString("/Detector/ZDC/AbsorberMaterial", this);
fZDCAbsorberMaterialCmd->SetGuidance("Set current ZDC absorber material");
fZDCAbsorberMaterialCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fZDCAbsorberMaterialCmd->SetToBeBroadcasted(false);
fZDCSetCurrentCmd = new G4UIcmdWithAnInteger("/Detector/ZDC/SetCurrent", this);
fZDCSetCurrentCmd->SetGuidance("Select ZDC to be modified");
fZDCSetCurrentCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fZDCSetCurrentCmd->SetToBeBroadcasted(false);
fZDCDuplicateCmd = new G4UIcmdWithAnInteger("/Detector/ZDC/Duplicate", this);
fZDCDuplicateCmd->SetGuidance("Select duplicate the ZDC with the given index");
fZDCDuplicateCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fZDCDuplicateCmd->SetDefaultValue(0);
fZDCDuplicateCmd->SetToBeBroadcasted(false);
//RPD commands
fRPDAddCmd = new G4UIcmdWithoutParameter("/Detector/RPD/Add", this);
fRPDAddCmd->SetGuidance("Add an RPD to the world");
fRPDAddCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fRPDAddCmd->SetToBeBroadcasted(false);
fRPDPositionCmd = new G4UIcmdWith3VectorAndUnit("/Detector/RPD/Position", this);
fRPDPositionCmd->SetGuidance("Set current RPD position");
fRPDPositionCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fRPDPositionCmd->SetToBeBroadcasted(false);
fRPDPositionCmd->SetParameterName("X","Y","Z",true);
fRPDPositionCmd->SetDefaultValue(G4ThreeVector(0.,0.,0.));
fRPDPositionCmd->SetDefaultUnit("mm");
fRPDFiberDiametersCmd = new G4UIcmdWith3VectorAndUnit("/Detector/RPD/FiberDiameters", this);
fRPDFiberDiametersCmd->SetGuidance("Set current RPD fiber core, cladding, and buffer diameters");
fRPDFiberDiametersCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fRPDFiberDiametersCmd->SetToBeBroadcasted(false);
fRPDFiberDiametersCmd->SetParameterName("Core","Cladding","Buffer",true);
fRPDFiberDiametersCmd->SetDefaultValue(G4ThreeVector(0.,0.,0.));
fRPDFiberDiametersCmd->SetDefaultUnit("mm");
fRPDHousingThicknessCmd =
new G4UIcmdWithADoubleAndUnit("/Detector/RPD/HousingThickness",this);
fRPDHousingThicknessCmd->SetGuidance("Set housing thickness of the current RPD");
fRPDHousingThicknessCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fRPDHousingThicknessCmd->SetToBeBroadcasted(false);
fRPDHousingThicknessCmd->SetDefaultUnit("mm");
fRPDSetFiberPitchCmd =
new G4UIcmdWithADoubleAndUnit("/Detector/RPD/FiberPitch",this);
fRPDSetFiberPitchCmd->SetGuidance("Set fiber pitch of the current RPD");
fRPDSetFiberPitchCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fRPDSetFiberPitchCmd->SetToBeBroadcasted(false);
fRPDSetFiberPitchCmd->SetDefaultUnit("mm");
fRPDSetTileSizeCmd =
new G4UIcmdWithADoubleAndUnit("/Detector/RPD/TileSize",this);
fRPDSetTileSizeCmd->SetGuidance("Set tile size of the current RPD");
fRPDSetTileSizeCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fRPDSetTileSizeCmd->SetToBeBroadcasted(false);
fRPDSetTileSizeCmd->SetDefaultUnit("mm");
fRPDMinWallThicknessCmd =
new G4UIcmdWithADoubleAndUnit("/Detector/RPD/MinWallThickness",this);
fRPDMinWallThicknessCmd->SetGuidance("Set minimum distance between fibers of the current RPD");
fRPDMinWallThicknessCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fRPDMinWallThicknessCmd->SetToBeBroadcasted(false);
fRPDMinWallThicknessCmd->SetDefaultUnit("mm");
fRPDTypeCmd = new G4UIcmdWithAString("/Detector/RPD/RPDtype", this);
fRPDTypeCmd->SetGuidance("Set design type for the current RPD (cms or panflute)");
fRPDTypeCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fRPDTypeCmd->SetToBeBroadcasted(false);
fRPDOpticalFlagCmd = new G4UIcmdWithABool("/Detector/RPD/Optical", this);
fRPDOpticalFlagCmd->SetGuidance("Set optical flag for current RPD");
fRPDOpticalFlagCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fRPDOpticalFlagCmd->SetDefaultValue(true);
fRPDOpticalFlagCmd->SetToBeBroadcasted(false);
fRPDOverlapsFlagCmd = new G4UIcmdWithABool("/Detector/RPD/CheckOverlaps", this);
fRPDOverlapsFlagCmd->SetGuidance("Set check overlaps flag for current RPD");
fRPDOverlapsFlagCmd->AvailableForStates(G4State_PreInit, G4State_Init, G4State_Idle);
fRPDOverlapsFlagCmd->SetDefaultValue(true);