4Run pede alignment over input bin files generated by tracking accumulation
6Besides the main purpose of running the pede minimizer, we also do other helpful
7tasks that are commonly done with alignment.
81. Apply the results from the pede minimizer to a new iteration of the detector
92. Construct the new iteration of the detector so that another round of tracking
113. Merge the histogram files generated from the previous round of tracking for
12 later analysis/drawing - this merging is only done if those histogram files
13 exist and an output histogrma file is defined in the job JSON.
14 - The histogram files are looked for by replacing the input _mille.bin suffix
15 on the input files with _gblplots.bin which is the format of the outputs
16 done by the tracking example.
21job.description =
'alignment parameter minimizatin via pede'
23if not isinstance(job.input_files, (str, dict)):
24 raise ValueError(
'"input_files" must be a dict list of input files or a path to a text file listing the input files')
26if isinstance(job.input_files, str):
27 listing = job.input_files
28 job.input_files = dict()
29 with open(listing)
as lf:
33 if line ==
'' or line.startswith(
'#'):
36 job.input_files[line] = os.path.basename(line)
38pede =
PEDE(inputs=job.input_files.keys()
if 'no_copy' in job.params
else job.input_files.values())
42job.add([pede, apply_res, construct_det])
45 pede_bin_fp.replace(
'_mille.bin',
'_gblplots.root')
46 for pede_bin_fp
in job.input_files.keys()
47 if os.path.isfile(pede_bin_fp.replace(
'_mille.bin',
'_gblplots.root'))
51 f
for f
in job.output_files.keys()
if f.endswith(
'root')
54if len(gbl_plots) > 0
and len(merged_gbl_plots) > 0:
56 from hpsmc
import hadd
59 outputs=merged_gbl_plots
Run ROOT's histogram/TTree merger.
Apply a millepede.res file to a detector description.
construct an LCDD from a compact.xml and recompile necessary parts of hps-java
Run pede minimizer over input bin files for alignment.
alignment module within hps-mc