Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eic_tutorial
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
tutorials
eic_tutorial
Commits
b1bdd6cf
Commit
b1bdd6cf
authored
5 years ago
by
Whitney Armstrong
Browse files
Options
Downloads
Patches
Plain Diff
modified: ../../gatsby-config.js
modified: part1/overview.md
parent
2f77be65
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gatsby-config.js
+7
-7
7 additions, 7 deletions
gatsby-config.js
src/docs/part1/overview.md
+16
-16
16 additions, 16 deletions
src/docs/part1/overview.md
with
23 additions
and
23 deletions
gatsby-config.js
+
7
−
7
View file @
b1bdd6cf
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
`
,
siteTitle
:
`
EIC Software
`
,
defaultTitle
:
`
EIC Software
`
,
siteTitleShort
:
`
EIC software
`
,
siteDescription
:
`
Electron ion collider simulation software tutorial
`
,
siteUrl
:
`https://
argonne_eic.gitlab.io
`
,
siteAuthor
:
`@rocketseat`
,
siteImage
:
`/banner.png`
,
siteImage
:
`/banner.png`
,
siteLanguage
:
`en`
,
themeColor
:
`#e1a809`
,
basePath
:
`/`
,
basePath
:
`/
tutorial/eic_tutorial/
`
,
footer
:
`Theme by Rocketseat`
,
},
plugins
:
[
...
...
This diff is collapsed.
Click to expand it.
src/docs/part1/overview.md
+
16
−
16
View file @
b1bdd6cf
...
...
@@ -56,7 +56,7 @@ To compile this detector into the GenericDetectors library the detector needs
to be added to the list of sources in the cmake file
`src/GenericDetectors/CMakeLists.txt`
.
```
```
bash
dd4hep_add_plugin
(
${
a_lib_name
}
SOURCES
src/BeamPipe_geo.cpp
...
...
...
@@ -70,7 +70,7 @@ The work of defining the detector is done in a function (here called
`build_detector`
) that is registered using the DD4hep plugin macro
`DECLARE_DETELEMENT`
.
```
```
cpp
static
Ref_t
build_detector
(
Detector
&
dtor
,
xml_h
e
,
SensitiveDetector
sens
)
{
xml_det_t
x_det
=
e
;
...
...
@@ -97,7 +97,7 @@ stamps out the necessary boiler plate code to register a new detector called
The
`<detector>`
tag defines a new instance of a detector and requires the
attributes "id", "name", and "type". For example:
```
```
xml
<detector
id=
"1"
name=
"MyRomanPot"
type=
"SimpleRomanPot"
vis=
"RedVis"
readout=
"RomanPotHits"
zoffset=
"1.0*m"
>
</detector>
...
...
@@ -135,7 +135,7 @@ If you have a detector parameter which we later will tweak (while optimizing
the design) try to get the value from the xml element but provide a good
default value. For example:
```
```
cpp
double radius = ( x_det.hasAttr(_Unicode(radius)) ) ? x_det.attr<double>(_Unicode(radius)) : 5.0*dd4hep::cm;
```
...
...
@@ -147,7 +147,7 @@ attribute defined. We will return to this later.
We will now look at parts of the source file `
src/GenericDetectors/src/SimpleRomanPot_geo.cpp
`.
```
```
cpp
static Ref_t build_detector(Detector& dtor, xml_h e, SensitiveDetector sens)
{
xml_det_t x_det = e;
...
...
@@ -173,7 +173,7 @@ It is a means of providing the detector hierarchy/tree, but doesn't necessarily
have to map exactly to detector geometry. However, it typically will typically
parallel the geometry (and probably should).
```
```
cpp
string module_name = "RomanPot";
Assembly assembly(det_name + "_assembly");
DetElement sdet( det_name, det_id);
...
...
@@ -184,7 +184,7 @@ The last line sets the `SensitiveDetector sens` argument to be the tracker type
`
sdet
` is associated with the mother detector element by the constructor which
looks up the detector name (here "MyRomanPot").
```
```
cpp
double z_offset = (x_det.hasAttr(_Unicode(zoffset))) ? x_det.attr<double>(_Unicode(zoffset)) : 0.0;
double thickness = (x_det.hasAttr(_Unicode(thickness))) ? x_det.attr<double>(_Unicode(thickness)) : 0.01*dd4hep::cm;
```
...
...
@@ -193,7 +193,7 @@ values that could also be define through attributes, however, we will want to
add child elements of the detector tag (so the attributes does not grow too
long).
```
```
cpp
double rp_chamber_thickness = 5.0*dd4hep::mm;
double rp_chamber_radius = 5.0*dd4hep::cm;
double rp_chamber_length = 50.0*dd4hep::cm;
...
...
@@ -230,7 +230,7 @@ BitFieldValue in the readout's BitField64 readout string. In this case the
"layer" BitFieldValue. The BitField64 is used to construct unique VolumeIDs and
CellIDs for PlacedVolumes and Segmentations respectively.
```
```
cpp
PlacedVolume pv;
pv = assembly.placeVolume( rp_chamber_vol );
pv = assembly.placeVolume( rp_vacuum_vol );
...
...
@@ -239,7 +239,7 @@ CellIDs for PlacedVolumes and Segmentations respectively.
Set the PlacedVolume BitFieldValue ID. "2" in this case.
```
```
cpp
double supp_x_half = 1.0*dd4hep::cm;
double supp_y_half = 1.0*dd4hep::cm;
double supp_thickness = 1.0*dd4hep::mm;
...
...
@@ -254,7 +254,7 @@ Set the PlacedVolume BitFieldValue ID. "2" in this case.
Next we define vectors which are used to define a "surface" (which will later
generate simulation tracker hits).
```
```
cpp
// create a measurement plane for the tracking surface attched to the sensitive volume
Vector3D u( 1. , 0. , 0. ) ;
Vector3D v( 0. , 1. , 0. ) ;
...
...
@@ -276,7 +276,7 @@ generate simulation tracker hits).
We now define a simple rectangular pixel sensor. This will be the first of
four: two will come in along the x axis and two along the y axis.
```
```
cpp
// ------------- x1
Volume support1_vol( "xsenseor_supp", supp_box, supp_mat );
Volume sensor1_vol( "xsenseor_sens", sens_box, sens_mat );
...
...
@@ -286,7 +286,7 @@ four: two will come in along the x axis and two along the y axis.
The code above builds two volumes one which will contain the sensitive volume.
The sensitive volume is assigned to be a sensitive detector.
```
```
cpp
DetElement layer1_DE( sdet, "layer1_DE", 1 );
pv = rp_vacuum_vol.placeVolume( support1_vol, Position(xy_shift,0, -z_shift) );
pv.addPhysVolID("layer", 1 );
...
...
@@ -298,7 +298,7 @@ the DetElement. Note the DetElement is constructed with the parent element
(sdet) being the first argument. In this way it is clear we are building,
(semi-)parallel to the geometry, a detector element hierarchy.
```
```
cpp
DetElement mod1( layer1_DE , "module_1", 1 );
pv = support1_vol.placeVolume(sensor1_vol, Position(0,0,0));
pv.addPhysVolID("module", 1 );
...
...
@@ -314,7 +314,7 @@ Finally we get the top level volume to place the assemble volume. Note we are
using the zoffset. This PV is then associated with the top level "system"
bitfieldvalue.
```
```
cpp
pv = dtor.pickMotherVolume(sdet).placeVolume(assembly, Position(0,0,z_offset));
pv.addPhysVolID("system", det_id); // Set the subdetector system ID.
sdet.setPlacement(pv);
...
...
@@ -363,7 +363,7 @@ There are some library dependencies:
### Running the scripts
```
```
bash
./run_example
root scripts/example_digi.cxx++
root scripts/example_hit_position.cxx++ # no output
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment