Belle II Software development
toCDCfromEclCKFTrackingValidation.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.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.root'
25N_EVENTS = 1000
26ACTIVE = False
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 WhichParticles=[],
50 UsePXDHits=False,
51 UseSVDHits=False,
52 UseCDCHits=True)
53
54 path.add_module("TFCDC_WireHitPreparer",
55 wirePosition="aligned",
56 useSecondHits=False,
57 flightTimeEstimation="outwards")
58
59 path.add_module("ToCDCFromEclCKF",
60 inputWireHits="CDCWireHitVector",
61 minimalEnRequirementCluster=0.3,
62 eclSeedRecoTrackStoreArrayName='EclSeedRecoTracks',
63 hitFindingDirection="backward",
64 outputRecoTrackStoreArrayName="CKFCDCRecoTracksFromEcl",
65 outputRelationRecoTrackStoreArrayName="EclSeedRecoTracks",
66 writeOutDirection="forward",
67 stateBasicFilterParameters={"maximalHitDistance": 7.5, "maximalHitDistanceEclSeed": 75.0},
68 stateExtrapolationFilterParameters={"direction": "backward"},
69 pathFilter="arc_length_fromEcl",
70 inputECLshowersStoreArrayName="ECLShowers",
71 trackFindingDirection="backward",
72 seedComponent="ECL"
73 )
74
75 path.add_module("ToCDCCKF",
76 inputWireHits="CDCWireHitVector",
77 inputRecoTrackStoreArrayName="CKFCDCRecoTracksFromEcl",
78 relatedRecoTrackStoreArrayName="RecoTracks",
79 relationCheckForDirection="backward",
80 outputRecoTrackStoreArrayName="RecoTracks",
81 outputRelationRecoTrackStoreArrayName="CKFCDCRecoTracksFromEcl",
82 writeOutDirection="backward",
83 stateBasicFilterParameters={"maximalHitDistance": 0.75},
84 stateExtrapolationFilterParameters={"direction": "forward"},
85 pathFilter="arc_length",
86 seedComponent="ECL"
87 )
88
89 path.add_module("DAFRecoFitter", recoTracksStoreArrayName="RecoTracks")
90
91 path.add_module('TrackCreator', recoTrackColName='RecoTracks')
92
93 path.add_module("MCRecoTracksMatcher",
94 mcRecoTracksStoreArrayName="MCRecoTracks",
95 prRecoTracksStoreArrayName="RecoTracks",
96 UseCDCHits=True,
97 UseSVDHits=False,
98 UsePXDHits=False)
99
100
101 tracking_coverage = {
102 'UsePXDHits': False,
103 'UseSVDHits': False,
104 'UseCDCHits': True,
105 'WhichParticles': [],
106 }
107
108
109 fit_tracks = False
110
111 use_fit_information = True
112
113 pulls = True
114
115 resolution = True
116
117 output_file_name = VALIDATION_OUTPUT_FILE
118
119 non_expert_parameters = []
120
121
122def main():
123 basf2.set_random_seed(1337)
124 validation_run = toCDCfromEclCKF()
125 validation_run.configure_and_execute_from_commandline()
126
127
128if __name__ == '__main__':
129 logging.basicConfig(level=logging.INFO)
130
131 if ACTIVE:
132 main()
133 else:
134 print("This validation deactivated and thus basf2 is not executed.\n"
135 "If you want to run this validation, please set the 'ACTIVE' flag above to 'True'.\n"
136 "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)