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.
Loading...
Searching...
No Matches
clusterEfficiency_cfg.py
Go to the documentation of this file.
1import HpstrConf
2import sys
3import os
4import baseConfig as base
5
6base.parser.add_argument(
7 '--sample', choices=['data', 'sim_bkgd', 'ap_signal', 'simp_signal'],
8 help='Which type of sample this is', required=True
9)
10base.parser.add_argument(
11 '--apPDG', type=int, default=622,
12 help="PDG of the A' (622 displaced, 623 prompt). Ignored for SIMP."
13)
14
15options = base.parser.parse_args()
16
17infile = options.inFilename
18outfile = options.outFilename
19
20print('Input file: %s' % infile)
21print('Output file: %s' % outfile)
22
24
25p.run_mode = 1
26p.skip_events = options.skip_events
27p.max_events = options.nevents
28
29p.add_library("libprocessors")
30
31if options.isData and not options.sample == 'data':
32 raise ValueError('If running on data, sample must be "data"')
33if not options.isData and options.sample == 'data':
34 raise ValueError('If running on MC, sample cannot be "data", use "sim_bkgd", "ap_signal" or "simp_signal"')
35
36cluseff = HpstrConf.Processor('cluseff', 'ClusterEfficiency2021')
37cluseff.parameters["isData"] = options.isData
38cluseff.parameters["isApSignal"] = 1 if ('ap' in options.sample) else 0
39cluseff.parameters["isSimpSignal"] = 1 if ('simp' in options.sample) else 0
40cluseff.parameters["apPDG"] = options.apPDG
41cluseff.parameters["vtxCollection"] = "UnconstrainedV0Vertices_KF"
42cluseff.parameters["calTimeOffset"] = 37.3
43cluseff.parameters["clusterEnergyThresh"] = 0.0
44#cluseff.parameters["debug"] = 1
45
46p.sequence = [cluseff]
47
48p.input_files = infile
49p.output_files = [outfile]
50
51p.printProcess()
Process python class.
Definition HpstrConf.py:20
Processor python class.
Definition HpstrConf.py:4