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
61e9cbcd
Commit
61e9cbcd
authored
1 month ago
by
emile cantacuzene
Browse files
Options
Downloads
Patches
Plain Diff
Changed plastic_BEDO orientation
parent
9024f778
No related branches found
Branches containing commit
No related tags found
1 merge request
!27
Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline
#383586
passed
1 month 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/Plastic_BEDO/Plastic_BEDO.cc
+9
-6
9 additions, 6 deletions
NPSimulation/Detectors/Plastic_BEDO/Plastic_BEDO.cc
Projects/Monster/Monster.detector
+11
-11
11 additions, 11 deletions
Projects/Monster/Monster.detector
with
20 additions
and
17 deletions
NPSimulation/Detectors/Plastic_BEDO/Plastic_BEDO.cc
+
9
−
6
View file @
61e9cbcd
...
@@ -78,8 +78,8 @@ Plastic_BEDO::Plastic_BEDO(){
...
@@ -78,8 +78,8 @@ Plastic_BEDO::Plastic_BEDO(){
// RGB Color + Transparency
// RGB Color + Transparency
m_VisSquare
=
new
G4VisAttributes
(
G4Colour
(
0
,
1
,
0
,
0.5
));
m_VisSquare
=
new
G4VisAttributes
(
G4Colour
(
0
,
1
,
0
,
1
));
m_VisCylinder
=
new
G4VisAttributes
(
G4Colour
(
0
,
0
,
1
,
0.5
));
m_VisCylinder
=
new
G4VisAttributes
(
G4Colour
(
0
,
0
,
1
,
1
));
}
}
...
@@ -105,7 +105,7 @@ void Plastic_BEDO::AddDetector(double R, double Theta, double Phi){
...
@@ -105,7 +105,7 @@ void Plastic_BEDO::AddDetector(double R, double Theta, double Phi){
G4LogicalVolume
*
Plastic_BEDO
::
BuildCylindricalDetector
(){
G4LogicalVolume
*
Plastic_BEDO
::
BuildCylindricalDetector
(){
if
(
!
m_CylindricalDetector
){
if
(
!
m_CylindricalDetector
){
G4ThreeVector
zTrans
(
0.
,
0.
,
3.
*
mm
);
G4ThreeVector
zTrans
(
0.
,
0.
,
-
3.
*
mm
);
G4Tubs
*
tubOut
=
new
G4Tubs
(
"Plastic_BEDO"
,
0
,
Plastic_BEDO_NS
::
Radius
,
Plastic_BEDO_NS
::
Length
*
0.5
,
0
,
360
*
deg
);
G4Tubs
*
tubOut
=
new
G4Tubs
(
"Plastic_BEDO"
,
0
,
Plastic_BEDO_NS
::
Radius
,
Plastic_BEDO_NS
::
Length
*
0.5
,
0
,
360
*
deg
);
G4Tubs
*
tubIn
=
new
G4Tubs
(
"Plastic_BEDO"
,
0
,
Plastic_BEDO_NS
::
Radius
-
Plastic_BEDO_NS
::
Thickness
,
Plastic_BEDO_NS
::
Length
*
0.5
,
0
,
360
*
deg
);
G4Tubs
*
tubIn
=
new
G4Tubs
(
"Plastic_BEDO"
,
0
,
Plastic_BEDO_NS
::
Radius
-
Plastic_BEDO_NS
::
Thickness
,
Plastic_BEDO_NS
::
Length
*
0.5
,
0
,
360
*
deg
);
...
@@ -165,12 +165,14 @@ void Plastic_BEDO::ReadConfiguration(NPL::InputParser parser){
...
@@ -165,12 +165,14 @@ void Plastic_BEDO::ReadConfiguration(NPL::InputParser parser){
// Construct detector and inialise sensitive part.
// Construct detector and inialise sensitive part.
// Called After DetecorConstruction::AddDetector Method
// Called After DetecorConstruction::AddDetector Method
void
Plastic_BEDO
::
ConstructDetector
(
G4LogicalVolume
*
world
){
void
Plastic_BEDO
::
ConstructDetector
(
G4LogicalVolume
*
world
){
for
(
unsigned
short
i
=
0
;
i
<
m_R
.
size
()
;
i
++
)
{
for
(
unsigned
short
i
=
0
;
i
<
m_R
.
size
()
;
i
++
)
{
G4double
wX
=
m_R
[
i
]
*
sin
(
m_Theta
[
i
]
)
*
cos
(
m_Phi
[
i
]
)
;
G4double
wX
=
m_R
[
i
]
*
sin
(
m_Theta
[
i
]
)
*
cos
(
m_Phi
[
i
]
)
;
G4double
wY
=
m_R
[
i
]
*
sin
(
m_Theta
[
i
]
)
*
sin
(
m_Phi
[
i
]
)
;
G4double
wY
=
m_R
[
i
]
*
sin
(
m_Theta
[
i
]
)
*
sin
(
m_Phi
[
i
]
)
;
G4double
wZ
=
m_R
[
i
]
*
cos
(
m_Theta
[
i
]
)
;
G4double
wZ
=
m_R
[
i
]
*
cos
(
m_Theta
[
i
]
)
;
G4ThreeVector
Det_pos
=
G4ThreeVector
(
wX
,
wY
,
wZ
)
;
G4ThreeVector
Det_pos
=
G4ThreeVector
(
wX
,
wY
,
wZ
)
;
// So the face of the detector is at R instead of the middle
// So the face of the detector is at R instead of the middle
Det_pos
+=
Det_pos
.
unit
()
*
Plastic_BEDO_NS
::
Thickness
*
0.5
;
Det_pos
+=
Det_pos
.
unit
()
*
Plastic_BEDO_NS
::
Thickness
*
0.5
;
// Building Detector reference frame
// Building Detector reference frame
...
@@ -178,14 +180,15 @@ void Plastic_BEDO::ConstructDetector(G4LogicalVolume* world){
...
@@ -178,14 +180,15 @@ void Plastic_BEDO::ConstructDetector(G4LogicalVolume* world){
G4double
jj
=
cos
(
m_Theta
[
i
])
*
sin
(
m_Phi
[
i
]);
G4double
jj
=
cos
(
m_Theta
[
i
])
*
sin
(
m_Phi
[
i
]);
G4double
kk
=
-
sin
(
m_Theta
[
i
]);
G4double
kk
=
-
sin
(
m_Theta
[
i
]);
G4ThreeVector
Y
(
ii
,
jj
,
kk
);
G4ThreeVector
Y
(
ii
,
jj
,
kk
);
G4ThreeVector
w
=
Det_pos
.
unit
();
G4ThreeVector
w
=
Det_pos
.
unit
();
G4ThreeVector
u
=
w
.
cross
(
Y
);
G4ThreeVector
u
=
w
.
cross
(
Y
);
G4ThreeVector
v
=
w
.
cross
(
u
);
G4ThreeVector
v
=
w
.
cross
(
u
);
v
=
v
.
unit
();
v
=
v
.
unit
();
u
=
u
.
unit
();
u
=
u
.
unit
();
G4RotationMatrix
*
Rot
=
new
G4RotationMatrix
(
u
,
v
,
w
);
G4RotationMatrix
*
Rot
=
new
G4RotationMatrix
(
u
,
v
,
w
);
new
G4PVPlacement
(
G4Transform3D
(
*
Rot
,
Det_pos
),
new
G4PVPlacement
(
G4Transform3D
(
*
Rot
,
Det_pos
),
BuildCylindricalDetector
(),
BuildCylindricalDetector
(),
"Plastic_BEDO"
,
world
,
false
,
i
+
1
);
"Plastic_BEDO"
,
world
,
false
,
i
+
1
);
...
...
This diff is collapsed.
Click to expand it.
Projects/Monster/Monster.detector
+
11
−
11
View file @
61e9cbcd
...
@@ -14,21 +14,21 @@ Monster
...
@@ -14,21 +14,21 @@ Monster
Shape= Cylindrical
Shape= Cylindrical
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Plastic_BEDO
Plastic_BEDO
R=0
R=0
.0001 cm
THETA=
0
THETA=
-45
PHI=0
PHI=0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Coaxial_Germanium
Coaxial_Germanium
R =
10
cm
R =
5
cm
THETA =
90
deg
THETA =
-135
deg
PHI = 0
PHI = 0
deg
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Coaxial_Germanium
Coaxial_Germanium
R =
10
cm
R =
5
cm
THETA =
90
deg
THETA =
45
deg
PHI =
18
0 deg
PHI = 0 deg
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Coaxial_Germanium
Coaxial_Germanium
R =
10
cm
R =
5
cm
THETA = 90 deg
THETA = 90 deg
PHI = 270 deg
PHI = 270 deg
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