Skip to content
Draft
82 changes: 82 additions & 0 deletions .github/workflows/013-electrons.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: 013-electrongun
on: ['push']
jobs:
evgen:
runs-on: ubuntu-latest
container: infnpd/mucoll-ilc-framework:1.6-centos8
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
id: cache-evgen
name: Cache Event Generation
uses: actions/cache@v2
with:
path: ./electronGun_evgen.slcio
key: events-${{ hashFiles('evtgen/013-electrongun/gen_electron_gun.py') }}
- name: Generate Events
if: steps.cache-evgen.outputs.cache-hit != 'true'
run: |
source /opt/ilcsoft/muonc/init_ilcsoft.sh
python evtgen/013-electrongun/gen_electron_gun.py -o electronGun_evgen.slcio -n 10
sim:
runs-on: ubuntu-latest
container: infnpd/mucoll-ilc-framework:1.6-centos8
needs: evgen
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
id: cache-evgen
name: Cache Event Generation
uses: actions/cache@v2
with:
path: ./electronGun_evgen.slcio
key: events-${{ hashFiles('evtgen/013-electrongun/gen_electron_gun.py') }}
-
id: cache-sim
name: Cache Simulation
uses: actions/cache@v2
with:
path: ./electronGun_sim.slcio
key: events-${{ hashFiles('simulation/013-electrongun/sim_steer.py') }}
- name: Simulate Events
if: steps.cache-sim.outputs.cache-hit != 'true'
run: |
source /opt/ilcsoft/muonc/init_ilcsoft.sh
ddsim --inputFiles electronGun_evgen.slcio --outputFile electronGun_sim.slcio --steeringFile simulation/013-electrongun/sim_steer.py
reco:
runs-on: ubuntu-latest
container: infnpd/mucoll-ilc-framework:1.6-centos8
needs: sim
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
id: cache-sim
name: Cache Simulation
uses: actions/cache@v2
with:
path: ./electronGun_sim.slcio
key: events-${{ hashFiles('simulation/013-electrongun/sim_steer.py') }}
-
id: cache-reco
name: Cache Event Generation
uses: actions/cache@v2
with:
path: ./electronGun_evgen.slcio
key: events-${{ hashFiles('reconstruction/013-electrongun/reco_steer_all.xml') }}
- name: Reconstruct Events
if: steps.cache-reco.outputs.cache-hit != 'true'
run: |
source /opt/ilcsoft/muonc/init_ilcsoft.sh
Marlin --global.LCIOInputFiles=electronGun_sim.slcio --MyDDMarlinPandora.PandoraSettingsXmlFile=reconstruction/013-electrongun/PandoraSettings/PandoraSettingsDefault.xml --Output_REC.LCIOOutputFile=electronGun_reco.slcio reconstruction/013-electrongun/reco_steer_all.xml
82 changes: 82 additions & 0 deletions .github/workflows/020-acts-nobib.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: 020-acts-nobib
on: ['push']
jobs:
evgen:
runs-on: ubuntu-latest
container: infnpd/mucoll-ilc-framework:1.6-centos8
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
id: cache-evgen
name: Cache Event Generation
uses: actions/cache@v2
with:
path: ./electronGun_evgen.slcio
key: events-${{ hashFiles('evtgen/013-electrongun/gen_electron_gun.py') }}
- name: Generate Events
if: steps.cache-evgen.outputs.cache-hit != 'true'
run: |
source /opt/ilcsoft/muonc/init_ilcsoft.sh
python evtgen/013-electrongun/gen_electron_gun.py -o electronGun_evgen.slcio -n 10
sim:
runs-on: ubuntu-latest
container: infnpd/mucoll-ilc-framework:1.6-centos8
needs: evgen
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
id: cache-evgen
name: Cache Event Generation
uses: actions/cache@v2
with:
path: ./electronGun_evgen.slcio
key: events-${{ hashFiles('evtgen/013-electrongun/gen_electron_gun.py') }}
-
id: cache-sim
name: Cache Simulation
uses: actions/cache@v2
with:
path: ./electronGun_sim.slcio
key: events-${{ hashFiles('simulation/013-electrongun/sim_steer.py') }}
- name: Simulate Events
if: steps.cache-sim.outputs.cache-hit != 'true'
run: |
source /opt/ilcsoft/muonc/init_ilcsoft.sh
ddsim --inputFiles electronGun_evgen.slcio --outputFile electronGun_sim.slcio --steeringFile simulation/013-electrongun/sim_steer.py
reco:
runs-on: ubuntu-latest
container: infnpd/mucoll-ilc-framework:1.6-centos8
needs: sim
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
id: cache-sim
name: Cache Simulation
uses: actions/cache@v2
with:
path: ./electronGun_sim.slcio
key: events-${{ hashFiles('simulation/013-electrongun/sim_steer.py') }}
-
id: cache-reco
name: Cache Event Generation
uses: actions/cache@v2
with:
path: ./electronGun_evgen.slcio
key: events-${{ hashFiles('reconstruction/020-acts-nobib/reco_steer_all.xml') }}
- name: Reconstruct Events
if: steps.cache-reco.outputs.cache-hit != 'true'
run: |
source /opt/ilcsoft/muonc/init_ilcsoft.sh
Marlin --global.LCIOInputFiles=electronGun_sim.slcio --MyDDMarlinPandora.PandoraSettingsXmlFile=reconstruction/020-acts-nobib/PandoraSettings/PandoraSettingsDefault.xml --Output_REC.LCIOOutputFile=electronGun_reco.slcio reconstruction/020-acts-nobib/reco_steer_all.xml
82 changes: 82 additions & 0 deletions .github/workflows/021-acts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: 021-acts
on: ['push']
jobs:
evgen:
runs-on: ubuntu-latest
container: kkrizka/mucoll-ilc-framework:pr-8-centos8stream
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
id: cache-evgen
name: Cache Event Generation
uses: actions/cache@v2
with:
path: ./electronGun_evgen.slcio
key: events-${{ hashFiles('evtgen/013-electrongun/gen_electron_gun.py') }}
- name: Generate Events
if: steps.cache-evgen.outputs.cache-hit != 'true'
run: |
source /opt/ilcsoft/muonc/init_ilcsoft.sh
python evtgen/013-electrongun/gen_electron_gun.py -o electronGun_evgen.slcio -n 10
sim:
runs-on: ubuntu-latest
container: kkrizka/mucoll-ilc-framework:pr-8-centos8stream
needs: evgen
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
id: cache-evgen
name: Cache Event Generation
uses: actions/cache@v2
with:
path: ./electronGun_evgen.slcio
key: events-${{ hashFiles('evtgen/013-electrongun/gen_electron_gun.py') }}
-
id: cache-sim
name: Cache Simulation
uses: actions/cache@v2
with:
path: ./electronGun_sim.slcio
key: events-${{ hashFiles('simulation/013-electrongun/sim_steer.py') }}
- name: Simulate Events
if: steps.cache-sim.outputs.cache-hit != 'true'
run: |
source /opt/ilcsoft/muonc/init_ilcsoft.sh
ddsim --inputFiles electronGun_evgen.slcio --outputFile electronGun_sim.slcio --steeringFile simulation/013-electrongun/sim_steer.py
reco:
runs-on: ubuntu-latest
container: kkrizka/mucoll-ilc-framework:pr-8-centos8stream
needs: sim
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
id: cache-sim
name: Cache Simulation
uses: actions/cache@v2
with:
path: ./electronGun_sim.slcio
key: events-${{ hashFiles('simulation/013-electrongun/sim_steer.py') }}
-
id: cache-reco
name: Cache Event Generation
uses: actions/cache@v2
with:
path: ./electronGun_evgen.slcio
key: events-${{ hashFiles('reconstruction/021-acts/reco_steer_all.xml') }}
- name: Reconstruct Events
if: steps.cache-reco.outputs.cache-hit != 'true'
run: |
source /opt/ilcsoft/muonc/init_ilcsoft.sh
Marlin --global.LCIOInputFiles=electronGun_sim.slcio --MyDDMarlinPandora.PandoraSettingsXmlFile=reconstruction/021-acts/PandoraSettings/PandoraSettingsDefault.xml --Output_REC.LCIOOutputFile=electronGun_reco.slcio reconstruction/021-acts/reco_steer_all.xml
15 changes: 10 additions & 5 deletions evtgen/013-electrongun/gen_electron_gun.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,25 @@
import random
from array import array

import argparse

# --- LCIO dependencies ---
from pyLCIO import UTIL, EVENT, IMPL, IO, IOIMPL

#---- number of events ----------------------
nevt = 100000
#---- configuration options ----------------------

parser = argparse.ArgumentParser(description='Generate single particle events')
parser.add_argument('-n', '--nEvents', type=int, default=100000, help='number of events to generate')
parser.add_argument('-o', '--output', type=str, default='electronGun_gen.slcio', help='output file name')

outfile = "electronGun_gen.slcio"
args = parser.parse_args()

#--------------------------------------------


wrt = IOIMPL.LCFactory.getInstance().createLCWriter( )

wrt.open( outfile , EVENT.LCIO.WRITE_NEW )
wrt.open( args.output , EVENT.LCIO.WRITE_NEW )

random.seed()

Expand Down Expand Up @@ -55,7 +60,7 @@
#=================================================


for j in range( 0, nevt ):
for j in range( 0, args.nEvents ):

col = IMPL.LCCollectionVec( EVENT.LCIO.MCPARTICLE )
evt = IMPL.LCEventImpl()
Expand Down
Loading