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

Public Member Functions

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

Static Public Attributes

 n_events = N_EVENTS
 number of events to generate
 
string generator_module = 'generic'
 Generator to be used in the simulation (-so)
 
string root_input_file = '../EvtGenSimNoBkg.root'
 no background overlay
 
dictionary tracking_coverage
 Define the user parameters for the track-finding module. More...
 
bool pulls = True
 Include pulls in the validation output.
 
 contact = CONTACT
 name of the contact person
 
 output_file_name = VALIDATION_OUTPUT_FILE
 name of the output ROOT file
 
 root_output_file = None
 Optional file name as a destination of all event data which is discarded otherwise.
 
bool resolution = False
 Include the residual plots of the fit parameters in the validation.
 
bool use_expert_folder = True
 Use the "expert" folder in the validation file as the destination of the pull and residual plots.
 
list exclude_profile_mc_parameter = []
 Exclude some of the perigee parameters from the mc side plots.
 
list exclude_profile_pr_parameter = []
 Exclude some of the perigee parameters from the pr side plots.
 
bool use_fit_information = False
 Do not fit the tracks but access the fit information for pulls etc.
 
bool extended = False
 Switch to use the extended harvesting validation instead.
 
bool saveFullTrees = False
 Only works in extended mode.
 
list non_expert_parameters = ['p_{t}']
 List of parameters which should be used as shifter plots (all plots with these x-labels)
 
bool show_results = False
 By default, do not show the browsing results.
 
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 = "Apply tracking to presimulated events or events generated on the fly."
 Description of the run setup to be displayed on command line.
 
 finder_module = None
 Name of the finder module to be used - can be everything that is accepted by tracking.run.utilities.extend_path.
 
bool fit_tracks = False
 By default, do not add the track fitting to the execution.
 
bool mc_tracking = True
 By default, do MC track finding and track matching.
 
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

Validate the CDC TrackFinderAutomaton

Definition at line 32 of file cdcAutomatonTrackingValidation.py.

Member Function Documentation

◆ adjust_path() [1/2]

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.

95  def adjust_path(self, path):
96  """Hook that gives the opportunity to check the path for consistency before processing it"""
97 
98 # Minimal run stub defining some general parameters
99 
100 

◆ adjust_path() [2/2]

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

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.

123  def configure(self, arguments):
124  """Configure for basf2 job; disable ROOT input if simulating events"""
125  super().configure(arguments)
126  if self.simulation_output:
127  get_logger().info("Requested to simulation run. Deactivate input file")
128 
129  self.root_input_file = None
130 

◆ configure() [2/2]

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/2]

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/2]

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/2]

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/2]

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 command line argument parser

Reimplemented from BrowseTFileOnTerminateRunMixin.

Definition at line 103 of file run.py.

103  def create_argument_parser(self, **kwds):
104  """Create command line argument parser"""
105  argument_parser = super().create_argument_parser(**kwds)
106 
107  # Left over from earlier parameter settings. Overwrites the more fundamental simulation_only parameter
108  argument_parser.add_argument(
109  '-o',
110  '--output',
111  dest='simulation_output',
112  default=argparse.SUPPRESS,
113  help='Output file to which the simulated events shall be written.'
114  )
115 
116  argument_parser.add_argument(
117  '-e',
118  '--extended',
119  dest='extended',
120  action='store_true',
121  default=argparse.SUPPRESS,
122  help='Use the extended validation with more plots and whistles'
123  )
124 
125  return argument_parser
126 

◆ create_path()

def create_path (   self)
inherited
Create path from parameters

Reimplemented from ReadOrGenerateTrackedEventsRun.

Definition at line 127 of file run.py.

◆ execute() [1/2]

def execute (   self)
inherited
Run the basf2 job

Reimplemented from EmptyRun.

Definition at line 131 of file event_generation.py.

◆ execute() [2/2]

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

Reimplemented in ReadOrGenerateEventsRun.

Definition at line 51 of file minimal.py.

◆ finder_module()

def finder_module (   self,
  path 
)
Add the CDC TrackFinderAutomaton to the basf2 path

Definition at line 41 of file cdcAutomatonTrackingValidation.py.

41  def finder_module(self, path):
42  """Add the CDC TrackFinderAutomaton to the basf2 path"""
43  path.add_module('TFCDC_TrackFinderAutomaton',
44  # UseNLoops = 1,
45  )
46 

◆ name() [1/2]

def name (   self)
inherited
provide name of this object

Definition at line 42 of file minimal.py.

◆ name() [2/2]

def name (   self)
inherited
provide name of this object

Definition at line 42 of file minimal.py.

◆ postprocess()

def postprocess (   self)
inherited
Browse the TFile interactively

Reimplemented from PostProcessingRunMixin.

Reimplemented in TrainingRunMixin, and HarvestingRunMixin.

Definition at line 85 of file mixins.py.

85  def postprocess(self):
86  """Browse the TFile interactively"""
87  if self.show_results and self.output_file_name:
88  with root_utils.root_open(self.output_file_name) as tfile:
89  root_utils.root_browse(tfile)
90  input("Close with return key.")
91 
92  super().postprocess()
93 
94 

◆ preparePathValidation()

def preparePathValidation (   self,
  path 
)
inherited
The default way to add the validation module to the path.

Derived classes can overload this method modify the validation module
or add more than one validation steps.

Definition at line 65 of file run.py.

◆ run()

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

Reimplemented from EmptyRun.

Definition at line 46 of file mixins.py.

Member Data Documentation

◆ tracking_coverage

dictionary tracking_coverage
static
Initial value:
= {
'WhichParticles': ['CDC'], # Include all particles seen in CDC, also secondaries
'UsePXDHits': False,
'UseSVDHits': False,
'UseCDCHits': True,
'UseOnlyAxialCDCHits': False,
"UseReassignedHits": True,
"UseNLoops": 1.0,
"UseOnlyBeforeTOP": True,
'MinCDCAxialHits': 8,
'MinCDCStereoHits': 6,
"AllowFirstCDCSuperLayerOnly": True,
'EnergyCut': 0,
}

Define the user parameters for the track-finding module.

Definition at line 48 of file cdcAutomatonTrackingValidation.py.


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