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

update mac files

parent c66efe1b
No related branches found
No related tags found
No related merge requests found
...@@ -44,6 +44,7 @@ target_link_libraries(PoSOS ${Geant4_LIBRARIES} ) ...@@ -44,6 +44,7 @@ target_link_libraries(PoSOS ${Geant4_LIBRARIES} )
set(PoSOS_SCRIPTS set(PoSOS_SCRIPTS
vis.mac vis.mac
gui.mac gui.mac
test.mac
) )
foreach(_script ${PoSOS_SCRIPTS}) foreach(_script ${PoSOS_SCRIPTS})
......
...@@ -33,6 +33,7 @@ PrimaryGeneratorAction::PrimaryGeneratorAction(DetectorConstruction* det) ...@@ -33,6 +33,7 @@ PrimaryGeneratorAction::PrimaryGeneratorAction(DetectorConstruction* det)
fDiameter = 0.1*mm; fDiameter = 0.1*mm;
fSourceType = 0; fSourceType = 0;
fSourceDirectionType = 0; fSourceDirectionType = 0;
fSourceGeometry = 0;
fSourceEnergy = 10*keV; fSourceEnergy = 10*keV;
fTheta_polar = 0; //in degrees, so the default is horizontal polarization fTheta_polar = 0; //in degrees, so the default is horizontal polarization
fPolarization_degree = 0.95; // values from 0 to 1, so the default is 95% polarization fPolarization_degree = 0.95; // values from 0 to 1, so the default is 95% polarization
...@@ -234,7 +235,7 @@ void PrimaryGeneratorAction::SetSourceDirectionType(G4int newType) ...@@ -234,7 +235,7 @@ void PrimaryGeneratorAction::SetSourceDirectionType(G4int newType)
} }
void PrimaryGeneratorAction::SetSourceGeometry(G4int newType) void PrimaryGeneratorAction::SetSourceGeometry(G4int newType)
{ {
if (newType <= 2 && newType >= 0){ if (newType <= 1 && newType >= 0){
fSourceGeometry = newType;} fSourceGeometry = newType;}
else{ else{
G4cerr<<"Possible values are 0 for square and 1 for circunference"<<G4endl; G4cerr<<"Possible values are 0 for square and 1 for circunference"<<G4endl;
......
...@@ -86,7 +86,8 @@ void RunAction::BeginOfRunAction(const G4Run* aRun) ...@@ -86,7 +86,8 @@ void RunAction::BeginOfRunAction(const G4Run* aRun)
G4cout << sourceString << G4endl; G4cout << sourceString << G4endl;
//G4String positionZ = G4BestUnit((fDetector->GetGeDetectorThickness()-fPrimary->GetSourcePositionZ()),"Length"); //G4String positionZ = G4BestUnit((fDetector->GetGeDetectorThickness()-fPrimary->GetSourcePositionZ()),"Length");
G4String positionX ="_x_source_"+std::to_string((int)fPrimary->GetSourcePositionX())+"mm"; G4String positionX ="_x_"+std::to_string((int)(1000 * fPrimary->GetSourcePositionX()))+"um";
G4String positionY ="_y_"+std::to_string((int)(1000 *fPrimary->GetSourcePositionX()))+"um";
G4String sourceEnergy =std::to_string((int)(1000. * fPrimary->GetSourceEnergy()))+"_keV"; G4String sourceEnergy =std::to_string((int)(1000. * fPrimary->GetSourceEnergy()))+"_keV";
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl; G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
...@@ -97,7 +98,7 @@ void RunAction::BeginOfRunAction(const G4Run* aRun) ...@@ -97,7 +98,7 @@ void RunAction::BeginOfRunAction(const G4Run* aRun)
//Thickness //Thickness
//std::stringstream stream_thickness; //std::stringstream stream_thickness;
//stream_thickness << std::fixed << std::setprecision(2) <<fDetector->GetGeDetectorThickness(); //stream_thickness << std::fixed << std::setprecision(2) <<fDetector->GetGeDetectorThickness();
G4String s_target_thickness ="_GeThickness_"+std::to_string((int)round(fDetector->GetGeDetectorThickness()))+"mm"; G4String s_target_thickness ="_DetSection_"+std::to_string((int)round(fDetector->GetGeDetectorWidth()))+"mm";
G4String s_collimator_material =fDetector->GetCollimatorMaterial()->GetName(); G4String s_collimator_material =fDetector->GetCollimatorMaterial()->GetName();
G4String s_collimatorThickness = "_collimator_"+s_collimator_material+"_"+std::to_string((int)fDetector->GetCollimatorThickness())+"mm"; G4String s_collimatorThickness = "_collimator_"+s_collimator_material+"_"+std::to_string((int)fDetector->GetCollimatorThickness())+"mm";
G4String s_setup_type = "_setup_"+std::to_string((int)fDetector->GetDetectorType()); G4String s_setup_type = "_setup_"+std::to_string((int)fDetector->GetDetectorType());
...@@ -108,6 +109,7 @@ void RunAction::BeginOfRunAction(const G4Run* aRun) ...@@ -108,6 +109,7 @@ void RunAction::BeginOfRunAction(const G4Run* aRun)
G4String directorName = fDetector->GetDetectorOutputDataDirectory()+"/"+sourceString+"_"+sourceEnergy G4String directorName = fDetector->GetDetectorOutputDataDirectory()+"/"+sourceString+"_"+sourceEnergy
//+datetime() //+datetime()
+positionX +positionX
+positionY
+s_target_thickness +s_target_thickness
+s_setup_type +s_setup_type
+s_collimatorThickness +s_collimatorThickness
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
/run/initialize /run/initialize
/PoSOS/gun/sourceType 0 /PoSOS/gun/sourceType 0
/PoSOS/gun/sourcePositionX 0.5 mm
/PoSOS/gun/sourcePositionY 1.0 mm
/PoSOS/gun/sourceDiameter 0.1 mm /PoSOS/gun/sourceDiameter 0.1 mm
/PoSOS/gun/sourceEnergy 7.0 keV /PoSOS/gun/sourceEnergy 7.0 keV
/PoSOS/gun/sourceGammaPolarizationAngle 90 /PoSOS/gun/sourceGammaPolarizationAngle 90
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment