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
kalTuple_cfg.py
Go to the documentation of this file.
1import HpstrConf
2import sys
3
4import baseConfig as base
5from baseConfig import bfield
6
7options = base.parser.parse_args()
8
9# Use the input file to set the output file name
10lcio_file = options.inFilename
11root_file = options.outFilename
12
13print('LCIO file: %s' % lcio_file)
14print('Root file: %s' % root_file)
15
17
18#p.max_events = 1000
19p.run_mode = 0
20p.skip_events = options.skip_events
21p.max_events = options.nevents
22
23# Library containing processors
24p.add_library("libprocessors")
25
26
29header = HpstrConf.Processor('header', 'EventProcessor')
30track = HpstrConf.Processor('track', 'TrackingProcessor')
31trackgbl = HpstrConf.Processor('trackgbl', 'TrackingProcessor')
32trackrefitgbl = HpstrConf.Processor('trackrefitgbl', 'TrackingProcessor')
33svthits = HpstrConf.Processor('svthits', 'Tracker3DHitProcessor')
34rawsvt = HpstrConf.Processor('rawsvt', 'SvtRawDataProcessor')
35ecal = HpstrConf.Processor('ecal', 'ECalDataProcessor')
36vtx = HpstrConf.Processor('vtx', 'VertexProcessor')
37vtxgbl = HpstrConf.Processor('vtxgbl', 'VertexProcessor')
38cvtxgbl = HpstrConf.Processor('cvtxgbl', 'VertexProcessor')
39mcpart = HpstrConf.Processor('mcpart', 'MCParticleProcessor')
40
41
45header.parameters["debug"] = 0
46header.parameters["headCollRoot"] = "EventHeader"
47header.parameters["trigCollLcio"] = "TriggerBank"
48header.parameters["rfCollLcio"] = "RFHits"
49header.parameters["vtpCollLcio"] = "VTPBank"
50header.parameters["vtpCollRoot"] = "VTPBank"
51header.parameters["tsCollLcio"] = "TSBank"
52header.parameters["tsCollRoot"] = "TSBank"
53
54#SvtRawData
55rawsvt.parameters["debug"] = 0
56rawsvt.parameters["hitCollLcio"] = 'SVTRawTrackerHits'
57rawsvt.parameters["hitfitCollLcio"] = 'SVTFittedRawTrackerHits'
58rawsvt.parameters["hitCollRoot"] = 'SVTRawTrackerHits'
59
60#Tracker3DHits
61svthits.parameters["debug"] = 0
62svthits.parameters["hitCollLcio"] = 'RotatedHelicalTrackHits'
63svthits.parameters["hitCollRoot"] = 'RotatedHelicalTrackHits'
64
65
66#Tracking
67track.parameters["debug"] = 0
68track.parameters["trkCollLcio"] = 'KalmanFullTracks'
69track.parameters["trkCollRoot"] = 'KalmanFullTracks'
70track.parameters["kinkRelCollLcio"] = ''
71track.parameters["trkRelCollLcio"] = 'KFTrackDataRelations'
72track.parameters["trkhitCollRoot"] = 'SiClustersOnTrack'
73track.parameters["hitFitsCollLcio"] = 'SVTFittedRawTrackerHits'
74track.parameters["rawhitCollRoot"] = ''
75
76#Only for detail studies
77track.parameters["rawhitCollRoot"] = '' # 'SCTRawHitsOnTrack_KF'
78
79if (not options.isData):
80 track.parameters["truthTrackCollLcio"] = 'KalmanFullTracksToTruthTrackRelations'
81 track.parameters["truthTrackCollRoot"] = 'Truth_KFTracks'
82
83track.parameters["bfield"] = bfield[str(options.year)]
84
85trackgbl.parameters["debug"] = 0
86trackgbl.parameters["trkCollLcio"] = 'GBLTracks'
87trackgbl.parameters["trkCollRoot"] = 'GBLTracks'
88trackgbl.parameters["kinkRelCollLcio"] = 'GBLKinkDataRelations'
89trackgbl.parameters["trkRelCollLcio"] = 'TrackDataRelations'
90trackgbl.parameters["trkhitCollRoot"] = 'RotatedHelicalOnTrackHits'
91trackgbl.parameters["hitFitsCollLcio"] = 'SVTFittedRawTrackerHits'
92
93#Only for detail studies
94trackgbl.parameters["rawhitCollRoot"] = '' # 'SVTRawHitsOnTrack'
95
96if (not options.isData):
97 trackgbl.parameters["truthTrackCollLcio"] = 'GBLTracksToTruthTrackRelations'
98 trackgbl.parameters["truthTrackCollRoot"] = 'Truth_GBLTracks'
99trackgbl.parameters["bfield"] = bfield[str(options.year)]
100
101#ECalData
102ecal.parameters["debug"] = 0
103ecal.parameters["hitCollLcio"] = 'EcalCalHits'
104ecal.parameters["hitCollRoot"] = '' # 'RecoEcalHits'
105ecal.parameters["clusCollLcio"] = "EcalClustersCorr"
106ecal.parameters["clusCollRoot"] = "RecoEcalClusters"
107
108#Vertex
109vtx.parameters["debug"] = 0
110vtx.parameters["vtxCollLcio"] = 'UnconstrainedV0Vertices_KF'
111vtx.parameters["vtxCollRoot"] = 'UnconstrainedV0Vertices_KF'
112vtx.parameters["partCollRoot"] = 'ParticlesOnVertices_KF'
113vtx.parameters["kinkRelCollLcio"] = ''
114vtx.parameters["trkRelCollLcio"] = 'KFTrackDataRelations'
115
116
117vtxgbl.parameters["debug"] = 0
118vtxgbl.parameters["vtxCollLcio"] = 'UnconstrainedV0Vertices'
119vtxgbl.parameters["vtxCollRoot"] = 'UnconstrainedV0Vertices'
120vtxgbl.parameters["partCollRoot"] = 'ParticlesOnVertices'
121vtxgbl.parameters["kinkRelCollLcio"] = 'GBLKinkDataRelations'
122vtxgbl.parameters["trkRelCollLcio"] = 'TrackDataRelations'
123
124
125cvtxgbl.parameters["debug"] = 0
126cvtxgbl.parameters["vtxCollLcio"] = 'TargetConstrainedV0Vertices'
127cvtxgbl.parameters["vtxCollRoot"] = 'TargetConstrainedV0Vertices'
128cvtxgbl.parameters["partCollRoot"] = 'ParticlesOnVertices'
129cvtxgbl.parameters["kinkRelCollLcio"] = 'GBLKinkDataRelations'
130cvtxgbl.parameters["trkRelCollLcio"] = 'TrackDataRelations'
131
132
133#MCParticle
134mcpart.parameters["debug"] = 0
135mcpart.parameters["mcPartCollLcio"] = 'MCParticle'
136mcpart.parameters["mcPartCollRoot"] = 'MCParticle'
137
138# Sequence which the processors will run.
139if (not options.isData):
140 p.sequence = [header, vtx, vtxgbl, cvtxgbl, ecal, track, trackgbl, mcpart]
141else:
142 p.sequence = [header, vtx, vtxgbl, cvtxgbl, ecal, track, trackgbl]
143
144p.input_files = lcio_file
145p.output_files = [root_file]
146
147
148p.printProcess()
Process python class.
Definition HpstrConf.py:20
Processor python class.
Definition HpstrConf.py:4