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