Belle II Software development
toCDCfromEclCKFTrackingValidation_onlyEclSeed.py
1#!/usr/bin/env python3
2
3
10
11"""
12<header>
13 <contact>simon.kurz@desy.de</contact>
14 <input>EvtGenSimNoBkg.root</input>
15 <output>toCDCfromEclCKFTrackingValidation_onlyEclSeed.root</output>
16 <description>This module validates toCDCfromEclCKF module using Y(4S) runs.</description>
17</header>
18"""
19
20import reconstruction
21from tracking.validation.run import TrackingValidationRun
22import logging
23import basf2
24VALIDATION_OUTPUT_FILE = 'toCDCfromEclCKFTrackingValidation_onlyEclSeed.root'
25N_EVENTS = 10000
26ACTIVE = True
27
28
29class toCDCfromEclCKF(TrackingValidationRun):
30 """Validate the ecl seeded ckf"""
31
32 n_events = N_EVENTS
33
34 generator_module = 'generic'
35
36 root_input_file = '../EvtGenSimNoBkg.root'
37
38 @staticmethod
39 def finder_module(path):
40 """Only run the following (necessary) modules"""
41 path.add_module('SetupGenfitExtrapolation',
42 energyLossBrems=False, noiseBrems=False)
43
45
46 # needed for truth matching
47 path.add_module('TrackFinderMCTruthRecoTracks',
48 RecoTracksStoreArrayName="MCRecoTracks",
49 # We are using primary as well as secondaries here!
50 WhichParticles=[],
51 UsePXDHits=False,
52 UseSVDHits=False,
53 UseCDCHits=True)
54
55 path.add_module("TFCDC_WireHitPreparer",
56 wirePosition="aligned",
57 useSecondHits=False,
58 flightTimeEstimation="outwards")
59
60 path.add_module("ToCDCFromEclCKF",
61 inputWireHits="CDCWireHitVector",
62 minimalEnRequirementCluster=0.3,
63 eclSeedRecoTrackStoreArrayName='EclSeedRecoTracks',
64 hitFindingDirection="backward",
65 outputRecoTrackStoreArrayName="RecoTracks",
66 outputRelationRecoTrackStoreArrayName="EclSeedRecoTracks",
67 writeOutDirection="forward",
68 stateBasicFilterParameters={"maximalHitDistance": 7.5, "maximalHitDistanceEclSeed": 75.0},
69 stateExtrapolationFilterParameters={"direction": "backward"},
70 pathFilter="arc_length_fromEcl",
71 inputECLshowersStoreArrayName="ECLShowers",
72 trackFindingDirection="backward",
73 seedComponent="ECL"
74 )
75
76 path.add_module("DAFRecoFitter", recoTracksStoreArrayName="RecoTracks")
77
78 path.add_module('TrackCreator', recoTrackColName='RecoTracks')
79
80 path.add_module("MCRecoTracksMatcher",
81 mcRecoTracksStoreArrayName="MCRecoTracks",
82 prRecoTracksStoreArrayName="RecoTracks",
83 UseCDCHits=True,
84 UseSVDHits=False,
85 UsePXDHits=False)
86
87
88 tracking_coverage = {
89 'UsePXDHits': False,
90 'UseSVDHits': False,
91 'UseCDCHits': True,
92 'WhichParticles': [],
93 }
94
95
96 fit_tracks = False
97
98 use_fit_information = True
99
100 pulls = True
101
102 resolution = True
103
104 output_file_name = VALIDATION_OUTPUT_FILE
105
106 non_expert_parameters = []
107
108
109def main():
110 basf2.set_random_seed(1337)
111 validation_run = toCDCfromEclCKF()
112 validation_run.configure_and_execute_from_commandline()
113
114
115if __name__ == '__main__':
116 logging.basicConfig(level=logging.INFO)
117
118 if ACTIVE:
119 main()
120 else:
121 print("This validation deactivated and thus basf2 is not executed.\n"
122 "If you want to run this validation, please set the 'ACTIVE' flag above to 'True'.\n"
123 "Exiting.")
None finder_module
Name of the finder module to be used - can be everything that is accepted by tracking....
Definition: main.py:1
def add_ecl_modules(path, components=None)