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
anaTrkEff_2016_cfg.py
Go to the documentation of this file.
1import HpstrConf
2import sys
3import os
4import baseConfig
5
6(options,args) = baseConfig.parser.parse_args()
7
8
9# Use the input file to set the output file name
10infile = options.inFilename
11outfile = options.outFilename
12
13print 'Input file: %s' % infile
14print 'Output file: %s' % outfile
15
17
18p.run_mode = 1
19#p.max_events = 1000
20
21# Library containing processors
22p.add_library("libprocessors")
23
24
27
28vtxana = HpstrConf.Processor('vtxana', 'TrackEfficiencyProcessor')
29
30
34vtxana.parameters["debug"] = 1
35vtxana.parameters["anaName"] = "vtxana"
36vtxana.parameters["trkColl"] = "GBLTracks"
37vtxana.parameters["cluColl"] = "RecoEcalClusters"
38vtxana.parameters["fspartColl"] = "FinalStateParticles"
39vtxana.parameters["cluSelectionjson"] = os.environ['HPSTR_BASE']+'/analysis/selections/clusterSelection-2016.json'
40vtxana.parameters["histoCfg"] = os.environ['HPSTR_BASE']+"/analysis/plotconfigs/trkeff/trkEffPlotConfig-2.3gev.json"
41vtxana.parameters["cluHistoCfg"] = os.environ['HPSTR_BASE']+"/analysis/plotconfigs/trkeff/trkEffPreSelPlotConfig-2.3gev.json"
42vtxana.parameters["beamE"] = 2.3
43vtxana.parameters["isData"] = options.isData
44CalTimeOffset=-999
45
46if (options.isData==1):
47 CalTimeOffset=56.
48 print "Running on data file: Setting CalTimeOffset %d" % CalTimeOffset
49
50elif (options.isData==0):
51 CalTimeOffset=43.
52 print "Running on MC file: Setting CalTimeOffset %d" % CalTimeOffset
53else:
54 print "Specify which type of ntuple you are running on: -t 1 [for Data] / -t 0 [for MC]"
55
56
57vtxana.parameters["CalTimeOffset"]=CalTimeOffset
58
59#Region definitions
60
61RegionPath=os.environ['HPSTR_BASE']+"/analysis/selections/"
62vtxana.parameters["regionDefinitions"] = [RegionPath+'trkEffFiducial.json',RegionPath+'trkEffAllECal.json']
63
64# Sequence which the processors will run.
65p.sequence = [vtxana]
66
67p.input_files=[infile]
68p.output_files = [outfile]
69
70p.printProcess()
71
72
Process python class.
Definition HpstrConf.py:20
Processor python class.
Definition HpstrConf.py:4