10 import modularAnalysis
as ma
11 import stdV0s
as stdv0
13 from ROOT
import Belle2
17 path = b2.create_path()
20 b2.set_random_seed(
"1337")
23 entrySequences=[
"0:1"],
25 detectors = [
"CDC",
"TOP",
"ARICH",
"ECL",
"KLM"]
32 chargedStableList = []
33 for idx
in range(len(Belle2.Const.chargedStableSet)):
34 pdgId = Belle2.Const.chargedStableSet.at(idx).getPDGCode()
35 chargedStableList.extend([pdgId, -pdgId])
39 plist = f
"{pname}:ref"
41 ma.fillParticleList(plist,
"[pt > 0.1] and [thetaInCDCAcceptance]", path=path)
43 ntup_vars = ma.calculateTrackIsolation(plist,
47 ma.printList(plist, full=
True, path=path)
48 ma.printVariableValues(plist, ntup_vars, path=path)
49 ma.variablesToNtuple(plist,
52 filename=
"TrackIsolationVariables.root", path=path)
53 v0_types = [
'Lambda0:merged',
'K_S0:merged']
54 v0_functions = [stdv0.stdLambdas, stdv0.stdKshorts]
55 v0_decays = [
' -> ^p+ ^pi-',
' -> ^pi+ ^pi-']
56 for v0_type, v0_function, v0_decay
in zip(v0_types, v0_functions, v0_decays):
57 v0_function(path=path)
59 ntup_vars = ma.calculateTrackIsolation(v0_type+v0_decay,
62 track_vars = vu.create_aliases_for_selected(list_of_variables=ntup_vars,
63 decay_string=v0_type+v0_decay)
64 ma.printList(v0_type, full=
True, path=path)
65 ma.printVariableValues(v0_type, track_vars, path=path)
66 ma.variablesToNtuple(v0_type,
68 treename=f
"{v0_type.split(':')[0]}",
69 filename=
"TrackIsolationVariables.root", path=path)
def configure_logging_for_tests(user_replacements=None)
def set_loglevel(loglevel)
def require_file(filename, data_type="", py_case=None)
def clean_working_directory()