Skip to content
Snippets Groups Projects
Commit 4a4e0697 authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

modified: ../config/sidebar.yml

	modified:   part1/simple_detector.md
	modified:   ../../static/hit_position.png
parent 7f4b0790
No related branches found
No related tags found
No related merge requests found
Pipeline #10109 passed with stage
in 1 minute and 38 seconds
......@@ -14,7 +14,7 @@
# link: '/getting-started/eic_container'
# - label: 'Environment'
# link: '/getting-started/environment'
- label: Tutorials
- label: Tutorial
items:
- label: 'Quick-start '
link: '/getting-started/quickstart'
......
......@@ -80,7 +80,29 @@ https://eic.phy.anl.gov/eicd/
root -b -q scripts/tutorial1_hit_position.cxx
# note if this fails because of ACLiC, run it again. This is a root bug.
```
Look at the generated file in results
Look at the generated file in results:
![local hit position](../hit_position.png)
This is the local position in the segmentation (i.e. pixel, strip, readout pad, etc.).
### Cell ID (channel) to Position
At the top of the script you can see these lines:
```cpp
dd4hep::Detector& detector = dd4hep::Detector::getInstance();
detector.fromCompact("gem_tracker.xml");
dd4hep::rec::CellIDPositionConverter cellid_converter(detector);
```
This
- gets the DD4hep 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)
Later on you can see its use:
```cpp
auto pos1 = cellid_converter.position(h.cellID);
```
static/hit_position.png

13.9 KiB | W: | H:

static/hit_position.png

13.1 KiB | W: | H:

static/hit_position.png
static/hit_position.png
static/hit_position.png
static/hit_position.png
  • 2-up
  • Swipe
  • Onion skin
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment