hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
cnvStdhepToRoot_cfg.py
Go to the documentation of this file.
1import HpstrConf
2import baseConfig as base
3import os
4
5
6options = base.parser.parse_args()
7
8# Use the input file to set the output file name
9stdhep_file = options.inFilename[0]
10root_file = options.outFilename
11
12
14
15p.run_mode = 2
16p.skip_events = options.skip_events
17p.max_events = options.nevents
18
19# Library containing processors
20p.libraries.append("libprocessors.so")
21
22
25
26cnvStd = HpstrConf.Processor('cnvStd', 'StdhepMCParticleProcessor')
27
28
32cnvStd.parameters["mcPartCollStdhep"] = 'MCParticle'
33cnvStd.parameters["mcPartCollRoot"] = 'MCParticle'
34cnvStd.parameters["skipEvent"] = options.skip_events
35if options.nevents > -1:
36 cnvStd.parameters["maxEvent"] = options.skip_events+options.nevents
37else:
38 cnvStd.parameters["maxEvent"] = -1
39# Sequence which the processors will run.
40p.sequence = [cnvStd]
41
42p.input_files = [stdhep_file]
43#p.input_files=[]
44p.output_files = [root_file]
45
46p.printProcess()
Process python class.
Definition HpstrConf.py:20
Processor python class.
Definition HpstrConf.py:4