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_2021_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"] = 1
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_KF"
44#vtxana.parameters["fspartColl"] = "ParticlesOnVertices_KF"
45vtxana.parameters["trkSelectionjson"] = os.environ['HPSTR_BASE']+'/analysis/selections/tridents/trackSelection-3pt7gev.json'
46vtxana.parameters["vtxSelectionjson"] = os.environ['HPSTR_BASE']+'/analysis/selections/tridents/tridentSelection-3pt7gev.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-3pt7gev.json"
49vtxana.parameters["beamE"] = 3.7
50vtxana.parameters["isData"] = options.isData
51#vtxana.parameters["isData"] = 1
52CalTimeOffset=-999
53
54#if (options.isData==1):
55# CalTimeOffset=56.
56# print "Running on data file: Setting CalTimeOffset %d" % CalTimeOffset
57
58#elif (options.isData==0):
59# CalTimeOffset=43.
60# print "Running on MC file: Setting CalTimeOffset %d" % CalTimeOffset
61#else:
62# print "Specify which type of ntuple you are running on: -t 1 [for Data] / -t 0 [for MC]"
63#below are 2019 numbers
64if (options.isData==1):
65 CalTimeOffset=38.
66 print("Running on data file: Setting CalTimeOffset %d" % CalTimeOffset)
67# TrkTimeOffset=-17.
68 TrkTimeOffset=0.
69 print("Running on data file: Setting TrkTimeOffset %d" % TrkTimeOffset)
70
71elif (options.isData==0):
72 CalTimeOffset=27.
73 print ("Running on MC file: Setting CalTimeOffset %d" % CalTimeOffset)
74 TrkTimeOffset=-30.
75 print ("Running on MC file: Setting TrkTimeOffset %d" % TrkTimeOffset)
76
77vtxana.parameters["CalTimeOffset"]=CalTimeOffset
78vtxana.parameters["TrkTimeOffset"]=TrkTimeOffset
79
80#Region definitions
81RegionPath=os.environ['HPSTR_BASE']+"/analysis/selections/tridents/"
82#vtxana.parameters["regionDefinitions"] = [RegionPath+'Tight.json']
83#vtxana.parameters["regionDefinitions"] = ['./tridentL1L1.json','./tridentL1L2.json','./tridentL2L1.json','./tridentL2L2.json']
84#vtxana.parameters["regionDefinitions"] = ['cfgs2019/tridentAllLayerCombos.json']
85#vtxana.parameters["regionDefinitions"] = [RegionPath+'/tridentAllLayerCombos.json']
86vtxana.parameters["regionDefinitions"] = [RegionPath+'/tridentAllLayerCombos-BothClusters.json']
87# RegionPath+'/tridentAllLayerCombos-NoClusters.json',
88# RegionPath+'/tridentAllLayerCombos-NoPosClust-EleClust.json',
89# RegionPath+'/tridentAllLayerCombos-PosClust-NoEleClust.json',
90# RegionPath+'/tridentAllLayerCombos-BothClusters.json']
91 # RegionPath+'/tridentL2Required.json',
92 # RegionPath+'/tridentL2Required-NoClusters.json',
93 # RegionPath+'/tridentL2Required-BothClusters.json',
94 # RegionPath+'/tridentL2Required-NoPosClust-EleClust.json',
95 # RegionPath+'/tridentL2Required-PosClust-NoEleClust.json',
96# RegionPath+'/tridentL1L1.json',
97# RegionPath+'/tridentL1L1-NoClusters.json',
98# RegionPath+'/tridentL1L1-NoPosClust-EleClust.json',
99# RegionPath+'/tridentL1L1-PosClust-NoEleClust.json',
100# RegionPath+'/tridentL1L1-BothClusters.json',
101# RegionPath+'/tridentL2L1.json',
102# RegionPath+'/tridentL2L1-NoClusters.json',
103# RegionPath+'/tridentL2L1-NoPosClust-EleClust.json',
104# RegionPath+'/tridentL2L1-PosClust-NoEleClust.json',
105# RegionPath+'/tridentL2L1-BothClusters.json',
106# RegionPath+'/tridentL1L2.json',
107# RegionPath+'/tridentL1L2-NoClusters.json',
108# RegionPath+'/tridentL1L2-NoPosClust-EleClust.json',
109# RegionPath+'/tridentL1L2-PosClust-NoEleClust.json',
110# RegionPath+'/tridentL1L2-BothClusters.json',
111# RegionPath+'/tridentL2L2.json',
112# RegionPath+'/tridentL2L2-NoClusters.json',
113# RegionPath+'/tridentL2L2-NoPosClust-EleClust.json',
114# RegionPath+'/tridentL2L2-PosClust-NoEleClust.json',
115# RegionPath+'/tridentL2L2-BothClusters.json']
116# RegionPath+'/tridentNoInnerMatch-NoClusters.json',
117# RegionPath+'/tridentNoInnerMatch-NoPosClust-EleClust.json',
118# RegionPath+'/tridentNoInnerMatch-PosClust-NoEleClust.json',
119# RegionPath+'/tridentNoInnerMatch-BothClusters.json']
120#vtxana.parameters["regionWABDefinitions"]=[RegionPath+'/wabL1ElectronCluster.json']
121# Sequence which the processors will run.
122p.sequence = [vtxana]
123
124p.input_files=infile
125p.output_files = [outfile]
126
127p.printProcess()
128
129
Process python class.
Definition HpstrConf.py:20
Processor python class.
Definition HpstrConf.py:4