Belle II Software  release-05-01-25
wirehit_preparation.py
1 from tracking.run.mixins import RunMixin
2 
3 import argparse
4 
5 
7  """Mixin part the """
8 
9 
10  flight_time_estimation = ""
11 
12 
13  n_loops = float("nan")
14 
15  def create_argument_parser(self, **kwds):
16  """Configure the basf2 job script using the translated command-line arguments"""
17 
18  argument_parser = super().create_argument_parser(**kwds)
19 
20  argument_parser.add_argument(
21  "-ft",
22  "--flight-time-estimation",
23  choices=["none", "outwards", "downwards"],
24  default=argparse.SUPPRESS,
25  dest="flight_time_estimation",
26  help=("Choose which estimation method for the time of flight should be use. \n"
27  "* 'none' no time of flight corrections\n"
28  "* 'outwards' means the minimal time needed to travel to the wire from the interaction point \n"
29  "* 'downwards' means the minimal time needed to travel to the wire from the y = 0 plane downwards \n")
30  )
31 
32  argument_parser.add_argument(
33  "-l",
34  "--mc-loop-limit",
35  type=float,
36  dest="n_loops",
37  help=("Choose to block all wire hits but the ones located on the {mc_loops} first loops")
38  )
39 
40  return argument_parser
41 
42  def create_path(self):
43  """
44  Sets up a path that plays back pregenerated events or generates events
45  based on the properties in the base class.
46  """
47  path = super().create_path()
48 
49  wire_hit_preparer = path.add_module("TFCDC_WireHitPreparer",
50  UseNLoops=self.n_loops)
51  if self.flight_time_estimation:
52  wire_hit_preparer.param(dict(flightTimeEstimation=self.flight_time_estimation))
53 
54  return path
tracking.run.mixins.RunMixin
Definition: mixins.py:14
tracking.run.mixins
Definition: mixins.py:1
wirehit_preparation.WireHitPreparerRunMixin.n_loops
n_loops
Loop limit above which on wire hits are prepared for the track finder - Uses MC information.
Definition: wirehit_preparation.py:13
wirehit_preparation.WireHitPreparerRunMixin.create_argument_parser
def create_argument_parser(self, **kwds)
Definition: wirehit_preparation.py:15
wirehit_preparation.WireHitPreparerRunMixin.flight_time_estimation
string flight_time_estimation
Used option for the initial flight time estimation.
Definition: wirehit_preparation.py:10
wirehit_preparation.WireHitPreparerRunMixin.create_path
def create_path(self)
Definition: wirehit_preparation.py:42
wirehit_preparation.WireHitPreparerRunMixin
Definition: wirehit_preparation.py:6