4 Run pede alignment over input bin files generated by tracking accumulation
6 Besides the main purpose of running the pede minimizer, we also do other helpful
7 tasks that are commonly done with alignment.
8 1. Apply the results from the pede minimizer to a new iteration of the detector
9 2. Construct the new iteration of the detector so that another round of tracking
11 3. 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.
21 job.description =
'alignment parameter minimizatin via pede'
23 if 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')
26 if 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)
38 pede =
PEDE(inputs=job.input_files.keys()
if 'no_copy' in job.params
else job.input_files.values())
42 job.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')
54 if 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