Skip to content

Commit 74e6cb4

Browse files
committed
update
1 parent 82fe374 commit 74e6cb4

File tree

2 files changed

+34
-31
lines changed

2 files changed

+34
-31
lines changed

_episodes/01-dd4hep.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ keypoints:
1717
## DD4hep simulation
1818
This Geant4-based simualtion package propagates particles through magnetic field and materials. Particles and detector hits for each event are saved in the output rootfiles.
1919

20-
- __Input 1: Event generation__
20+
### __Input 1: Event generation__
2121

2222
The collision event at ePIC, including the beam particles, vertices, and outgoing particles, are typically generated with a dedicated event generator, e.g. PYTHIA8 for specific physics channels. The outputs are provided to the DD4hep simulation in [HEPMC3 format](https://arxiv.org/pdf/1912.08005).
2323

2424
One can also use the DD4hep's particle gun to generate outgoing particles with given vertex and distribution, see the [previous tutorial](https://eic.github.io/tutorial-simulations-using-ddsim-and-geant4/aio/index.html) on `ddsim`.
2525

2626

27-
- __Input 2: Detector description__
27+
### __Input 2: Detector description__
2828

2929
The ePIC detector description in DD4hep is maintained [on github](https://github.com/eic/epic/). On the bottom of each sub-detector compact file under `epic/compact`, the `readout` block specifies how the detector hits are saved in the output rootfile.
3030

@@ -41,13 +41,14 @@ This Geant4-based simualtion package propagates particles through magnetic field
4141
All hits from this silicon vertex barrel detector, including their position, energy deposit, time, will be stored under the branch `VertexBarrelHits` in output.
4242
Each detector hit also comes an assigned 64-bit cell ID, with the last 32 bits from right to left represents the hit localtion in a 0.020 x 0.020 mm mesh grid. This __segmentation__ often represents the detector granularity (in this case, the silicon pixel sensor size) that will be used later for hit digitization.
4343

44-
- __Output__
44+
### __Output__
4545
The `event` tree in the simulation output contains
4646
- `MCParticles`: records the truth info of primary and secondary particles
4747
- Individual branches for signals from various sub-detector systems e.g. `VertexBarrelHits`
4848

4949
> Exercise 1.1: access simulation campaign rootfiles
5050
> The simulation campaign [website](https://eic.github.io/epic-prod/documentation/default_datasets.html) documents the available datasets and version information.
51+
>
5152
> -__Browse the directory__
5253
> For stand-alone `xrdfs` command, see the [previous tutorials](https://eic.github.io/tutorial-analysis/01-introduction/index.html). Here we will proceed with the python interface:
5354
```console
@@ -89,23 +90,23 @@ print(df)
8990

9091

9192
> Exercise 1.3: extract momentum distribution of primary electrons
93+
>
94+
> Make selection
9295
> ```console
93-
# select electrons
9496
from particle import Particle
9597
part = Particle.from_name("e-")
9698
pdg_id = part.pdgid.abspid
97-
condition1 = df["MCParticles.PDG"]==pdg_id
98-
# select primary particles
99-
condition2 = df["MCParticles.generatorStatus"]==1
100-
101-
# extract momentum
102-
# all electrons
103-
df_new = df[condition1]
99+
condition1 = df["MCParticles.PDG"]==pdg_id # select electrons
100+
condition2 = df["MCParticles.generatorStatus"]==1 # select primary particles
101+
```
102+
> extract momentum
103+
> ```console
104+
df_new = df[condition1] # all electrons
104105
mom = np.sqrt(df_new["MCParticles.momentum.x"]**2+df_new["MCParticles.momentum.y"]**2+df_new["MCParticles.momentum.z"]**2)
105106
bins = np.arange(0,20)
106107
_ = plt.hist(mom,bins=bins,alpha=0.5)
107-
# primary electrons
108-
df_new = df[condition1&condition2]
108+
109+
df_new = df[condition1&condition2] # primary electrons
109110
mom = np.sqrt(df_new["MCParticles.momentum.x"]**2+df_new["MCParticles.momentum.y"]**2+df_new["MCParticles.momentum.z"]**2)
110111
_ = plt.hist(mom,bins=bins,histtype="step", color='r')
111112
```

_episodes/02-eicrecon.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Each reconstruction step involves 3 components:
2424
> in this section, we will use __track reconstruction__ as an example. Please refer to the Lehigh reconstruction workfest [presentations](https://indico.bnl.gov/event/20727/sessions/7433/#20240725) for reconstruction workflow of other systems.
2525
2626

27-
> - __Digitization__
27+
### __Digitization__
2828
All simualted detector hits are digitized to reflect certain detector specs e.g. spatial and time resolution, and energy threshold. For example, the `VertexBarrelHits` from simulation are digitized through the `SiliconTrackerDigi` factory in `EICrecon/src/detectors/BVTX/BVTX.cc`:
2929
```console
3030
// Digitization
@@ -72,7 +72,8 @@ Each reconstruction step involves 3 components:
7272
- int32_t charge
7373
- int32_t timeStamp
7474
```
75-
In addition, the one-to-one relation between the sim hit and its digitized hit is stored as an `MCRecoTrackerHitAssociation` object:
75+
76+
In addition, the one-to-one relation between the sim hit and its digitized hit is stored as an `MCRecoTrackerHitAssociation` object:
7677
```console
7778
edm4eic::MCRecoTrackerHitAssociation:
7879
Description: "Association between a RawTrackerHit and a SimTrackerHit"
@@ -83,7 +84,8 @@ Each reconstruction step involves 3 components:
8384
- edm4eic::RawTrackerHit rawHit // reference to the digitized hit
8485
- edm4hep::SimTrackerHit simHit // reference to the simulated hit
8586
```
86-
which is filled in `SiliconTrackerDigi.cc`:
87+
88+
which is filled in `SiliconTrackerDigi.cc`:
8789
```console
8890
auto hitassoc = associations->create();
8991
hitassoc.setWeight(1.0);
@@ -95,34 +97,34 @@ Each reconstruction step involves 3 components:
9597
{: .challenge}
9698

9799

98-
> -__Track Reconstruction__
99-
By default, we use the Combinatorial Kalman Filter from the ACTS library to handle track finding and fitting. This happens in the `CKFTracking` factory.
100+
### __Track Reconstruction__
101+
By default, we use the Combinatorial Kalman Filter from the ACTS library to handle track finding and fitting. This happens in the `CKFTracking` factory.
100102

101103
> Exercise 2.2: please find the inputs and outputs of `CKFTracking`, and draw a flow chart from `CentralTrackerMeasurements` to `CentralTrackVertices`.
102104
{: .challenge}
103105

104-
-__Reconstruction output__
105-
- `events` tree:
106-
- `MCParticles` and detector sim hits are copied from simulation output to recon output
107-
- outputs from each step of recon algorithms must be either `edm4hep` or `edm4eic` object if you want to save them in recon output
108-
- the default list of saved objects in recon output is defined in `EICrecon/src/services/io/podio/JEventProcessorPODIO.cc`. It can be configured in command line.
109-
- `podio_metadata` tree:
110-
- `events___idTable` provides a lookup table between output collection name and IDs.
106+
### __Reconstruction output__
107+
> - `events` tree:
108+
> - `MCParticles` and detector sim hits are copied from simulation output to recon output
109+
> - outputs from each step of recon algorithms must be either `edm4hep` or `edm4eic` object if you want to save them in recon output
110+
> - the default list of saved objects in recon output is defined in `EICrecon/src/services/io/podio/JEventProcessorPODIO.cc`. It can be configured in command line.
111+
> - `podio_metadata` tree:
112+
> - `events___idTable` provides a lookup table between output collection name and IDs.
111113
112114

113115
> Exercise 2.3:
114116
> The __vector member__ or __relation__ of a given data collection is saved in a separate branch starts with "_".
115-
- use ```tree.keys(filter_name="_CentralCKFTrajectories*",recursive=False)``` to list those members in `CentralCKFTrajectories`
116-
- for a given event, the vector member `_CentralCKFTrajectories_measurementChi2` provides a list of chi2 for each meaurement hit respectively. If multiple trajectories are found for one event, you can use `CentralCKFTrajectories.measurementChi2_begin` to locate the start index of a given trajectory (subentry).
117+
> - Please use ```tree.keys(filter_name="_CentralCKFTrajectories*",recursive=False)``` to list those members in `CentralCKFTrajectories`
118+
> - for a given event, the vector member `_CentralCKFTrajectories_measurementChi2` provides a list of chi2 for each meaurement hit respectively. If multiple trajectories are found for one event, you can use `CentralCKFTrajectories.measurementChi2_begin` to locate the start index of a given trajectory (subentry).
117119
{: .challenge}
118120

119121
> Exercise 2.4:
120122
> `CentralTrackerMeasurements` saved all available space points for tracking as 2D meaurement attached to representing surfaces.
121-
- use the relation `_CentralTrackerMeasurements_hits` to trace back to the original detector hit collection (hint: use the collection ID lookup table), and obtain the 3D coordinate of the hit
123+
> - Please use the relation `_CentralTrackerMeasurements_hits` to trace back to the original detector hit collection (hint: use the collection ID lookup table), and obtain the 3D coordinate of the hit
122124
{: .challenge}
123125
{% include links.md %}
124126

125127
## Future reading
126-
- Generate your own simulation and reconstruction rootfiles [tutorial](https://eic.github.io/tutorial-simulations-using-ddsim-and-geant4/)
127-
- Contribute to reconstruction algorithsm [tutorial](https://eic.github.io/tutorial-reconstruction-algorithms/)
128-
- Develop analysis benchmarks [tutorial](https://eic.github.io/tutorial-developing-benchmarks/)
128+
> - Generate your own simulation and reconstruction rootfiles [tutorial](https://eic.github.io/tutorial-simulations-using-ddsim-and-geant4/)
129+
> - Contribute to reconstruction algorithsm [tutorial](https://eic.github.io/tutorial-reconstruction-algorithms/)
130+
> - Develop analysis benchmarks [tutorial](https://eic.github.io/tutorial-developing-benchmarks/)

0 commit comments

Comments
 (0)