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
simPartTuple_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')
31svthits = HpstrConf.Processor('svthits', 'Tracker2DHitProcessor')
32rawsvt = HpstrConf.Processor('rawsvt', 'SvtRawDataProcessor')
33mcthits = HpstrConf.Processor('mcthits', 'MCTrackerHitProcessor')
34mcehits = HpstrConf.Processor('mcehits', 'MCEcalHitProcessor')
35ecal = HpstrConf.Processor('ecal', 'ECalDataProcessor')
36fsp = HpstrConf.Processor('fps', 'FinalStateParticleProcessor')
37mcpart = HpstrConf.Processor('mcpart', 'MCParticleProcessor')
38
39
43header.parameters["debug"] = 0
44header.parameters["headCollRoot"] = "EventHeader"
45header.parameters["trigCollLcio"] = "TriggerBank"
46header.parameters["rfCollLcio"] = "RFHits"
47header.parameters["vtpCollLcio"] = "VTPBank"
48header.parameters["vtpCollRoot"] = "VTPBank"
49header.parameters["tsCollLcio"] = "TSBank"
50header.parameters["tsCollRoot"] = "TSBank"
51
52# SvtRawData
53rawsvt.parameters["debug"] = 0
54rawsvt.parameters["hitCollLcio"] = 'SVTRawTrackerHits'
55rawsvt.parameters["hitfitCollLcio"] = 'SVTFittedRawTrackerHits'
56rawsvt.parameters["hitCollRoot"] = 'SVTRawTrackerHits'
57
58# Tracker2DHits
59svthits.parameters["debug"] = 0
60svthits.parameters["hitCollLcio"] = 'StripClusterer_SiTrackerHitStrip1D'
61svthits.parameters["hitCollRoot"] = 'SiClusters'
62svthits.parameters["mcPartRelLcio"] = 'SVTTrueHitRelations'
63
64# Tracking
65track.parameters["debug"] = 0
66track.parameters["trkCollLcio"] = 'KalmanFullTracks'
67track.parameters["trkCollRoot"] = 'KalmanFullTracks'
68track.parameters["kinkRelCollLcio"] = ''
69track.parameters["trkRelCollLcio"] = 'KFTrackDataRelations'
70track.parameters["trkhitCollRoot"] = 'SiClustersOnTrack'
71track.parameters["hitFitsCollLcio"] = 'SVTFittedRawTrackerHits'
72
73# Only for detail studies
74# LT uncomment
75track.parameters["rawhitCollRoot"] = 'SVTRawHitsOnTrack_KF'
76
77# LT uncommented
78# if (not options.isData):
79# track.parameters["truthTrackCollLcio"] = 'KalmanFullTracksToTruthTrackRelations'
80# track.parameters["truthTrackCollRoot"] = 'Truth_KFTracks'
81
82# LT check if we need the b field or not -- version of HPS java
83# for Jess's files need to give it b-field
84
85track.parameters["bfield"] = bfield[str(options.year)]
86
87# ECalData
88ecal.parameters["debug"] = 0
89ecal.parameters["hitCollLcio"] = 'EcalCalHits'
90ecal.parameters["hitCollRoot"] = 'RecoEcalHits'
91ecal.parameters["clusCollLcio"] = "EcalClustersCorr"
92ecal.parameters["clusCollRoot"] = "RecoEcalClusters"
93
94#MCTrackerHits
95mcthits.parameters["debug"] = 0
96mcthits.parameters["hitCollLcio"] = 'TrackerHits'
97mcthits.parameters["hitCollRoot"] = 'TrackerSimHits'
98
99#MCEcalHits
100mcehits.parameters["debug"] = 0
101mcehits.parameters["hitCollLcio"] = 'EcalHits'
102mcehits.parameters["hitCollRoot"] = 'EcalSimHits'
103
104#FinalStateParticleProcessor
105fsp.parameters["debug"] = 0
106fsp.parameters["fspCollLcio"] = "FinalStateParticles_KF"
107fsp.parameters["fspCollRoot"] = "FinalStateParticles_KF"
108fsp.parameters["kinkRelCollLcio"] = ""
109fsp.parameters["trkRelCollLcio"] = "KFTrackDataRelations"
110fsp.parameters["trkhitCollRoot"] = "fspOnTrackHits"
111fsp.parameters["rawhitCollRoot"] = "fspOnTrackRawHits"
112fsp.parameters["hitFitsCollLcio"] = "SVTFittedRawTrackerHits"
113
114# MCParticle
115mcpart.parameters["debug"] = 0
116mcpart.parameters["mcPartCollLcio"] = 'MCParticle'
117mcpart.parameters["mcPartCollRoot"] = 'MCParticle'
118
119sequence = [header, ecal, track, svthits, rawsvt, mcthits, mcehits, mcpart]
120
121p.sequence = sequence
122
123p.input_files = lcio_file
124p.output_files = [root_file]
125
126p.printProcess()
Process python class.
Definition HpstrConf.py:20
Processor python class.
Definition HpstrConf.py:4