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

Initial commit.

Static version of detectors.md. Will fix later.
parents
Branches
No related tags found
No related merge requests found
Pipeline #15012 failed
Showing
with 822 additions and 0 deletions
src/docs/eicweb-logo-small.png

21.9 KiB

src/docs/eicweb-logo.png

34.4 KiB

---
title: "EIC Container"
---
## Downloading the container.
```shell
git clone ...
```
## Installing the container
```shell
todo
```
## Using the container
```bash
todo
```
---
title: "Development Environment"
---
## Development within singularity container
The following helper runs bash inside `eic_container`
```bash
module load eic_container
container_dev
```
For projects that you want to build but which are also inside of the container, you must make sure to set `$PATH` and `$LD_LIBRARY_PATH` to point to the development build's installation prefix first. Here we assume your development builds are being installed into `$HOME/stow/development`
A simple setup script will make sure
```bash
export PATH=$HOME/stow/development/bin:$PATH
export LD_LIBRARY_PATH=$HOME/stow/development/lib:$HOME/stow/development/lib64:$LD_LIBRARY_PATH
export ROOT_INCLUDE_PATH=$HOME/stow/development/include:$ROOT_INCLUDE_PATH
```
---
title: "Modulefiles"
---
## What are modulefiles?
Modulefiles (or Lmod) is installed on almost every HPC system these days. It is a set of tcl/tk or lua scripts to swap software in and out of your current environment. It does this (mostly) by managing your environment variables, namely, `PATH` and `LD_LIBRARY_PATH`.
```bash
module avail
module list
module load eic_container
module list
module purge
module list
```
https://modules.readthedocs.io/en/latest/
## Development within singularity container
[See here](singularity) for more info on singularity.
The following helper runs bash inside `eic_container`
```bash
module load eic_container
container_dev
```
For projects that you want to build but which are also inside of the container,
you must make sure to set `$PATH` and `$LD_LIBRARY_PATH` to point to the
development build's installation prefix first. Here we assume your development
builds are being installed into `$HOME/stow/development`
A simple setup script will make sure things are in order
```shell title=setup.sh
module use $HOME/etc/modulefiles
module load eic_container
export PATH=$HOME/stow/development/bin:$PATH
export LD_LIBRARY_PATH=$HOME/stow/development/lib:$HOME/stow/development/lib64:$LD_LIBRARY_PATH
export ROOT_INCLUDE_PATH=$HOME/stow/development/include:$ROOT_INCLUDE_PATH
```
---
title: "Quick-start Guide"
---
## Prerequisites
We assume that you are somewhat familiar with:
- git and gitlab (https://eicweb.phy.anl.gov)
- working in the terminal over ssh and can copy files to your local machine.
- cmake, C++, python, and shell scripting
This tutorial requires that [singularity](singularity) is installed
on the local system.
Singularity can be [downloaded here](https://sylabs.io/guides/3.7/user-guide/quick_start.html) -- 3.7 being the
most recent version as of January 2021.
- The tutorial has been tested on both the BNL and JLAB interactive nodes.
- *For an optimal experience, we strongly recommend you to use singularity 3 or later for this tutorial.
Use (very) old versions of singularity (e.g. 2.6.x) at your own risk!*
## Step 1: Setup the EIC Software Container (jug_xl)
### Step 1a: Create a local directory that you want to work in, e.g., `~/eic`
```bash
mkdir ~/eic
cd ~/eic
```
### Step 1b: Deploy the containerized environment and launch a shell
Execute the following line in your terminal to setup your environment in your sandbox
directory. This will install the latest stable container and place a script called
`eic-shell` in the top-level directory. This script will load the environment for you.
```bash
curl https://eicweb.phy.anl.gov/containers/eic_container/-/raw/master/install.sh | bash
```
Now you can launch a shell in our development environment:
```bash
./eic-shell
```
Note that starting `eic-shell` will set the environment variable `ATHENA_PREFIX` to point
to the `local` subdirectory of your chosen working directory (e.g.,`~/eic/local`.
This will then automatically add `$ATHENA_PREFIX/lib` to your `LD_LIBRARY_PATH` in the
container. This means that anything you install to the `ATHENA_PREFIX` will be
automatically available in your environment. This is important for DD4hep to find your
custom installed detector plugins.
## Step 2: Clone the repos
There are 2 repos you need:
* IP6 (IP-specific components)
* Athena detector
```bash
git clone https://eicweb.phy.anl.gov/EIC/detectors/athena.git
git clone https://eicweb.phy.anl.gov/EIC/detectors/ip6.git
ln -s ../ip6/ip6 athena/ip6
```
In part 1 of the tutorial we will be mostly using files from a tutorial repo.
Later on, we will com back to these detector repositories.
## Step 3: Looking at the geometry
Before moving on to part 1, let's generate the geometry in a ROOT file:
**Note: if you want to skip this, you can [click here to view the latest detector from the athena repository](https://eic.phy.anl.gov/geoviewer/index.htm?file=https://eicweb.phy.anl.gov/api/v4/projects/473/jobs/artifacts/master/raw/geo/detector_geo_full.root?job=report&item=default;1&opt=clipxyz;transp30;zoom75;ROTY290;ROTZ350;trz0;trr0;ctrl;all&).**
For this example we will generate a geometry ROOT file (called `detector_geometry.root`),
copy this file to your local computer and open it with our web viewer.
To generate the geometry file, please execute the following commands:
```bash
cd athena
source /opt/detector/setup.sh
dd_web_display --export athena.xml
```
(Note: the `source /opt/detector/setup.sh` command adds the Athena detector plugins that ship
with the jug_xl container to your environment.)
Please copy this file to your local computer (using `scp`) if working on a remote system.
Then open the [web viewer](https://eic.phy.anl.gov/geoviewer/), and click on the `...` and
open the local ROOT file from your hard drive.
![viewer_step1](../quickstart_viewer_1.png)
This will populate the sidebar with the objects in the ROOT file. Right click on "default"
and then click on "Draw" in the top-level menu (you don't have to select any specific
draw-options in the draw submenu, you only need to click on "Draw" itself).
![viewer_step1](../quickstart_viewer_2.png)
Now you will see the detector geometry in the main viewer window. In order to modify the
view you can:
* Right-click and drag to move the view around (or two-finger drag on a mobile device).
* Left-click and drag to rotate the view (or one-finger drag on a mobile device).
* Use your mouse wheel to zoom in and out (or pinch on a mobile device).
* Click on the blue square on in the bottom left of the canvas to open the controls. Here
you can change settings such as cut-outs (clipping, try selecting all of 'X', 'Y', and 'Z'), and transparency (under "appearance").
* Right-click on the canvas to show other options.
![viewer_step1](../quickstart_viewer_3.png)
Finally, you can browse and display the subgeometries in the file.
Double-click on "default" and then "world_volume" to expand the list of objects. You can
also expand each of the sub-geometries in their components.
To display one of the sub-geometries, right-click on the component you want to view and
select "Draw".
![viewer_step1](../quickstart_viewer_4.png)
That's all. You should now be ready to continue with Part 1 of the tutorial.
---
title: "Singularity"
---
[Singularity](https://sylabs.io/docs/) is likely to be already installed on most large HPC system.
```bash
git clone git@eicweb.phy.anl.gov/containers/eic_container.git
cd container
```
## Installing the singularity container
## Using the container
## Tips
In your `.bashrc` add something like this:
```bash
if [ ! -e /environment ] ; then
running_singularity=
else
running_singularity="\#singularity"
fi
# ...
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]${running_singularity}\$ '
```
If you are running inside a singularity container your commandline prompt will now inform you:
<pre><font color="#8AE234"><b>user@host</b></font>:<font color="#729FCF"><b>~/stow/eic_container_0.9.13/lib</b></font>\#singularity$</pre>
---
title: "Simulation Hackathon "
---
## Tasks
### EIC
1. Beam pipe and beamline final focusing quads (FFQ)
2. Roman pot detectors placed with a quad and dipole in between the IR and detectors.
3. RICH material (no optical photons) and simple digitization.
4. ACTS integration
5. CLEO magnet field map
6.
### SoLID
1. Update magnet geometry (10 ft from end of magnet to calorimeter). See J. Benesch doc.
2. Gas cherenkov materials.
---
title: "ATHENA Detector Documentation"
---
import Documentation from './detector.md'
<Documentation />
# Instructions on building the athena detector geometry
Instructions on how to setup your environment and run the full simulation.
## Step 1: Setup a sandbox directory
Create a local directory that you want to work in, e.g., `~/eic`
```bash
mkdir ~/eic
cd ~/eic
```
## Step 2: Deploy the containerized environment and launc a shell
Execute the following line in your temrinal to setup your environment in your sandbox
directory. This will install the latest stable container and place a script called
`eic-shell` in the top-level directory. This script will load the environment for you.
```bash
curl https://eicweb.phy.anl.gov/containers/eic_container/-/raw/master/install.sh | bash
```
Now you can launch a shell in our development environment:
```bash
./eic-shell
```
Note that this will also set the `$ATHENA_PREFIX` environment variable, and the related
environment variables. You should install all local software to this `$ATHENA_PREFIX`
(which is the `./local` subdirectory of your sandbox working directory).
## Step 3: Clone the repos
Right now there are 2 repos you need:
* IP6 (IP-specific components)
* Athena detector
```bash
git clone https://eicweb.phy.anl.gov/EIC/detectors/athena.git
git clone https://eicweb.phy.anl.gov/EIC/detectors/ip6.git
```
## Step 4: Build/install the detector plugins
We need to build detector plugins for both the Athena and for the IP.
### Building IP6
```bash
cd ip6
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$ATHENA_PREFIX ..
make install
cd ../..
```
### Building the athena detector
```bash
cd athena
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$ATHENA_PREFIX ..
make install -j8
cd ../..
```
## Step 5: Link the compact files for IP6
```bash
cd athena
ln -s ../ip6/ip6
```
## Final Step
That's all, you are now fully setup. Let's try a simple geometry overlap check
to make sure everything works properly.
```bash
checkOverlaps -c athena.xml
```
In order to run the simulation with our datamodel, you should use the `npsim` executable.
You can exectute
```bash
npsim -h
```
to get help on how to do this.
Here is an example command for npsim with from a Hepmc3 file:
```bash
npsim --runType batch \
--part.minimalKineticEnergy 100 \
-v WARNING \
--numberOfEvents 100 \
--compactFile athena.xml \
--inputFiles YOUR_FILES.hepmc \
--outputFile YOUR_FILENAME.root
```
---
title: "Useful links"
---
## DD4hep Links
- User manual: https://dd4hep.web.cern.ch/dd4hep/usermanuals/DD4hepManual/DD4hepManual.pdf
- https://dd4hep.web.cern.ch/
- https://dd4hep.web.cern.ch/dd4hep/reference/
Papers:
- https://www.epj-conferences.org/articles/epjconf/pdf/2019/19/epjconf_chep2018_02037.pdf
Talks:
- https://indico.bnl.gov/event/6336/contributions/29688/attachments/23652/34349/2019-07-10-DD4hep-EIC-Meeting.pdf
- https://indico.cern.ch/event/773049/contributions/3474743/attachments/1938118/3213628/gaede_dd4hep_chep19_v1.pdf
- CMS and DD4hep https://indico.cern.ch/event/773049/contributions/3474725/attachments/1935943/3212061/cmsDD4hepMigration.pdf
FCC Software project
- http://hep-fcc.github.io/FCCSW/tutorials/FCCSW/Detector/doc/DD4hepInFCCSW.html
## ACTS
- http://acts.web.cern.ch/ACTS/
- http://acts.web.cern.ch/ACTS/guides_users/
- http://acts.web.cern.ch/ACTS/latest/doc/modules.html
- ACTS DD4hep plugin: http://acts.web.cern.ch/ACTS/latest/doc/group__DD4hepPlugins.html
- repo:https://gitlab.cern.ch/acts
## genfit
https://github.com/GenFit/Genfit
eicweb repo https://eicweb.phy.anl.gov/eic_tools/GenFit
paper: https://arxiv.org/pdf/1902.04405
Talks:
https://indico.cern.ch/event/258092/contributions/1588579/attachments/454221/629632/WorkingTitle.pdf
## HepMC3
- [HepMC3 website](http://hepmc.web.cern.ch/hepmc/index.html)
- [GenEvent class doc](http://hepmc.web.cern.ch/hepmc/classHepMC3_1_1GenEvent.html) is a good starting point for quick reference.
## Gaudi
- [Gaudi Read-the-docs](https://gaudi-framework.readthedocs.io/en/latest/index.html)
- [Gaudi HPX Discussion](https://indico.cern.ch/event/532371/)
- [Gaudo 2016 workshop](https://indico.cern.ch/event/556551/)
- https://indico.bnl.gov/event/8400/contributions/37125/attachments/27821/42681/EIC_SoftwareWG_20200429.pdf
#### Experiments using Gaudi
##### ATLAS
- [Athena](https://atlassoftwaredocs.web.cern.ch/athena/)
- [ATLAS](https://gitlab.cern.ch/atlas/athena)
##### LHCb
- https://gitlab.cern.ch/lhcb/LHCb
- https://gitlab.cern.ch/lhcb/LHCbSkeleton
##### FCC
- [FCCSW](https://github.com/HEP-FCC/FCCSW)
## Other Software
### xrootd
https://xrootd.slac.stanford.edu/
### zendo
- https://zenodo.org/
- https://zenodo.readthedocs.io/en/latest/
---
title: "Overview"
---
This tutorial is designed to give the user a **quick glimpse** of some key aspects of the simulation assembled toolkit and is in no way near a full treatment.
Rather, the aim of this tutorial is to **provide starting point** to quickly begin simulation work with the modern software tools.
The key toolkit components were thoughtfully selected to (i) leverage externally supported and maintained projects, (ii) decouple framework as much as possible, (iii) allow for modern tools to be developed with the vision of using these tools for next decade.
The key software components are:
- DD4hep (with Geant4 and ROOT)
- GAUDI
- ACTS
- podio
## DD4hep
DD4hep introduces the concept of a `DetElement` which is related to the volumes (logical volumes) and placed volumes but not in a strict way.
These elements build up a separate tree which describes the relationship between the volumes and the readout detectors.
Through the unique BitField ID this allows position space information to be mapped to and from channel number/cell ID space.
## EIC Data model
### PODIO
The idea is to use plain-old-datatype IO. PODIO stamps out structs based on yaml files.
![data model use](data_model_use2.png)
## NPDet - Nuclear physics detector library
NPDet is a collection of _generic detectors_ and _geometry tools_ built around using DD4hep.
- `dd_web_display`
- `npdet_info`
- `npdet_to_step`
- `npdet_to_teve`
- `npdet_fields`
## Reconstruction and Tracking Tools
The goal of having a robust detector library and data model is to aid in the use and development of new tools, techniques, and algorithms.
Many external tools exist that can be applied along the path to the ultimate physics analysis.
See the [useful links](links) for a list of tools.
- [Athena Detector](#athena-detector)
* [Detector Subsystems](#detector-subsystems)
+ [IP Subsystems](#ip-subsystems)
* [Key Central Detector Parameters](#key-central-detector-parameters)
+ [PID Detector Region Parameters](#pid-detector-region-parameters)
* [Main Constant Definitions](#main-constant-definitions)
* [Calorimeter Parameters](#calorimeter-parameters)
+ [Note on paramaeterization](#note-on-paramaeterization)
+ [Endcaps](#endcaps)
* [Main magnet](#main-magnet)
+ [Tracker subassemblies for ACTS](#tracker-subassemblies-for-acts)
+ [Solenoid Magnet](#solenoid-magnet)
* [Central tracking detectors](#central-tracking-detectors)
+ [PID detectors](#pid-detectors)
* [Central calorimetry](#central-calorimetry)
+ [Ecal configuration](#ecal-configuration)
+ [Silicon tracking configuration](#silicon-tracking-configuration)
* [Far foward detectors](#far-foward-detectors)
* [Detector IDs](#detector-ids)
+ [Note about ACTS tracking geometry construction](#note-about-acts-tracking-geometry-construction)
+ [Allocated IDs](#allocated-ids)
* [Detector Definition Parameters](#detector-definition-parameters)
* [Constant naming convention](#constant-naming-convention)
* [Parameter nomenclature](#parameter-nomenclature)
* [Solenoid Magnet Parameters](#solenoid-magnet-parameters)
* [Tracking Detector Parameters](#tracking-detector-parameters)
+ [GEM Tracker Parameters](#gem-tracker-parameters)
* [Vertex Tracker Parameters](#vertex-tracker-parameters)
+ [Vertex Tracking Region](#vertex-tracking-region)
+ [Tracker Detector Parameters](#tracker-detector-parameters)
* [Central tracking and PID detector boundaries](#central-tracking-and-pid-detector-boundaries)
+ [Ecal Endcaps](#ecal--endcaps)
* [EM Calorimeter Parameters](#em-calorimeter-parameters)
+ [Note about Calormieter parameterization.](#note-about-calormieter-parameterization)
* [Hadronic Calorimeter Parameters](#hadronic-calorimeter-parameters)
\ No newline at end of file
---
title: Creating docs
---
By creating a MDX file inside your docs folder it will be created as a page, with the path defined by the filename.
Inside all docs files, you can define the following options:
<div style="overflow-x:auto;">
<table>
<tr>
<th>Key</th>
<th>Required?</th>
<th>Description</th>
</tr>
<tr>
<td>title</td>
<td>Yes</td>
<td>Page title</td>
</tr>
<tr>
<td>description</td>
<td>No</td>
<td>Page description</td>
</tr>
<tr>
<td>image</td>
<td>No</td>
<td>Used for og:image</td>
</tr>
</table>
</div>
### Example:
```mdx
---
title: 'My Example'
description: 'A simple description for this page'
image: /banner.jpeg
---
Wow, this is a nice page
```
## Embeding files
In a documentation website, sometimes you will need to embed well known services (like CodeSandbox, Twitter, or others...). If you need to
do it, you can simply copy-paste the link (powered by the awesome [gatsby-remark-embeder](https://www.gatsbyjs.org/packages/gatsby-remark-embedder/)).
Make sure to check the [supported services](https://github.com/MichaelDeBoey/gatsby-remark-embedder#supported-services).
https://youtu.be/QfcozcbDhNM
## Code Highlight
### Title
To show the title, just add it to your code block. Ex: `title=src/myfile.css`
```css title=src/myfile.css
.gatsby::before {
content: 'niceee...';
}
```
### Line numbers
If you want to show line number, just add a option `lineNumbers=true`.
```js lineNumbers=true
const rocket = {
launch: () => console.log('Launching...'),
};
rocket.launch();
```
### React live
As mentioned in the introduction, this theme uses `react-live`, so you can
create a playground for live editing React components.
To use it, just add a `live=true` option to your code block.
```jsx live=true
function MyComponent() {
function handleButtonClick() {
alert('wowww');
}
return <button onClick={handleButtonClick}>Hey, click me!</button>;
}
render(<MyComponent />);
```
---
title: 'Getting started'
---
The best way yo start is by using our starter:
```bash
gatsby new rocket-docs https://github.com/rocketseat/gatsby-starter-theme-docs
```
But, if you prefer, you can install and configure manually.
```bash
# Using Yarn:
yarn add @rocketseat/gatsby-theme-docs
# Using NPM:
npm i @rocketseat/gatsby-theme-docs
```
## Theme Options
| Key | Default | Required | Description |
| ---------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------ |
| basePath | / | No | Root url for all docs |
| configPath | config | No | Location of config files |
| docsPath | docs | No | The site description for SEO and social (FB, Twitter) tags |
| githubUrl | - | No | The complete URL of your repository. For example: `https://github/rocketseat/gatsby-themes` |
| baseDir | - | No | If your Gatsby site does not live in the root of your project directory/git repo, pass the subdirectory name here (ex: `docs`) |
## Example usage
```js title=gatsby-config.js
module.exports = {
siteMetadata: {
siteTitle: `@rocketseat/gatsby-theme-docs`,
defaultTitle: `@rocketseat/gatsby-theme-docs`,
siteTitleShort: `gatsby-theme-docs`,
siteDescription: `Out of the box Gatsby Theme for creating documentation websites easily and quickly`,
siteUrl: `https://rocketdocs.netlify.com`,
siteAuthor: `@rocketseat`,
siteImage: `/banner.png`,
siteLanguage: `en`,
themeColor: `#7159c1`,
},
plugins: [
{
resolve: `@rocketseat/gatsby-theme-docs`,
options: {
docsPath: `src/docs`,
basePath: `/`,
},
},
],
};
```
Once you have installed the dependencies you will need to create the [navigation](/usage/navigation) and [documentation](/usage/creating-docs) file.
After that, you are ready 🚀
---
title: "Introduction"
metaTitle: "This is the title tag of this page"
metaDescription: "This is the meta description"
---
# Tutorial
- [Quick start](quickstart.md)
Start here to setup download software and configure your development environment.
- [Part 1](part1.md)
An introduction to detecto description starting with a simple detector. This tutorial shows how to add new parameterized detectors to a library of generic detectors (NPdet).
- [Part 2](part2.md)
This tutorial is broken in to multiple parts.
* Preface for the new programmer
* Part 0a: Configuring your running environment
* Part 0b: Configuring your development environment
* Part 1: Simple Detector Example
* Part 2: Extending Detector Geometry
* Part 3: Adding a new detector
* Part 4: Detector digitization, volumes, and segmentation
* Part 5: Event reconstruction
Some introduction text. Lists out all the headings from h1 to h6. Easy to customise. Some more text. Additional text.
# Heading H1
Heading 1 text
## Heading H2
Heading 2 text
### Heading H3
Heading 3 text
#### Heading H4
Heading 4 text
##### Heading H5
Heading 5 text
###### Heading H6
Heading 6 text
# Welcome
This tutorial is meant to prepare you to contribute to the simuliation toolkit for the EIC.
The tutorial is not meant to be a representation of the final software workflow, but to put enough pieces
together to do the work required.
## Lists
- Item 1
- Item 2
- Item 3
- Item 4
- Item 5
---
title: Navigation
---
To create a navigation file, simple add it under the config folder. Example:
```yml title=sidebar.yml
# Just a simple item
- label: 'Home'
link: '/'
# With a list of items
- label: 'With subitens'
items:
- label: 'My Example'
link: '/my-example'
```
You can also add external links:
```yml
- label: 'GitHub'
link: 'https://github.com/jpedroschmitz'
```
---
title: Shadowing
---
To shadow/override this theme, you will need to place your files into `src/@rocketseat/gatsby-theme-docs/` folder.
_ps: if you still have questions, check the [Shadowing in Gatsby Themes](https://www.gatsbyjs.org/docs/themes/shadowing/) article._
## Changing the logo
If you want to change the logo just create the following file:
```js title=src/@rocketseat/gatsby-theme-docs/components/Logo.js
import styled from '@emotion/styled';
import logo from '../assets/logo.svg';
export default styled.div`
width: 160px;
height: 36px;
background-size: contain;
background: url(${logo}) center no-repeat;
`;
```
## Changing the home text
Create a file at `src/@rocketseat/gatsby-theme-docs/text/index.mdx` to edit the text.
import React from 'react';
import { Link } from 'gatsby';
import Layout from '@rocketseat/gatsby-theme-docs/src/components/Layout';
import SEO from '@rocketseat/gatsby-theme-docs/src/components/SEO';
export default function NotFound() {
return (
<Layout title="Page not found!">
<SEO title="404: Not found" />
<p>You just hit a route that doesn&#39;t exist... the sadness.</p>
<p>
If you&#39;d like to go back to homepage,{' '}
<Link to="/">click here</Link>.
</p>
</Layout>
);
}
static/Argonne_color_black_transparent.png

9.67 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment