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
98391417
Commit
98391417
authored
4 years ago
by
Marshall Scott
Browse files
Options
Downloads
Patches
Plain Diff
First draft fi_B0_EMCAL
parent
289dab64
Branches
Branches containing commit
No related tags found
1 merge request
!44
Draft: Resolve "Implement fi_B0_EMCAL"
Pipeline
#8192
failed
4 years ago
Stage: config
Stage: build
Stage: docs
Stage: test
Stage: finalize
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
compact/definitions.xml
+19
-0
19 additions, 0 deletions
compact/definitions.xml
compact/display.xml
+2
-0
2 additions, 0 deletions
compact/display.xml
compact/fi_B0_EMCAL.xml
+46
-0
46 additions, 0 deletions
compact/fi_B0_EMCAL.xml
src/fi_B0_EMCAL.cpp
+92
-0
92 additions, 0 deletions
src/fi_B0_EMCAL.cpp
with
159 additions
and
0 deletions
compact/definitions.xml
+
19
−
0
View file @
98391417
...
...
@@ -653,5 +653,24 @@
<constant
name=
"ci_GEM_posx"
value=
"0 * cm"
/>
<constant
name=
"ci_GEM_nlayers"
value=
"8"
/>
<comment>
--------------------------
Forward Ion B0 EMCAL
--------------------------
will move later
</comment>
<constant
name=
"fi_B0_EMCAL_ID"
value=
"500"
/>
<constant
name=
"fi_B0_EMCAL_y_length"
value=
"4 * cm"
/>
<constant
name=
"fi_B0_EMCAL_x_length"
value=
"4 * cm"
/>
<constant
name=
"fi_B0_EMCAL_sizez"
value=
"40 * cm"
/>
<constant
name=
"fi_B0_EMCAL_rmin"
value=
"7 * cm"
/>
<constant
name=
"fi_B0_EMCAL_rmax"
value=
"10 * cm"
/>
<constant
name=
"fi_B0_EMCAL_z"
value=
"0 * cm"
/>
<constant
name=
"fi_B0_EMCAL_Gap"
value=
"0.01 * mm"
/>
<constant
name=
"fi_B0_EMCAL_x_Shift"
value=
"-35 * cm"
/>
<constant
name=
"fi_B0_EMCAL_angle"
value=
"0.05"
/><comment>
not used in .h file
</comment>
</define>
This diff is collapsed.
Click to expand it.
compact/display.xml
+
2
−
0
View file @
98391417
...
...
@@ -59,6 +59,8 @@
<vis
name=
"ci_GEMVis"
r=
"0.8"
g=
"0.4"
b=
"0.3"
alpha=
"0.8"
showDaughters=
"true"
visible=
"true"
/>
<vis
name=
"ci_HCALVis"
r=
"0.6"
g=
"0"
b=
"0.6"
alpha=
"1.0"
showDaughters=
"true"
visible=
"true"
/>
<vis
name=
"fi_B0_EMCALVis"
r=
"0.1"
g=
"1.0"
b=
"0.9"
alpha=
"1.0"
showDaughters=
"true"
visible=
"true"
/>
<comment>
Deprecated colors.
</comment>
...
...
This diff is collapsed.
Click to expand it.
compact/fi_B0_EMCAL.xml
0 → 100644
+
46
−
0
View file @
98391417
<lccdd
xmlns:compact=
"http://www.lcsim.org/schemas/compact/1.0"
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
xs:noNamespaceSchemaLocation=
"http://www.lcsim.org/schemas/compact/1.0/compact.xsd"
>
<!-- Some information about detector-->
<info
name=
"Forward Ion B0 EMCAL"
title=
"Forward Ion B0 EMCAL"
author=
"Marshall Scott"
url=
"https://eicweb.phy.anl.gov/EIC/detectors/reference_detector.git"
status=
"development"
version=
"v1 2021-04-14"
>
<comment>
Forward Ion B0 EMCAL
</comment>
</info>
<includes>
</includes>
<limits>
</limits>
<regions>
</regions>
<display>
</display>
<!-- Define detector -->
<detectors>
<comment>
Forward Ion B0 EMCAL
</comment>
<detector
id=
"fi_B0_EMCAL_ID"
name=
"fi_B0_EMCAL"
type=
"fi_B0_EMCAL"
insideTrackingVolume=
"false"
vis=
"fi_B0_EMCALVis"
readout=
"fi_B0_EMCAL_Hits"
>
<material
name=
"PbWO4"
/>
<dimensions
length=
"fi_B0_EMCAL_y_length"
width=
"fi_B0_EMCAL_x_length"
z_length=
"fi_B0_EMCAL_sizez"
x_offset=
"fi_B0_EMCAL_x_Shift"
rmin=
"fi_B0_EMCAL_rmin"
rmax=
"fi_B0_EMCAL_rmax"
z=
"fi_B0_EMCAL_z"
gap=
"fi_B0_EMCAL_Gap"
angle=
"fi_B0_EMCAL_angle"
/>
</detector>
</detectors>
<readouts>
<readout
name=
"fi_B0_EMCAL_Hits"
>
<segmentation
type=
"CartesianGridXY"
grid_size_x=
"1.0*mm"
grid_size_y=
"1.0*mm"
/>
<id>
system:8,layer:8,x:32:-16,y:-16
</id>
</readout>
</readouts>
<plugins>
</plugins>
</lccdd>
This diff is collapsed.
Click to expand it.
src/fi_B0_EMCAL.cpp
0 → 100644
+
92
−
0
View file @
98391417
#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
=
detElem
.
nameStr
();
int
detID
=
detElem
.
id
();
xml
::
Component
dims
=
detElem
.
dimensions
();
double
RIn
=
dims
.
rmin
();
double
ROut
=
dims
.
rmax
();
double
SizeZ
=
dims
.
z_length
();
double
X_Shift
=
dims
.
x_offset
();
double
X_length
=
dims
.
width
();
double
Y_length
=
dims
.
length
();
double
Z
=
dims
.
z
();
double
Angle
=
dims
.
angle
();
double
Gap
=
dims
.
gap
();
Material
pbw04
=
desc
.
material
(
"PbWO4"
);
Material
vacuum
=
desc
.
material
(
"Vacuum"
);
//Outer volume
Box
fi_B0_EMCAL_Solid
(
X_length
/
2.
,
Y_length
/
2.
,
SizeZ
/
2.
);
Volume
envelopeVol
(
"fi_B0_EMCAL_Logic"
,
fi_B0_EMCAL_Solid
,
pbw04
);
envelopeVol
.
setVisAttributes
(
desc
.
visAttributes
(
detElem
.
visStr
()));
// Crystals
double
y_C
=
0
*
dd4hep
::
cm
;
double
x_C
=
0
*
dd4hep
::
cm
;
int
k
=
-
1
;
char
*
abname
;
for
(
int
j
=
0
;
j
<
50
;
j
++
)
{
y_C
-=
Y_length
+
Gap
;
x_C
=
(
X_length
+
Gap
)
*
0.5
;
sens
.
setType
(
"calorimeter"
);
for
(
int
i
=
0
;
i
<
50
;
i
++
)
{
double
R
=
sqrt
(
x_C
*
x_C
+
y_C
*
y_C
);
if
(
R
<
ROut
-
X_length
+
Gap
&&
R
>
RIn
)
{
k
++
;
std
::
sprintf
(
abname
,
"fi_B0_EMCAL_%d"
,
k
);
Volume
crystalVol1
(
abname
,
fi_B0_EMCAL_Solid
,
pbw04
);
crystalVol1
.
setSensitiveDetector
(
sens
);
Transform3D
tr1
(
RotationZYX
(
0
,
0
,
0
),
Position
(
x_C
+
X_Shift
,
y_C
,
Z
));
PlacedVolume
cry1
=
envelopeVol
.
placeVolume
(
crystalVol1
,
tr1
);
cry1
.
addPhysVolID
(
"crystal"
,
k
);
k
++
;
std
::
sprintf
(
abname
,
"fi_B0_EMCAL_%d"
,
k
);
Volume
crystalVol2
(
abname
,
fi_B0_EMCAL_Solid
,
pbw04
);
crystalVol2
.
setSensitiveDetector
(
sens
);
Transform3D
tr2
(
RotationZYX
(
0
,
0
,
0
),
Position
(
-
x_C
+
X_Shift
,
y_C
,
Z
));
PlacedVolume
cry2
=
envelopeVol
.
placeVolume
(
crystalVol2
,
tr2
);
cry2
.
addPhysVolID
(
"crystal"
,
k
);
k
++
;
std
::
sprintf
(
abname
,
"fi_B0_EMCAL_%d"
,
k
);
Volume
crystalVol3
(
abname
,
fi_B0_EMCAL_Solid
,
pbw04
);
crystalVol3
.
setSensitiveDetector
(
sens
);
Transform3D
tr3
(
RotationZYX
(
0
,
0
,
0
),
Position
(
x_C
+
X_Shift
,
-
y_C
,
Z
));
PlacedVolume
cry3
=
envelopeVol
.
placeVolume
(
crystalVol3
,
tr3
);
cry3
.
addPhysVolID
(
"crystal"
,
k
);
k
++
;
std
::
sprintf
(
abname
,
"fi_B0_EMCAL_%d"
,
k
);
Volume
crystalVol4
(
abname
,
fi_B0_EMCAL_Solid
,
pbw04
);
crystalVol4
.
setSensitiveDetector
(
sens
);
Transform3D
tr4
(
RotationZYX
(
0
,
0
,
0
),
Position
(
-
x_C
+
X_Shift
,
-
y_C
,
Z
));
PlacedVolume
cry4
=
envelopeVol
.
placeVolume
(
crystalVol4
,
tr4
);
cry4
.
addPhysVolID
(
"crystal"
,
k
);
}
x_C
+=
X_length
+
Gap
;
}
}
DetElement
det
(
detName
,
detID
);
Volume
motherVol
=
desc
.
pickMotherVolume
(
det
);
Transform3D
tr
(
RotationZYX
(
0
,
0
,
0
),
Position
(
0
,
0
,
0
));
PlacedVolume
detPV
=
motherVol
.
placeVolume
(
envelopeVol
,
tr
);
detPV
.
addPhysVolID
(
"system"
,
detID
);
det
.
setPlacement
(
detPV
);
return
det
;
}
// clang-format off
DECLARE_DETELEMENT
(
fi_B0_EMCAL
,
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