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