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
anaTridentKF_2019_cfg.py
Go to the documentation of this file.
1import HpstrConf
2import sys
3import os
4import baseConfig
5
6options = 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', 'TridentWABAnaProcessor')
29
30
34vtxana.parameters["debug"] = 1
35vtxana.parameters["anaName"] = "vtxana"
36vtxana.parameters["cluColl"] = "RecoEcalClusters"
37vtxana.parameters["trkColl"] = "KalmanFullTracks"
38vtxana.parameters["vtxColl"] = "UnconstrainedV0Candidates_KF"
39#vtxana.parameters["hitColl"] = "RotatedHelicalTrackHits"
40vtxana.parameters["hitColl"] = "SiClustersOnTrack"
41vtxana.parameters["mcColl"] = "MCParticle"
42#vtxana.parameters["fspartColl"] = "FinalStateParticles_KF"
43vtxana.parameters["fspartColl"] = "ParticlesOnVertices_KF"
44vtxana.parameters["trkSelectionjson"] = os.environ['HPSTR_BASE']+'/analysis/selections/tridents/trackSelection-4pt5gev.json'
45vtxana.parameters["vtxSelectionjson"] = os.environ['HPSTR_BASE']+'/analysis/selections/tridents/tridentSelection-4pt5gev.json'
46#vtxana.parameters["histoCfg"] = os.environ['HPSTR_BASE']+"/analysis/plotconfigs/tracking/vtxAnalysis.json"
47vtxana.parameters["histoCfg"] = os.environ['HPSTR_BASE']+"/analysis/plotconfigs/tridents/triAnalysis-4pt5gev.json"
48vtxana.parameters["beamE"] = 4.5
49vtxana.parameters["isData"] = options.isData
50CalTimeOffset=-999
51
52#if (options.isData==1):
53# CalTimeOffset=56.
54# print "Running on data file: Setting CalTimeOffset %d" % CalTimeOffset
55
56#elif (options.isData==0):
57# CalTimeOffset=43.
58# print "Running on MC file: Setting CalTimeOffset %d" % CalTimeOffset
59#else:
60# print "Specify which type of ntuple you are running on: -t 1 [for Data] / -t 0 [for MC]"
61#below are 2019 numbers
62if (options.isData==1):
63 CalTimeOffset=43.
64 print("Running on data file: Setting CalTimeOffset %d" % CalTimeOffset)
65
66elif (options.isData==0):
67 CalTimeOffset=27.
68 print ("Running on MC file: Setting CalTimeOffset %d" % CalTimeOffset)
69
70vtxana.parameters["CalTimeOffset"]=CalTimeOffset
71
72#Region definitions
73
74RegionPath=os.environ['HPSTR_BASE']+"/analysis/selections/tridents/"
75#vtxana.parameters["regionDefinitions"] = [RegionPath+'Tight.json']
76#vtxana.parameters["regionDefinitions"] = ['./tridentL1L1.json','./tridentL1L2.json','./tridentL2L1.json','./tridentL2L2.json']
77#vtxana.parameters["regionDefinitions"] = ['cfgs2019/tridentAllLayerCombos.json']
78vtxana.parameters["regionDefinitions"] = [RegionPath+'/tridentAllLayerCombos.json',
79 RegionPath+'/tridentAllLayerCombos-PositronCluster.json',
80 RegionPath+'/tridentAllLayerCombos-PosClust-NoEleClust.json',
81 RegionPath+'/tridentAllLayerCombos-BothClusters.json',
82 RegionPath+'/tridentAllLayerCombos-RadCut.json',
83 RegionPath+'/tridentAllLayerCombos-PositronCluster-RadCut.json',
84 RegionPath+'/tridentAllLayerCombos-PosClust-NoEleClust-RadCut.json',
85 RegionPath+'/tridentAllLayerCombos-BothClusters-RadCut.json',
86 RegionPath+'/tridentAllLayerCombos-GammaStTruth-RadCut.json',
87 RegionPath+'/tridentAllLayerCombos-GammaStTruth-PositronCluster-RadCut.json',
88 RegionPath+'/tridentAllLayerCombos-GammaStTruth-BothClusters-RadCut.json',
89 RegionPath+'/tridentL1L1.json',
90 RegionPath+'/tridentL1L1-PositronCluster.json',
91 RegionPath+'/tridentL1L1-BothClusters.json',
92 RegionPath+'/tridentL1L1-PositronCluster-RadCut.json',
93 RegionPath+'/tridentL1L1-BothClusters-RadCut.json']
94# RegionPath+'/tridentL2L1.json',
95# RegionPath+'/tridentL2L1-PositronCluster.json',
96# RegionPath+'/tridentL2L1-BothClusters.json',
97# RegionPath+'/tridentL1L2.json',
98# RegionPath+'/tridentL1L2-PositronCluster.json',
99# RegionPath+'/tridentL1L2-BothClusters.json',
100# RegionPath+'/tridentL2L2.json',
101# RegionPath+'/tridentL2L2-PositronCluster.json',
102# RegionPath+'/tridentL2L2-BothClusters.json']
103vtxana.parameters["regionWABDefinitions"]=[RegionPath+'/wabL1ElectronCluster.json']
104# Sequence which the processors will run.
105p.sequence = [vtxana]
106
107p.input_files=infile
108p.output_files = [outfile]
109
110p.printProcess()
111
112
Process python class.
Definition HpstrConf.py:20
Processor python class.
Definition HpstrConf.py:4