Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Reference Detector
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
EIC
detectors
Reference Detector
Commits
381a1e0f
Commit
381a1e0f
authored
Mar 26, 2021
by
Jihee Kim
Browse files
Options
Downloads
Patches
Plain Diff
Created global volume for detector and Added VisAttributes
parent
a05da0b5
No related branches found
No related tags found
1 merge request
!11
Resolve "Implement ffi_ZDC"
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
compact/display.xml
+1
-0
1 addition, 0 deletions
compact/display.xml
src/ffi_ZDC.cpp
+8
-1
8 additions, 1 deletion
src/ffi_ZDC.cpp
with
9 additions
and
1 deletion
compact/display.xml
+
1
−
0
View file @
381a1e0f
...
...
@@ -49,6 +49,7 @@
<vis
name=
"BeamPipeVis"
alpha=
"1"
r=
"0.75"
g=
"0.75"
b=
"0.75"
showDaughters=
"true"
visible=
"true"
/>
<vis
name=
"cb_SolenoidVis"
alpha=
"0.4"
r=
"0.1"
g=
"0.0"
b=
"0.1"
showDaughters=
"true"
visible=
"true"
/>
<vis
name=
"ffi_ZDCVis"
alpha=
"0.1"
r=
"0.1"
g=
"0.0"
b=
"1.0"
showDaughters=
"true"
visible=
"true"
/>
<comment>
Deprecated colors.
...
...
This diff is collapsed.
Click to expand it.
src/ffi_ZDC.cpp
+
8
−
1
View file @
381a1e0f
...
...
@@ -25,12 +25,19 @@ static Ref_t createDetector(Detector& desc, xml_h e, SensitiveDetector sens)
double
y_rot
=
dd4hep
::
getAttrOrDefault
(
rot
,
_Unicode
(
y
),
0.0
);
double
z_rot
=
dd4hep
::
getAttrOrDefault
(
rot
,
_Unicode
(
z
),
0.0
);
Material
Vacuum
=
desc
.
material
(
"Vacuum"
);
std
::
cout
<<
"positions: "
<<
x_pos
<<
" , "
<<
z_pos
<<
std
::
endl
;
// Create Global Volume
Box
ffi_ZDC_GVol_Solid
(
Width
*
0.5
,
Width
*
0.5
,
Thickness
*
0.5
);
Volume
detVol
(
"ffi_ZDC_GVol_Logic"
,
ffi_ZDC_GVol_Solid
,
Vacuum
);
detVol
.
setVisAttributes
(
desc
.
visAttributes
(
x_det
.
visStr
()));
DetElement
det
(
detName
,
detID
);
Volume
motherVol
=
desc
.
pickMotherVolume
(
det
);
Transform3D
tr
(
RotationZYX
(
0.
,
0.
,
0.
),
Position
(
0.
,
0.
,
0.
));
Transform3D
tr
(
RotationZYX
(
z_rot
,
y_rot
,
x_rot
),
Position
(
x_pos
,
0.
,
z_pos
));
PlacedVolume
detPV
=
motherVol
.
placeVolume
(
detVol
,
tr
);
det
.
setPlacement
(
detPV
);
return
det
;
...
...
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