10import modularAnalysis
as ma
13from ROOT
import Belle2
17path = b2.create_path()
20b2.set_random_seed(
"1337")
23 entrySequences=[
"0:1"],
25detectors = [
"CDC",
"TOP",
"ARICH",
"ECL",
"KLM"]
33for idx
in range(len(Belle2.Const.chargedStableSet)):
34 pdgId = Belle2.Const.chargedStableSet.at(idx).getPDGCode()
35 chargedStableList.extend([pdgId, -pdgId])
37for pname, pdgId
in zip(
pdg.to_names(chargedStableList), chargedStableList):
39 plist = f
"{pname}:ref"
41 ma.fillParticleList(plist,
"[pt > 0.1] and [thetaInCDCAcceptance]", path=path)
43 track_iso_vars = ma.calculateTrackIsolation(plist,
46 exclude_pid_det_weights=
True)
48 ma.printVariableValues(plist, track_iso_vars[pdgId], path=path)
49 ma.variablesToNtuple(plist,
50 track_iso_vars[pdgId],
52 filename=
"TrackIsolationVariables.root",
55v0_types = [
"Lambda0:merged",
"K_S0:merged"]
56v0_functions = [stdv0.stdLambdas, stdv0.stdKshorts]
57v0_decays = [
" -> ^p+ ^pi-",
" -> ^pi+ ^pi-"]
59for v0_type, v0_function, v0_decay
in zip(v0_types, v0_functions, v0_decays):
61 v0_function(path=path)
63 track_iso_vars = ma.calculateTrackIsolation(v0_type+v0_decay,
66 exclude_pid_det_weights=
True)
68 ntup_vars_aliases = []
69 for ivars
in track_iso_vars.values():
70 ntup_vars_aliases += vu.create_aliases_for_selected(list_of_variables=ivars,
71 decay_string=v0_type+v0_decay)
73 ma.printVariableValues(v0_type, ntup_vars_aliases, path=path)
74 ma.variablesToNtuple(v0_type,
76 treename=f
"{v0_type.split(':')[0]}",
77 filename=
"TrackIsolationVariables.root", path=path)
def require_file(filename, data_type="", py_case=None)
def clean_working_directory()
def configure_logging_for_tests(user_replacements=None)
def set_loglevel(loglevel)