HPS-MC
 
Loading...
Searching...
No Matches
track_align_job.py
Go to the documentation of this file.
1"""!
2@file track_align_job.py
3
4This job is focused on running the hps-java JobManager once. The user
5can decide which steering file to use; however, the user must know that
6this job provides many command-line definitions to be substituted into
7the SimpleGblAliDriver config parameters. Look at the steering files
8in the examples/alignment/tracking directory as an example.
9"""
10
11import os
12import logging
13from hpsmc.tools import JobManager
14
15
16logger = logging.getLogger('hpsmc.job')
17
18job.description = 'single hps-java run with input steering file'
19
20
21input_files = list(job.input_files.values())
22if len(input_files) > 1:
23 raise Exception('This script accepts only one input file.')
24
25java_run = JobManager(
26 steering=job.params["steering"],
27 outputs=list(job.output_files.keys())
28 )
29
30# update defs to include our track_align defaults for the SimpleGBLTrajAliDriver
31traj_ali_driver_defaults = {
32 'enableAlignmentCuts': True,
33 'doCOMAlignment': True,
34 'minMom': 0.5,
35 'maxMom': 5.0,
36 'nHitsCut': 6,
37 'debugAlignmentDs': False,
38 'correctTrack': True,
39 'includeNoHitScatters': False,
40 'gblRefitIterations': 0,
41 'storeTrackStates': True,
42 'compositeAlign': True,
43 'constrainedFit': False,
44 'momC': 4.55,
45 'constrainedBSFit': False,
46 'bsZ': -7.7,
47 'trackSide': -1,
48 'writeMilleChisqCut': 5,
49 'enableStandardCuts': False,
50 'maxTrackChisqFourHits': 60.,
51 'maxTrackChisqFiveHits': 60.,
52 'maxTrackChisqSixHits': 60.,
53 'inputCollectionName': 'KalmanFullTracks'
54 }
55if 'defs' not in job.params:
56 # no user-defined defs
57 java_run.defs = traj_ali_driver_defaults
58else:
59 # some user defined defs, make sure others get their defaults
60 java_run.defs = job.params['defs']
61 for key, val in traj_ali_driver_defaults.items():
62 if key not in java_run.defs:
63 java_run.defs[key] = val
64
65job.add([java_run])
Run the hps-java JobManager class.
Definition tools.py:160
Tools that can be used in HPSMC jobs.
Definition tools.py:1