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 --rses isopenaccess 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 If you see multiple replicas you can use any one of those. You can check using `rucio list-rses --rses isopenaccess` for a full list of RSE's.
0074
0075 #### Access methods for production files include:
0076
0077 - **Download all files in a dataset at once with `rucio download <dataset>`**
0078 ```shell
0079 rucio download epic:/RECO/25.01.1/epic_craterlake/DIS/NC/18x275/minQ2=100
0080 ```
0081
0082 or multiple datasets at once
0083 ```shell
0084 rucio download <dataset1> <dataset2>
0085 ```
0086
0087 - **Download single file with `rucio download <file_did>`**
0088 ```shell
0089 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
0090 ```
0091
0092 - **Copying with `xrdcp`:**
0093 ```shell
0094 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>
0095 ```
0096
0097 - **Copying with `gfal-copy`:**
0098 ```shell
0099 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>
0100 ```
0101
0102 - **Opening directly with ROOT:**
0103 ```c++
0104 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")
0105 ```
0106 or using Python
0107 ```python
0108 import uproot
0109 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"
0110 root_file = uproot.open(file_path)
0111 ```
0112
0113 ```python
0114 import ROOT
0115 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"
0116 file = ROOT.TFile.Open(file_path, "READ")
0117 ```
0118