16from trackfindingcdc.run.training
import TrainingRunMixin
20 """Run to record segment pairs encountered at the AxialSegmentPairCreator and retrain its mva method"""
24 generator_module =
"generic"
26 bkg_files = os.path.join(os.environ[
"VO_BELLE2_SW_DIR"],
"bkg")
29 truth =
"truth_positive"
33 """Database identifier of the filter being trained"""
34 return "trackfindingcdc_RealisticAxialSegmentPairFilter.xml"
36 def create_path(self):
37 """Setup the recording path after the simulation"""
38 path = super().create_path()
41 path.add_module(
"TFCDC_WireHitPreparer",
42 flightTimeEstimation=
"outwards")
44 path.add_module(
'TFCDC_ClusterPreparer',
46 SuperClusterExpandOverApogeeGap=
True)
48 path.add_module(
"TFCDC_SegmentFinderFacetAutomaton")
59 elif self.
task ==
"eval":
68 elif self.
task ==
"explore":
82 raise ValueError(
"Unknown task " + self.
task)
84 path.add_module(
"TFCDC_TrackFinderSegmentPairAutomaton",
85 SegmentPairAxialBridging=
True,
86 AxialSegmentPairFilter=
"unionrecording",
87 AxialSegmentPairFilterParameters={
88 "rootFileName": self.sample_file_name,
92 SegmentPairFilter=
'none',
93 SegmentPairRelationFilter=
'none')
100 run.configure_and_execute_from_commandline()
103if __name__ ==
"__main__":
105 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)