Belle II Software  release-05-01-25
test2_phigamma.py
1 """
2 <header>
3  <input>../phigamma_neutral_skimmed.udst.root</input>
4  <output>phigamma_Validation.root</output>
5  <contact>giuseppe.finocchiaro@lnf.infn.it</contact>
6 </header>
7 """
8 
9 import basf2
10 from stdCharged import *
11 from stdV0s import *
12 from stdPhotons import *
13 from ROOT import Belle2
14 from glob import glob
15 import modularAnalysis as ma
16 from variables import variables as vm
17 
18 inputFiles = '../phigamma_neutral_skimmed.udst.root'
19 histoRootFile = 'phigamma_Validation.root'
20 inputFileList = glob(inputFiles)
21 
22 phigamma_path = basf2.Path()
23 ma.inputMdstList('default', inputFileList, path=phigamma_path)
24 
25 stdKshorts(path=phigamma_path)
26 ma.fillParticleList('K+:all', "", writeOut=True, path=phigamma_path)
27 ma.fillParticleList('K_L0:all', "", writeOut=True, path=phigamma_path)
28 ma.fillParticleList('gamma:sig', 'nTracks > 1 and 3. < E < 8.', writeOut=True, path=phigamma_path)
29 
30 ma.reconstructDecay('phi:KK -> K+:all K-:all', '0.9 < M < 1.2', writeOut=True, path=phigamma_path)
31 
32 vm.addAlias("gamma_E_CMS", "useCMSFrame(E)")
33 vm.addAlias("gamma_E", "E")
34 vm.addAlias("K_S0_mass", "M")
35 vm.addAlias("phi_mass", "M")
36 
37 
38 variableshisto = [('gamma_E', 120, 2.5, 8.5),
39  ('gamma_E_CMS', 100, 2.0, 7.0),
40  ('nTracks', 15, 0, 15),
41  ]
42 variableshistoKS = [('K_S0_mass', 200, 0.4, 0.6),
43  ]
44 variableshistoPhi = [('phi_mass', 200, 0.8, 1.2),
45  ]
46 
47 ma.variablesToHistogram('gamma:sig', variableshisto, filename=histoRootFile, path=phigamma_path)
48 ma.variablesToHistogram('K_S0:merged', variableshistoKS, filename=histoRootFile, path=phigamma_path)
49 ma.variablesToHistogram('phi:KK', variableshistoPhi, filename=histoRootFile, path=phigamma_path)
50 
51 basf2.process(phigamma_path)
52 print(basf2.statistics)
basf2.process
def process(path, max_event=0)
Definition: __init__.py:25