Belle II Software  release-05-02-19
FacetRelationFilterTrainingRun Class Reference
Inheritance diagram for FacetRelationFilterTrainingRun:
Collaboration diagram for FacetRelationFilterTrainingRun:

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
 Post-process events according to the user's desired task (train, eval, explore)
 
 variables
 Signal some variables to select in the classification analysis self.variables = None #all variables.
 
 groupby
 group output by superlayer_id
 
 auxiliaries
 auxiliary histograms
 
 root_input_file
 generating events, so there is no ROOT input file
 

Static Public Attributes

int n_events = 1000
 Suggested number for this analysis.
 
string generator_module = "generic"
 Suggested generator module.
 
string task = "explore"
 Default task set to explore.
 
string truth = "truth_positive"
 Name of the truth variables.
 
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.
 
list bkg_files = []
 By default, no background overlay.
 
 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 for recording facets encountered at the filter

Definition at line 18 of file trainFacetRelationFilter.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 88 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 114 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 39 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 61 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 38 of file trainFacetRelationFilter.py.

38  def create_path(self):
39  """Setup the recording path after the simulation"""
40  path = super().create_path()
41 
42 
43  if self.task == "train":
44  var_sets = [
45  "mva",
46  "filter(truth)",
47  ]
48 
49  elif self.task == "eval":
50  var_sets = [
51  "basic",
52  "filter(chi2)",
53  "filter(chi2_old)",
54  "filter(simple)",
55  "filter(truth)",
56  ]
57 
58  self.variables = [
59  "chi2_weight",
60  "chi2_accept",
61  "chi2_old_weight",
62  "chi2_old_accept",
63  "simple_accept",
64  ]
65 
66  self.groupby = ["", "superlayer_id"]
67  self.auxiliaries = [
68  "superlayer_id",
69  ]
70 
71  elif self.task == "explore":
72  var_sets = [
73  "basic",
74  "bend",
75  "fit",
76  "filter(chi2)",
77  "filter(simple)",
78  "filter(truth)",
79  ]
80 
81 
83  self.variables = [
84  # "delta_phi",
85  # "delta_phi_pull",
86  # "delta_phi_pull_per_r",
87  # "delta_curv",
88  # "delta_curv_pull",
89  # "delta_curv_pull_per_r",
90 
91  # "cos_delta",
92  # "from_middle_cos_delta",
93  # "to_middle_cos_delta",
94 
95  "chi2_0",
96  # "chi2_0_per_s",
97  # "erf_0",
98  # "fit_0_phi0",
99  # "fit_0_cos_delta",
100 
101  # "chi2_1",
102  # "chi2_1_per_s",
103  # "fit_1_phi0",
104  # "fit_1_cos_delta",
105 
106  # "chi2",
107  # "chi2_per_s",
108  # "fit_phi0",
109  # "fit_cos_delta",
110 
111  # "phi0_from_sigma",
112  # "phi0_to_sigma",
113 
114  # "phi0_ref_pull",
115  # "phi0_ref_diff",
116  # "phi0_ref_sigma",
117 
118  # "chi2_comb",
119  # "phi0_comb_pull",
120  # "phi0_comb_diff",
121  # "phi0_comb_sigma",
122 
123  # "chi2_kari_unit",
124  # "abs_curv_unit",
125 
126  # "chi2_kari_l",
127  # "abs_curv_l",
128 
129  # "chi2_kari_pseudo",
130  # "abs_curv_pseudo",
131 
132  # "chi2_kari_proper",
133  # "abs_curv_proper",
134  ]
135 
136 
137  self.groupby = ["", "superlayer_id"]
138 
139  self.auxiliaries = [
140  "superlayer_id",
141  ]
142 
143  path.add_module("TFCDC_WireHitPreparer",
144  flightTimeEstimation="outwards",
145  UseNLoops=1.0)
146 
147  path.add_module("TFCDC_ClusterPreparer")
148 
149  path.add_module("TFCDC_SegmentFinderFacetAutomaton",
150  FacetRelationFilter="unionrecording",
151  FacetRelationFilterParameters={
152  "rootFileName": self.sample_file_name,
153  "varSets": var_sets,
154  })
155 
156  return path
157 
158 

◆ execute()

def execute (   self)
inherited
Run the basf2 job

Reimplemented from EmptyRun.

Definition at line 122 of file event_generation.py.

◆ identifier()

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

Definition at line 34 of file trainFacetRelationFilter.py.

◆ name()

def name (   self)
inherited
provide name of this object

Definition at line 35 of file minimal.py.

◆ run()

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

Reimplemented in PostProcessingRunMixin.

Definition at line 52 of file minimal.py.


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