20from trackfindingcdc.run.training
import TrainingRunMixin
24 """Run for recording facets encountered at the filter"""
29 generator_module = "generic"
36 truth =
"truth_positive"
39 flight_time_reestimation =
False
42 facet_least_square_fit =
False
46 """Database identifier of the filter being trained"""
47 return "trackfindingcdc_FacetFilter.xml"
50 """Convert command-line arguments to basf2 argument list"""
54 argument_parser.add_argument(
56 "--flight-time-reestimation",
58 dest=
"flight_time_reestimation",
59 help=
"Switch to reestimate drift length before fitting."
62 argument_parser.add_argument(
64 "--facet-least-square-fit",
66 dest=
"facet_least_square_fit",
67 help=
"Switch to fit the facet with least square method for the drift length update"
70 return argument_parser
72 def create_path(self):
74 Sets up a path that plays back pregenerated events or generates events
75 based on the properties
in the base
class.
78 path = super().create_path()
124 path.add_module(
"TFCDC_WireHitPreparer",
125 flightTimeEstimation=
"outwards",
128 path.add_module(
"TFCDC_ClusterPreparer")
130 path.add_module(
"TFCDC_SegmentFinderFacetAutomaton",
133 FacetFilter=
"unionrecording",
134 FacetFilterParameters={
135 "rootFileName": self.sample_file_name,
138 FacetRelationFilter=
"none")
144 """Execute the facet recording"""
146 run.configure_and_execute_from_commandline()
149if __name__ ==
"__main__":
151 logging.basicConfig(stream=sys.stdout, level=logging.INFO, format=
"%(levelname)s:%(message)s")
def create_argument_parser(self, **kwds)
str task
Default task set to explore.
bool flight_time_reestimation
Option whether to reestimate the drift length.
variables
Signal some variables to select in the classification analysis.
bool facet_least_square_fit
Option whether to use the least square fit to the hit triplet.
task
Post-process events according to the user's desired task (train, eval, explore)