Belle II Software  release-08-01-10
cdcLegendreTrackingValidation.py
1 #!/usr/bin/env python3
2 
3 
10 
11 """
12 <header>
13  <contact>software-tracking@belle2.org</contact>
14  <input>EvtGenSimNoBkg.root</input>
15  <output>CDCLegendreTrackingValidation.root</output>
16  <description>This module validates that legendre track finding is capable of reconstructing tracks in Y(4S) runs.</description>
17 </header>
18 """
19 
20 from tracking.validation.run import TrackingValidationRun
21 import logging
22 import basf2
23 VALIDATION_OUTPUT_FILE = 'CDCLegendreTrackingValidation.root'
24 N_EVENTS = 1000
25 ACTIVE = False
26 
27 
29  """Validate the combined CDC Legendre track-finding algorithm"""
30 
31  n_events = N_EVENTS
32 
33  generator_module = 'generic'
34 
35  root_input_file = '../EvtGenSimNoBkg.root'
36 
37  @staticmethod
38  def finder_module(path):
39  """Add the CDC Legendre track-finding module and related modules to the basf2 path"""
40  path.add_module('TFCDC_WireHitPreparer')
41 
42  use_legendre_finder = True
43  if use_legendre_finder:
44  path.add_module('TFCDC_AxialTrackFinderLegendre')
45  else:
46  path.add_module('TFCDC_AxialTrackFinderHough')
47 
48  path.add_module('TFCDC_TrackExporter')
49 
50 
51  tracking_coverage = {
52  'WhichParticles': ['CDC'], # Include all particles seen in CDC, also secondaries
53  'UsePXDHits': False,
54  'UseSVDHits': False,
55  'UseCDCHits': True,
56  'UseOnlyAxialCDCHits': True,
57  "UseReassignedHits": True,
58  'UseOnlyBeforeTOP': True,
59  'UseNLoops': 1,
60  'MinCDCAxialHits': 8,
61  'EnergyCut': 0,
62  }
63 
64 
65  pulls = True
66 
67  output_file_name = VALIDATION_OUTPUT_FILE
68 
69 
71  exclude_profile_pr_parameter = ["Seed tan #lambda", "Seed #theta"]
72 
73 
74 def main():
75  basf2.set_random_seed(1337)
76  validation_run = CDCLegendre()
77  validation_run.configure_and_execute_from_commandline()
78 
79 
80 if __name__ == '__main__':
81  logging.basicConfig(level=logging.INFO)
82  if ACTIVE:
83  main()
84  else:
85  print("This validation deactivated and thus basf2 is not executed.\n"
86  "If you want to run this validation, please set the 'ACTIVE' flag above to 'True'.\n"
87  "Exiting.")
finder_module
Name of the finder module to be used - can be everything that is accepted by tracking....
Definition: main.py:1
int main(int argc, char **argv)
Run all tests.
Definition: test_main.cc:91