Belle II Software light-2609-luna
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 Klong candidates built
23 from all neutral ECL clusters, i.e. ECL clusters that are not matched to any track.
24
25 Parameters:
26 listtype (str): name of standard list options (currently only
27 'allklm' and 'allecl' are 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]', True, path)
35 # all ECL clusters
36 elif listtype == 'allecl':
37 B2WARNING('The Klong particles in the list "allecl" are exclusively built from ECLClusters!')
38 fillParticleList('K_L0:allecl', '[isFromECL > 0]', True, path)
39 else:
40 B2FATAL("""
41
42 Only the particle lists 'allklm' (Klongs built from KLM clusters) and 'allecl' (Klongs built from neutral ECLCluster) are
43 currently supported. Please use:
44
45 stdKlongs('allklm', path=mypath)
46 """)