diff --git a/src/docs/part1/simple_detector.md b/src/docs/part1/simple_detector.md index b8f8e34af1370f52825aae0468094b11f11bb45d..afb409b5d358714f6a3f9b3d2e6ba96e6d41ebab 100644 --- a/src/docs/part1/simple_detector.md +++ b/src/docs/part1/simple_detector.md @@ -4,40 +4,55 @@ title: "Simple Detector" ## Setup +Note all these commands assume you are in an `eic-shell` singularity session. + ```bash git clone https://eicweb.phy.anl.gov/EIC/tutorials/ip6_tutorial_1.git part1 cd part1 ``` -You will find the following files and directories. -```shell -. -├── elements.xml -├── gem_tracker.xml -├── gps.mac -├── materials.xml -├── README.md -├── rootlogon.C -├── run_example -└── scripts - ├── example_Acts.cxx - ├── example_cell_size.cxx - ├── example_digi.cxx - ├── example_hit_recon.cxx - ├── example_seg_size.cxx - ├── example_tracking.cxx - └── mag_field.cxx -``` +## Inspect files +Look around see what's what. The files -[`materials.xml`](https://eicweb.phy.anl.gov/EIC/tutorials/ip6_tutorial_1/blob/master/materials.xml), -[`elements.xml`](https://eicweb.phy.anl.gov/EIC/tutorials/ip6_tutorial_1/blob/master/elements.xml), +[`compact/materials.xml`](https://eicweb.phy.anl.gov/EIC/tutorials/ip6_tutorial_1/blob/master/compact/materials.xml), +[`compact/elements.xml`](https://eicweb.phy.anl.gov/EIC/tutorials/ip6_tutorial_1/blob/master/compact/elements.xml), and [`gem_tracker.xml`](https://eicweb.phy.anl.gov/EIC/tutorials/ip6_tutorial_1/blob/master/gem_tracker.xml) are the compact detector description files. The first two files are included in -the main `gem_tracker.xml` file. Note these files are conventionally found in -directories named compact. +the main `gem_tracker.xml` file. Note these files are often found in +directories named compact (but not always). + +## Compile the detector library + +``` +mkdir build +cmake ../. -DCMAKE_INSTALL_PREFIX=../../local +make -j4 install +``` +## Look at geometry + + +``` +dd_web_display --export gem_tracker.xml +``` +Copy the generated file `detector_geometry.root` to your local machine. +Then open the [web viewer](https://eic.phy.anl.gov/geoviewer/), click on the `...` and open the local root file. + + +```xml + <detector id="2" name="GEMTracker" vis="RedVis" type="my_GEMTracker" readout="GEMTrackerHits" > + <layer id="1" z="-100 *cm" inner_r="40*cm" outer_r="120*cm" phi0_offset="0.0*deg" /> + <layer id="2" z="-80 *cm" inner_r="30*cm" outer_r="90*cm" phi0_offset="0.0*deg" /> + <layer id="3" z="-60 *cm" inner_r="20*cm" outer_r="70*cm" phi0_offset="0.0*deg" /> + <layer id="4" z="-40 *cm" inner_r="20*cm" outer_r="50.0*cm" phi0_offset="0.0*deg" /> + <layer id="5" z=" 40 *cm" inner_r="20*cm" outer_r="50.0*cm" phi0_offset="0.0*deg" /> + <layer id="6" z=" 60 *cm" inner_r="25*cm" outer_r="70.0*cm" phi0_offset="0.0*deg" /> + <layer id="7" z=" 80 *cm" inner_r="30*cm" outer_r="90.0*cm" phi0_offset="0.0*deg" /> + <layer id="8" z="100 *cm" inner_r="40*cm" outer_r="100.0*cm" phi0_offset="0.0*deg" /> + </detector> +``` @@ -50,7 +65,6 @@ ddsim --runType run --enableG4GPS \ --outputFile gem_tracker_sim.root ``` - This will run geant4 using the General Particle Source (GPS) tool. The output will be a root file containing the generated events and GEM tracker hits.