Belle II Software prerelease-11-00-00a
stdKlongs.py
1#!/usr/bin/env python3
2
3
10
11from basf2 import B2FATAL, B2WARNING
12from modularAnalysis import fillParticleList
13
14
15def stdKlongs(listtype='allklm', path=None):
16 """
17 Warning:
18 This function is a placeholder for Klong selections. Currently
19 everything but the 'allklm' and 'allecl' lists is disabled pending study.
20
21 By default, prepares the 'K_L0:allklm' list with no cuts (all KLM clusters are loaded).
22 It's possible to provide the argument 'allecl' to create a list of all ECL clusters loaded as Klong candidates.
23
24 Parameters:
25 listtype (str): name of standard list options (currently only
26 'allklm' and 'allecl' are supported/recommended)
27 path (basf2.Path): modules are added to this path
28 """
29
30 # all KLM clusters
31 if listtype == 'allklm':
32 B2WARNING('The Klong particles in the list "allklm" are exclusively built from KLMClusters!')
33 fillParticleList('K_L0:allklm', '[isFromKLM > 0]', True, path)
34 # all ECL clusters
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 """)