12a test of the EventKinematics variables using the small test file for running quickly
16from basf2
import set_random_seed, create_path, process
20set_random_seed(
"1337")
23fsps = [
'gamma',
'e+',
'mu+',
'pi+',
'K+',
'p+',
27testpath = create_path()
28testpath.add_module(
'RootInput', inputFileNames=testinput)
29testpath.add_module(
'ParticleLoader', decayStrings=[fsp +
':MC' for fsp
in fsps],
30 addDaughters=
True, skipNonPrimaryDaughters=
True, useMCParticles=
True)
32 testpath.add_module(
'ParticleListManipulator', outputListName=fsp,
33 inputListNames=[fsp +
':MC'], cut=
'mcPrimary > 0 and nDaughters == 0')
37 'genMissingMass2OfEvent',
38 'genMissingEnergyOfEventCMS',
39 'genMissingMomentumOfEventCMS',
40 'genTotalPhotonsEnergyOfEvent',
41 'genVisibleEnergyOfEventCMS',
44testpath.add_module(
'EventKinematics', particleLists=fsps, usingMC=
True)
46testpath.add_module(
'ParticlePrinter', listName=
'', fullPrint=
False,
47 variables=event_kinematics)
def require_file(filename, data_type="", py_case=None)
def configure_logging_for_tests(user_replacements=None)