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_2016_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
19p.max_events = options.nevents
20
21# Library containing processors
22p.add_library("libprocessors")
23
24
27
28vtxana = HpstrConf.Processor('vtxana', 'TridentWABAnaProcessor')
29
30
34vtxana.parameters["debug"] = 0
35vtxana.parameters["anaName"] = "vtxana"
36vtxana.parameters["cluColl"] = "RecoEcalClusters"
37vtxana.parameters["trkColl"] = "KalmanFullTracks"
38vtxana.parameters["vtxColl"] = "UnconstrainedV0Vertices_KF"
39#vtxana.parameters["hitColl"] = "RotatedHelicalTrackHits"
40vtxana.parameters["rawhitColl"] = "SVTRawHitsOnTrack_KF"
41#vtxana.parameters["hitColl"] = "fspOnTrackHits"
42vtxana.parameters["mcColl"] = "MCParticle"
43vtxana.parameters["fspartColl"] = "FinalStateParticles"
44#vtxana.parameters["fspartColl"] = "FinalStateParticles_KF"
45vtxana.parameters["trkSelectionjson"] = os.environ['HPSTR_BASE']+'/analysis/selections/tridents/trackSelection-2pt3gev.json'
46vtxana.parameters["vtxSelectionjson"] = os.environ['HPSTR_BASE']+'/analysis/selections/tridents/tridentSelection-2pt3gev.json'
47#vtxana.parameters["histoCfg"] = os.environ['HPSTR_BASE']+"/analysis/plotconfigs/tracking/vtxAnalysis.json"
48vtxana.parameters["histoCfg"] = os.environ['HPSTR_BASE']+"/analysis/plotconfigs/tridents/triAnalysis-2pt3gev.json"
49vtxana.parameters["beamE"] = 2.3
50vtxana.parameters["isData"] = options.isData
51#vtxana.parameters["isData"] = 1
52CalTimeOffset=-999
53
54
55
56#if (options.isData==1):
57# CalTimeOffset=56.
58# print "Running on data file: Setting CalTimeOffset %d" % CalTimeOffset
59
60#elif (options.isData==0):
61# CalTimeOffset=43.
62# print "Running on MC file: Setting CalTimeOffset %d" % CalTimeOffset
63#else:
64# print "Specify which type of ntuple you are running on: -t 1 [for Data] / -t 0 [for MC]"
65#below are 2019 numbers
66if (options.isData==1):
67 CalTimeOffset=56.
68 print("Running on data file: Setting CalTimeOffset %d" % CalTimeOffset)
69# TrkTimeOffset=-17.
70 TrkTimeOffset=0.
71 print("Running on data file: Setting TrkTimeOffset %d" % TrkTimeOffset)
72 vtxana.parameters["fspartColl"] = "ParticlesOnUVertices_KF"
73
74elif (options.isData==0):
75 CalTimeOffset=27.
76 print ("Running on MC file: Setting CalTimeOffset %d" % CalTimeOffset)
77 TrkTimeOffset=0.
78 print ("Running on MC file: Setting TrkTimeOffset %d" % TrkTimeOffset)
79
80vtxana.parameters["CalTimeOffset"]=CalTimeOffset
81vtxana.parameters["TrkTimeOffset"]=TrkTimeOffset
82
83#Region definitions
84RegionPath=os.environ['HPSTR_BASE']+"/analysis/selections/tridents/"
85#vtxana.parameters["regionDefinitions"] = [RegionPath+'Tight.json']
86#vtxana.parameters["regionDefinitions"] = ['./tridentL1L1.json','./tridentL1L2.json','./tridentL2L1.json','./tridentL2L2.json']
87#vtxana.parameters["regionDefinitions"] = ['cfgs2019/tridentAllLayerCombos.json']
88#vtxana.parameters["regionDefinitions"] = [RegionPath+'/tridentAllLayerCombos-BothClusters.json']
89vtxana.parameters["regionDefinitions"] = [RegionPath+'/tridentAllLayerCombos.json',
90 RegionPath+'/tridentAllLayerCombos-RadCut.json',
91 RegionPath+'/tridentAllLayerCombos-BothClusters.json']
92 # RegionPath+'/tridentL2L1.json',
93 # RegionPath+'/tridentL2L1-NoClusters.json',
94 # RegionPath+'/tridentL2L1-NoPosClust-EleClust.json',
95 # RegionPath+'/tridentL2L1-PosClust-NoEleClust.json',
96# RegionPath+'/tridentL2L1-BothClusters.json',
97 # RegionPath+'/tridentL1L2.json',
98 # RegionPath+'/tridentL1L2-NoClusters.json',
99 # RegionPath+'/tridentL1L2-NoPosClust-EleClust.json',
100 # RegionPath+'/tridentL1L2-PosClust-NoEleClust.json',
101# RegionPath+'/tridentL1L2-BothClusters.json',
102 # RegionPath+'/tridentL2L2.json',
103 # RegionPath+'/tridentL2L2-NoClusters.json',
104 # RegionPath+'/tridentL2L2-NoPosClust-EleClust.json',
105 # RegionPath+'/tridentL2L2-PosClust-NoEleClust.json',
106# RegionPath+'/tridentL2L2-BothClusters.json']
107# RegionPath+'/tridentNoInnerMatch-NoClusters.json',
108# RegionPath+'/tridentNoInnerMatch-NoPosClust-EleClust.json',
109# RegionPath+'/tridentNoInnerMatch-PosClust-NoEleClust.json',
110# RegionPath+'/tridentNoInnerMatch-BothClusters.json']
111#vtxana.parameters["regionWABDefinitions"]=[RegionPath+'/wabL1ElectronCluster.json']
112
113
114# RegionPath+'/tridentAllLayerCombos-NoClusters.json',
115# RegionPath+'/tridentAllLayerCombos-NoPosClust-EleClust.json',
116# RegionPath+'/tridentAllLayerCombos-PosClust-NoEleClust.json',
117# RegionPath+'/tridentAllLayerCombos-BothClusters.json']
118# RegionPath+'/tridentL2Required.json',
119# RegionPath+'/tridentL2Required-NoClusters.json',
120# RegionPath+'/tridentL2Required-NoPosClust-EleClust.json',
121# RegionPath+'/tridentL2Required-PosClust-NoEleClust.json',
122# RegionPath+'/tridentL1L1.json',
123# RegionPath+'/tridentL1L1-NoClusters.json',
124# RegionPath+'/tridentL1L1-NoPosClust-EleClust.json',
125# RegionPath+'/tridentL1L1-PosClust-NoEleClust.json',
126
127
128# Sequence which the processors will run.
129p.sequence = [vtxana]
130
131p.input_files=infile
132p.output_files = [outfile]
133
134p.printProcess()
135
136
Process python class.
Definition HpstrConf.py:20
Processor python class.
Definition HpstrConf.py:4