def equivalent_ECS(self):
        """ 1) define completly the change of variable for the enlarged ECS
                -find which propagator aligned,...
            2) define equivalent solution if any (B->C)
        """

        if self.num_neut == 0:
            #option: authorize a!
            if self.opt.use_ecs_a:
                Block_ECS(self, 'a', self.main_content)
                return [self]
            else:
                return []
        elif self.num_neut == 1:
            #option: authorize b or c!
            if self.opt.use_ecs_b or self.opt.use_ecs_c:
                output = self.equivalent_ECS_1neut()
                return output
            else:
                return []
        else:
            #two neutrino case
            #option: authorize d or e or f!
            if self.opt.use_ecs_d or self.opt.use_ecs_e or self.opt.use_ecs_f:
                output = self.equivalent_ECS_2neut()
                return output
            else:
                return []
Exemplo n.º 2
0
    def equivalent_ECS_1neut(self, use_noresonant=0):
        """
            define completely the change of variable for the enlarged ECS
            - return all the possible ECS changing the particles entering in the B case
            - define equivalent soltution if any (B->C)
        """

        sol = []
        fuse_list = [self.main_content[0].twin]  #define the blob fuse
        for propagator in self.main_content[0].all_mother():
            if propagator.channel.startswith('T'):
                break
            # define a B change of variable
            if self.opt.use_ecs_b:
                New_sol = ECS_sector(self.MG_sec, 'b', self.main_content,
                                     self.unaligned)
                fuse_particle = New_sol.define_fuse_region(fuse_list)
                Block_ECS(New_sol, 'b', self.main_content + [fuse_particle])
                New_sol.order_block(New_sol)
                sol.append(New_sol)

            #look for class C
            if self.opt.use_ecs_c:
                sol += self.equivalent_ECS_passinC(propagator, fuse_list)

            #update fuse for next level
            fuse_list.append(propagator.twin)

        return sol
Exemplo n.º 3
0
    def define_new_ecs_d(self, propagator, fuse):
        """ return a valid object for this change of variable """

        for propa in propagator:
            if propa.channel.startswith('T'):
                return []

        fuse_particle = []
        for data in fuse:
            fuse_particle.append(self.define_fuse_region(data))
        for particule in fuse_particle:
            if particule.MG in [1, 2]:
                return []

        New_sol = ECS_sector(self.MG_sec, 'd', self.main_content,
                             self.unaligned)
        Block_ECS(New_sol, 'd', self.main_content + fuse_particle)
        New_sol.order_block(New_sol)
        return [New_sol]
Exemplo n.º 4
0
    def equivalent_ECS_passinC(self, propa1, fuse1):
        """ check if those information can create a C block and define it
            propa1: first propagator than should enter in the C block
            fuse1: list of particles following this propa and should be fuse 
        """

        particle2 = propa1.twin
        if not particle2 or particle2.mass:
            return []  #the mass should be 0
        if particle2.MG < 3:
            return []
        propa2 = propa1.mother
        if propa2 == 0 or propa2.channel.startswith('T'):
            return []  #not enough propa remaining

        New_sol = ECS_sector(self.MG_sec, 'c', self.main_content,
                             self.unaligned)
        fuse = self.define_fuse_region(fuse1)
        Block_ECS(New_sol, 'c', self.main_content + [fuse, particle2])
        New_sol.order_block(New_sol)

        return [New_sol]
    def equivalent_ECS_2neut(self):
        """ 1) define completly the change of variable for the enlarged ECS
                -find which propagator aligned,...
            Each change of variable are factorized!!!
        """
        total_propa, lim1, lim2 = self.main_content[0].unaligned_propa(
            self.main_content[1], 0)
        lim = [lim1, lim2]
        fuse_particle = []
        #
        #     Enlarged constraint Sector D
        #
        if self.chgt_var == 'd':
            #check validity from option
            if not self.opt.use_ecs_d:
                return []
            #find the two thiner propagator for each neutrino
            for i in [0, 1]:
                thiner = 500
                thiner2 = 600
                #search thiner propa if option authorized
                if self.opt.ecs_fuse:
                    motherX = self.main_content[i]
                    for j in range(0, lim[i]):
                        motherX = motherX.mother
                        if motherX.width < thiner and motherX.channel == 'S':
                            thiner2 = thiner
                            thiner = motherX.width
                        elif motherX.width < thiner2 and motherX.channel == 'S':
                            thiner2 = motherX.width
                #check number of find solution and reassign
                if thiner == 500:  #no propagator in S channel or don't use fuse
                    thiner = self.main_content[
                        i].mother.width  #order between thiner
                    thiner2 = self.main_content[
                        i].mother.mother.width  #is irrelevant at this stage
                if thiner2 == 500:  #only one propagator in S channel
                    if thiner != self.main_content[i].mother.width:
                        thiner2 = self.main_content[i].mother.mother.width
                    elif self.main_content[i].mother.channel == 'S_flat':
                        thiner2 = self.main_content[i].mother.mother.width
                    else:
                        thiner2 = self.main_content[i].mother.mother.width

                #define fuse particle
                motherX = self.main_content[i]
                fuse_list = []
                fuse_with_this_neut = 0
                while fuse_with_this_neut < 2:
                    fuse_list.append(motherX.twin)
                    motherX = motherX.mother
                    if motherX == 0:
                        break
                    if motherX.width in [thiner, thiner2]:
                        fuse = self.define_fuse_region(fuse_list)
                        fuse_particle.append(fuse)
                        fuse_list = []
                        fuse_with_this_neut += 1
            Block_ECS(self, 'd', self.main_content + fuse_particle)
            self.order_block(self)
            return [self]
        #
        #     Enlarged constraint Sector E
        #
        elif self.chgt_var == 'e':
            #check validity from option
            if not self.opt.use_ecs_e:
                return []
            #find the two thiner propagator
            for i in [0, 1]:
                #search thiner propagator if option authorized
                if self.opt.ecs_fuse:
                    motherX = self.main_content[i].mother
                    thiner = motherX.width
                    for j in range(0, lim[i] - 1):
                        motherX = motherX.mother
                        if motherX.width < thiner and motherX.channel == 'S':
                            thiner = motherX.width
                else:
                    thiner = self.main_content[i].mother.width
                #define fuse particle
                motherX = self.main_content[i]
                fuse_list = []
                while 1:
                    fuse_list.append(motherX.twin)
                    motherX = motherX.mother
                    if motherX.width == thiner:
                        fuse = self.define_fuse_region(fuse_list)
                        fuse_particle.append(fuse)
                        break
            a = Block_ECS(self, 'e', self.main_content + fuse_particle)
            self.order_block(self)
            #print 'ECS E content: ',
            #for particle in self.main_content+fuse_particle:#a.order_content:
            #    print particle.MG,
            #print
            return [self]
        #
        #     Enlarged constraint Sector F
        #
        elif self.chgt_var == 'f' or self.chgt_var == 'g':
            #check validity from option
            if not self.opt.use_ecs_f:
                return []
            #F change of variable can't have freedom to move those propagator
            twin_part = []
            twin_part.append(self.main_content[0].twin)
            twin_part.append(self.main_content[1].twin)
            Block_ECS(self, self.chgt_var, self.main_content + twin_part)
            self.order_block(self)
            return [self]
    def equivalent_ECS_1neut(self, use_noresonant=0):
        """ 1) define completly the change of variable for the enlarged ECS
                -find which propagator aligned,...
            2) define equivalent solution if any (B->C)
        """
        # 1.1) ->search for the two thiner propagator+ check if we can pass in C change of variable
        thiner = self.main_content[0].mother.width
        part_thin = self.main_content[0].mother
        thiner_bef_m0 = 500  #thiner propagator in ascendance of mass nul (for Case C)
        thiner_m0 = 500  #thiner mother of a mass null particle (for Case C)
        madeC = 0
        motherX = self.main_content[0]

        while 1:
            motherX = motherX.mother
            if motherX == 0:
                break

            if motherX.width < thiner and motherX.channel == 'S':
                thiner = motherX.width
                part_thin = motherX

            #check for C splitting:
            try:
                if motherX.twin.external and motherX.twin.mass == 0:
                    if motherX.twin.tf_level > 1 and motherX.channel == 'S':
                        madeC = 1
                        if motherX.mother.width < thiner_m0:
                            thiner_m0 = motherX.mother.width
                            if thiner < thiner_bef_m0:
                                thiner_bef_m0 = thiner
            except:
                pass

        #1.2) ->create block and new ECS first for C change of variable secondly for B
        if madeC:
            New_sol = ECS_sector(self.MG_sec, 'c', self.main_content,
                                 self.unaligned)
            fuse_list = []
            motherX = self.main_content[0]
            while motherX.width != thiner_bef_m0:
                fuse_list.append(motherX.twin)
                motherX = motherX.mother
            fuse_particle1 = New_sol.define_fuse_region(fuse_list)
            fuse_list = []
            while motherX.width != thiner_m0:
                fuse_list.append(motherX.twin)
                motherX = motherX.mother
            fuse_particle2 = New_sol.define_fuse_region(fuse_list)
            Block_ECS(New_sol, 'c',
                      self.main_content + [fuse_particle1, fuse_particle2])
            New_sol.order_block(New_sol)

        # define B change of variable
        fuse_list = []
        motherX = self.main_content[0]
        while part_thin != motherX:
            fuse_list.append(motherX.twin)
            motherX = motherX.mother
        fuse_particle = self.define_fuse_region(fuse_list)
        Block_ECS(self, 'b', self.main_content + [fuse_particle])
        self.order_block(self)

        #2) Check definition from option
        sol = []
        if self.opt.use_ecs_b:
            sol.append(self)
        if madeC and self.opt.use_ecs_c:
            sol.append(New_sol)

        return sol