Belle II Software
release-08-01-10
stdKlongs.py
1
#!/usr/bin/env python3
2
3
10
11
from
basf2
import
B2FATAL, B2WARNING
12
from
modularAnalysis
import
fillParticleList
13
14
15
def
stdKlongs
(listtype='allklm', path=None):
16
"""
17
Warning:
18
This function is a placeholder for Klong selections. Currently
19
everything but the 'allklm' list is disabled pending study.
20
21
Prepares the 'K_L0:allklm' list with no cuts (all KLM clusters are loaded).
22
23
Parameters:
24
listtype (str): name of standard list options (currently only
25
'all' is supported/recommended)
26
path (basf2.Path): modules are added to this path
27
"""
28
29
# all KLM clusters
30
if
listtype ==
'allklm'
:
31
B2WARNING(
'The Klong particles in the list "allklm" are exclusively built from KLMClusters!'
)
32
fillParticleList(
'K_L0:allklm'
,
'[isFromKLM > 0] and [klmClusterKlId >= 0] and [klmClusterKlId <= 1]'
,
True
, path)
33
elif
listtype ==
'allecl'
:
34
B2WARNING(
'The Klong particles in the list "allecl" are exclusively built from ECLClusters!'
)
35
fillParticleList(
'K_L0:allecl'
,
'isFromECL > 0'
,
True
, path)
36
else
:
37
B2FATAL(
"""
38
39
Only the particle lists 'allklm' (Klongs built from KLM clusters) and 'allecl' (Klongs built from neutral ECLCluster) are
40
currently supported. Please use:
41
42
stdKlongs('allklm', path=mypath)
43
"""
)
44
# # loose KLs, removes buggy KLM clusters
45
# elif listtype == 'veryLoose':
46
# stdKlongs('all', path)
47
# selection = 'E > 0.5 and E < 10. and klmClusterTiming > -10 and klmClusterTiming < 100.'
48
# B2WARNING("The standard Klong lists are not studied or optimised yet. ")
49
# B2WARNING("Beware that anything more complex than the 'all' list may not work as desired (or at all).")
50
# B2WARNING("You will have the following cuts applied: %s" % selection)
51
# cutAndCopyList(
52
# 'K_L0:veryLoose',
53
# 'K_L0:all',
54
# selection,
55
# True,
56
# path)
57
#
58
# # additional cuts on KL_ID
59
# elif listtype == 'loose':
60
# stdKlongs('all', path)
61
# selection = 'E > 0.5 and E < 10. and klmClusterTiming > -10 and klmClusterTiming < 100. and klmClusterKlId > 0.04'
62
# B2WARNING("The standard Klong lists are not studied or optimised yet. ")
63
# B2WARNING("Beware that anything more complex than the 'all' list may not work as desired (or at all).")
64
# B2WARNING("You will have the following cuts applied: %s" % selection)
65
# cutAndCopyList(
66
# 'K_L0:loose',
67
# 'K_L0:all',
68
# selection,
69
# True,
70
# path)
71
#
72
# # additional cuts on KL_ID
73
# elif listtype == 'tight':
74
# stdKlongs('loose', path)
75
# tight_selection = 'klmClusterKlId > 0.2'
76
# B2WARNING("With the following additional tight selection: %s" % tight_selection)
77
# cutAndCopyList(
78
# 'K_L0:tight',
79
# 'K_L0:loose',
80
# tight_selection,
81
# True,
82
# path)
stdKlongs
Definition:
stdKlongs.py:1
analysis
scripts
stdKlongs.py
Generated on Mon Sep 23 2024 14:00:10 for Belle II Software by
1.9.1