Belle II Software  release-08-01-10
cdcCRTrackingValidation.py
1 #!/usr/bin/env python3
2 
3 
10 
11 """
12 <header>
13  <contact>software-tracking@belle2.org</contact>
14  <input>CosmicsSimNoBkg.root</input>
15  <output>CDCCRTrackingValidation.root</output>
16  <description>This module validates that track finding is capable of reconstructing tracks in cosmics run.</description>
17 </header>
18 """
19 
20 from tracking.validation.run import TrackingValidationRun
21 import tracking
22 import logging
23 import basf2
24 VALIDATION_OUTPUT_FILE = 'CDCCRTrackingValidation.root'
25 CONTACT = 'software-tracking@belle2.org'
26 N_EVENTS = 10000
27 ACTIVE = False
28 
29 
31  """Validate the CDC cosmic-ray track-finding"""
32 
33  n_events = N_EVENTS
34 
35  generator_module = 'Cosmics'
36 
37  root_input_file = '../CosmicsSimNoBkg.root'
38 
39  components = None
40 
41  def finder_module(self, path):
42  """Add the CDC cosmic-ray track-finding module to the basf2 path"""
44 
45 
46  tracking_coverage = {
47  'WhichParticles': ['CDC'], # Include all particles seen in CDC, also secondaries
48  'UsePXDHits': False,
49  'UseSVDHits': False,
50  'UseCDCHits': True,
51  'UseOnlyAxialCDCHits': False,
52  "UseReassignedHits": True,
53  }
54 
55 
56  use_fit_information = True
57 
58  fit_tracks = True
59 
60  pulls = True
61 
62  resolution = True
63 
64  contact = CONTACT
65 
66  output_file_name = VALIDATION_OUTPUT_FILE
67 
68 
69 def main():
70  basf2.set_random_seed(1337)
71  validation_run = CDCCR()
72  validation_run.configure_and_execute_from_commandline()
73 
74 
75 if __name__ == '__main__':
76  logging.basicConfig(level=logging.INFO)
77  if ACTIVE:
78  main()
79  else:
80  print("This validation deactivated and thus basf2 is not executed.\n"
81  "If you want to run this validation, please set the 'ACTIVE' flag above to 'True'.\n"
82  "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
def add_cr_track_finding(path, reco_tracks="RecoTracks", components=None, merge_tracks=True, use_second_cdc_hits=False)
Definition: __init__.py:516