Belle II Software  release-08-01-10
caf_vxd.py
1 #!/usr/bin/env python3
2 
3 
10 
11 import os
12 import sys
13 
14 
15 from caf.framework import CAF
16 
17 
18 def 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 
48 if __name__ == "__main__":
49  # Pass arguments after script name as input files
50  main(sys.argv[1:])
Definition: main.py:1
int main(int argc, char **argv)
Run all tests.
Definition: test_main.cc:91