Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/tutorial-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: tutorial-ci

on: [pull_request, workflow_dispatch]

jobs:
check:
uses: eic/tutorial-ci/.github/workflows/check.yml@main
20 changes: 10 additions & 10 deletions episodes/01-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ There are three broad classes of files stored on xrootd, each in their own direc
- RECO: The output root files from the reconstruction
- And again, if running yourself, this would be your output from EICrecon (after you've used your awesome new reconstruction algorithm from the [Reconstruction algorithms tutorial](https://eic.github.io/tutorial-reconstruction-algorithms/) of course)

Most users will interact with the files in the RECO directory and that is what we will focus on in this tutorial. Within the RECO directory, files are organized by campaign (26.02.0 for the February 2026 campaign, for example), detector configuration and then physics process. Each physics process will have different sub directories, for example generator version, energy, or Q2. The directory structure and number of reconstructed files for each campaign can be found on the [Simulation Website reconstruction campaigns page](https://eic.github.io/epic-prod/campaigns/campaigns_reco.html).
Most users will interact with the files in the RECO directory and that is what we will focus on in this tutorial. Within the RECO directory, files are organized by campaign (26.03.0 for the March 2026 campaign, for example), detector configuration and then physics process. Each physics process will have different sub directories, for example generator version, energy, or Q2. The directory structure and number of reconstructed files for each campaign can be found on the [Simulation Website reconstruction campaigns page](https://eic.github.io/epic-prod/campaigns/campaigns_reco.html).

::::::::::::::::::::::::::::::::::::::::::::: callout

Expand All @@ -49,36 +49,36 @@ We will need a file to analyse going forward, if you have not done so, download
Grab a file from -

```bash
epic:/RECO/26.02.0/epic_craterlake/DIS/BeAGLE1.03.02-1.2/eHe3/10x110/q2_2to10/
epic:/RECO/26.04.1/epic_craterlake/DIS/BeAGLE1.03.02-1.2/eHe3/10x110/q2_2to10/
```

::::::::::::::::::::::::::::::::::::::::::::: callout

Reminder, you can check the *content* of files within this dataset via:

```bash
rucio did content list --short epic:/RECO/26.02.0/epic_craterlake/DIS/BeAGLE1.03.02-1.2/eHe3/10x110/q2_2to10
rucio did content list --short epic:/RECO/26.04.1/epic_craterlake/DIS/BeAGLE1.03.02-1.2/eHe3/10x110/q2_2to10
```

and check the location of files in the dataset via:

```bash
rucio replica list file --protocols root --pfns --rses isopenaccess epic:/RECO/26.02.0/epic_craterlake/DIS/BeAGLE1.03.02-1.2/eHe3/10x110/q2_2to10
rucio replica list file --protocols root --pfns --rses isopenaccess epic:/RECO/26.04.1/epic_craterlake/DIS/BeAGLE1.03.02-1.2/eHe3/10x110/q2_2to10
```

:::::::::::::::::::::::::::::::::::::::::::::

For example -

```bash
xrdcp root://dtn-eic.jlab.org:1094//volatile/eic/EPIC//RECO/26.02.0/epic_craterlake/DIS/BeAGLE1.03.02-1.2/eHe3/10x110/q2_2to10/BeAGLE1.03.02-1.2_DIS_eHe3_10x110_q2_2to10_ab.0001.eicrecon.edm4eic.root
xrdcp root://epicxrd1.sdcc.bnl.gov:1095//eic/EPIC//RECO/26.04.1/epic_craterlake/DIS/BeAGLE1.03.02-1.2/eHe3/10x110/q2_2to10/BeAGLE1.03.02-1.2_DIS_eHe3_10x110_q2_2to10_ab.0001.eicrecon.edm4eic.root
```
Note that the ./ at the end is the target location to copy to. Change this as desired.

::::::::::::::::::::::::::::::::::::::::::::: callout

Note that we can also specify a different filename to copy to as we could with a normal cp command. You might want to do this as the filename is a little cumbersome.
I called mine `3He_10x110_Feb26Campaign.root`, just replace ./ with your file name of choice.
I called mine `3He_10x110_Apr26Campaign.root`, just replace ./ with your file name of choice.

:::::::::::::::::::::::::::::::::::::::::::::

Expand Down Expand Up @@ -108,15 +108,15 @@ where here we're finding things in the given path that match the name pattern pr
Alternatively, you could grab a list of the files you want and pipe them to a file -

```bash
xrdfs root://dtn-eic.jlab.org ls /volatile/eic/EPIC/RECO/26.02.0/epic_craterlake/DIS/NC/18x275/minQ2=10 | sed 's|^|root://dtn-eic.jlab.org/|g' > list.txt
xrdfs root://dtn2304.jlab.org:8443 ls /jlab-osdf-ro/eic/EPIC/cache/RECO/26.03.0/epic_craterlake/DIS/NC/18x275/minQ2=10 | sed 's|^|root://dtn2304.jlab.org:8443/|g' > list.txt
```

In this case, we're listing all files on the server in that path, piping them to sed and inserting "root://dtn-eic.jlab.org/" at the front and then feeding the output to the file "list.txt".
In this case, we're listing all files on the server in that path, piping them to sed and inserting "root://dtn2304.jlab.org:8443/" at the front and then feeding the output to the file "list.txt".

```bash
more list.txt
root://dtn-eic.jlab.org//volatile/eic/EPIC/RECO/26.02.0/epic_craterlake/DIS/NC/18x275/minQ2=10/pythia8NCDIS_18x275_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_1.0000.eicrecon.tree.edm4eic.root
root://dtn-eic.jlab.org//volatile/eic/EPIC/RECO/26.02.0/epic_craterlake/DIS/NC/18x275/minQ2=10/pythia8NCDIS_18x275_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_1.0001.eicrecon.tree.edm4eic.root
root://dtn2304.jlab.org:8443//jlab-osdf-ro/eic/EPIC/cache/RECO/26.03.0/epic_craterlake/DIS/NC/18x275/minQ2=10/pythia8NCDIS_18x275_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_1.0000.eicrecon.edm4eic.root
root://dtn2304.jlab.org:8443//jlab-osdf-ro/eic/EPIC/cache/RECO/26.03.0/epic_craterlake/DIS/NC/18x275/minQ2=10/pythia8NCDIS_18x275_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_1.0001.eicrecon.edm4eic.root
...
```
We could then, for example, feed this list to a TChain -
Expand Down
4 changes: 2 additions & 2 deletions episodes/03-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ TTreeReaderArray<float> trackMomY(tree_reader, "ReconstructedChargedParticles.mo
TTreeReaderArray<float> trackMomZ(tree_reader, "ReconstructedChargedParticles.momentum.z");

// Get Links Between MCParticles and ReconstructedChargedParticles
TTreeReaderArray<unsigned int> recoAssoc(tree_reader, "_ReconstructedChargedParticleLinks_from.index");
TTreeReaderArray<unsigned int> simuAssoc(tree_reader, "_ReconstructedChargedParticleLinks_to.index");
TTreeReaderArray<int> recoAssoc(tree_reader, "_ReconstructedChargedParticleLinks_from.index");
TTreeReaderArray<int> simuAssoc(tree_reader, "_ReconstructedChargedParticleLinks_to.index");
```

The last two lines encode the link between a ReconstructedChargedParticle and an MCParticle where the matching is determined by the EICrecon [reconstruction algorithms](https://github.com/eic/EICrecon/tree/main/src/algorithms/reco) which generate the ReconstructedChargedParticle objects.
Expand Down
16 changes: 8 additions & 8 deletions learners/exercise-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ void EfficiencyAnalysis(TString infile="PATH_TO_INPUT_FILE"){
TTreeReaderArray<float> trackMomZ(tree_reader, "ReconstructedChargedParticles.momentum.z");

// Get Links Between MCParticles and ReconstructedChargedParticles
TTreeReaderArray<unsigned int> recoAssoc(tree_reader, "_ReconstructedChargedParticleLinks_from.index");
TTreeReaderArray<unsigned int> simuAssoc(tree_reader, "_ReconstructedChargedParticleLinks_to.index");
TTreeReaderArray<int> recoAssoc(tree_reader, "_ReconstructedChargedParticleLinks_from.index");
TTreeReaderArray<int> simuAssoc(tree_reader, "_ReconstructedChargedParticleLinks_to.index");

// Define Histograms
TH1D *partEta = new TH1D("partEta","Eta of Thrown Charged Particles;Eta",100,-5.,5.);
Expand Down Expand Up @@ -108,8 +108,8 @@ void EfficiencyAnalysis_Exercise(TString infile="PATH_TO_FILE"){
TTreeReaderArray<float> trackMomZ(tree_reader, "ReconstructedChargedParticles.momentum.z");

// Get Links Between MCParticles and ReconstructedChargedParticles
TTreeReaderArray<unsigned int> recoAssoc(tree_reader, "_ReconstructedChargedParticleLinks_from.index");
TTreeReaderArray<unsigned int> simuAssoc(tree_reader, "_ReconstructedChargedParticleLinks_to.index");
TTreeReaderArray<int> recoAssoc(tree_reader, "_ReconstructedChargedParticleLinks_from.index");
TTreeReaderArray<int> simuAssoc(tree_reader, "_ReconstructedChargedParticleLinks_to.index");

// Define Histograms
TH1D *partEta = new TH1D("partEta","#eta of Thrown Charged Particles; #eta", 120, -6, 6);
Expand Down Expand Up @@ -252,8 +252,8 @@ void ResolutionAnalysis(TString infile="PATH_TO_INPUT_FILE"){
TTreeReaderArray<float> trackMomZ(tree_reader, "ReconstructedChargedParticles.momentum.z");

// Get Links Between MCParticles and ReconstructedChargedParticles
TTreeReaderArray<unsigned int> recoAssoc(tree_reader, "_ReconstructedChargedParticleLinks_from.index");
TTreeReaderArray<unsigned int> simuAssoc(tree_reader, "_ReconstructedChargedParticleLinks_to.index");
TTreeReaderArray<int> recoAssoc(tree_reader, "_ReconstructedChargedParticleLinks_from.index");
TTreeReaderArray<int> simuAssoc(tree_reader, "_ReconstructedChargedParticleLinks_to.index");

// Define Histograms
TH1D *trackMomentumRes = new TH1D("trackMomentumRes","Track Momentum Resolution", 400, -2, 2);
Expand Down Expand Up @@ -327,8 +327,8 @@ void ResolutionAnalysis_Exercise(TString infile="PATH_TO_FILE"){
TTreeReaderArray<float> trackMomZ(tree_reader, "ReconstructedChargedParticles.momentum.z");

// Get Links Between MCParticles and ReconstructedChargedParticles
TTreeReaderArray<unsigned int> recoAssoc(tree_reader, "_ReconstructedChargedParticleLinks_from.index");
TTreeReaderArray<unsigned int> simuAssoc(tree_reader, "_ReconstructedChargedParticleLinks_to.index");
TTreeReaderArray<int> recoAssoc(tree_reader, "_ReconstructedChargedParticleLinks_from.index");
TTreeReaderArray<int> simuAssoc(tree_reader, "_ReconstructedChargedParticleLinks_to.index");

// Define Histograms
TH1D *trackMomentumRes = new TH1D("trackMomentumRes","Track Momentum Resolution; (P_{rec} - P_{MC})/P_{MC}", 400, -2, 2);
Expand Down
10 changes: 5 additions & 5 deletions learners/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ If you have not done so already, please follow the
[Setting Up Your Environment tutorial setup instructions](https://eic.github.io/tutorial-setting-up-environment/#setup)
well before the start of the tutorial to ensure your system is ready.

This tutorial will go over how to analyze the reconstructed simulation, so you will need to download a file to work with locally. The files are on the order of 50-80MB each. For consistency, we will use neutral current DIS events from the February 2026 campaign (26.02.0) with minimum Q2 = 10 GeV2 and at the highest electron-proton beam energy combination (if you wish to make an energy comparison, you can download additional files). To browse the available files, you can run the following commands from within the eic-shell environment:
This tutorial will go over how to analyze the reconstructed simulation, so you will need to download a file to work with locally. The files are on the order of 50-80MB each. For consistency, we will use neutral current DIS events from the March 2026 campaign (26.03.0) with minimum Q2 = 10 GeV2 and at the highest electron-proton beam energy combination (if you wish to make an energy comparison, you can download additional files). To browse the available files, you can run the following commands from within the eic-shell environment:

```bash
xrdfs root://dtn-eic.jlab.org
ls /volatile/eic/EPIC/RECO/26.02.0/epic_craterlake/DIS/NC/18x275/minQ2=10
xrdfs root://dtn2304.jlab.org:8443
ls /jlab-osdf-ro/eic/EPIC/cache/RECO/26.03.0/epic_craterlake/DIS/NC/18x275/minQ2=10
exit
```

You can download any of the files you want in here. You can do this by (still within eic-shell environment) navigating to the directory you will store your file(s) and run the command:

```bash
xrdcp root://dtn-eic.jlab.org//volatile/eic/EPIC/RECO/26.02.0/epic_craterlake/DIS/NC/18x275/minQ2=10/pythia8NCDIS_18x275_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_5.0001.eicrecon.tree.edm4eic.root ./
xrdcp root://dtn2304.jlab.org:8443//jlab-osdf-ro/eic/EPIC/cache/RECO/26.03.0/epic_craterlake/DIS/NC/18x275/minQ2=10/pythia8NCDIS_18x275_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_5.0001.eicrecon.edm4eic.root ./
```

Do not forget the trailing ./ (or just . works too) as this tells the progam to put the file in your current dir.

::::::::::::::::::::::::::::::::::::::::::::: callout

Note that we can also specify a different filename to copy to as we could with a normal cp command. You might want to do this as the filename is a little cumbersome.
I called mine NC_DIS_18x275_Feb26Campaign.root, just replace ./ with your file name of choice.
I called mine NC_DIS_18x275_Mar26Campaign.root, just replace ./ with your file name of choice.

:::::::::::::::::::::::::::::::::::::::::::::

Expand Down
Loading