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
Merge requests
!12
Resolve "Implement ci_GEM"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Implement ci_GEM"
20-implement-ci_gem
into
master
Overview
1
Commits
1
Pipelines
7
Changes
2
Merged
Marshall Scott
requested to merge
20-implement-ci_gem
into
master
4 years ago
Overview
1
Commits
1
Pipelines
7
Changes
2
Expand
Closes
#20 (closed)
Edited
4 years ago
by
Whitney Armstrong
0
0
Merge request reports
Viewing commit
6fb452b5
Show latest version
2 files
+
142
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
6fb452b5
First HCAL run with hardcoded .cpp values
· 6fb452b5
Marshall Scott
authored
4 years ago
src/ci_HCAL.cpp
0 → 100644
+
68
−
0
Options
#include
<XML/Helper.h>
///////////////////////////
// Central Ion GEM
///////////////////////////
using
namespace
dd4hep
;
static
Ref_t
createDetector
(
Detector
&
desc
,
xml_h
handle
,
SensitiveDetector
sens
)
{
xml
::
DetElement
detElem
=
handle
;
std
::
string
detName
=
"ci_HCAL"
;
int
detID
=
1
;
//xml::Component dims = detElem.dimensions();
//Envelope volume specs
double
RIn
=
0.
*
dd4hep
::
cm
;
double
ROut
=
300.
*
dd4hep
::
cm
;
double
SizeZ
=
160.
*
dd4hep
::
cm
;
double
ShiftZ
=
5.
*
dd4hep
::
cm
;
double
PosZ
=
0.
*
dd4hep
::
cm
;
double
det_RIn
=
80.
*
dd4hep
::
cm
;
Material
mat_iron
=
desc
.
material
(
"Iron"
);
Material
mat_air
=
desc
.
material
(
"Air"
);
Material
mat_vac
=
desc
.
material
(
"Vacuum"
)
Tube
ci_Hcal_Solid
(
RIn
,
ROut
,
SizeZ
/
2.
,
0.
,
360
*
deg
);
Volume
envelopeVol
(
"ci_Hcal_Logic"
,
ci_Hcal_Solid
,
mat_vac
);
//check that this one is iron
envelopeVol
.
setVisAttributes
(
0.3
,
0
,
3.0
,
0.1
);
//Layer Specs
double
det_ROut
=
ROut
-
1.
*
dd4hep
::
cm
;
double
det_ThicknessZ
=
2.
*
dd4hep
::
cm
;
double
det_GapZ
=
2.
*
dd4hep
::
cm
;
double
Nlay
=
20
;
Tube
ci_Hcal_detSolid
(
RIn
,
det_ROut
,
det_ThicknessZ
/
2.
,
0.
,
360
*
deg
);
//Volume detVol("ci_Hcal_det_Logic", ci_Hcal_detSolid, mat_iron);//extraneous
//detVol.setVisAttributes(0.6, 0, 0.6, 1);
//Adding layers to placed detector volume
for
(
int
lNum
=
0
;
lNum
<
Nlay
;
lNum
++
){
//xml_comp_t x_layer = c;
string
layer_name
=
detName
+
_toString
(
lNum
,
"_layer%d"
);
double
layer_Posz
=
-
SizeZ
/
2.
+
(
lNum
+
1
)
*
det_ThicknessZ
+
(
lNum
+
1
)
*
5.
*
ddphep
::
cm
;
Volume
layer_vol
(
layer_name
,
ci_Hcal_detSolid
,
mat_iron
);
Position
layer_pos
(
0
,
0
,
layer_Posz
);
//DetElement layer(envelope_det, layer_name, detID);
//layer.setVisAttributes(desc.visAttributes(det.visStr()));
//layer.setAttributes(desc, layer_vol, desc.region(), desc.limits(), );//(region, limits, visable).
PlacedVolume
layer_phv
=
envelopeVol
.
placeVolume
(
layer_vol
,
layer_pos
);
layer_phv
.
addPhysVolID
(
"layer"
,
layerNum
);
}
DetElement
det
(
detName
,
detID
);
Volume
motherVol
=
desc
.
pickMotherVolume
(
det
);
PlacedVolume
detPV
=
motherVol
.
placeVolume
(
envelopeVol
,
RotationZYX
(
0
,
0
,
0
));
det
.
setPlacement
(
detPV
);
return
det
;
}
// clang-format off
DECLARE_DETELEMENT
(
ci_GEM
,
createDetector
)
Loading