Skip to content
Snippets Groups Projects
Commit 069fa36e authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Edited/tested part1

parent bd33aaad
No related branches found
No related tags found
No related merge requests found
Pipeline #10147 passed
...@@ -15,7 +15,13 @@ title: "Simple Detector Demo" ...@@ -15,7 +15,13 @@ title: "Simple Detector Demo"
## Setup ## 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 ```bash
git clone https://eicweb.phy.anl.gov/EIC/tutorials/ip6_tutorial_1.git part1 git clone https://eicweb.phy.anl.gov/EIC/tutorials/ip6_tutorial_1.git part1
...@@ -37,9 +43,8 @@ directories named compact (but not always). ...@@ -37,9 +43,8 @@ directories named compact (but not always).
### Compile the detector library ### Compile the detector library
```bash ```bash
mkdir build cmake -B build -DCMAKE_INSTALL_PREFIX=../local/ -S . -DCMAKE_CXX_STANDARD=17
cmake ../. -DCMAKE_INSTALL_PREFIX=../../local cmake --build build -j4 -- install
make -j4 install
``` ```
## Visualize and Check Geometry ## Visualize and Check Geometry
...@@ -167,7 +172,7 @@ detector.fromCompact("gem_tracker.xml"); ...@@ -167,7 +172,7 @@ detector.fromCompact("gem_tracker.xml");
dd4hep::rec::CellIDPositionConverter cellid_converter(detector); 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 - gets the main [DD4hep Detector](https://dd4hep.web.cern.ch/dd4hep/reference/classdd4hep_1_1Detector.html) instance
- loads the compact detector file - 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) - 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: ...@@ -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"/> <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> <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. 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". 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). More bit fields could be allocated if desired (in part 2 it will become clear why we might want to do this).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment