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
simpTuple_2016_cfg.py
Go to the documentation of this file.
1import HpstrConf
2import sys
3import baseConfig as base
4from baseConfig import bfield
5
6base.parser.add_argument("-TS", "--trackstate", type=str, dest="trackstate",
7 help="Specify Track State | 'AtECal', 'AtTarget'. Default is origin ", metavar="trackstate", default="AtTarget")
8
9options = base.parser.parse_args()
10
11# Use the input file to set the output file name
12lcio_file = options.inFilename
13root_file = options.outFilename
14
15print('LCIO file: %s' % lcio_file)
16print('Root file: %s' % root_file)
17
19
20# p.max_events = 1000
21p.run_mode = 0
22p.skip_events = options.skip_events
23p.max_events = options.nevents
24
25# Library containing processors
26p.add_library("libprocessors")
27
28
31header = HpstrConf.Processor('header', 'EventProcessor')
32vtx = HpstrConf.Processor('vtx', 'VertexProcessor')
33mcpart = HpstrConf.Processor('mcpart', 'MCParticleProcessor')
34
35
39header.parameters["debug"] = 0
40header.parameters["headCollRoot"] = "EventHeader"
41header.parameters["trigCollLcio"] = "TriggerBank"
42header.parameters["rfCollLcio"] = "RFHits"
43header.parameters["vtpCollLcio"] = "VTPBank"
44header.parameters["vtpCollRoot"] = "VTPBank"
45header.parameters["tsCollLcio"] = "TSBank"
46header.parameters["tsCollRoot"] = "TSBank"
47
48# Vertex
49vtx.parameters["debug"] = 0
50vtx.parameters["vtxCollLcio"] = 'UnconstrainedV0Vertices_KF'
51vtx.parameters["vtxCollRoot"] = 'UnconstrainedV0Vertices_KF'
52vtx.parameters["partCollRoot"] = 'ParticlesOnUVertices_KF'
53vtx.parameters["kinkRelCollLcio"] = ''
54vtx.parameters["trkRelCollLcio"] = 'KFTrackDataRelations'
55vtx.parameters["trkhitCollRoot"] = ''
56vtx.parameters["hitFitsCollLcio"] = 'SVTFittedRawTrackerHits'
57vtx.parameters["rawhitCollRoot"] = ''
58vtx.parameters["trackStateLocation"] = options.trackstate
59if options.trackstate == "":
60 vtx.parameters["bfield"] = bfield[str(options.year)]
61vtx.parameters["mcPartRelLcio"] = 'SVTTrueHitRelations'
62
63# MCParticle
64mcpart.parameters["debug"] = 0
65mcpart.parameters["mcPartCollLcio"] = 'MCParticle'
66mcpart.parameters["mcPartCollRoot"] = 'MCParticle'
67
68sequence = [header, vtx]
69
70# If MC, get MCParticles
71if (not options.isData):
72 sequence.append(mcpart)
73
74p.sequence = sequence
75
76p.input_files = lcio_file
77p.output_files = [root_file]
78
79p.printProcess()
Process python class.
Definition HpstrConf.py:20
Processor python class.
Definition HpstrConf.py:4