Belle II Software development
caf_vxd.py
1#!/usr/bin/env python3
2
3
10
11import os
12import sys
13
14
15from caf.framework import CAF
16
17
18def main(argv):
19 inputFiles = []
20 for file in argv[0:]:
21 inputFiles.append(os.path.abspath(file))
22 if not len(inputFiles):
23 print(' Usage: basf2 SCRIPT_NAME DST_FILE.root [DST_FILE2.root ... ]')
24 sys.exit(1)
25
26 # The Calibration and Alignment Framework
27 caf = CAF()
28
29 # predefined scenarios
30 from alignment import setups
31 # run std reco and select alignment particles/decays
32 setups.do_reconstruction = True
33 setups.do_analysis = True
34
35 millepede = setups.setup_VXDHalfShells()
36
37 # Align primary beamspot simultaneously with VXD half shells in addition
38 millepede.set_components(['VXDAlignment', 'BeamSpot'])
39
40 caf.add_calibration(millepede.create('vxd_shells_beamspot', inputFiles))
41
42 caf.output_dir = 'caf_output'
43 caf.run()
44
45 print("Finished CAF Processing")
46
47
48if __name__ == "__main__":
49 # Pass arguments after script name as input files
50 main(sys.argv[1:])
Definition: main.py:1