Ejemplo n.º 1
0
import Mint2, ROOT, math, sys, pprint
from AGammaD0Tohhpi0.data import datalib
from ROOT import DalitzEventList, TFile, binflipChi2, FitAmpSum
from ROOT.MINT import NamedParameterBase, Minimiser
from AGammaD0Tohhpi0.binflip import *
from AGammaD0Tohhpi0.mint import get_config, set_default_config, pattern_D0Topipipi0

ROOT.TH1.SetDefaultSumw2(True)

if len(sys.argv) > 1:
    name = sys.argv[1]
else:
    name = 'data_worldAv_1M_wExpEff'
print 'Dataset:', name
config = get_config(name)
set_default_config(config.fnames[0])
print 'Config file:', config.fnames[0]

model = FitAmpSum(pattern_D0Topipipi0)
#print 'Amplitudes:'
#model.printAllAmps()

# Get the phase difference calculator.
pattern = pattern_D0Topipipi0
diffcalc = PhaseDifferenceCalc(pattern, config.fnames[0])

#Simulation variables
x = config.float('x')
y = config.float('y')

qoverp = config.float('qoverp')
Ejemplo n.º 2
0
import Mint2
from AGammaD0Tohhpi0.data import datalib
from ROOT import DalitzEvent
from AGammaD0Tohhpi0.mint import set_default_config

set_default_config()

tree = datalib.get_data('MINT_test-kkpi0')

tree.GetEntry(0)
evt = DalitzEvent()
evt.fromTree(tree)
pattern = evt.eventPattern()

s12min, s12max = pattern.sijMin(1, 2), pattern.sijMax(1, 2)
s13min, s13max = pattern.sijMin(1, 3), pattern.sijMax(1, 3)

for i in xrange(tree.GetEntries()):
    tree.GetEntry(i)
    evt = DalitzEvent()
    evt.fromTree(tree)

    tag = tree.tag
    s12 = evt.s(1, 2)
    s13 = evt.s(1, 3)
    s23 = evt.s(2, 3)
Ejemplo n.º 3
0
argparser.add_argument('--fname',
                       default='$AGAMMAD0TOHHPI0ROOT/scripts/mint/KKpi0.txt',
                       help='Config file name.')
argparser.add_argument('--pattern',
                       nargs='*',
                       default=(421, 321, -321, 111),
                       help='Dalitz event pattern',
                       type=int)
argparser.add_argument('--precision',
                       default=1e-2,
                       type=float,
                       help='Integrator precision')

args = argparser.parse_args()

set_default_config(os.path.expandvars(args.fname))

pattern = DalitzEventPattern(*args.pattern)

amps = FitAmpSum(pattern)
integ = FlexiFastAmplitudeIntegrator(pattern, amps)
integ.setPrecision(args.precision)
integ.doFractions()
print '\n'
print 'Fit fractions:'
for frac in integ.getFractions():
    print frac.name().ljust(40), frac.frac()

targets = {
    "D0->K*(1410)+(->K+,pi0),K-": 3.7,
    "D0->K*(1410)bar-(->K-,pi0),K+": 4.8,
Ejemplo n.º 4
0
#!/usr/bin/env python

# Load Mint2 libraries.
import Mint2, ROOT, math, sys
from AGammaD0Tohhpi0.data import datalib
from ROOT import PhaseDifferenceCalc, DalitzEventList, TFile, DalitzEventPattern
from ROOT.MINT import NamedParameterBase
from AGammaD0Tohhpi0.mint import config, set_default_config, get_config
from AGammaD0Tohhpi0.binflip import plotBinNumbers

if len(sys.argv) > 1 :
    name = sys.argv[1]
    config = get_config(name).fnames[0]

# Set the config file.
set_default_config(config)

h = plotBinNumbers(config, 8, 1000)
c = ROOT.TCanvas('c', '', 600, 600)
h.Draw('colz')
c.SaveAs('binnumber-vs-dalitz.pdf')