Skip to content
Snippets Groups Projects
Commit 5a661bdb authored by MANZANILLAS Luis's avatar MANZANILLAS Luis
Browse files

updates to mac file examples

parent 5e03032a
Branches
No related tags found
No related merge requests found
#----------------------------------------------------------------------------
# Setup the project
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(Ge2SOS)
project(PoSOS)
#----------------------------------------------------------------------------
# Find Geant4 package, activating all available UI and Vis drivers by default
......@@ -33,20 +33,20 @@ file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
#----------------------------------------------------------------------------
# Add the executable, and link it to the Geant4 libraries
#
add_executable(Ge2SOS Ge2SOS.cc ${sources} ${headers})
target_link_libraries(Ge2SOS ${Geant4_LIBRARIES} )
add_executable(PoSOS PoSOS.cc ${sources} ${headers})
target_link_libraries(PoSOS ${Geant4_LIBRARIES} )
#----------------------------------------------------------------------------
# Copy all scripts to the build directory, i.e. the directory in which we
# build OpNovice. This is so that we can run the executable directly because it
# relies on these scripts being in the current working directory.
#
set(Ge2SOS_SCRIPTS
set(PoSOS_SCRIPTS
vis.mac
gui.mac
)
foreach(_script ${Ge2SOS_SCRIPTS})
foreach(_script ${PoSOS_SCRIPTS})
configure_file(
${PROJECT_SOURCE_DIR}/${_script}
${PROJECT_BINARY_DIR}/${_script}
......@@ -57,5 +57,5 @@ endforeach()
#----------------------------------------------------------------------------
# Install the executable to 'bin' directory under CMAKE_INSTALL_PREFIX
#
install(TARGETS Ge2SOS DESTINATION bin)
install(TARGETS PoSOS DESTINATION bin)
......@@ -32,16 +32,16 @@ int main(int argc,char** argv)
G4cout << " " << G4endl
<< "======================================================="<< G4endl
<< " "<< G4endl
<< " ###### ###### ###### ###### "<< G4endl
<< " # # # # # "<< G4endl
<< " # # # # # "<< G4endl
<< " ####### ###### ###### ###### "<< G4endl
<< " # # # # # # "<< G4endl
<< " # # # # # # "<< G4endl
<< " ## ##### #### ####### # # ####### "<< G4endl
<< " ## # # # # # # # "<< G4endl
<< " # # # # # # # # "<< G4endl
<< " ######## #### ####### ###### ####### "<< G4endl
<< " # # # # # # # "<< G4endl
<< " # # # # # # # "<< G4endl
<< " # #### ####### ###### ####### "<< G4endl
<< " "<< G4endl
<< "======================================================="<< G4endl
<< " Germanium detectors at SOLEIL "<< G4endl
<< " Polarimetry at SOLEIL "<< G4endl
<< " Paco Iguaz Gutierrez, Luis Manzanillas Velez "<< G4endl
<< "======================================================="<< G4endl
<< G4endl << G4endl;
......
......@@ -3,13 +3,13 @@
/process/em/augerCascade true
/process/em/pixe true
#/Ge2SOS/det/setOutputDirectory /home/iwsatlas1/manzanil/Documents/Varios/SOLEIL/
/Ge2SOS/det/setDetectorType 1
/Ge2SOS/det/setNTargetSamples 1
/Ge2SOS/det/setGeDetectorThickness 2. mm
#/PoSOS/det/setOutputDirectory /home/iwsatlas1/manzanil/Documents/Varios/SOLEIL/
/PoSOS/det/setDetectorType 1
/PoSOS/det/setNTargetSamples 1
/PoSOS/det/setGeDetectorThickness 2. mm
#Set the position of the collimator, a values between -37 and 37 mm (size of samples)
#Choise of source type: 0 Cs-137; 1 Bi-207; 2 Sr-90; 3 e-
/run/initialize
/Ge2SOS/gun/sourceType 0
/PoSOS/gun/sourceType 0
/run/beamOn 1
......@@ -29,7 +29,7 @@ class DetectorMessenger: public G4UImessenger
DetectorConstruction* fDetector;
G4UIdirectory* fGe2SOSDir;
G4UIdirectory* fPoSOSDir;
G4UIdirectory* fDetDir;
G4UIcmdWithAString* commandSetWorldMaterial;
......
......@@ -14,7 +14,7 @@
DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
:G4UImessenger(),
fDetector(Det),
fGe2SOSDir(0),
fPoSOSDir(0),
fDetDir(0),
commandSetWorldMaterial(0),
commandSetDetectorType(0),
......@@ -35,64 +35,64 @@ DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
commandSetDataType(0),
commandSetOutputDirectory(0)
{
fDetDir = new G4UIdirectory("/Ge2SOS/det/");
fDetDir = new G4UIdirectory("/PoSOS/det/");
fDetDir->SetGuidance("detector construction commands");
commandSetCollimatorMaterial = new G4UIcmdWithAString("/Ge2SOS/det/setCollimatorMat",this);
commandSetCollimatorMaterial = new G4UIcmdWithAString("/PoSOS/det/setCollimatorMat",this);
commandSetCollimatorMaterial->SetGuidance("Select material of the collimator.");
commandSetCollimatorMaterial->SetParameterName("choice",false);
commandSetCollimatorMaterial->AvailableForStates(G4State_PreInit,G4State_Idle);
commandSetCollimatorMaterial->SetToBeBroadcasted(false);
commandSetTargetMaterial = new G4UIcmdWithAString("/Ge2SOS/det/setGeDetectorMat",this);
commandSetTargetMaterial = new G4UIcmdWithAString("/PoSOS/det/setGeDetectorMat",this);
commandSetTargetMaterial->SetGuidance("Select material of the target.");
commandSetTargetMaterial->SetParameterName("choice",false);
commandSetTargetMaterial->AvailableForStates(G4State_PreInit,G4State_Idle);
commandSetTargetMaterial->SetToBeBroadcasted(false);
commandSetGeContainerMaterial = new G4UIcmdWithAString("/Ge2SOS/det/setGeContainerMat",this);
commandSetGeContainerMaterial = new G4UIcmdWithAString("/PoSOS/det/setGeContainerMat",this);
commandSetGeContainerMaterial->SetGuidance("Select material of the ge container.");
commandSetGeContainerMaterial->SetParameterName("choice",false);
commandSetGeContainerMaterial->AvailableForStates(G4State_PreInit,G4State_Idle);
commandSetGeContainerMaterial->SetToBeBroadcasted(false);
commandSetGeContainerMaterialCoating = new G4UIcmdWithAString("/Ge2SOS/det/setGeContainerMatCoating",this);
commandSetGeContainerMaterialCoating = new G4UIcmdWithAString("/PoSOS/det/setGeContainerMatCoating",this);
commandSetGeContainerMaterialCoating->SetGuidance("Select material of the ge container coating.");
commandSetGeContainerMaterialCoating->SetParameterName("choice",false);
commandSetGeContainerMaterialCoating->AvailableForStates(G4State_PreInit,G4State_Idle);
commandSetGeContainerMaterialCoating->SetToBeBroadcasted(false);
commandSetDetectorName = new G4UIcmdWithAString("/Ge2SOS/det/setGeDetectorName",this);
commandSetDetectorName = new G4UIcmdWithAString("/PoSOS/det/setGeDetectorName",this);
commandSetDetectorName->SetGuidance("Select name of detector.");
commandSetDetectorName->SetParameterName("choice",false);
commandSetDetectorName->AvailableForStates(G4State_PreInit,G4State_Idle);
commandSetDetectorName->SetToBeBroadcasted(false);
commandSetSetupName = new G4UIcmdWithAString("/Ge2SOS/det/setSetupName",this);
commandSetSetupName = new G4UIcmdWithAString("/PoSOS/det/setSetupName",this);
commandSetSetupName->SetGuidance("Select name of setup.");
commandSetSetupName->SetParameterName("choice",false);
commandSetSetupName->AvailableForStates(G4State_PreInit,G4State_Idle);
commandSetSetupName->SetToBeBroadcasted(false);
commandSetDataType = new G4UIcmdWithAString("/Ge2SOS/det/setDataType",this);
commandSetDataType = new G4UIcmdWithAString("/PoSOS/det/setDataType",this);
commandSetDataType->SetGuidance("Select format of data: csv, hdf5, root.");
commandSetDataType->SetParameterName("choice",false);
commandSetDataType->AvailableForStates(G4State_PreInit,G4State_Idle);
commandSetDataType->SetToBeBroadcasted(false);
commandSetOutputDirectory = new G4UIcmdWithAString("/Ge2SOS/det/setOutputDirectory",this);
commandSetOutputDirectory = new G4UIcmdWithAString("/PoSOS/det/setOutputDirectory",this);
commandSetOutputDirectory->SetGuidance("Set output directory");
commandSetOutputDirectory->SetParameterName("choice",false);
commandSetOutputDirectory->AvailableForStates(G4State_PreInit,G4State_Idle);
commandSetOutputDirectory->SetToBeBroadcasted(false);
commandSetWorldMaterial = new G4UIcmdWithAString("/Ge2SOS/det/setWorldMat",this);
commandSetWorldMaterial = new G4UIcmdWithAString("/PoSOS/det/setWorldMat",this);
commandSetWorldMaterial->SetGuidance("Select material of the world.");
commandSetWorldMaterial->SetParameterName("choice",false);
commandSetWorldMaterial->AvailableForStates(G4State_PreInit,G4State_Idle);
commandSetWorldMaterial->SetToBeBroadcasted(false);
commandSetGeDetectorLength = new G4UIcmdWithADoubleAndUnit("/Ge2SOS/det/setGeDetectorLength",this);
commandSetGeDetectorLength = new G4UIcmdWithADoubleAndUnit("/PoSOS/det/setGeDetectorLength",this);
commandSetGeDetectorLength->SetGuidance("Set length of target samples");
commandSetGeDetectorLength->SetParameterName("SampleLength",false);
commandSetGeDetectorLength->SetRange("SampleLength>0.");
......@@ -100,7 +100,7 @@ DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
commandSetGeDetectorLength->AvailableForStates(G4State_PreInit,G4State_Idle);
commandSetGeDetectorLength->SetToBeBroadcasted(false);
commandSetGeDetectorThickness = new G4UIcmdWithADoubleAndUnit("/Ge2SOS/det/setGeDetectorThickness",this);
commandSetGeDetectorThickness = new G4UIcmdWithADoubleAndUnit("/PoSOS/det/setGeDetectorThickness",this);
commandSetGeDetectorThickness->SetGuidance("Set thickness of target samples");
commandSetGeDetectorThickness->SetParameterName("SampleThickness",false);
commandSetGeDetectorThickness->SetRange("SampleThickness>0.");
......@@ -108,7 +108,7 @@ DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
commandSetGeDetectorThickness->AvailableForStates(G4State_PreInit,G4State_Idle);
commandSetGeDetectorThickness->SetToBeBroadcasted(false);
commandSetGeDetectorWidth = new G4UIcmdWithADoubleAndUnit("/Ge2SOS/det/setGeDetectorWidth",this);
commandSetGeDetectorWidth = new G4UIcmdWithADoubleAndUnit("/PoSOS/det/setGeDetectorWidth",this);
commandSetGeDetectorWidth->SetGuidance("Set width of target samples");
commandSetGeDetectorWidth->SetParameterName("SampleWidth",false);
commandSetGeDetectorWidth->SetRange("SampleWidth>0.");
......@@ -116,7 +116,7 @@ DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
commandSetGeDetectorWidth->AvailableForStates(G4State_PreInit,G4State_Idle);
commandSetGeDetectorWidth->SetToBeBroadcasted(false);
commandSetContactThickness = new G4UIcmdWithADoubleAndUnit("/Ge2SOS/det/setContactThickness",this);
commandSetContactThickness = new G4UIcmdWithADoubleAndUnit("/PoSOS/det/setContactThickness",this);
commandSetContactThickness->SetGuidance("Set thickness of Al contact");
commandSetContactThickness->SetParameterName("ContactThickness",false);
commandSetContactThickness->SetRange("ContactThickness>0.");
......@@ -124,7 +124,7 @@ DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
commandSetContactThickness->AvailableForStates(G4State_PreInit,G4State_Idle);
commandSetContactThickness->SetToBeBroadcasted(false);
commandSetBeWindowRadius = new G4UIcmdWithADoubleAndUnit("/Ge2SOS/det/setBeWindowRadius",this);
commandSetBeWindowRadius = new G4UIcmdWithADoubleAndUnit("/PoSOS/det/setBeWindowRadius",this);
commandSetBeWindowRadius->SetGuidance("Set radius of Be Window");
commandSetBeWindowRadius->SetParameterName("WindowRadius",false);
commandSetBeWindowRadius->SetRange("WindowRadius>0.");
......@@ -133,7 +133,7 @@ DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
commandSetBeWindowRadius->SetToBeBroadcasted(false);
commandSetCollimatorThickness = new G4UIcmdWithADoubleAndUnit("/Ge2SOS/det/setCollimatorThickness",this);
commandSetCollimatorThickness = new G4UIcmdWithADoubleAndUnit("/PoSOS/det/setCollimatorThickness",this);
commandSetCollimatorThickness->SetGuidance("Set thickness of target samples");
commandSetCollimatorThickness->SetParameterName("CollimatorThickness",false);
commandSetCollimatorThickness->SetRange("CollimatorThickness>0.");
......@@ -141,7 +141,7 @@ DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
commandSetCollimatorThickness->AvailableForStates(G4State_PreInit,G4State_Idle);
commandSetCollimatorThickness->SetToBeBroadcasted(false);
commandSetDistanceCollimatorDetector = new G4UIcmdWithADoubleAndUnit("/Ge2SOS/det/setDistanceCollimatorDetector",this);
commandSetDistanceCollimatorDetector = new G4UIcmdWithADoubleAndUnit("/PoSOS/det/setDistanceCollimatorDetector",this);
commandSetDistanceCollimatorDetector->SetGuidance("Set distance collimator detector");
commandSetDistanceCollimatorDetector->SetParameterName("CollimatorDistance",false);
commandSetDistanceCollimatorDetector->SetRange("CollimatorDistance>0.");
......@@ -150,12 +150,12 @@ DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
commandSetDistanceCollimatorDetector->SetToBeBroadcasted(false);
commandSetDetectorType = new G4UIcmdWithAnInteger("/Ge2SOS/det/setDetectorType",this);
commandSetDetectorType = new G4UIcmdWithAnInteger("/PoSOS/det/setDetectorType",this);
commandSetDetectorType->SetGuidance("Set detector type");
commandSetDetectorType->AvailableForStates(G4State_PreInit,G4State_Idle);
commandSetDetectorType->SetToBeBroadcasted(false);
commandSetNumberOfTargetSamples = new G4UIcmdWithAnInteger("/Ge2SOS/det/setNTargetSamples",this);
commandSetNumberOfTargetSamples = new G4UIcmdWithAnInteger("/PoSOS/det/setNTargetSamples",this);
commandSetNumberOfTargetSamples->SetGuidance("Set number of target Samples");
commandSetNumberOfTargetSamples->AvailableForStates(G4State_PreInit,G4State_Idle);
commandSetNumberOfTargetSamples->SetToBeBroadcasted(false);
......@@ -168,7 +168,7 @@ DetectorMessenger::DetectorMessenger(DetectorConstruction * Det)
DetectorMessenger::~DetectorMessenger()
{
delete fDetDir;
delete fGe2SOSDir;
delete fPoSOSDir;
delete commandSetWorldMaterial;
delete commandSetDetectorType;
delete commandSetNumberOfTargetSamples;
......
......@@ -13,64 +13,64 @@ PrimaryGeneratorMessenger::PrimaryGeneratorMessenger(PrimaryGeneratorAction* Gun
fAction(Gun),fGunDir(0)
{
fGunDir = new G4UIdirectory("/Ge2SOS/gun/");
fGunDir = new G4UIdirectory("/PoSOS/gun/");
fGunDir->SetGuidance("PrimaryGenerator control");
fSourceType = new G4UIcmdWithAnInteger("/Ge2SOS/gun/sourceType",this);
fSourceType = new G4UIcmdWithAnInteger("/PoSOS/gun/sourceType",this);
fSourceType->SetGuidance("Choose the type of source");
fSourceType->SetParameterName("sourceType",true);
fSourceType->SetDefaultValue(0);
fSourceType->AvailableForStates(G4State_Idle);
fSourceDirectionType = new G4UIcmdWithAnInteger("/Ge2SOS/gun/sourceDirectionType",this);
fSourceDirectionType = new G4UIcmdWithAnInteger("/PoSOS/gun/sourceDirectionType",this);
fSourceDirectionType->SetGuidance("Choose the direction type");
fSourceDirectionType->SetParameterName("sourceDirectionType",true);
fSourceDirectionType->SetDefaultValue(0);
fSourceDirectionType->AvailableForStates(G4State_Idle);
fSourceGeometry = new G4UIcmdWithAnInteger("/Ge2SOS/gun/sourceGeometry",this);
fSourceGeometry = new G4UIcmdWithAnInteger("/PoSOS/gun/sourceGeometry",this);
fSourceGeometry->SetGuidance("Choose the type of geometry for the source");
fSourceGeometry->SetParameterName("sourceGeometry",true);
fSourceGeometry->SetDefaultValue(0);
fSourceGeometry->AvailableForStates(G4State_Idle);
fSourceEnergy = new G4UIcmdWithADoubleAndUnit("/Ge2SOS/gun/sourceEnergy", this);
fSourceEnergy = new G4UIcmdWithADoubleAndUnit("/PoSOS/gun/sourceEnergy", this);
fSourceEnergy->SetGuidance("Choose source energy");
fSourceEnergy->SetParameterName("sourceEnergy",true);
fSourceEnergy->SetDefaultValue(20.*keV);
fSourceEnergy->AvailableForStates(G4State_Idle);
fSourcePolarizationAngle = new G4UIcmdWithADouble("/Ge2SOS/gun/sourceGammaPolarizationAngle", this);
fSourcePolarizationAngle = new G4UIcmdWithADouble("/PoSOS/gun/sourceGammaPolarizationAngle", this);
fSourcePolarizationAngle->SetGuidance("Choose angle of polarization in degrees");
fSourcePolarizationAngle->SetParameterName("sourcePolarAngle",true);
fSourcePolarizationAngle->SetDefaultValue(0.);
fSourcePolarizationAngle->AvailableForStates(G4State_Idle);
fSourcePolarizationDegree = new G4UIcmdWithADouble("/Ge2SOS/gun/sourceGammaPolarizationDegree", this);
fSourcePolarizationDegree = new G4UIcmdWithADouble("/PoSOS/gun/sourceGammaPolarizationDegree", this);
fSourcePolarizationDegree->SetGuidance("Choose degree of polarization o to 1");
fSourcePolarizationDegree->SetParameterName("sourcePolarDegree",true);
fSourcePolarizationDegree->SetDefaultValue(1.);
fSourcePolarizationDegree->AvailableForStates(G4State_Idle);
fSourcePositionX = new G4UIcmdWithADoubleAndUnit("/Ge2SOS/gun/sourcePositionX",this);
fSourcePositionX = new G4UIcmdWithADoubleAndUnit("/PoSOS/gun/sourcePositionX",this);
fSourcePositionX->SetGuidance("Set Source x position");
fSourcePositionX->SetParameterName("fPositionX",true);
fSourcePositionX->SetDefaultValue(0.*mm);
fSourcePositionX->AvailableForStates(G4State_Idle);
fSourcePositionY = new G4UIcmdWithADoubleAndUnit("/Ge2SOS/gun/sourcePositionY",this);
fSourcePositionY = new G4UIcmdWithADoubleAndUnit("/PoSOS/gun/sourcePositionY",this);
fSourcePositionY->SetGuidance("Set Source y position");
fSourcePositionY->SetParameterName("fPositionY",true);
fSourcePositionY->SetDefaultValue(0.*mm);
fSourcePositionY->AvailableForStates(G4State_Idle);
fSourcePositionZ = new G4UIcmdWithADoubleAndUnit("/Ge2SOS/gun/sourcePositionZ",this);
fSourcePositionZ = new G4UIcmdWithADoubleAndUnit("/PoSOS/gun/sourcePositionZ",this);
fSourcePositionZ->SetGuidance("Set Source z position");
fSourcePositionZ->SetParameterName("fPositionZ",true);
fSourcePositionZ->SetDefaultValue(30.*mm);
fSourcePositionZ->AvailableForStates(G4State_Idle);
fSourceDiameter = new G4UIcmdWithADoubleAndUnit("/Ge2SOS/gun/sourceDiameter",this);
fSourceDiameter = new G4UIcmdWithADoubleAndUnit("/PoSOS/gun/sourceDiameter",this);
fSourceDiameter->SetGuidance("Set Source diameter or side");
fSourceDiameter->SetParameterName("fDiameter",true);
fSourceDiameter->SetDefaultValue(5.*mm);
......
......@@ -5,25 +5,18 @@
/process/em/pixe true
#/run/numberOfThreads 4
#/Ge2SOS/det/setOutputDirectory /nfs/tegile/work/experiences/detecteurs/manzanillas/LEAPS_INNOV/Geant4_output/
/Ge2SOS/det/setDetectorType 5
/Ge2SOS/det/setSetupName run_1
#/PoSOS/det/setOutputDirectory /nfs/tegile/work/experiences/detecteurs/manzanillas/LEAPS_INNOV/Geant4_output/
/PoSOS/det/setSetupName run_1
#select output format, options are: csv root hdf5
/Ge2SOS/det/setDataType csv
/Ge2SOS/det/setNTargetSamples 1
/Ge2SOS/det/setGeDetectorThickness 6.99 mm
/Ge2SOS/det/setGeDetectorLength 36. mm
/Ge2SOS/det/setGeDetectorWidth 36. mm
/Ge2SOS/det/setCollimatorThickness 1. mm
/Ge2SOS/det/setCollimatorMat titanium_grade1
/Ge2SOS/det/setContactThickness 300. nm
/Ge2SOS/det/setBeWindowRadius 26.0 mm
/PoSOS/det/setDataType csv
#Set the position of the collimator, a values between -37 and 37 mm (size of samples)
#Choise of source type: 0 gamma,1 Fe-55,2 Cs-137; 1 Bi-207; 2 Sr-90; 3 e-
/run/initialize
/Ge2SOS/gun/sourceType 1
/Ge2SOS/gun/sourceDiameter 0.1 mm
#/Ge2SOS/gun/sourceEnergy 60.0 keV
/PoSOS/gun/sourceType 0
/PoSOS/gun/sourceDiameter 0.1 mm
/PoSOS/gun/sourceEnergy 7.0 keV
/PoSOS/gun/sourceGammaPolarizationAngle 90
/PoSOS/gun/sourceGammaPolarizationDegree 0.9
/run/beamOn 9000000
......@@ -13,8 +13,8 @@
# viewing in a VRML viewer:
#/vis/open VRML2FILE
#
/Ge2SOS/det/setDetectorType 0
/Ge2SOS/gun/sourceType 0
/PoSOS/det/setDetectorType 0
/PoSOS/gun/sourceType 0
# Disable auto refresh and quieten vis messages whilst scene and
# trajectories are established:
/vis/viewer/set/autoRefresh false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment