Ejemplo n.º 1
0
    def __init__(self,
                 A_KS,
                 s12,
                 s13,
                 A_KL=np.array([0]),
                 eps=PhysicalParameters().default_eps,
                 parameters=PhysicalParameters()):
        self.eps = eps
        self.parameters = parameters
        if not A_KL.any(
        ):  # .any() returns true if a single element returns is non-zero
            A_KL = A_KS * 0  # ensure same dimensions
            self.eps = 0.  # if no KL is supplied, set eps = 0 for consistency

        # These maps hold the cashed amplitude values as a function of time
        # each amplitude is a 2D numpy array holding python complex numbers
        self.A_KS = LimitedSizeDict(
            size_limit=3)  # save last 2 calculated times in cache
        self.A_KL = LimitedSizeDict(size_limit=3)
        self.A_KS_0 = A_KS
        self.A_KL_0 = A_KL

        #  save s coordinates corresponding to matrix
        self.s12 = s12  # s(Ks, pi+-)
        self.s13 = s13  # s(Ks, pi+-)
Ejemplo n.º 2
0
    def __init__(self, 
        KS_amplitude_file, 
        KL_amplitude_file, 
        eps=PhysicalParameters().default_eps, 
        parameters=PhysicalParameters(),
        efficiency=None, 
        binning_file="input/KsPiPi_optimal.pickle",
        KL_to_pipi_factor=1,#factor to multiply on the KL->pipi amplitude
        amplitude_asym_factor=1): # Factor to multiply on the A_KS - A_K1 difference

        self.eps = eps
        self.parameters = parameters

        # save predicted yields, so they do not have to be recalculated if just doing statistical fluctuations
        self.predicted_yields = {}

        self.KS_amplitude_file = "not initialized" # will be set in self.update_amplitudes(), DONT CHANGE
        self.KL_amplitude_file = "not initialized" # will be set in self.update_amplitudes(), DONT CHANGE

        self.KL_to_pipi_factor = KL_to_pipi_factor
        self.amplitude_asym_factor = amplitude_asym_factor

        self.update_amplitudes(KS_amplitude_file, KL_amplitude_file)

        if efficiency==None:
            efficiency = DefaultEfficiency(
                self.s12, self.s13)
        self.efficiency = efficiency

        # The time range over which to do the amplitude integrals
        # Set by efficiency as default, as that is where the time-acceptance is defined
        self.time_range = self.efficiency.default_time_range()

        bin_def, bin_def_s12, bin_def_s13 = uf.load_binning(binning_file)


        self.binning = Binning(bin_def, bin_def_s12, bin_def_s13,
                self.s12, self.s13)


        return
    def __init__(self, s12, s13, p, z_min=0, z_max=2200):
        self.base_eff = np.ones((len(s12), len(s13)))

        default_param = PhysicalParameters()
        self.param = default_param

        c = 300  # mm/ns

        self.t_min = z_min * default_param.mK / (c * p)
        self.t_min[self.t_min == None] = 0

        self.t_max = z_max * default_param.mK / (c * p)
        self.t_max[self.t_max == None] = 0
Ejemplo n.º 4
0
        yields = Ntot*yields/sum(yields) # normalize

        self.predicted_yields[key] = yields # save so it will not have to be recalculated     
        
        return yields

    def get_Fi_hat(self):
        '''Returns Fi as they would be measured in a control channel, for the physics
        situation and parameters relevant for the FullModel'''
        yields = self.predict_yields([0., 0., 0.], 1000) # no cabibbo suppressed part, ~ flavour tagged D
        Fi_hat = (yields[16:] + yields[15::-1])/sum(yields) #B- yields are in right order, B+ yields should be reversed
        return Fi_hat

if __name__ == "__main__":
    print ("Testing {}".format(os.path.basename(__file__)))
    parameters = PhysicalParameters(False)
    fm = FullModel(
        "../amplitude_calculations/output/KS_default.pickle",
        "../amplitude_calculations/output/KL_default.pickle",
        1.*cmath.rect(2.2e-3, math.pi/4),
        parameters)
    dm = DefaultModel("../amplitude_calculations/output/KS_default.pickle")
    physics_param = [uf.deg_to_rad(75.), 0.1, uf.deg_to_rad(90.)]
    
    data = fm.predict_yields(physics_param, 4000)
    print "DATA ASYM:", (sum(data[16:])-sum(data[:16]))/sum(data)
    print "B+:", (sum(data[:16]))
    print "B-:", (sum(data[16:]))
    # res = dm.fit(data)
    # print res
    points_name += '_tp{}'.format(args.time_range_points)
if not args.points == 500:
    points_name += '_p{}'.format(args.points)
    points_file_name = '_n{}'.format(args.points)

amp_dir = '/data/lhcb/users/bjoern/Analyses/B2DPi/data/various_studies/ks_cpv/amplitudes'
output_dir = '/data/lhcb/users/bjoern/Analyses/B2DPi/data/various_studies/ks_cpv/simple_full_studies'
output_dir = '{}/setup_{}_{}{}_n_{}'.format(output_dir, args.model, args.setup,
                                            points_name, args.n_kl)
subprocess.call(['mkdir', '-p', output_dir])

# A default model
fm_default = FullModel(
    "{}/{}_KS_default{}.pickle".format(amp_dir, args.model, points_file_name),
    "{}/{}_KL_default{}.pickle".format(amp_dir, args.model, points_file_name),
    eps=PhysicalParameters().default_eps,
    parameters=PhysicalParameters(),
    binning_file="../python/input/KsPiPi_optimal.pickle")

# extract the phase space coordinates from default model
s12 = fm_default.s12
s13 = fm_default.s13

quantile_suffixes = ['']
if args.quantiles == 5:
    quantile_suffixes = [
        '_q{:1.3f}'.format(q) for q in np.linspace(0.1, 0.9, 5)
    ]
if args.quantiles == 9:
    quantile_suffixes = [
        '_q{:1.3f}'.format(q) for q in np.linspace(0.1, 0.9, 9)
    def __init__(self, s12, s13, coeff=None, setup=None):
        self.p = PhysicalParameters().p

        self.spm = uf.get_spm(s12, s13)

        # these are calculated by the script extract_momentum_dependence_RapidSim.py in /scripts
        setup_coefficients = {
            'lhcb_LL_p': [-4.64, 27.24],
            'lhcb_LL_p_q0.025': [-0.16, 4.50],
            'lhcb_LL_p_q0.050': [-0.24, 5.31],
            'lhcb_LL_p_q0.075': [-0.27, 5.96],
            'lhcb_LL_p_q0.100': [-0.40, 6.62],
            'lhcb_LL_p_q0.125': [-0.43, 7.19],
            'lhcb_LL_p_q0.150': [-0.47, 7.71],
            'lhcb_LL_p_q0.175': [-0.53, 8.23],
            'lhcb_LL_p_q0.200': [-0.67, 8.85],
            'lhcb_LL_p_q0.225': [-0.76, 9.41],
            'lhcb_LL_p_q0.250': [-0.89, 10.01],
            'lhcb_LL_p_q0.275': [-0.96, 10.55],
            'lhcb_LL_p_q0.300': [-1.04, 11.16],
            'lhcb_LL_p_q0.325': [-1.15, 11.78],
            'lhcb_LL_p_q0.350': [-1.31, 12.46],
            'lhcb_LL_p_q0.375': [-1.51, 13.23],
            'lhcb_LL_p_q0.400': [-1.66, 13.95],
            'lhcb_LL_p_q0.425': [-1.79, 14.68],
            'lhcb_LL_p_q0.450': [-1.95, 15.46],
            'lhcb_LL_p_q0.475': [-2.11, 16.34],
            'lhcb_LL_p_q0.500': [-2.29, 17.21],
            'lhcb_LL_p_q0.525': [-2.47, 18.13],
            'lhcb_LL_p_q0.550': [-2.65, 19.11],
            'lhcb_LL_p_q0.575': [-2.90, 20.23],
            'lhcb_LL_p_q0.600': [-3.18, 21.47],
            'lhcb_LL_p_q0.625': [-3.52, 22.81],
            'lhcb_LL_p_q0.650': [-3.83, 24.24],
            'lhcb_LL_p_q0.675': [-4.15, 25.78],
            'lhcb_LL_p_q0.700': [-4.52, 27.50],
            'lhcb_LL_p_q0.725': [-4.87, 29.34],
            'lhcb_LL_p_q0.750': [-5.21, 31.40],
            'lhcb_LL_p_q0.775': [-5.79, 33.90],
            'lhcb_LL_p_q0.800': [-6.52, 36.90],
            'lhcb_LL_p_q0.825': [-7.28, 40.33],
            'lhcb_LL_p_q0.850': [-8.03, 44.34],
            'lhcb_LL_p_q0.875': [-9.01, 49.28],
            'lhcb_LL_p_q0.900': [-10.86, 56.47],
            'lhcb_LL_p_q0.925': [-13.01, 66.02],
            'lhcb_LL_p_q0.950': [-15.84, 80.70],
            'lhcb_LL_p_q0.975': [-23.96, 111.89],
            'lhcb_DD_p': [-7.39, 42.46],
            'lhcb_DD_p_q0.025': [-0.49, 6.99],
            'lhcb_DD_p_q0.050': [-0.66, 8.46],
            'lhcb_DD_p_q0.075': [-0.87, 9.71],
            'lhcb_DD_p_q0.100': [-1.06, 10.82],
            'lhcb_DD_p_q0.125': [-1.22, 11.87],
            'lhcb_DD_p_q0.150': [-1.49, 12.98],
            'lhcb_DD_p_q0.175': [-1.71, 14.03],
            'lhcb_DD_p_q0.200': [-1.83, 14.94],
            'lhcb_DD_p_q0.225': [-2.05, 16.01],
            'lhcb_DD_p_q0.250': [-2.20, 16.97],
            'lhcb_DD_p_q0.275': [-2.37, 17.94],
            'lhcb_DD_p_q0.300': [-2.53, 18.94],
            'lhcb_DD_p_q0.325': [-2.81, 20.09],
            'lhcb_DD_p_q0.350': [-3.02, 21.21],
            'lhcb_DD_p_q0.375': [-3.28, 22.39],
            'lhcb_DD_p_q0.400': [-3.47, 23.53],
            'lhcb_DD_p_q0.425': [-3.72, 24.80],
            'lhcb_DD_p_q0.450': [-3.96, 26.07],
            'lhcb_DD_p_q0.475': [-4.25, 27.46],
            'lhcb_DD_p_q0.500': [-4.45, 28.80],
            'lhcb_DD_p_q0.525': [-4.67, 30.26],
            'lhcb_DD_p_q0.550': [-4.93, 31.79],
            'lhcb_DD_p_q0.575': [-5.26, 33.50],
            'lhcb_DD_p_q0.600': [-5.70, 35.40],
            'lhcb_DD_p_q0.625': [-6.07, 37.37],
            'lhcb_DD_p_q0.650': [-6.43, 39.50],
            'lhcb_DD_p_q0.675': [-6.73, 41.70],
            'lhcb_DD_p_q0.700': [-7.35, 44.39],
            'lhcb_DD_p_q0.725': [-7.83, 47.14],
            'lhcb_DD_p_q0.750': [-8.42, 50.27],
            'lhcb_DD_p_q0.775': [-9.37, 54.15],
            'lhcb_DD_p_q0.800': [-10.33, 58.51],
            'lhcb_DD_p_q0.825': [-11.31, 63.47],
            'lhcb_DD_p_q0.850': [-12.31, 69.43],
            'lhcb_DD_p_q0.875': [-13.58, 76.65],
            'lhcb_DD_p_q0.900': [-15.83, 86.38],
            'lhcb_DD_p_q0.925': [-18.85, 99.76],
            'lhcb_DD_p_q0.950': [-23.54, 120.47],
            'lhcb_DD_p_q0.975': [-33.57, 161.94],
            'lhcb_LL_pz': [-4.61, 27.11],
            'lhcb_LL_pz_q0.025': [-0.16, 4.43],
            'lhcb_LL_pz_q0.050': [-0.23, 5.22],
            'lhcb_LL_pz_q0.075': [-0.27, 5.88],
            'lhcb_LL_pz_q0.100': [-0.38, 6.52],
            'lhcb_LL_pz_q0.125': [-0.42, 7.09],
            'lhcb_LL_pz_q0.150': [-0.46, 7.61],
            'lhcb_LL_pz_q0.175': [-0.50, 8.12],
            'lhcb_LL_pz_q0.200': [-0.64, 8.74],
            'lhcb_LL_pz_q0.225': [-0.74, 9.29],
            'lhcb_LL_pz_q0.250': [-0.87, 9.89],
            'lhcb_LL_pz_q0.275': [-0.96, 10.45],
            'lhcb_LL_pz_q0.300': [-1.02, 11.03],
            'lhcb_LL_pz_q0.325': [-1.14, 11.65],
            'lhcb_LL_pz_q0.350': [-1.30, 12.35],
            'lhcb_LL_pz_q0.375': [-1.50, 13.10],
            'lhcb_LL_pz_q0.400': [-1.63, 13.82],
            'lhcb_LL_pz_q0.425': [-1.76, 14.54],
            'lhcb_LL_pz_q0.450': [-1.91, 15.33],
            'lhcb_LL_pz_q0.475': [-2.09, 16.22],
            'lhcb_LL_pz_q0.500': [-2.24, 17.06],
            'lhcb_LL_pz_q0.525': [-2.45, 18.00],
            'lhcb_LL_pz_q0.550': [-2.63, 18.98],
            'lhcb_LL_pz_q0.575': [-2.86, 20.08],
            'lhcb_LL_pz_q0.600': [-3.16, 21.33],
            'lhcb_LL_pz_q0.625': [-3.48, 22.65],
            'lhcb_LL_pz_q0.650': [-3.77, 24.06],
            'lhcb_LL_pz_q0.675': [-4.11, 25.62],
            'lhcb_LL_pz_q0.700': [-4.48, 27.35],
            'lhcb_LL_pz_q0.725': [-4.84, 29.17],
            'lhcb_LL_pz_q0.750': [-5.18, 31.26],
            'lhcb_LL_pz_q0.775': [-5.72, 33.73],
            'lhcb_LL_pz_q0.800': [-6.47, 36.74],
            'lhcb_LL_pz_q0.825': [-7.24, 40.19],
            'lhcb_LL_pz_q0.850': [-7.99, 44.20],
            'lhcb_LL_pz_q0.875': [-8.99, 49.14],
            'lhcb_LL_pz_q0.900': [-10.81, 56.31],
            'lhcb_LL_pz_q0.925': [-12.99, 65.92],
            'lhcb_LL_pz_q0.950': [-15.73, 80.48],
            'lhcb_LL_pz_q0.975': [-23.89, 111.73],
            'lhcb_DD_pz': [-7.35, 42.32],
            'lhcb_DD_pz_q0.025': [-0.48, 6.89],
            'lhcb_DD_pz_q0.050': [-0.63, 8.35],
            'lhcb_DD_pz_q0.075': [-0.87, 9.61],
            'lhcb_DD_pz_q0.100': [-1.04, 10.69],
            'lhcb_DD_pz_q0.125': [-1.21, 11.75],
            'lhcb_DD_pz_q0.150': [-1.48, 12.86],
            'lhcb_DD_pz_q0.175': [-1.65, 13.84],
            'lhcb_DD_pz_q0.200': [-1.80, 14.80],
            'lhcb_DD_pz_q0.225': [-2.03, 15.86],
            'lhcb_DD_pz_q0.250': [-2.16, 16.83],
            'lhcb_DD_pz_q0.275': [-2.34, 17.79],
            'lhcb_DD_pz_q0.300': [-2.51, 18.81],
            'lhcb_DD_pz_q0.325': [-2.75, 19.91],
            'lhcb_DD_pz_q0.350': [-2.98, 21.06],
            'lhcb_DD_pz_q0.375': [-3.25, 22.24],
            'lhcb_DD_pz_q0.400': [-3.44, 23.39],
            'lhcb_DD_pz_q0.425': [-3.67, 24.64],
            'lhcb_DD_pz_q0.450': [-3.93, 25.93],
            'lhcb_DD_pz_q0.475': [-4.21, 27.31],
            'lhcb_DD_pz_q0.500': [-4.42, 28.66],
            'lhcb_DD_pz_q0.525': [-4.63, 30.12],
            'lhcb_DD_pz_q0.550': [-4.90, 31.64],
            'lhcb_DD_pz_q0.575': [-5.21, 33.33],
            'lhcb_DD_pz_q0.600': [-5.69, 35.28],
            'lhcb_DD_pz_q0.625': [-6.04, 37.24],
            'lhcb_DD_pz_q0.650': [-6.38, 39.34],
            'lhcb_DD_pz_q0.675': [-6.70, 41.57],
            'lhcb_DD_pz_q0.700': [-7.31, 44.23],
            'lhcb_DD_pz_q0.725': [-7.82, 47.04],
            'lhcb_DD_pz_q0.750': [-8.37, 50.11],
            'lhcb_DD_pz_q0.775': [-9.32, 54.01],
            'lhcb_DD_pz_q0.800': [-10.30, 58.38],
            'lhcb_DD_pz_q0.825': [-11.22, 63.29],
            'lhcb_DD_pz_q0.850': [-12.23, 69.24],
            'lhcb_DD_pz_q0.875': [-13.52, 76.52],
            'lhcb_DD_pz_q0.900': [-15.76, 86.21],
            'lhcb_DD_pz_q0.925': [-18.76, 99.59],
            'lhcb_DD_pz_q0.950': [-23.51, 120.38],
            'lhcb_DD_pz_q0.975': [-33.51, 161.81],
            'belle_VDX_p': [-0.41, 1.42],
            'belle_VDX_p_q0.025': [0.03, 0.20],
            'belle_VDX_p_q0.050': [0.02, 0.28],
            'belle_VDX_p_q0.075': [-0.00, 0.36],
            'belle_VDX_p_q0.100': [-0.02, 0.43],
            'belle_VDX_p_q0.125': [-0.05, 0.49],
            'belle_VDX_p_q0.150': [-0.07, 0.55],
            'belle_VDX_p_q0.175': [-0.09, 0.61],
            'belle_VDX_p_q0.200': [-0.11, 0.66],
            'belle_VDX_p_q0.225': [-0.13, 0.72],
            'belle_VDX_p_q0.250': [-0.16, 0.78],
            'belle_VDX_p_q0.275': [-0.18, 0.84],
            'belle_VDX_p_q0.300': [-0.20, 0.89],
            'belle_VDX_p_q0.325': [-0.22, 0.94],
            'belle_VDX_p_q0.350': [-0.24, 1.00],
            'belle_VDX_p_q0.375': [-0.26, 1.06],
            'belle_VDX_p_q0.400': [-0.28, 1.11],
            'belle_VDX_p_q0.425': [-0.31, 1.17],
            'belle_VDX_p_q0.450': [-0.33, 1.23],
            'belle_VDX_p_q0.475': [-0.35, 1.29],
            'belle_VDX_p_q0.500': [-0.37, 1.35],
            'belle_VDX_p_q0.525': [-0.39, 1.40],
            'belle_VDX_p_q0.550': [-0.42, 1.46],
            'belle_VDX_p_q0.575': [-0.44, 1.52],
            'belle_VDX_p_q0.600': [-0.46, 1.58],
            'belle_VDX_p_q0.625': [-0.49, 1.64],
            'belle_VDX_p_q0.650': [-0.51, 1.70],
            'belle_VDX_p_q0.675': [-0.54, 1.77],
            'belle_VDX_p_q0.700': [-0.57, 1.83],
            'belle_VDX_p_q0.725': [-0.59, 1.90],
            'belle_VDX_p_q0.750': [-0.62, 1.97],
            'belle_VDX_p_q0.775': [-0.65, 2.04],
            'belle_VDX_p_q0.800': [-0.69, 2.12],
            'belle_VDX_p_q0.825': [-0.72, 2.20],
            'belle_VDX_p_q0.850': [-0.76, 2.30],
            'belle_VDX_p_q0.875': [-0.79, 2.40],
            'belle_VDX_p_q0.900': [-0.84, 2.52],
            'belle_VDX_p_q0.925': [-0.90, 2.66],
            'belle_VDX_p_q0.950': [-0.96, 2.82],
            'belle_VDX_p_q0.975': [-1.06, 3.07],
            'belle_VDX_pt': [-0.28, 1.02],
            'belle_VDX_pt_q0.025': [-0.00, 0.12],
            'belle_VDX_pt_q0.050': [-0.00, 0.16],
            'belle_VDX_pt_q0.075': [-0.01, 0.21],
            'belle_VDX_pt_q0.100': [-0.02, 0.25],
            'belle_VDX_pt_q0.125': [-0.02, 0.29],
            'belle_VDX_pt_q0.150': [-0.03, 0.33],
            'belle_VDX_pt_q0.175': [-0.05, 0.37],
            'belle_VDX_pt_q0.200': [-0.06, 0.41],
            'belle_VDX_pt_q0.225': [-0.07, 0.45],
            'belle_VDX_pt_q0.250': [-0.08, 0.49],
            'belle_VDX_pt_q0.275': [-0.10, 0.53],
            'belle_VDX_pt_q0.300': [-0.11, 0.57],
            'belle_VDX_pt_q0.325': [-0.12, 0.61],
            'belle_VDX_pt_q0.350': [-0.14, 0.65],
            'belle_VDX_pt_q0.375': [-0.15, 0.69],
            'belle_VDX_pt_q0.400': [-0.17, 0.73],
            'belle_VDX_pt_q0.425': [-0.18, 0.77],
            'belle_VDX_pt_q0.450': [-0.19, 0.82],
            'belle_VDX_pt_q0.475': [-0.21, 0.86],
            'belle_VDX_pt_q0.500': [-0.22, 0.90],
            'belle_VDX_pt_q0.525': [-0.24, 0.95],
            'belle_VDX_pt_q0.550': [-0.26, 1.00],
            'belle_VDX_pt_q0.575': [-0.28, 1.05],
            'belle_VDX_pt_q0.600': [-0.30, 1.10],
            'belle_VDX_pt_q0.625': [-0.32, 1.16],
            'belle_VDX_pt_q0.650': [-0.35, 1.22],
            'belle_VDX_pt_q0.675': [-0.37, 1.28],
            'belle_VDX_pt_q0.700': [-0.39, 1.34],
            'belle_VDX_pt_q0.725': [-0.42, 1.40],
            'belle_VDX_pt_q0.750': [-0.44, 1.47],
            'belle_VDX_pt_q0.775': [-0.47, 1.54],
            'belle_VDX_pt_q0.800': [-0.50, 1.61],
            'belle_VDX_pt_q0.825': [-0.53, 1.69],
            'belle_VDX_pt_q0.850': [-0.57, 1.77],
            'belle_VDX_pt_q0.875': [-0.61, 1.87],
            'belle_VDX_pt_q0.900': [-0.65, 1.97],
            'belle_VDX_pt_q0.925': [-0.70, 2.08],
            'belle_VDX_pt_q0.950': [-0.75, 2.21],
            'belle_VDX_pt_q0.975': [-0.82, 2.38]
        }

        # make the interpolation
        if setup in setup_coefficients:
            coeff = setup_coefficients[setup]
            self.p = self.spm * coeff[0] + coeff[1]
            self.p[self.p <= 0] = 0.001
        else:
            raise ValueError(
                'Unknown setup "{}" in PhaseSpaceDependentMomentum!'.format(
                    setup))
        return
 def __init__(self, s12, s13):
     self.base_eff = np.ones((len(s12), len(s13)))
     self.param = PhysicalParameters()
     self.t_min = 0
     self.t_max = 4 * self.param.KL_tau
Ejemplo n.º 8
0
    points_name += '_q{:1.3f}'.format(args.quantile)
    quantile_suffix = '_q{:1.3f}'.format(args.quantile)
if args.model_Ki: 
    points_name += '_modelKi'
if args.perfect_eff_Ki: 
    points_name += '_perfecteffKi'

cases = ['full', 'eps_only', 'mat_only']

amp_dir = '/data/lhcb/users/bjoern/Analyses/B2DPi/data/various_studies/ks_cpv/amplitudes'
output_dir = '/data/lhcb/users/bjoern/Analyses/B2DPi/data/various_studies/ks_cpv/simple_full_studies'
output_dir = '{}/setup_{}_{}{}_n_{}'.format(output_dir, args.model, args.setup, points_name, args.n_kl)
subprocess.call(['mkdir', '-p', output_dir])
print 'output_dir:', output_dir

pp = PhysicalParameters(include_mixing=True, sum_chi=include_absorbtion)
pp_no_mat = PhysicalParameters(include_mixing=False, sum_chi=include_absorbtion)

# A default model
fm_default = FullModel(
        "{}/{}_KS_default{}.pickle".format(amp_dir, args.model, points_file_name), 
        "{}/{}_KL_default{}.pickle".format(amp_dir, args.model, points_file_name), 
        eps = PhysicalParameters().default_eps, 
        parameters = PhysicalParameters(), 
        binning_file="../python/input/KsPiPi_optimal.pickle") 

# extract the phase space coordinates from default model
s12 = fm_default.s12
s13 = fm_default.s13

if args.setup=='default':
Ejemplo n.º 9
0

if __name__ == "__main__":
    print("Testing {}".format(os.path.basename(__file__)))
    from models import DefaultModel, DefaultCombinedDHModel
    from models import FullModel
    from PhysicalParameters import PhysicalParameters
    from GammaFitter import GammaFitter
    from GammaFitterXiSetup import GammaFitterXiSetup

    dm = DefaultModel("../amplitude_calculations/output/KS_default.pickle")
    dcm = DefaultCombinedDHModel(
        "../amplitude_calculations/output/KS_default.pickle")
    fm = FullModel("../amplitude_calculations/output/KS_default.pickle",
                   "../amplitude_calculations/output/KL_default.pickle",
                   PhysicalParameters().default_eps, PhysicalParameters(True))
    bs = BiasStudy(fm,
                   param_sets=np.array(
                       [[uf.deg_to_rad(x), 0.1,
                         uf.deg_to_rad(130)] for x in [80]]),
                   KL_amplitude_files=[
                       "../amplitude_calculations/output/KL_seed_1.pickle",
                       "../amplitude_calculations/output/KL_seed_2.pickle"
                   ])

    gf = GammaFitter()
    gf_xi = GammaFitterXiSetup()

    bs.init_yields()
    # bs.load_yields("tmp_n.pickle")
    bs.run(dm, gf)