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 69 of file clusterFilterValidation.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  output_file_name 
)
Constructor

Definition at line 73 of file clusterFilterValidation.py.

73 def __init__(self, output_file_name):
74 """Constructor"""
75 super().__init__(foreach="CDCWireHitClusterVector",
76 output_file_name=output_file_name)
77
79
80 self.cluster_varset = Belle2.TrackFindingCDC.CDCWireHitClusterVarSet()
81
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 82 of file clusterFilterValidation.py.

82 def initialize(self):
83 """Receive signal at the start of event processing"""
84 self.cluster_varset.initialize()
85 super().initialize()
86

◆ peel()

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

Definition at line 100 of file clusterFilterValidation.py.

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

◆ pick()

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

Definition at line 96 of file clusterFilterValidation.py.

96 def pick(self, facet):
97 """Always pick, never reject"""
98 return True
99

◆ prepare()

def prepare (   self)
Fill the MC hit table

Definition at line 92 of file clusterFilterValidation.py.

92 def prepare(self):
93 """Fill the MC hit table"""
94 self.mc_hit_lookup.fill()
95

◆ terminate()

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

Definition at line 87 of file clusterFilterValidation.py.

87 def terminate(self):
88 """Receive signal at the end of event processing"""
89 self.cluster_varset.terminate()
90 super().terminate()
91

Member Data Documentation

◆ cluster_varset

cluster_varset

reference to the CDCWireHitClusterVarSet

Definition at line 80 of file clusterFilterValidation.py.

◆ mc_hit_lookup

mc_hit_lookup

reference to the CDCMCHitlookUp singleton

Definition at line 78 of file clusterFilterValidation.py.

◆ save_histograms

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

Save histograms in a sub folder.

Definition at line 132 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 126 of file clusterFilterValidation.py.


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