Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nptool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
np
nptool
Commits
f0382fb8
Commit
f0382fb8
authored
2 months ago
by
audrey.chatillon
Browse files
Options
Downloads
Patches
Plain Diff
[Epic] Build simplification
parent
a9b32f05
No related branches found
No related tags found
1 merge request
!27
Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline
#378555
passed
2 months ago
Stage: build-NPLib
Stage: build-NPSimulation
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NPSimulation/Detectors/Epic/Epic.cc
+20
-25
20 additions, 25 deletions
NPSimulation/Detectors/Epic/Epic.cc
Projects/Epic_sim_proto/Epic.detector
+3
-3
3 additions, 3 deletions
Projects/Epic_sim_proto/Epic.detector
with
23 additions
and
28 deletions
NPSimulation/Detectors/Epic/Epic.cc
+
20
−
25
View file @
f0382fb8
...
...
@@ -136,7 +136,7 @@ void Epic::ReadConfiguration(NPL::InputParser parser){
m_InterDistance_KK
=
blocks
[
i
]
->
GetDouble
(
"InterDistance_KK"
,
"mm"
);
m_nA
=
blocks
[
i
]
->
GetInt
(
"nAnodes"
);
m_nSamplesPerA
=
blocks
[
i
]
->
GetVectorInt
(
"nSamplesPerAnode"
);
m_SampleMaterial
=
blocks
[
i
]
->
GetVectorString
(
"SampleMaterial"
,
" "
);
m_SampleMaterial
=
blocks
[
i
]
->
GetVectorString
(
"SampleMaterial
PerAnode
"
,
" "
);
m_SampleThickness
=
blocks
[
i
]
->
GetVectorDouble
(
"SampleThickness"
,
"micrometer"
);
}
else
{
...
...
@@ -329,36 +329,31 @@ G4AssemblyVolume* Epic::BuildEpic(){
// - Cathodes with the actinide deposit
// - Anodes
// - gas volumes : active gas_AK and gas_KK
double
posZ_first_cathode
=
-
1.
*
(
double
)
m_nA
*
m_Distance_AK
*
mm
-
(
double
)
std
::
trunc
(
0.5
*
m_nA
)
*
m_InterDistance_KK
*
mm
;
int
index_K
=
0
;
// Build the first cathode and the first anode
BuildCathode
(
posZ_first_cathode
);
BuildSample
(
posZ_first_cathode
+
0.5
*
m_Thickness_K
+
0.5
*
m_SampleThickness
.
at
(
index_K
),
m_SampleThickness
.
at
(
index_K
),
m_SampleMaterial
.
at
(
index_K
));
BuildAnode
(
posZ_first_cathode
+
m_Distance_AK
*
mm
);
index_K
++
;
// Build the central pairs of cathodes back to back, the anodes and the gas_KK
// definition of the gas volume located @ pair of cathodes
G4Tubs
*
gas_KK_solid
=
new
G4Tubs
(
"gas_KK"
,
0
,
37.
*
mm
,
0.5
*
m_InterDistance_KK
,
0
,
360
*
deg
);
G4LogicalVolume
*
gas_KK_vol
=
new
G4LogicalVolume
(
gas_KK_solid
,
gas_material
,
"logic_gas_KK"
,
0
,
0
,
0
);
gas_KK_vol
->
SetVisAttributes
(
m_VisGasKK
);
for
(
int
i
=
1
;
i
<
m_nA
;
i
++
){
double
posZ_current_cathode
=
posZ_first_cathode
+
(
double
)
i
*
2.
*
m_Distance_AK
*
mm
+
(
double
)(
i
-
0.5
)
*
m_InterDistance_KK
*
mm
;
BuildSample
(
posZ_current_cathode
-
0.5
*
m_InterDistance_KK
*
mm
-
0.5
*
m_Thickness_K
-
0.5
*
m_SampleThickness
.
at
(
index_K
),
m_SampleThickness
.
at
(
index_K
),
m_SampleMaterial
.
at
(
index_K
));
index_K
++
;
BuildCathode
(
posZ_current_cathode
-
0.5
*
m_InterDistance_KK
*
mm
);
Tv
.
setY
(
0
);
Tv
.
setZ
(
posZ_current_cathode
);
m_EpicVolume
->
AddPlacedVolume
(
gas_KK_vol
,
Tv
,
Rv
);
BuildCathode
(
posZ_current_cathode
+
0.5
*
m_InterDistance_KK
*
mm
);
BuildSample
(
posZ_current_cathode
+
0.5
*
m_InterDistance_KK
*
mm
+
0.5
*
m_Thickness_K
+
0.5
*
m_SampleThickness
.
at
(
index_K
),
m_SampleThickness
.
at
(
index_K
),
m_SampleMaterial
.
at
(
index_K
));
index_K
++
;
BuildAnode
(
posZ_current_cathode
+
0.5
*
m_InterDistance_KK
*
mm
+
m_Distance_AK
*
mm
);
// position along the beam axis of the first anode
double
posZ_anode
=
(
double
)(
1
-
m_nA
)
*
m_Distance_AK
-
(
double
)
std
::
trunc
(
0.5
*
m_nA
)
*
m_InterDistance_KK
;
// build the stack of cathodes / actinide samples / anodes
for
(
int
i
=
0
;
i
<
m_nA
;
i
++
){
BuildCathode
(
posZ_anode
-
m_Distance_AK
*
mm
);
BuildSample
(
posZ_anode
-
m_Distance_AK
+
0.5
*
m_Thickness_K
+
0.5
*
m_SampleThickness
.
at
(
i
),
m_SampleThickness
.
at
(
i
),
m_SampleMaterial
.
at
(
i
));
BuildAnode
(
posZ_anode
);
if
(
m_nSamplesPerA
.
at
(
i
)
==
2
)
BuildSample
(
posZ_anode
+
m_Distance_AK
-
0.5
*
m_Thickness_K
-
0.5
*
m_SampleThickness
.
at
(
i
),
m_SampleThickness
.
at
(
i
),
m_SampleMaterial
.
at
(
i
));
BuildCathode
(
posZ_anode
+
m_Distance_AK
*
mm
);
if
(
i
<
m_nA
-
1
)
{
Tv
.
setY
(
0
);
Tv
.
setZ
(
posZ_anode
+
m_Distance_AK
+
0.5
*
m_InterDistance_KK
);
m_EpicVolume
->
AddPlacedVolume
(
gas_KK_vol
,
Tv
,
Rv
);
}
posZ_anode
+=
2.
*
m_Distance_AK
*
mm
+
m_InterDistance_KK
*
mm
;
}
// Build the last cathode
BuildSample
(
posZ_first_cathode
+
(
double
)
m_nA
*
2.
*
m_Distance_AK
*
mm
+
(
double
)(
m_nA
-
1
)
*
m_InterDistance_KK
*
mm
-
0.5
*
m_Thickness_K
-
0.5
*
m_SampleThickness
.
at
(
index_K
),
m_SampleThickness
.
at
(
index_K
),
m_SampleMaterial
.
at
(
index_K
));
BuildCathode
(
posZ_first_cathode
+
(
double
)
m_nA
*
2.
*
m_Distance_AK
*
mm
+
(
double
)(
m_nA
-
1
)
*
m_InterDistance_KK
*
mm
);
// --- UNACTIVE GAS VOLUME TO DO ?
...
...
This diff is collapsed.
Click to expand it.
Projects/Epic_sim_proto/Epic.detector
+
3
−
3
View file @
f0382fb8
...
...
@@ -7,6 +7,6 @@ Epic
Distance_AK= 2.5 mm
InterDistance_KK= 0.8 mm
Thickness_K= 12 micrometer
nSamplesPerAnode=
2 2 2 2
2
SampleMaterial
= 238U
238U 235U 23
5U 238U 238U 235U 235U 238
U 238U
SampleThickness=
10. 10. 10. 10.
10. 10. 10. 10. 10.
10.
micrometer
nSamplesPerAnode=
2 2 2 2
2
SampleMaterial
PerAnode=
238U 235U 23
8U 235
U 238U
SampleThickness=
10. 10. 10. 10. 10. micrometer
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