16from trackfindingcdc.run.training
import TrainingRunMixin
20 """Run to record segment pairs encountered at the AxialSegmentPairCreator and retrain its mva method"""
25 generator_module =
"generic"
27 bkg_files = os.path.join(os.environ[
"VO_BELLE2_SW_DIR"],
"bkg")
30 truth =
"truth_positive"
34 """Database identifier of the filter being trained"""
35 return "trackfindingcdc_FeasibleAxialSegmentPairFilter.xml"
37 def create_path(self):
38 """Setup the recording path after the simulation"""
39 path = super().create_path()
42 path.add_module(
"TFCDC_WireHitPreparer",
43 flightTimeEstimation=
"outwards")
45 path.add_module(
'TFCDC_ClusterPreparer',
47 SuperClusterExpandOverApogeeGap=
True)
50 path.add_module(
"TFCDC_SegmentFinderFacetAutomaton")
59 elif self.
task ==
"eval":
65 elif self.
task ==
"explore":
78 raise ValueError(
"Unknown task " + self.
task)
80 path.add_module(
"TFCDC_TrackFinderSegmentPairAutomaton",
81 SegmentPairAxialBridging=
True,
82 AxialSegmentPairFilter=
"unionrecording",
83 AxialSegmentPairFilterParameters={
84 "rootFileName": self.sample_file_name,
87 SegmentPairFilter=
'none',
88 SegmentPairRelationFilter=
'none')
95 run.configure_and_execute_from_commandline()
98if __name__ ==
"__main__":
100 logging.basicConfig(stream=sys.stdout, level=logging.INFO, format=
'%(levelname)s:%(message)s')
task
Process each event according to the user's desired task (train, eval, explore)