15from tools
import getBelleUrl_data, getBelleUrl_mc
17from modularAnalysis
import variablesToNtuple
18from modularAnalysis
import fillParticleList
20from b2biiConversion
import convertBelleMdstToBelleIIMdst
25mc_or_data = sys.argv[1].lower()
26isMC = {
"mc":
True,
"data":
False}.get(mc_or_data,
None)
28 sys.exit(
'First parameter must be "mc" or "data" to indicate whether we run on MC or real data')
31 if len(sys.argv) != 9:
32 sys.exit(
'Must provide all 8 parameters !')
34 eventType = sys.argv[3]
35 dataType = sys.argv[4]
36 belleLevel = sys.argv[5]
37 minRunNo = sys.argv[6]
38 maxRunNo = sys.argv[7]
39 streamNo = sys.argv[8]
41 if len(sys.argv) != 8:
42 sys.exit(
'Must provide all 7 parameters !')
44 skimType = sys.argv[3]
45 dataType = sys.argv[4]
46 belleLevel = sys.argv[5]
47 minRunNo = sys.argv[6]
48 maxRunNo = sys.argv[7]
53os.environ[
'PGUSER'] =
'g0db'
54os.environ[
'USE_GRAND_REPROCESS_DATA'] =
'1'
57 url = getBelleUrl_mc(expNo, minRunNo, maxRunNo,
58 eventType, dataType, belleLevel, streamNo)
60 url = getBelleUrl_data(expNo, minRunNo, maxRunNo,
61 skimType, dataType, belleLevel)
63mypath = b2.create_path()
64convertBelleMdstToBelleIIMdst(url, applySkim=
True, path=mypath)
69outDir =
'./analysisOutput'
71filenameEnd =
'_'.join(sys.argv[2:]) +
'.root'
73outputFileName = outDir +
'/output_' + filenameEnd
79fillParticleList(
'pi+:all',
'', path=mypath)
81kinematic_variables = [
'px',
'py',
'pz',
'E']
84 'pi+:all', kinematic_variables, filename=outputFileName, path=mypath)
87progress = b2.register_module(
'Progress')
88mypath.add_module(progress)