diff --git a/src/docs/part1/simple_detector.md b/src/docs/part1/simple_detector.md index ce49a81a5997577f304da834836de14a2f84998d..7acbf47b16e24cd2ceb689349ecfda7be1bed7bd 100644 --- a/src/docs/part1/simple_detector.md +++ b/src/docs/part1/simple_detector.md @@ -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).