2import baseConfig
as base
6 setattr(parser.values, options.dest, value.split(
','))
10base.parser.add_argument(
'-l',
'--layer', type=str, dest=
"layer", default=
"",
11 help=
"To run on all layers, leave default. To select specific layer: L<n><T/B>")
13base.parser.add_argument(
'-thresh',
'--thresh', type=str, dest=
"thresholdsFileIn",
14 help=
"Load online thresholds file used to set apv channel threshold. Required for fitting!")
17base.parser.add_argument(
"-deadRMS",
'--deadRMS', type=int, dest=
"deadRMS",
18 help=
"Define dead channel by setting low RMS threshold", metavar=
"deadRMS", default=150)
20base.parser.add_argument(
"-b",
"--rebin", type=int, dest=
"rebin",
21 help=
"rebin factor.", metavar=
"rebin", default=1)
23base.parser.add_argument(
"-minStats",
'--minStats', type=int, dest=
"minStats",
24 help=
"Offline fitting requires a minimum number of stats to fit channel", metavar=
"minStats", default=1200)
26options = base.parser.parse_args()
29lcio_file = options.inFilename[0]
30root_file = options.outFilename
32print(
'LCIO file: %s' % lcio_file)
33print(
'Root file: %s' % root_file)
36histo_file = options.inFilename[0]
42p.skip_events = options.skip_events
43p.max_events = options.nevents
46p.libraries.append(
"libprocessors.so")
57fitBL.parameters[
"histCfg"] = os.environ[
'HPSTR_BASE']+
'/analysis/plotconfigs/svt/SvtBlFits.json'
58fitBL.parameters[
"rawhitsHistCfg"] = os.environ[
'HPSTR_BASE']+
'/analysis/plotconfigs/svt/baselinefits/rawSvtHits.json'
59fitBL.parameters[
"layer"] = options.layer
60fitBL.parameters[
"rebin"] = options.rebin
61fitBL.parameters[
"minStats"] = options.minStats
62fitBL.parameters[
"deadRMS"] = options.deadRMS
63fitBL.parameters[
"thresholdsFileIn"] = options.thresholdsFileIn
64fitBL.parameters[
"debug"] = options.debug
69p.input_files = [histo_file]
70p.output_files = [root_file]
timeSample_callback(options, opt, value, parser)