/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
SimGeneral/Configuration/python/LumiToRun.py
10 строк
421 B
Chris West
Introduce runDependent process modifier and make configuration of run-dependent MC configurable from cmsDriver
28 апр 2021, 01:30
28 апр 2021, 01:30
bb7547c
Код
Авторство
О чём код?
def lumi_to_run(runs, events_in_sample, events_per_job): '''Print tuple for use in firstLuminosityBlockForEachRun''' n_iovs = len(runs) n_lumis = events_in_sample // events_per_job if n_lumis % n_iovs != 0: raise Exception('n_lumis should be evenly divisible by n_iovs.') pairs = [] for i, run in enumerate(runs): pairs.append((run, 1 + i*n_lumis//n_iovs)) return tuple(pairs)