A direct look into the .slcio file

Analysis of the \(e^+e^- \to e^+e^-\) .slcio file

Note

We are not aware of an array-based way for extracting the particles from .slcio files. Thus, we will restrict ourselves to low events numbers, or overview level variables. More quantitative studies will follow in the ROOT BASED part.

Let’s check that the .slcio file actually exists:

! echo  /data_ilc/flc/kunath/local_only/eehiq
!ls -lh /data_ilc/flc/kunath/local_only/eehiq
/data_ilc/flc/kunath/local_only/eehiq
total 1,8G
-rw-r--r-- 1 kunath ilc  43M  2 mars  16:55 anajob_events.csv
-rw-r--r-- 1 kunath ilc  84M  2 mars  15:55 anajob.txt
-rw-r--r-- 1 kunath ilc 498M 21 févr. 17:55 P2f_z_eehiq.root
-rw-r----- 1 kunath ilc 1,2G  7 févr. 21:12 rv02-02.sv02-02.mILD_l5_o1_v02.E250-SetA.I500002.P2f_z_eehiq.eL.pR.n000.d_dstm_15783_0.slcio
from pyLCIO.io.LcioReader import LcioReader

folder = "/data_ilc/flc/kunath/local_only/eehiq"
bhabha_data = (
    folder
    + "/rv02-02.sv02-02.mILD_l5_o1_v02.E250-SetA.I500002.P2f_z_eehiq.eL.pR.n000.d_dstm_15783_0.slcio"
)
reader = LcioReader(bhabha_data)
Welcome to JupyROOT 6.24/06
Loading LCIO ROOT dictionaries ...

Available collections

for event in reader:
    for collectionName in event.getCollectionNames():
        print(collectionName)
    break
BuildUpVertex
BuildUpVertex_RP
BuildUpVertex_V0
BuildUpVertex_V0_RP
ClusterMCTruthLink
DistilledPFOs
GammaGammaCandidateEtaPrimes
GammaGammaCandidateEtas
GammaGammaCandidatePi0s
GammaGammaParticles
MCParticlesSkimmed
MCTruthClusterLink
MCTruthMarlinTrkTracksLink
MCTruthRecoLink
MarlinTrkTracks
MarlinTrkTracksKaon
MarlinTrkTracksMCTruthLink
MarlinTrkTracksProton
PandoraClusters
PandoraPFOs
PrimaryVertex
PrimaryVertex_RP
RecoMCTruthLink

Typical number of PFOs per event

import matplotlib.pyplot as plt
import numpy as np

pfo_counts = []
for i, event in zip(range(500), reader):
    collection = event.getCollection("PandoraPFOs")
    pfo_counts.append(len(collection))
plt.hist(pfo_counts, bins=np.arange(-0.5, max(pfo_counts) + 1, 1))
plt.xlabel("# PFOs in $e^+e^- \\to e^+e^-$ events");
../_images/LCIO_6_0.png