49 def create_argument_parser(self, **kwds):
50 """Convert command-line arguments to basf2 argument list"""
52 argument_parser = super().create_argument_parser(**kwds)
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()
80 ## Post-process events according to the user's desired task (train, eval, explore)
81 if self.task == "train":
87 elif self.task == "eval":
95 elif self.task == "explore":
106 ## Signal some variables to select in the classification analysis
124 path.add_module("TFCDC_WireHitPreparer",
125 flightTimeEstimation="outwards",
128 path.add_module("TFCDC_ClusterPreparer")
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,
138 FacetRelationFilter="none")