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
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
a05da0b5
Commit
a05da0b5
authored
4 years ago
by
Jihee Kim
Browse files
Options
Downloads
Patches
Plain Diff
Created ZDC source file and added read in parameters
parent
46e91b78
Branches
Branches containing commit
No related tags found
1 merge request
!11
Resolve "Implement ffi_ZDC"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/ffi_ZDC.cpp
+39
-0
39 additions, 0 deletions
src/ffi_ZDC.cpp
with
39 additions
and
0 deletions
src/ffi_ZDC.cpp
0 → 100644
+
39
−
0
View file @
a05da0b5
#include
<XML/Helper.h>
///////////////////////////////////////////
// Far Forward Ion Zero Degree Calorimeter
///////////////////////////////////////////
using
namespace
std
;
using
namespace
dd4hep
;
static
Ref_t
createDetector
(
Detector
&
desc
,
xml_h
e
,
SensitiveDetector
sens
)
{
xml_det_t
x_det
=
e
;
string
detName
=
x_det
.
nameStr
();
int
detID
=
x_det
.
id
();
xml_dim_t
dim
=
x_det
.
dimensions
();
double
Width
=
dim
.
x
();
double
Thickness
=
dim
.
z
();
xml_dim_t
pos
=
x_det
.
position
();
double
x_pos
=
dd4hep
::
getAttrOrDefault
(
pos
,
_Unicode
(
x
),
0.0
);
double
z_pos
=
dd4hep
::
getAttrOrDefault
(
pos
,
_Unicode
(
z
),
0.0
);
xml_dim_t
rot
=
x_det
.
rotation
();
double
x_rot
=
dd4hep
::
getAttrOrDefault
(
rot
,
_Unicode
(
x
),
0.0
);
double
y_rot
=
dd4hep
::
getAttrOrDefault
(
rot
,
_Unicode
(
y
),
0.0
);
double
z_rot
=
dd4hep
::
getAttrOrDefault
(
rot
,
_Unicode
(
z
),
0.0
);
DetElement
det
(
detName
,
detID
);
Volume
motherVol
=
desc
.
pickMotherVolume
(
det
);
Transform3D
tr
(
RotationZYX
(
0.
,
0.
,
0.
),
Position
(
0.
,
0.
,
0.
));
PlacedVolume
detPV
=
motherVol
.
placeVolume
(
detVol
,
tr
);
det
.
setPlacement
(
detPV
);
return
det
;
}
DECLARE_DETELEMENT
(
ffi_ZDC
,
createDetector
)
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