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