Belle II Software  release-05-01-25
EclDumpGeometry.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
19 
20 import sys
21 import basf2 as b2
22 from modularAnalysis import inputMdst
23 from basf2 import conditions
24 
25 # ..path
26 mypath = b2.create_path()
27 
28 # ..override ECL geometry if requested
29 newGeom = 0
30 narg = len(sys.argv)
31 if(narg == 2):
32  newGeom = int(sys.argv[1])
33 if(newGeom == 1):
34  b2.conditions.globaltags = ['ecl_alignment']
35 if(newGeom == 2):
36  b2.conditions.prepend_testing_payloads("localdb/database.txt")
37 print(b2.conditions.globaltags)
38 inputMdst(
39  'default',
40  '/group/belle2/dataprod/Data/OfficialReco/proc11/e0010/4S/GoodRuns/r05902/skim/hlt_mumu_2trk/mdst/sub00/*.root',
41  path=mypath)
42 
43 # ..ECL geometry
44 mypath.add_module('Gearbox')
45 mypath.add_module('Geometry')
46 mypath.add_module('ECLDumpGeometry')
47 
48 # ..Process the events
49 b2.process(mypath)
50 print(b2.statistics)