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

Public Member Functions

def output_file_name (self)
 
def harvesting_module (self, path=None)
 
def create_argument_parser (self, **kwds)
 
def create_path (self)
 
def pickle_crops (self, harvesting_module, crops, **kwds)
 
def unpickle_crops (self)
 
def postprocess (self)
 
def adjust_path (self, path)
 
def run (self, path)
 
def run (self, path)
 
def name (self)
 
def name (self)
 
def name (self)
 
def configure_and_execute_from_commandline (self)
 
def configure_and_execute_from_commandline (self)
 
def configure_and_execute_from_commandline (self)
 
def execute (self)
 
def execute (self)
 
def execute (self)
 
def configure_from_commandline (self)
 
def configure_from_commandline (self)
 
def configure_from_commandline (self)
 
def configure (self, arguments)
 
def configure (self, arguments)
 
def configure (self, arguments)
 

Public Attributes

 monte_carlo
 Degree of refinement of the segment generation.
 

Static Public Attributes

int n_events = 10000
 number of events to generate
 
string generator_module = "low_gun"
 use the low-momentum particle gun event generator
 
string root_input_file = "low_gun.root"
 read generated/simulated/reconstructed events from this ROOT file
 
string monte_carlo = "no"
 do not generate new events
 
bool karimaki_fit = False
 use the Riemann fit instead of the Karimaki fit
 
string flight_time_estimation = "none"
 do not estimate the flight time
 
bool flight_time_reestimation = False
 do not re-estimate the flight time
 
bool use_alpha_in_drift_length = True
 use the alpha parameter for drift length
 
 flight_time_mass_scale = float("nan")
 assume a very heavy particle for flight time calculation
 
string fit_positions = "recoPos"
 fit the reconstructed hit position for the segment fit
 
string fit_variance = "proper"
 use the drift-length variance in the segment fit
 
 output_file_name = None
 Disable the writing of an output ROOT file. More...
 
bool show_results = False
 By default, do not show the browsing results.
 
bool postprocess_only = False
 By default, browse the output TFile too.
 
bool postprocess_only = False
 By default, browse the output TFile too.
 
string description = "Empty execution of basf2"
 Description of the run setup to be displayed on command line.
 
string description = "Empty execution of basf2"
 Description of the run setup to be displayed on command line.
 
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

Harvester to read, postprocess and inspect MC events for track-segment fit validation

Definition at line 38 of file record.py.

Member Function Documentation

◆ adjust_path()

def adjust_path (   self,
  path 
)
inherited
Add the harvester to the basf2 path

Reimplemented from EmptyRun.

Definition at line 66 of file run.py.

◆ configure() [1/3]

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() [2/3]

def configure (   self,
  arguments 
)
inherited
Save the command-line arguments as key-value pairs

Reimplemented in CDCDisplayRun, and ReadOrGenerateEventsRun.

Definition at line 74 of file minimal.py.

◆ configure() [3/3]

def configure (   self,
  arguments 
)
inherited
Save the command-line arguments as key-value pairs

Reimplemented in CDCDisplayRun, and ReadOrGenerateEventsRun.

Definition at line 74 of file minimal.py.

◆ configure_and_execute_from_commandline() [1/3]

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_and_execute_from_commandline() [2/3]

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_and_execute_from_commandline() [3/3]

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() [1/3]

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

Definition at line 68 of file minimal.py.

◆ configure_from_commandline() [2/3]

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

Definition at line 68 of file minimal.py.

◆ configure_from_commandline() [3/3]

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 
)
Convert command-line arguments to basf2 argument list

Reimplemented from HarvestingRunMixin.

Definition at line 87 of file record.py.

87  def create_argument_parser(self, **kwds):
88  """Convert command-line arguments to basf2 argument list"""
89  argument_parser = super().create_argument_parser(**kwds)
90 
91  argument_parser.add_argument(
92  '-m',
93  '--monte-carlo',
94  choices=["no", "medium", "full"],
95  default=self.monte_carlo,
96  dest='monte_carlo',
97  help='Amount of monte carlo information to be used in the segment generation.',
98  )
99 
100  argument_parser.add_argument(
101  "-k",
102  "--karimaki",
103  dest="karimaki_fit",
104  action="store_true",
105  help='Use Karimaki fit instead of Riemann fit'
106  )
107 
108  argument_parser.add_argument(
109  "-fp",
110  "--fit-pos",
111  choices=["recoPos", "rlDriftCircle", "wirePos"],
112  default=self.fit_positions,
113  dest="fit_positions",
114  help=("Choose which positional information the segment fit should be used. \n"
115  "* 'wirePos' means only the wire position\n"
116  "* 'recoPos' means only the reconstructed position\n"
117  "* 'rlDriftCircle' means only the drift circle with the right left passage\n")
118  )
119 
120  argument_parser.add_argument(
121  "-fv",
122  "--fit-var",
123  choices=["unit", "driftLength", "pseudo", "proper"],
124  default=self.fit_variance,
125  dest="fit_variance",
126  help=("Choose which variance information the segment fit should be used. \n"
127  "* 'unit' means equal variance of 1\n"
128  "* 'driftLength' means inserting the drift length as variance, very improper because dimension mismatch\n"
129  "* 'pseudo' means the squared dirft length + plus the drift length variance "
130  "(correct dimension, proper lower bound)\n"
131  "* 'proper' means only the drift length variance\n")
132  )
133 
134  argument_parser.add_argument(
135  "-ft",
136  "--flight-time-estimation",
137  choices=["none", "outwards", "downwards"],
138  default=self.flight_time_estimation,
139  dest="flight_time_estimation",
140  help=("Choose which estimation method for the time of flight should be use. \n"
141  "* 'none' no time of flight corrections\n"
142  "* 'outwards' means the minimal time needed to travel to the wire from the interaction point \n"
143  "* 'downwards' means the minimal time needed to travel to the wire from the y = 0 plane downwards \n")
144  )
145 
146  argument_parser.add_argument(
147  "-fr",
148  "--flight-time-reestimation",
149  action="store_true",
150  dest="flight_time_reestimation",
151  help=("Switch to reestimate drift length before fitting.")
152  )
153 
154  argument_parser.add_argument(
155  "-fa",
156  "--use-alpha-in-drift-length",
157  action="store_true",
158  dest="use_alpha_in_drift_length",
159  help=("Switch to serve the alpha angle to the drift length translator.")
160  )
161 
162  argument_parser.add_argument(
163  "-fm",
164  "--flight-time-mass-scale",
165  type=float,
166  dest="flight_time_mass_scale",
167  help=("Mass parameter to estimate the velocity in the time of flight estimation")
168  )
169 
170  return argument_parser
171 

◆ create_path()

def create_path (   self)
Sets up a path that plays back pregenerated events or generates events
based on the properties in the base class.

Reimplemented from ReadOrGenerateEventsRun.

Definition at line 172 of file record.py.

◆ execute() [1/3]

def execute (   self)
inherited
Run the basf2 job

Reimplemented from EmptyRun.

Definition at line 131 of file event_generation.py.

◆ execute() [2/3]

def execute (   self)
inherited
Create the basf2 path then run the job

Reimplemented in ReadOrGenerateEventsRun.

Definition at line 51 of file minimal.py.

◆ execute() [3/3]

def execute (   self)
inherited
Create the basf2 path then run the job

Reimplemented in ReadOrGenerateEventsRun.

Definition at line 51 of file minimal.py.

◆ harvesting_module()

def harvesting_module (   self,
  path = None 
)
Harvest and post-process the MC events

Reimplemented from HarvestingRunMixin.

Definition at line 80 of file record.py.

◆ name() [1/3]

def name (   self)
inherited
provide name of this object

Definition at line 42 of file minimal.py.

◆ name() [2/3]

def name (   self)
inherited
provide name of this object

Definition at line 42 of file minimal.py.

◆ name() [3/3]

def name (   self)
inherited
provide name of this object

Definition at line 42 of file minimal.py.

◆ output_file_name()

def output_file_name (   self)
Get the output ROOT filename

Definition at line 67 of file record.py.

◆ pickle_crops()

def pickle_crops (   self,
  harvesting_module,
  crops,
**  kwds 
)
inherited
Save the raw crops as a pickle file

Definition at line 41 of file run.py.

◆ postprocess()

def postprocess (   self)
inherited
Post-process the crops

Reimplemented from PostProcessingRunMixin.

Definition at line 51 of file run.py.

◆ run() [1/2]

def run (   self,
  path 
)
inherited
Post-process the basf2 job output

Reimplemented from EmptyRun.

Definition at line 46 of file mixins.py.

◆ run() [2/2]

def run (   self,
  path 
)
inherited
Post-process the basf2 job output

Reimplemented from EmptyRun.

Definition at line 46 of file mixins.py.

◆ unpickle_crops()

def unpickle_crops (   self)
inherited
Load the raw crops from a pickle file

Definition at line 46 of file run.py.

Member Data Documentation

◆ output_file_name

output_file_name = None
staticinherited

Disable the writing of an output ROOT file.

Harvester to select crops, postprocess, and inspect

Definition at line 20 of file run.py.


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