Belle II Software  release-08-01-10
RealisticAxialSegmentPairFilterTrainingRun Class Reference
Inheritance diagram for RealisticAxialSegmentPairFilterTrainingRun:
Collaboration diagram for RealisticAxialSegmentPairFilterTrainingRun:

Public Member Functions

def identifier (self)
 
def create_path (self)
 
def create_argument_parser (self, **kwds)
 
def configure (self, arguments)
 
def execute (self)
 
def name (self)
 
def configure_and_execute_from_commandline (self)
 
def run (self, path)
 
def configure_from_commandline (self)
 
def adjust_path (self, path)
 

Public Attributes

 task
 Process each event according to the user's desired task (train, eval, explore)
 
 root_input_file
 generating events, so there is no ROOT input file
 

Static Public Attributes

int n_events = 10000
 number of events to generate
 
string generator_module = "generic"
 use the generic event generator
 
 bkg_files = os.path.join(os.environ["VO_BELLE2_SW_DIR"], "bkg")
 overlay background hits from the events in these files
 
string truth = "truth_positive"
 degree of MC truth-matching
 
string description = "Simulate events using various generator and detector setups from command line."
 Description of the run setup to be displayed on command line.
 
string detector_setup = "Default"
 By default, use the default detector setup.
 
 components = None
 By default, do specific components.
 
bool disable_deltas = False
 By default, do not disable delta-ray generation.
 
 simulation_output = None
 By default, do no store the simulation output.
 
bool allow_input = True
 By default, this basf2 job can read events from an input ROOT TFile.
 
 random_seed = None
 By default, the random-number seed is unassigned.
 
int n_processes = 0
 By default, no parallel processing.
 
int n_events_to_skip = 0
 By default, do not skip any events at the start of the input ROOT TFile.
 

Detailed Description

Run to record segment pairs encountered at the AxialSegmentPairCreator and retrain its mva method

Definition at line 20 of file trainRealisticAxialSegmentPairFilter.py.

Member Function Documentation

◆ adjust_path()

def adjust_path (   self,
  path 
)
inherited
Hook that gives the opportunity to check the path for consistency before processing it

Reimplemented in HarvestingRunMixin.

Definition at line 95 of file minimal.py.

◆ configure()

def configure (   self,
  arguments 
)
inherited
Configure for basf2 job; disable ROOT input if simulating events

Reimplemented from EmptyRun.

Reimplemented in CDCDisplayRun.

Definition at line 123 of file event_generation.py.

◆ configure_and_execute_from_commandline()

def configure_and_execute_from_commandline (   self)
inherited
Configure basf2 job script from command-line arguments then run it

Definition at line 46 of file minimal.py.

◆ configure_from_commandline()

def configure_from_commandline (   self)
inherited
Convert the command-line arguments to a basf2 job script

Definition at line 68 of file minimal.py.

◆ create_argument_parser()

def create_argument_parser (   self,
**  kwds 
)
inherited

◆ create_path()

def create_path (   self)
Setup the recording path after the simulation

Reimplemented from ReadOrGenerateEventsRun.

Definition at line 37 of file trainRealisticAxialSegmentPairFilter.py.

37  def create_path(self):
38  """Setup the recording path after the simulation"""
39  path = super().create_path()
40 
41  # In contrast to other training use only the first *half* loop for more aggressive training
42  path.add_module("TFCDC_WireHitPreparer",
43  flightTimeEstimation="outwards")
44 
45  path.add_module('TFCDC_ClusterPreparer',
46  SuperClusterDegree=3,
47  SuperClusterExpandOverApogeeGap=True)
48 
49  path.add_module("TFCDC_SegmentFinderFacetAutomaton")
50 
51  # Also fix the segment orientation to outwards to make training additionally aggressive
52 
53  if self.task == "train":
54  varSets = [
55  "realistic",
56  "filter(truth)",
57  ]
58  skim = "feasible"
59 
60  elif self.task == "eval":
61  varSets = [
62  "filter(truth)",
63  "filter(realistic)",
64  "filter(feasible)",
65  "filter(simple)",
66  ]
67  skim = ""
68 
69  elif self.task == "explore":
70  varSets = [
71  "basic",
72  "fitless",
73  "hit_gap",
74  "fit",
75  # "filter(simple)",
76  # "filter(feasible)",
77  # "filter(realistic)",
78  "filter(truth)",
79  ]
80  skim = "feasible"
81 
82  else:
83  raise ValueError("Unknown task " + self.task)
84 
85  path.add_module("TFCDC_TrackFinderSegmentPairAutomaton",
86  SegmentPairAxialBridging=True,
87  AxialSegmentPairFilter="unionrecording",
88  AxialSegmentPairFilterParameters={
89  "rootFileName": self.sample_file_name,
90  "varSets": varSets,
91  "skim": skim,
92  },
93  SegmentPairFilter='none',
94  SegmentPairRelationFilter='none')
95 
96  return path
97 
98 

◆ execute()

def execute (   self)
inherited
Run the basf2 job

Reimplemented from EmptyRun.

Definition at line 131 of file event_generation.py.

◆ identifier()

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

Definition at line 33 of file trainRealisticAxialSegmentPairFilter.py.

◆ name()

def name (   self)
inherited
provide name of this object

Definition at line 42 of file minimal.py.

◆ run()

def run (   self,
  path 
)
inherited
Process the basf2 path

Reimplemented in PostProcessingRunMixin.

Definition at line 59 of file minimal.py.


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