def get_intermediate_PS_point(self, higher_PS_point, children): recoilers = tuple(i for i in higher_PS_point.keys() if i not in (1, 2, children[0], children[1])) def dummy_leg(i): return subtraction.SubtractionLeg(i, 21, subtraction.SubtractionLeg.FINAL) structure = subtraction.SingularStructure(substructures=[ subtraction.CollStructure(legs=(dummy_leg(children[0]), dummy_leg(children[1]))), ], legs=(dummy_leg(r) for r in recoilers)) leg_numbers_map = subtraction.bidict({ i: frozenset({ i, }) for i in higher_PS_point.keys() if i not in (children[0], children[1]) }) leg_numbers_map[1000] = frozenset({children[0], children[1]}) mapping = mappings.FinalGroupingMapping intermediate_ps_point, mapping_vars = mapping.map_to_lower_multiplicity( higher_PS_point, structure, leg_numbers_map) return intermediate_ps_point, mapping_vars
def approach_limit(self, PS_point, structure, scaling_parameter, process): """Produce a higher multiplicity phase-space point from PS_point, according to kinematic_variables that approach the limit of structure parametrically with scaling_parameter. """ # Decompose the counterterm decomposed = structure.decompose() # The rescaling of the convolution variables is done independently of the mapping # and should therefore not be considered decomposed = [step for step in decomposed if step.name() != "F"] # Always approach the limit at the same speed base = scaling_parameter**(1. / max(len(decomposed), 1)) #base = scaling_parameter # Prepare a momentum dictionary for each mapping mom_dict = sub.bidict() for leg in process['legs']: mom_dict[leg['number']] = frozenset([ leg['number'], ]) parent_index = max(leg['number'] for leg in process['legs']) + 1 fake_ct = sub.Counterterm(process=process, momenta_dict=mom_dict) closer_PS_point = PS_point.get_copy() # Walk the hike up and down for step in decomposed: mapping = self.determine_mapping(step) all_children = frozenset([leg.n for leg in step.get_all_legs()]) recoilers = self.get_recoilers(fake_ct, exclude=all_children) # Below is a hack to recoil against the Higgs for C(1,3),C(2,4) of g g > d d~ h. #recoilers = [sub.SubtractionLeg(5,25,sub.SubtractionLeg.FINAL),] new_ss = sub.SingularStructure(substructures=[ step, ], legs=recoilers) if step.name() == "C": mom_dict[parent_index] = all_children elif step.name() == "S": pass else: raise MadGraph5Error("Unrecognized structure of type " + step.name()) kin_variables = {} #misc.sprint('Now doing step: %s'%str(step)) #misc.sprint('Starting PS point:\n',str(closer_PS_point)) low_PS_point, _ = mapping.map_to_lower_multiplicity( closer_PS_point, new_ss, mom_dict, None, kin_variables) #misc.sprint('Mapped down PS point:\n',str(low_PS_point)) #misc.sprint('kin_variables=',kin_variables) mapping.rescale_kinematic_variables(new_ss, mom_dict, kin_variables, base) #misc.sprint('rescaled kin_variables=',base,kin_variables) closer_PS_point, _ = mapping.map_to_higher_multiplicity( low_PS_point, new_ss, mom_dict, kin_variables) #misc.sprint('Mapped up PS point:\n',str(closer_PS_point)) #misc.sprint('kin_variables=',kin_variables) if parent_index in mom_dict.keys(): del mom_dict[parent_index] return closer_PS_point
def get_final_PS_point_direct(self, PS_point, children): recoilers = tuple( i for i in PS_point.keys() if i not in (1, 2, children[0], children[1], children[2]) ) def dummy_leg(i): return subtraction.SubtractionLeg(i, 21, subtraction.SubtractionLeg.FINAL) structure = subtraction.SingularStructure( substructures=[subtraction.CollStructure( legs=(dummy_leg(children[0]), dummy_leg(children[1]), dummy_leg(children[2])) ), ], legs=(dummy_leg(r) for r in recoilers) ) leg_numbers_map = subtraction.bidict({ i: frozenset({i,}) for i in PS_point.keys() if i not in (children[0], children[1], children[2])}) leg_numbers_map[2000] = frozenset({children[0], children[1], children[2]}) mapping = mappings.FinalRescalingOneMapping final_PS_point, mapping_vars = mapping.map_to_lower_multiplicity( PS_point, structure, leg_numbers_map, compute_jacobian=True) return final_PS_point, mapping_vars
def __init__(self, mapping, intermediate_masses, final_masses): self.mapping = mapping assert len(intermediate_masses) == len(final_masses) self.generator = psgen.FlatInvertiblePhasespace([ 0., ] * 2, intermediate_masses, (0.5, 0.5), beam_types=(0, 0)) self.momenta_dict = sub.bidict({ 1: frozenset((1, )), 2: frozenset((2, )) }) legs = [] substructures = [] self.final_masses_m = dict() self.final_masses_s = dict() self.intermediate_masses_m = dict() self.intermediate_masses_s = dict() for i in range(len(intermediate_masses)): self.momenta_dict[i + 3] = frozenset((i + 3, )) if intermediate_masses[i] == final_masses[i]: legs.append(MappedPS.leg(i + 3)) else: substructures.append(MappedPS.structure(i + 3)) self.final_masses_m['m2' + str(i + 3)] = final_masses[i]**2 self.final_masses_s['s' + str(i + 3)] = final_masses[i]**2 self.intermediate_masses_m['m2' + str(i + 3)] = intermediate_masses[i]**2 self.intermediate_masses_s['s' + str(i + 3)] = intermediate_masses[i]**2 self.singular_structure = sub.SingularStructure( legs=legs, substructures=substructures) print self.singular_structure