コード例 #1
0
def run_susyhit(signal):
    with cd(susyhit_path):
        set_params(signal.mH, signal.mB)
        sp.call('./run', stdout=open(os.devnull, 'w'))
        sp.call([
            'cp', 'susyhit_slha.out', '/'.join([
                dm_dir, 'Cards/param_cards/', signal.index + '_param_card.dat'
            ])
        ])
コード例 #2
0
    def run_prospino(self):
        """ Runs Prospino to get the Higgsino pair production cross section. """

        input_spectrum = DM_CARDS_DIR + '/prospino_input/' + self.index + '_slhaspectrum.in'
        sh.copy(input_spectrum, PROSPINO_DIR + '/prospino.in.les_houches')

        with cd(PROSPINO_DIR):
            devnull = open(os.devnull, 'w')
            sp.call(['make', 'clean'])
            sp.call('make')
            sp.call('./prospino_2.run')
            sh.copy(
                'prospino.dat', DM_CARDS_DIR + '/prospino_output_xsections/' +
                self.index + '_xsection.dat')
コード例 #3
0
 def run_susyhit(self, susyhit_path='/extra/adarsh/Tools/susyhit'):
     with cd(susyhit_path):
         with open('suspect2_lha.in', 'w') as f:
             f.write(
                 suspect_input_template.format(mH=str(self.mH),
                                               mB=str(self.mB),
                                               mW="3000.",
                                               tb="10.0"))
         sp.call('./run', stdout=open(os.devnull, 'w'))
         sh.copy(
             'slhaspectrum.in', DM_CARDS_DIR + '/prospino_input/' +
             self.index + '_slhaspectrum.in')
         sh.copy(
             'susyhit_slha.out', DM_CARDS_DIR + '/param_cards/' +
             self.index + '_param_card.dat')
コード例 #4
0
            return '   1   {} # M_1\n'.format(M1)
        if '# mu(EWSB)' in line:
            return '   23\t{} # mu(EWSB)\n'.format(mu)
        else:
            return line

    modify_file('suspect2_lha.in', linemodfn)


def run_susyhit(signal):
    with cd(susyhit_path):
        set_params(signal.mH, signal.mB)
        sp.call('./run', stdout=open(os.devnull, 'w'))
        sp.call([
            'cp', 'susyhit_slha.out', '/'.join([
                dm_dir, 'Cards/param_cards/', signal.index + '_param_card.dat'
            ])
        ])


if __name__ == "__main__":
    # map(run_susyhit,tqdm(signals, desc = 'running SUSY-HIT'))
    with cd(susyhit_path):
        set_params(1000, 25)
        sp.call('./run')
        sp.call([
            'cp', 'susyhit_slha.out', '/'.join([
                dm_dir, 'Cards/param_cards/', signal.index + '_param_card.dat'
            ])
        ])
コード例 #5
0
 def make_feature_array(self):
     with cd(self.directory + '/MakeFeatureArray/Build'):
         devnull = open(os.devnull, 'w')
         sp.call('./analyze.sh', shell=True, stderr=devnull, stdout=devnull)