コード例 #1
0
def expand_all():
    go_to_main_dir()
    print "copying files"
    copy_file()
    del_file()
    print "modifying files"
    mod_file.mod_file('./Source/MadWeight_File/mod_file/MW_pos',
                      opt={'nowarning': """['DESACTIVATE_CUT']"""})
コード例 #2
0
ファイル: expand_MadWeight.py プロジェクト: mfasDa/MadGraph5
def expand_all(echap=[]):
    go_to_main_dir()
    print("copying files")
    copy_file(echap)
    del_file()
    print("modifying files")
    opt = {}
    opt['nowarning'] = """['DESACTIVATE_CUT','DESACTIVATE_BW_CUT','get_user_params','main_make','obj_for_MW']"""
    mod_file.mod_file('./Source/MadWeight/mod_file/MW_pos', opt=opt)
コード例 #3
0
ファイル: expand_MadWeight.py プロジェクト: cesarotti/MMAPS
def expand_all(echap=[]):
    go_to_main_dir()
    print "copying files"
    copy_file(echap)
    del_file()
    print "modifying files"
    opt = {}
    opt["nowarning"] = """['DESACTIVATE_CUT','DESACTIVATE_BW_CUT','get_user_params','main_make','obj_for_MW']"""
    mod_file.mod_file("./Source/MadWeight/mod_file/MW_pos", opt=opt)
コード例 #4
0
def verif_event(MWparam):

    # 0 ##############
    ####  go to main directory and copy file
    go_to_main_dir()
    try:
        os.mkdir('./Events/'+MWparam.name)
    except:
        pass
    os.system('cp ./Events/input.lhco ./Events/'+MWparam.name+'/')
    # 1 ##############
    ####   take run information
    for MW_dir in MWparam.MW_listdir:
        select=Lhco_filter(MW_dir,'input.lhco',MWparam)
コード例 #5
0
def verif_event(MWparam):

    # 0 ##############
    ####  go to main directory and copy file
    go_to_main_dir()
    try:
        os.mkdir('./Events/' + MWparam.name)
    except:
        pass
    os.system('cp ./Events/input.lhco ./Events/' + MWparam.name + '/')
    # 1 ##############
    ####   take run information
    for MW_dir in MWparam.MW_listdir:
        select = Lhco_filter(MW_dir, 'input.lhco', MWparam)
コード例 #6
0
ファイル: verif_event.py プロジェクト: cesarotti/MMAPS
def restrict_event_passing_cut(MWparam):
    """ return the number of events in a (previous) run which pass the 'new' cut """
    
    # 0 ##############
    ####  go to main directory and copy file
    go_to_main_dir()
    try:
        os.mkdir('./Events/'+MWparam.name)
    except:
        pass
    os.system('cp ./SubProcesses/'+MWparam.MW_listdir[0]+'/'+MWparam.old_name+'/verif.lhco ./Events/'+MWparam.name+'/')
    # 1 ##############
    ####   take run information
    MW_dir=MWparam.MW_listdir[0]
    filter=Lhco_filter(MW_dir,MWparam=MWparam,auto=0)
    return filter.verif_event(MWparam.name+'/verif.lhco',output=1) #output 1:return which event pass the cut
コード例 #7
0
def restrict_event_passing_cut(MWparam):
    """ return the number of events in a (previous) run which pass the 'new' cut """
    
    # 0 ##############
    ####  go to main directory and copy file
    go_to_main_dir()
    try:
        os.mkdir('./Events/'+MWparam.name)
    except:
        pass
    os.system('cp ./SubProcesses/'+MWparam.MW_listdir[0]+'/'+MWparam.old_name+'/verif.lhco ./Events/'+MWparam.name+'/')
    # 1 ##############
    ####   take run information
    MW_dir=MWparam.MW_listdir[0]
    filter=Lhco_filter(MW_dir,MWparam=MWparam,auto=0)
    return filter.verif_event(MWparam.name+'/verif.lhco',output=1) #output 1:return which event pass the cut
コード例 #8
0
def collect_schedular(MW_param):

    go_to_main_dir()
    run_name=MW_param.name

    if MW_param.norm_with_cross:    #check if we use normalisation by CS
        print 'collecting cross section results'
        for dir in MW_param.P_listdir:
            os.chdir('./SubProcesses/'+dir+'/schedular')
            Collect_P_dir(dir,MW_param)
            os.chdir('../../../')
        # suppress lhe file and vegas-grid
        Clean_event(run_name)

    print 'collecting output  weight results'
    for dir in MW_param.MW_listdir:
        os.chdir('./SubProcesses/'+dir+'/schedular')
        Collect_MW_dir(dir,MW_param)
        os.chdir('../../../')
    All_Col=Collect_All_dir(MW_param)
コード例 #9
0
def collect_schedular(MW_param):

    go_to_main_dir()
    run_name = MW_param.name

    if MW_param.norm_with_cross:  #check if we use normalisation by CS
        print 'collecting cross section results'
        for dir in MW_param.P_listdir:
            os.chdir('./SubProcesses/' + dir + '/schedular')
            Collect_P_dir(dir, MW_param)
            os.chdir('../../../')
        # suppress lhe file and vegas-grid
        Clean_event(run_name)

    print 'collecting output  weight results'
    for dir in MW_param.MW_listdir:
        os.chdir('./SubProcesses/' + dir + '/schedular')
        Collect_MW_dir(dir, MW_param)
        os.chdir('../../../')
    All_Col = Collect_All_dir(MW_param)
コード例 #10
0
ファイル: clean.py プロジェクト: bendavid/MadGraph5_aMC-NLO
                elif os.path.isdir(os.path.join(pos,element)):
                    value,mess=self.suppress_dir(os.path.join(pos,element),opt)
                else:
                    value=0
                    mess="unknow data type "+str(element)+str(os.path.isdir(element))
                supress*=value
                if mess:
                    message+=mess+'\n'

        if supress:
            if 'n' not in opt:
                os.rmdir(pos)
                if 's' not in opt:
                    print 'delete dir',pos
            else:
                print 'schedulle removing directory',pos
                
            return 1,''
        else:
            return 0,message

#2 #########################################################################
if (__name__=='__main__'):

    from MW_param import go_to_main_dir

    go_to_main_dir()
    #Clean_event('fermi')
    #Clean_run('fermi')
    print 'no cleaning by default'
コード例 #11
0
                else:
                    value = 0
                    mess = "unknow data type " + str(element) + str(
                        os.path.isdir(element))
                supress *= value
                if mess:
                    message += mess + '\n'

        if supress:
            if 'n' not in opt:
                os.rmdir(pos)
                if 's' not in opt:
                    print 'delete dir', pos
            else:
                print 'schedulle removing directory', pos

            return 1, ''
        else:
            return 0, message


#2 #########################################################################
if (__name__ == '__main__'):

    from MW_param import go_to_main_dir

    go_to_main_dir()
    #Clean_event('fermi')
    #Clean_run('fermi')
    print 'no cleaning by default'
コード例 #12
0
ファイル: collect_result.py プロジェクト: andresib/ThesisCode
def collect_schedular(MW_param):

    go_to_main_dir()
    Collect_All(MW_param)
コード例 #13
0
def collect_schedular(MW_param):

    go_to_main_dir()
    Collect_All(MW_param)