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

modified: part1/simple_detector.md

parent 38446f42
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ git clone https://eicweb.phy.anl.gov/EIC/tutorials/ip6_tutorial_1.git part1
cd part1
```
## Inspect files
### Inspect files
Look around see what's what.
The files
......@@ -23,7 +23,7 @@ are the compact detector description files. The first two files are included in
the main `gem_tracker.xml` file. Note these files are often found in
directories named compact (but not always).
## Compile the detector library
### Compile the detector library
```bash
mkdir build
......@@ -31,8 +31,9 @@ cmake ../. -DCMAKE_INSTALL_PREFIX=../../local
make -j4 install
```
## Look at geometry
## Visualize and Check Geometry
### Look at disk tracker
```bash
dd_web_display --export gem_tracker.xml
......@@ -57,6 +58,51 @@ Examine the compact description, specifically this part:
</detector>
```
### Check for overlaps
```bash
checkOverlaps -t 0.0001 -c gem_tracker.xml
```
```
...
Info in <TGeoNodeMatrix::CheckOverlaps>: Checking overlaps for world_volume and daughters within 0.0001
Check overlaps: [==========] 11 [100.00 %] 00:00
Info in <TGeoNodeMatrix::CheckOverlaps>: Number of illegal overlaps/extrusions : 0
```
### Look at all the constants
Look at the constants as defined in the compact description (xml files).
```bash
npdet_info dump gem_tracker.xml
```
This should output something like this:
```bash
CrossingAngle = 0.020 = 0.020*rad
ForwardTrackerPlane_z0 = 400.000 = 400*cm
Place_Center = 0.000 = 0*cm
compact_checksum = 1924675351.000 = 1924675351
tracker_region_rmax = 200.000 = 2.0*m
tracker_region_zmax = 400.000 = 4.0*m
world_side = 1000.000 = 10*m
world_x = 1000.000 = world_side
world_y = 1000.000 = world_side
world_z = 10000.000 = 10*world_side
```
Or if there are too many constants to dump, try searching:
```bash
npdet_info search world --all gem_tracker.xml
```
This is very useful with a good subsystem naming convention.
## Run the geant4 simulation
```bash
......@@ -71,16 +117,14 @@ The output will be a root file containing the generated events and GEM tracker h
See the [GPS Documentation](http://www.fe.infn.it/u/paterno/Geant4_tutorial/slides_further/GPS/GPS.pdf) for more information.
## Looking at the data
## Using detector description in analysis
### Preface: data model
First, the data model used by npsim is described here
First, the data model used by `npsim is described here
https://eic.phy.anl.gov/eicd/
## Hit position
```bash
root -b -q scripts/tutorial2_cell_size.cxx+
```
Look at the generated file in results:
![local hit position](../hit_position.png)
......@@ -107,7 +151,11 @@ Later on you can see its use:
### Cell size
You will see this:
```bash
root -b -q scripts/tutorial2_cell_size.cxx+
```
[You](You) will see this:
```bash
...
Segmentation-Cell Position : 39,102,-100
......
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