Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Polarimeter Geant4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DETECTOR
Polarimeter Geant4
Commits
a9c11e2d
Commit
a9c11e2d
authored
Feb 15, 2023
by
MANZANILLAS Luis
Browse files
Options
Downloads
Patches
Plain Diff
update mac files
parent
c66efe1b
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMakeLists.txt
+1
-0
1 addition, 0 deletions
CMakeLists.txt
src/PrimaryGeneratorAction.cc
+2
-1
2 additions, 1 deletion
src/PrimaryGeneratorAction.cc
src/RunAction.cc
+4
-2
4 additions, 2 deletions
src/RunAction.cc
test.mac
+2
-0
2 additions, 0 deletions
test.mac
with
9 additions
and
3 deletions
CMakeLists.txt
+
1
−
0
View file @
a9c11e2d
...
@@ -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
}
)
...
...
This diff is collapsed.
Click to expand it.
src/PrimaryGeneratorAction.cc
+
2
−
1
View file @
a9c11e2d
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
src/RunAction.cc
+
4
−
2
View file @
a9c11e2d
...
@@ -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
->
GetGeDetector
Thickness
()))
+
"mm"
;
G4String
s_target_thickness
=
"_
DetSection
_"
+
std
::
to_string
((
int
)
round
(
fDetector
->
GetGeDetector
Width
()))
+
"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
...
...
This diff is collapsed.
Click to expand it.
test.mac
+
2
−
0
View file @
a9c11e2d
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment