|
| cluster_preparation_module = basf2.register_module("TFCDC_ClusterPreparer") |
| basf2 module for CDC cluster preparation
|
|
bool | py_profile = True |
| create a python profile
|
|
| output_file_name = None |
| There is no default for the name of the output TFile.
|
|
bool | show_results = False |
| By default, do not show the browsing results.
|
|
bool | postprocess_only = False |
| By default, browse the output TFile too.
|
|
str | description = "Empty execution of basf2" |
| Description of the run setup to be displayed on command line.
|
|
| generator_module = None |
| By default, do not generate events.
|
|
str | 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.
|
|
int | n_events = 10000 |
| By default, process 10000 events.
|
|
| root_input_file = None |
| By default, there is no 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.
|
|
Prepare and execute a basf2 job to read generated events or generate new events then validate the CDC cluster filter
Definition at line 31 of file clusterFilterValidation.py.
◆ adjust_path()
adjust_path |
( |
| self, |
|
|
| path ) |
|
inherited |
Hook that gives the opportunity to check the path for consistency before processing it
Reimplemented in VXDTF2TrackingValidation, and VXDTF2TrackingValidationBkg.
Definition at line 94 of file minimal.py.
94 def adjust_path(self, path):
95 """Hook that gives the opportunity to check the path for consistency before processing it"""
96
97
98
99
◆ configure()
configure |
( |
| self, |
|
|
| arguments ) |
|
inherited |
Save the command-line arguments as key-value pairs
Reimplemented in ReadOrGenerateEventsRun.
Definition at line 73 of file minimal.py.
73 def configure(self, arguments):
74 """Save the command-line arguments as key-value pairs"""
75
76
77 for (key, value) in list(vars(arguments).items()):
78 if value is None:
79 continue
80 if hasattr(self, key):
81 get_logger().info("Setting %s to %s", key, value)
82 setattr(self, key, value)
83
◆ configure_and_execute_from_commandline()
configure_and_execute_from_commandline |
( |
| self | ) |
|
|
inherited |
Configure basf2 job script from command-line arguments then run it
Definition at line 45 of file minimal.py.
45 def configure_and_execute_from_commandline(self):
46 """Configure basf2 job script from command-line arguments then run it"""
47 self.configure_from_commandline()
48 self.execute()
49
◆ configure_from_commandline()
configure_from_commandline |
( |
| self | ) |
|
|
inherited |
Convert the command-line arguments to a basf2 job script
Definition at line 67 of file minimal.py.
67 def configure_from_commandline(self):
68 """Convert the command-line arguments to a basf2 job script"""
69 argument_parser = self.create_argument_parser()
70 arguments = argument_parser.parse_args()
71 self.configure(arguments)
72
◆ create_argument_parser()
create_argument_parser |
( |
| self, |
|
|
** | kwds ) |
Configure the basf2 job script using the translated command-line arguments
Reimplemented from BrowseTFileOnTerminateRunMixin.
Definition at line 41 of file clusterFilterValidation.py.
41 def create_argument_parser(self, **kwds):
42 """Configure the basf2 job script using the translated command-line arguments"""
43 argument_parser = super().create_argument_parser(**kwds)
44 return argument_parser
45
◆ create_path()
Sets up a path that plays back pregenerated events or generates events
based on the properties in the base class.
Reimplemented from EmptyRun.
Definition at line 46 of file clusterFilterValidation.py.
46 def create_path(self):
47 """
48 Sets up a path that plays back pregenerated events or generates events
49 based on the properties in the base class.
50 """
51 main_path = super().create_path()
52
53 cluster_preparation_module = self.get_basf2_module(self.cluster_preparation_module)
54 main_path.add_module(cluster_preparation_module)
55
56
57 validation_module = ClusterFilterValidationModule(output_file_name=self.output_file_name)
58 if self.py_profile:
59 main_path.add_module(metamodules.PyProfilingModule(validation_module))
60 else:
61 main_path.add_module(validation_module)
62
63 return main_path
64
65
◆ execute()
Create the basf2 path then run the job
Reimplemented in ReadOrGenerateEventsRun.
Definition at line 50 of file minimal.py.
50 def execute(self):
51 """Create the basf2 path then run the job"""
52
53
54 path = self.create_path()
55 self.adjust_path(path)
56 self.run(path)
57
◆ name()
provide name of this object
Definition at line 41 of file minimal.py.
41 def name(self):
42 """provide name of this object"""
43 return self.__class__.__name__
44
◆ postprocess()
Browse the TFile interactively
Reimplemented from PostProcessingRunMixin.
Definition at line 84 of file mixins.py.
84 def postprocess(self):
85 """Browse the TFile interactively"""
86 if self.show_results and self.output_file_name:
87 with root_utils.root_open(self.output_file_name) as tfile:
88 root_utils.root_browse(tfile)
89 input("Close with return key.")
90
91 super().postprocess()
92
93
◆ run()
Post-process the basf2 job output
Reimplemented from EmptyRun.
Definition at line 45 of file mixins.py.
45 def run(self, path):
46 """Post-process the basf2 job output"""
47 if not self.postprocess_only:
48 super().run(path)
49
50 self.postprocess()
51
◆ allow_input
By default, this basf2 job can read events from an input ROOT TFile.
Definition at line 109 of file minimal.py.
◆ bkg_files
◆ cluster_preparation_module
cluster_preparation_module = basf2.register_module("TFCDC_ClusterPreparer") |
|
static |
◆ components
◆ description
str description = "Empty execution of basf2" |
|
staticinherited |
Description of the run setup to be displayed on command line.
Definition at line 33 of file minimal.py.
◆ detector_setup
str detector_setup = "Default" |
|
staticinherited |
◆ disable_deltas
bool disable_deltas = False |
|
staticinherited |
◆ generator_module
◆ n_events
By default, process 10000 events.
Definition at line 111 of file minimal.py.
◆ n_events_to_skip
By default, do not skip any events at the start of the input ROOT TFile.
Definition at line 119 of file minimal.py.
◆ n_processes
By default, no parallel processing.
Definition at line 117 of file minimal.py.
◆ output_file_name
There is no default for the name of the output TFile.
Definition at line 60 of file mixins.py.
◆ postprocess_only
bool postprocess_only = False |
|
staticinherited |
By default, browse the output TFile too.
Post-process the basf2 job output
Definition at line 29 of file mixins.py.
◆ py_profile
◆ random_seed
By default, the random-number seed is unassigned.
Definition at line 115 of file minimal.py.
◆ root_input_file
By default, there is no input ROOT TFile.
Definition at line 113 of file minimal.py.
◆ show_results
bool show_results = False |
|
staticinherited |
By default, do not show the browsing results.
Definition at line 62 of file mixins.py.
◆ simulation_output
The documentation for this class was generated from the following file: