Belle II Software  release-08-01-10
toCDCCKFTrackingValidationBkg.py
1 #!/usr/bin/env python3
2 
3 
10 
11 """
12 <header>
13  <contact>software-tracking@belle2.org</contact>
14  <input>EvtGenSim.root</input>
15  <output>toCDCCKFTrackingValidationBkg.root</output>
16  <description>This module validates ToCDCCKF module using Y(4S) runs with background.</description>
17 </header>
18 """
19 
20 from tracking.validation.run import TrackingValidationRun
21 import tracking
22 import logging
23 import basf2
24 import svd
25 
26 VALIDATION_OUTPUT_FILE = 'toCDCCKFTrackingValidationBkg.root'
27 N_EVENTS = 1000
28 ACTIVE = True
29 
30 
32  """Validate the ToCDCCKF Kalman finder/filter algorithm with Y(4S) events"""
33 
34  n_events = N_EVENTS
35 
36  generator_module = 'generic'
37 
38  root_input_file = '../EvtGenSim.root'
39 
40  @staticmethod
41  def finder_module(path):
42  """Add the ToCDCCKF module and related modules to the basf2 path"""
43 
44  path.add_module('SetupGenfitExtrapolation',
45  energyLossBrems=False, noiseBrems=False)
46 
48  tracking.add_vxd_track_finding_vxdtf2(path, reco_tracks="RecoTracksSVD", components=["SVD"])
49  path.add_module("DAFRecoFitter", recoTracksStoreArrayName="RecoTracksSVD")
50 
51  path.add_module("TFCDC_WireHitPreparer",
52  wirePosition="aligned",
53  useSecondHits=False,
54  flightTimeEstimation="outwards")
55  path.add_module("ToCDCCKF",
56  inputWireHits="CDCWireHitVector",
57  inputRecoTrackStoreArrayName="RecoTracksSVD",
58  relatedRecoTrackStoreArrayName="CKFCDCRecoTracks",
59  relationCheckForDirection="backward",
60  outputRecoTrackStoreArrayName="CKFCDCRecoTracks",
61  outputRelationRecoTrackStoreArrayName="RecoTracksSVD",
62  writeOutDirection="backward",
63  stateBasicFilterParameters={"maximalHitDistance": 0.75},
64  stateExtrapolationFilterParameters={"direction": "forward"},
65  pathFilter="arc_length")
66 
67  path.add_module("RelatedTracksCombiner",
68  CDCRecoTracksStoreArrayName="CKFCDCRecoTracks",
69  VXDRecoTracksStoreArrayName="RecoTracksSVD",
70  recoTracksStoreArrayName="RecoTracks")
71 
72  path.add_module("DAFRecoFitter", recoTracksStoreArrayName="RecoTracks")
73 
74  path.add_module('TrackCreator', recoTrackColName='RecoTracks')
75 
76 
77  tracking_coverage = {
78  'UsePXDHits': False,
79  'UseSVDHits': True,
80  'UseCDCHits': True,
81  'WhichParticles': [],
82  }
83 
84 
85  fit_tracks = False
86 
87  use_fit_information = True
88 
89  pulls = True
90 
91  resolution = True
92 
93  output_file_name = VALIDATION_OUTPUT_FILE
94 
95 
96 def main():
97  basf2.set_random_seed(1337)
98  validation_run = toCDCCKFValidationBkg()
99  validation_run.configure_and_execute_from_commandline()
100 
101 
102 if __name__ == '__main__':
103  logging.basicConfig(level=logging.INFO)
104  if ACTIVE:
105  main()
106  else:
107  print("This validation deactivated and thus basf2 is not executed.\n"
108  "If you want to run this validation, please set the 'ACTIVE' flag above to 'True'.\n"
109  "Exiting.")
finder_module
Name of the finder module to be used - can be everything that is accepted by tracking....
Definition: main.py:1
def add_svd_reconstruction(path, isROIsimulation=False, createRecoDigits=False, applyMasking=False)
Definition: __init__.py:15
int main(int argc, char **argv)
Run all tests.
Definition: test_main.cc:91