Belle II Software development
FacetFilterTrainingRun Class Reference
Inheritance diagram for FacetFilterTrainingRun:
StandardEventGenerationRun ReadOrGenerateEventsRun MinimalRun EmptyRun

Public Member Functions

def identifier (self)
 
def create_argument_parser (self, **kwds)
 
def create_path (self)
 

Public Attributes

 task
 Post-process events according to the user's desired task (train, eval, explore)
 
 variables
 Signal some variables to select in the classification analysis.
 

Static Public Attributes

int n_events = 100
 Suggested number for this analysis.
 
str generator_module = "generic"
 Suggested generator module.
 
str task = "explore"
 Default task set to explore.
 
str truth = "truth_positive"
 Name of the truth variables.
 
bool flight_time_reestimation = False
 Option whether to reestimate the drift length.
 
bool facet_least_square_fit = False
 Option whether to use the least square fit to the hit triplet.
 

Detailed Description

Run for recording facets encountered at the filter

Definition at line 23 of file trainFacetFilter.py.

Member Function Documentation

◆ create_argument_parser()

def create_argument_parser (   self,
**  kwds 
)
Convert command-line arguments to basf2 argument list

Reimplemented from ReadOrGenerateEventsRun.

Definition at line 49 of file trainFacetFilter.py.

49 def create_argument_parser(self, **kwds):
50 """Convert command-line arguments to basf2 argument list"""
51
52 argument_parser = super().create_argument_parser(**kwds)
53
54 argument_parser.add_argument(
55 "-fr",
56 "--flight-time-reestimation",
57 action="store_true",
58 dest="flight_time_reestimation",
59 help="Switch to reestimate drift length before fitting."
60 )
61
62 argument_parser.add_argument(
63 "-fl",
64 "--facet-least-square-fit",
65 action="store_true",
66 dest="facet_least_square_fit",
67 help="Switch to fit the facet with least square method for the drift length update"
68 )
69
70 return argument_parser
71

◆ create_path()

def create_path (   self)
Sets up a path that plays back pregenerated events or generates events
based on the properties in the base class.

Reimplemented from ReadOrGenerateEventsRun.

Definition at line 72 of file trainFacetFilter.py.

72 def create_path(self):
73 """
74 Sets up a path that plays back pregenerated events or generates events
75 based on the properties in the base class.
76 """
77
78 path = super().create_path()
79
80
81 if self.task == "train":
82 var_sets = [
83 "mva",
84 "filter(truth)",
85 ]
86
87 elif self.task == "eval":
88 var_sets = [
89 "filter(chi2)",
90 "filter(realistic)",
91 "filter(mva)",
92 "filter(truth)",
93 ]
94
95 elif self.task == "explore":
96 var_sets = [
97 "basic",
98 "truth",
99 "bend",
100 "fit",
101 "filter(truth)",
102 "filter(realistic)",
103 "filter(chi2)",
104 ]
105
106
107 self.variables = [
108 "curv",
109 "curv_pull",
110 "middle_phi_pull",
111 "middle_chi2",
112 "fit_0_phi0_sigma",
113 "chi2_0",
114 "chi2_0_per_s",
115 "fit_1_phi0_sigma",
116 "chi2_1",
117 "chi2_1_per_s",
118 "fit_phi0_sigma",
119 "chi2 chi2_per_s",
120 "realistic_accept",
121 "chi2_accept",
122 ]
123
124 path.add_module("TFCDC_WireHitPreparer",
125 flightTimeEstimation="outwards",
126 UseNLoops=1.0)
127
128 path.add_module("TFCDC_ClusterPreparer")
129
130 path.add_module("TFCDC_SegmentFinderFacetAutomaton",
131 FacetUpdateDriftLength=self.flight_time_reestimation,
132 FacetLeastSquareFit=self.facet_least_square_fit,
133 FacetFilter="unionrecording",
134 FacetFilterParameters={
135 "rootFileName": self.sample_file_name,
136 "varSets": var_sets,
137 },
138 FacetRelationFilter="none")
139
140 return path
141
142

◆ identifier()

def identifier (   self)
Database identifier of the filter being trained

Definition at line 45 of file trainFacetFilter.py.

45 def identifier(self):
46 """Database identifier of the filter being trained"""
47 return "trackfindingcdc_FacetFilter.xml"
48

Member Data Documentation

◆ facet_least_square_fit

bool facet_least_square_fit = False
static

Option whether to use the least square fit to the hit triplet.

Definition at line 42 of file trainFacetFilter.py.

◆ flight_time_reestimation

bool flight_time_reestimation = False
static

Option whether to reestimate the drift length.

Definition at line 39 of file trainFacetFilter.py.

◆ generator_module

str generator_module = "generic"
static

Suggested generator module.

Definition at line 29 of file trainFacetFilter.py.

◆ n_events

int n_events = 100
static

Suggested number for this analysis.

Definition at line 26 of file trainFacetFilter.py.

◆ task [1/2]

str task = "explore"
static

Default task set to explore.

Definition at line 33 of file trainFacetFilter.py.

◆ task [2/2]

task

Post-process events according to the user's desired task (train, eval, explore)

Definition at line 81 of file trainFacetFilter.py.

◆ truth

str truth = "truth_positive"
static

Name of the truth variables.

Definition at line 36 of file trainFacetFilter.py.

◆ variables

variables

Signal some variables to select in the classification analysis.

Definition at line 107 of file trainFacetFilter.py.


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