Belle II Software development
ClusterFilterValidationModule Class Reference
Inheritance diagram for ClusterFilterValidationModule:

Public Member Functions

def __init__ (self, output_file_name)
 
def initialize (self)
 
def terminate (self)
 
def prepare (self)
 
def pick (self, facet)
 
def peel (self, cluster)
 

Public Attributes

 mc_hit_lookup
 reference to the CDCMCHitlookUp singleton
 
 cluster_varset
 reference to the CDCWireHitClusterVarSet
 

Static Public Attributes

refiners save_tree
 Refiners to be executed at the end of the harvesting / termination of the module Save a tree of all collected variables in a sub folder.
 
refiners save_histograms
 Save histograms in a sub folder.
 

Detailed Description

Module to collect information about the facet creation cuts and compose validation plots on terminate.

Definition at line 66 of file clusterFilterValidation.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  output_file_name 
)
Constructor

Definition at line 70 of file clusterFilterValidation.py.

70 def __init__(self, output_file_name):
71 """Constructor"""
72 super().__init__(foreach="CDCWireHitClusterVector",
73 output_file_name=output_file_name)
74
76
77 self.cluster_varset = Belle2.TrackFindingCDC.CDCWireHitClusterVarSet()
78
static const CDCMCHitLookUp & getInstance()
Getter for the singletone instance.

Member Function Documentation

◆ initialize()

def initialize (   self)
Receive signal at the start of event processing

Definition at line 79 of file clusterFilterValidation.py.

79 def initialize(self):
80 """Receive signal at the start of event processing"""
81 self.cluster_varset.initialize()
82 super().initialize()
83

◆ peel()

def peel (   self,
  cluster 
)
Extract and store CDC hit and cluster information

Definition at line 97 of file clusterFilterValidation.py.

97 def peel(self, cluster):
98 """Extract and store CDC hit and cluster information"""
99
100 mc_hit_lookup = self.mc_hit_lookup
101
102 self.cluster_varset.extract(cluster)
103 cluster_crops = self.cluster_varset.getNamedValues()
104 cluster_crops = dict(cluster_crops)
105
106 # Truth variables
107 n_background = 0
108 for wireHit in list(cluster.items()):
109 cdcHit = wireHit.getHit()
110 if mc_hit_lookup.isBackground(cdcHit):
111 n_background += 1
112
113 truth_dict = dict(
114 n_background_truth=n_background,
115 background_fraction_truth=1.0 * n_background / cluster.size()
116 )
117
118 cluster_crops.update(truth_dict)
119 return cluster_crops
120

◆ pick()

def pick (   self,
  facet 
)
Always pick, never reject

Definition at line 93 of file clusterFilterValidation.py.

93 def pick(self, facet):
94 """Always pick, never reject"""
95 return True
96

◆ prepare()

def prepare (   self)
Fill the MC hit table

Definition at line 89 of file clusterFilterValidation.py.

89 def prepare(self):
90 """Fill the MC hit table"""
91 self.mc_hit_lookup.fill()
92

◆ terminate()

def terminate (   self)
Receive signal at the end of event processing

Definition at line 84 of file clusterFilterValidation.py.

84 def terminate(self):
85 """Receive signal at the end of event processing"""
86 self.cluster_varset.terminate()
87 super().terminate()
88

Member Data Documentation

◆ cluster_varset

cluster_varset

reference to the CDCWireHitClusterVarSet

Definition at line 77 of file clusterFilterValidation.py.

◆ mc_hit_lookup

mc_hit_lookup

reference to the CDCMCHitlookUp singleton

Definition at line 75 of file clusterFilterValidation.py.

◆ save_histograms

refiners save_histograms
static
Initial value:
= refiners.save_histograms(
)

Save histograms in a sub folder.

Definition at line 129 of file clusterFilterValidation.py.

◆ save_tree

refiners save_tree
static
Initial value:
= refiners.save_tree(
)

Refiners to be executed at the end of the harvesting / termination of the module Save a tree of all collected variables in a sub folder.

Definition at line 123 of file clusterFilterValidation.py.


The documentation for this class was generated from the following file: