Warning, /eic.github.io/_resources/production_file.md is written in an unsupported language. File is not indexed.
0001 ---
0002 title: Production Files Access
0003 description: production_file
0004 name: production_file
0005 layout: default
0006 ---
0007
0008 {% include layouts/title.md %}
0009
0010 # Production Files Access
0011
0012 Starting from production campaign 25.01.1 onwards. Now files are registred to a catalog in Rucio (Data Mangement Software).
0013 All old files will be registred to rucio, notification to follow
0014
0015 To see what files are available and how to access it use Rucio.
0016
0017 - Files are now registered with Rucio, the Data Management System.
0018 - Access Rucio client from `eic-shell`:
0019 ```shell
0020 $ ./eic-shell
0021 $ rucio whoami
0022 ```
0023
0024 - Files are registered in Rucio with a format similar to xrootd, excluding the base path `/volatile/eic/EPIC`.
0025 - Data Identifiers (DID) are structured as `scope:name`. For "epic," the scope is always `epic`, resulting in DIDs like:
0026 - `epic:/EVGEN/...` for EVEGEN files
0027 - `epic:/FULL/...` for FULL simulation files
0028 - `epic:/RECO/...` for Reconstructed output files
0029 - `epic:/LOGS/...` for Log files
0030
0031 ## Step by step guide.
0032 ### First find the location of files.
0033
0034 - **List datasets for a campaign** :
0035 command: `rucio list-dids --short <dids>`
0036 ```shell
0037 $ rucio list-dids --short epic:/RECO/25.01.1/*
0038
0039 epic:/RECO/25.01.1/epic_craterlake/DIS/NC/18x275/minQ2=100
0040 epic:/RECO/25.01.1/epic_craterlake/DIS/NC/10x100/minQ2=1
0041 epic:/RECO/25.01.1/epic_craterlake/DIS/NC/18x275/minQ2=1000
0042 epic:/RECO/25.01.1/epic_craterlake/DIS/NC/18x275/minQ2=1
0043 epic:/RECO/25.01.1/epic_craterlake/DIS/NC/10x100/minQ2=10
0044 epic:/RECO/25.01.1/epic_craterlake/BACKGROUNDS/SYNRAD/dataprod_rel_1.0.0/18x275
0045 epic:/RECO/25.01.1/epic_craterlake/DIS/NC/18x275/minQ2=10
0046 ....
0047 ```
0048 Note: The list shown above is truncated for preview.
0049 Replace `25.01.1` with any other campaign.
0050
0051 - **List files within a dataset**:
0052 command: `rucio list-content --short <did>`
0053 ```shell
0054 $ rucio list-content --short epic:/RECO/25.01.1/epic_craterlake/DIS/NC/10x100/minQ2=10
0055
0056 epic:/RECO/25.01.1/epic_craterlake/DIS/NC/10x100/minQ2=10/pythia8NCDIS_10x100_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_5.1105.eicrecon.tree.edm4eic.root
0057 epic:/RECO/25.01.1/epic_craterlake/DIS/NC/10x100/minQ2=10/pythia8NCDIS_10x100_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_5.1106.eicrecon.tree.edm4eic.root
0058 epic:/RECO/25.01.1/epic_craterlake/DIS/NC/10x100/minQ2=10/pythia8NCDIS_10x100_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_5.1107.eicrecon.tree.edm4eic.root
0059 epic:/RECO/25.01.1/epic_craterlake/DIS/NC/10x100/minQ2=10/pythia8NCDIS_10x100_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_5.1108.eicrecon.tree.edm4eic.root
0060 epic:/RECO/25.01.1/epic_craterlake/DIS/NC/10x100/minQ2=10/pythia8NCDIS_10x100_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_5.1109.eicrecon.tree.edm4eic.root
0061 epic:/RECO/25.01.1/epic_craterlake/DIS/NC/10x100/minQ2=10/pythia8NCDIS_10x100_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_5.1110.eicrecon.tree.edm4eic.root
0062 epic:/RECO/25.01.1/epic_craterlake/DIS/NC/10x100/minQ2=10/pythia8NCDIS_10x100_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_5.1111.eicrecon.tree.edm4eic.root
0063 ```
0064 Note: The list shown above is truncated for preview.
0065
0066 - **Find location of files**:
0067 command: `rucio list-file-replicas --protocol root --pfns <did>`
0068 ```shell
0069 $ rucio list-file-replicas --protocol root --pfns epic:/RECO/25.01.1/epic_craterlake/DIS/NC/10x100/minQ2=10/pythia8NCDIS_10x100_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_5.0255.eicrecon.tree.edm4eic.root
0070
0071 root://dtn-rucio.jlab.org:1094//volatile/eic/EPIC//RECO/25.01.1/epic_craterlake/DIS/NC/10x100/minQ2=10/pythia8NCDIS_10x100_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_5.0255.eicrecon.tree.edm4eic.root
0072 ```
0073
0074 #### Access methods for production files include:
0075
0076 - **Download all files in a dataset at once with `rucio download <dataset>`**
0077 ```shell
0078 rucio download epic:/RECO/25.01.1/epic_craterlake/DIS/NC/18x275/minQ2=100
0079 ```
0080
0081 or multiple datasets at once
0082 ```shell
0083 rucio download <dataset1> <dataset2>
0084 ```
0085
0086 - **Download single file with `rucio download <file_did>`**
0087 ```shell
0088 rucio download epic:/RECO/25.01.1/epic_craterlake/DIS/NC/10x100/minQ2=10/pythia8NCDIS_10x100_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_5.1105.eicrecon.tree.edm4eic.root
0089 ```
0090
0091 - **Copying with `xrdcp`:**
0092 ```shell
0093 xrdcp root://dtn-rucio.jlab.org:1094//volatile/eic/EPIC/RECO/25.01.1/epic_craterlake/DIS/NC/10x100/minQ2=10/pythia8NCDIS_10x100_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_5.0255.eicrecon.tree.edm4eic.root <local destination>
0094 ```
0095
0096 - **Copying with `gfal-copy`:**
0097 ```shell
0098 gfal-copy root://dtn-rucio.jlab.org:1094//volatile/eic/EPIC/RECO/25.01.1/epic_craterlake/DIS/NC/10x100/minQ2=10/pythia8NCDIS_10x100_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_5.0255.eicrecon.tree.edm4eic.root <local destination>
0099 ```
0100
0101 - **Opening directly with ROOT:**
0102 ```c++
0103 auto f = TFile::Open("root://dtn-rucio.jlab.org:1094//volatile/eic/EPIC/RECO/25.01.1/epic_craterlake/DIS/NC/10x100/minQ2=10/pythia8NCDIS_10x100_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_5.0255.eicrecon.tree.edm4eic.root")
0104 ```
0105 or using Python
0106 ```python
0107 import uproot
0108 file_path = "root://dtn-rucio.jlab.org:1094//volatile/eic/EPIC/RECO/25.01.1/epic_craterlake/DIS/NC/10x100/minQ2=10/pythia8NCDIS_10x100_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_5.0255.eicrecon.tree.edm4eic.root"
0109 root_file = uproot.open(file_path)
0110 ```
0111
0112 ```python
0113 import ROOT
0114 file_path = "root://dtn-rucio.jlab.org:1094//volatile/eic/EPIC/RECO/25.01.1/epic_craterlake/DIS/NC/10x100/minQ2=10/pythia8NCDIS_10x100_minQ2=10_beamEffects_xAngle=-0.025_hiDiv_5.0255.eicrecon.tree.edm4eic.root"
0115 file = ROOT.TFile.Open(file_path, "READ")
0116 ```
0117