HPS-MC
tritrig_gen_to_slic_job.py
Go to the documentation of this file.
1 """!
2 @file tritrig_gen_to_beam_coords_job.py
3 
4 Simulate tritrig events, add mother particle information and rotate events into beam coordinates.
5 """
6 from hpsmc.generators import MG5, StdHepConverter
7 from hpsmc.tools import Unzip, AddMotherFullTruth, BeamCoords, SLIC
8 
9 job.description = 'Generate tritrig events and simulate passage through detector'
10 
11 if 'nevents' in job.params:
12  nevents = job.params['nevents']
13 else:
14  nevents = 10000
15 
16 
17 mg = MG5(name='tritrig')
18 
19 
20 unzip = Unzip(inputs=mg.output_files())
21 
22 
23 cnv = StdHepConverter(inputs=mg.output_files(),
24  outputs=['tritrig.stdhep'])
25 
26 
27 mom = AddMotherFullTruth(inputs=[cnv.output_files()[0], unzip.output_files()[0]],
28  outputs=['tritrig_mom.stdhep'])
29 
30 
31 rot = BeamCoords(inputs=['tritrig_mom.stdhep'],
32  outputs=['tritrig_mom_rot.stdhep'])
33 
34 
35 job.ptag('gen', 'tritrig_mom_rot.stdhep')
36 
37 
38 slic = SLIC(inputs=['tritrig_mom_rot.stdhep'],
39  outputs=['tritrig_mom_rot.slcio'],
40  nevents=nevents + 1)
41 
42 
43 job.add([mg, unzip, cnv, mom, rot, slic])
Run the MadGraph 5 event generator.
Definition: generators.py:402
Target processing and conversion of LHE files to StdHep using EGS5.
Definition: generators.py:135
Add full truth mother particles for physics samples.
Definition: tools.py:742
Transform StdHep events into beam coordinates.
Definition: tools.py:516
Run the SLIC Geant4 simulation.
Definition: tools.py:15
Unzip the input files to outputs.
Definition: tools.py:1218
Tools that can be used in HPSMC jobs.
Definition: tools.py:1