Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
EIC
tutorials
eic_tutorial
Commits
069fa36e
Commit
069fa36e
authored
May 21, 2021
by
Sylvester Joosten
Browse files
Edited/tested part1
parent
bd33aaad
Pipeline
#10147
passed with stage
in 1 minute and 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/docs/part1/simple_detector.md
View file @
069fa36e
...
...
@@ -15,7 +15,13 @@ title: "Simple Detector Demo"
## Setup
Note all these commands assume you are in an
`eic-shell`
singularity session.
*
Note: this tutorial component assume you are in an
`eic-shell`
singularity session, and that you
load the pre-compiled detector plugins from the container with
*
```
bash
source
/opt/detector/setup.sh
```
First start by cloning part 1 of the tutorial.
```
bash
git clone https://eicweb.phy.anl.gov/EIC/tutorials/ip6_tutorial_1.git part1
...
...
@@ -37,9 +43,8 @@ directories named compact (but not always).
### Compile the detector library
```
bash
mkdir
build
cmake ../.
-DCMAKE_INSTALL_PREFIX
=
../../local
make
-j4
install
cmake
-B
build
-DCMAKE_INSTALL_PREFIX
=
../local/
-S
.
-DCMAKE_CXX_STANDARD
=
17
cmake
--build
build
-j4
--
install
```
## Visualize and Check Geometry
...
...
@@ -167,7 +172,7 @@ detector.fromCompact("gem_tracker.xml");
dd4hep
::
rec
::
CellIDPositionConverter
cellid_converter
(
detector
);
```
This
This
accomplishes the following:
-
gets the main
[
DD4hep Detector
](
https://dd4hep.web.cern.ch/dd4hep/reference/classdd4hep_1_1Detector.html
)
instance
-
loads the compact detector file
-
initializes the
[
position converter tool
](
https://dd4hep.web.cern.ch/dd4hep/reference/classdd4hep_1_1rec_1_1CellIDPositionConverter.html
)
(
which
provides thread safe access)
...
...
@@ -271,7 +276,7 @@ Looking at the id specification we see the following:
<segmentation
type=
"PolarGridRPhi"
grid_size_phi=
"3.0*degree"
grid_size_r=
"5.0*cm"
/>
<id>
system:5,barrel:3,layer:4,module:5,r:32:-16,phi:-16
</id>
```
This means there are 5 bits associated with system (this is the
`<detector>`
's
`id`
)
this
field is mandatory but can differ from 5 bits.
This means there are 5 bits associated with system (this is the
`<detector>`
's
`id`
)
. The
field is mandatory but can differ from 5 bits.
The subsequent fields are arbitrary but should result in a unique 64 bit integer.
Here 3 bits for the "barrel", 4 bits for a "layer", 5 bits for the "module".
More bit fields could be allocated if desired (in part 2 it will become clear why we might want to do this).
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment