10 def add_ckf_based_merger(path, cdc_reco_tracks, svd_reco_tracks, use_mc_truth=False, direction="backward"):
12 Convenience function to add the SVD track finding using VXDTF2 and the merger based on the CKF to the path.
13 :param path: The path to add the module to
14 :param cdc_reco_tracks: The name of the already created CDC Reco Tracks
15 :param svd_reco_tracks: The name of the already created CDC Reco Tracks
16 :param use_mc_truth: Use the MC information in the CKF
17 :param direction: where to extrapolate to. Valid options are forward and backward
20 path.add_module(
"DAFRecoFitter", recoTracksStoreArrayName=cdc_reco_tracks)
24 path.add_module(
"MCRecoTracksMatcher", UsePXDHits=
False, UseSVDHits=
True, UseCDCHits=
False,
25 mcRecoTracksStoreArrayName=
"MCRecoTracks",
26 prRecoTracksStoreArrayName=svd_reco_tracks)
28 result_filter =
"truth_svd_cdc_relation"
29 result_filter_parameters = {}
31 result_filter =
"mva_with_relations"
32 result_filter_parameters = {
'DBPayloadName':
'ckf_SeededCDCToSVDResultParameters'}
34 if direction ==
"forward":
39 path.add_module(
"CDCToSVDSeedCKF",
40 advanceHighFilterParameters={
"direction": direction},
42 fromRelationStoreArrayName=cdc_reco_tracks,
43 toRelationStoreArrayName=svd_reco_tracks,
45 writeOutDirection=direction,
47 inputRecoTrackStoreArrayName=cdc_reco_tracks,
48 relatedRecoTrackStoreArrayName=svd_reco_tracks,
49 relationCheckForDirection=direction,
50 cdcTracksStoreArrayName=cdc_reco_tracks,
51 vxdTracksStoreArrayName=svd_reco_tracks,
53 firstHighFilterParameters={
"direction": direction},
54 reverseSeed=reverse_seed,
57 filterParameters=result_filter_parameters
58 ).set_name(f
"CDCToSVDSeedCKF_{direction}")
68 direction="backward"):
70 Convenience function to add the PXD ckf to the path.
71 :param path: The path to add the module to
72 :param svd_cdc_reco_tracks: The name of the already created SVD+CDC reco tracks
73 :param pxd_reco_tracks: The name to output the PXD reco tracks to
74 :param use_mc_truth: Use the MC information in the CKF
75 :param use_best_results: CKF parameter for useBestNInSeed
76 :param use_best_seeds: CKF parameter for UseNStates
77 :param direction: where to extrapolate to. Valid options are forward and backward
79 if "PXDSpacePointCreator" not in [m.name()
for m
in path.modules()]:
80 path.add_module(
"PXDSpacePointCreator")
82 path.add_module(
"DAFRecoFitter", recoTracksStoreArrayName=svd_cdc_reco_tracks)
84 if direction ==
"forward":
90 path.add_module(
"MCRecoTracksMatcher", UsePXDHits=
False, UseSVDHits=
True, UseCDCHits=
True,
91 mcRecoTracksStoreArrayName=
"MCRecoTracks",
92 prRecoTracksStoreArrayName=svd_cdc_reco_tracks)
94 module_parameters = dict(
95 firstHighFilter=
"truth",
96 secondHighFilter=
"all",
97 thirdHighFilter=
"all",
103 module_parameters = dict(
104 firstHighFilterParameters={
105 'DBPayloadName':
'ckf_ToPXDStateFilter_1Parameters',
106 "direction": direction},
107 firstHighUseNStates=use_best_seeds,
108 secondHighFilterParameters={
109 'DBPayloadName':
'ckf_ToPXDStateFilter_2Parameters'},
110 secondHighUseNStates=use_best_seeds,
111 thirdHighFilterParameters={
112 'DBPayloadName':
'ckf_ToPXDStateFilter_3Parameters'},
113 thirdHighUseNStates=use_best_seeds,
115 'DBPayloadName':
'ckf_PXDTrackCombinationParameters'},
116 useBestNInSeed=use_best_results,
119 module_parameters[
"seedHitJumping"] = -1
120 module_parameters[
"hitHitJumping"] = 0
122 path.add_module(
"ToPXDCKF",
123 advanceHighFilterParameters={
"direction": direction},
125 writeOutDirection=direction,
127 inputRecoTrackStoreArrayName=svd_cdc_reco_tracks,
128 relatedRecoTrackStoreArrayName=pxd_reco_tracks,
129 relationCheckForDirection=direction,
131 outputRecoTrackStoreArrayName=pxd_reco_tracks,
132 outputRelationRecoTrackStoreArrayName=svd_cdc_reco_tracks,
134 reverseSeed=reverse_seed,
135 reverseSeedState=reverse_seed,
136 **module_parameters).set_name(f
"ToPXDCKF_{direction}")
146 direction="backward"):
148 Convenience function to add the SVD ckf to the path.
149 :param path: The path to add the module to
150 :param cdc_reco_tracks: The name of the already created CDC reco tracks
151 :param svd_reco_tracks: The name to output the SVD reco tracks to
152 :param use_mc_truth: Use the MC information in the CKF
153 :param use_best_results: CKF parameter for useNResults
154 :param use_best_seeds: CKF parameter for useBestNInSeed
155 :param direction: where to extrapolate to. Valid options are forward and backward
157 if direction ==
"forward":
163 module_parameters = dict(
164 firstHighFilter=
"truth",
165 secondHighFilter=
"all",
166 thirdHighFilter=
"all",
172 if direction ==
"forward":
173 module_parameters = dict(
174 firstHighFilterParameters={
175 "direction": direction,
176 'DBPayloadName':
'ckf_CDCSVDStateFilter_1_forward_Parameters'},
177 firstHighUseNStates=use_best_seeds,
178 secondHighFilterParameters={
179 'DBPayloadName':
'ckf_CDCSVDStateFilter_2_forward_Parameters'},
180 secondHighUseNStates=use_best_seeds,
181 thirdHighFilterParameters={
182 'DBPayloadName':
'ckf_CDCSVDStateFilter_3_forward_Parameters'},
183 thirdHighUseNStates=use_best_seeds,
185 'DBPayloadName':
'ckf_CDCToSVDResultParameters'},
186 useBestNInSeed=use_best_results,
189 module_parameters = dict(
190 firstHighFilterParameters={
191 "direction": direction,
192 'DBPayloadName':
'ckf_CDCSVDStateFilter_1_backward_Parameters'},
193 firstHighUseNStates=use_best_seeds,
194 secondHighFilterParameters={
195 'DBPayloadName':
'ckf_CDCSVDStateFilter_2_backward_Parameters'},
196 secondHighUseNStates=use_best_seeds,
197 thirdHighFilterParameters={
198 'DBPayloadName':
'ckf_CDCSVDStateFilter_3_backward_Parameters'},
199 thirdHighUseNStates=use_best_seeds,
201 'DBPayloadName':
'ckf_CDCToSVDResultParameters'},
202 useBestNInSeed=use_best_results,
205 path.add_module(
"CDCToSVDSpacePointCKF",
206 inputRecoTrackStoreArrayName=cdc_reco_tracks,
207 outputRecoTrackStoreArrayName=svd_reco_tracks,
208 outputRelationRecoTrackStoreArrayName=cdc_reco_tracks,
209 relatedRecoTrackStoreArrayName=svd_reco_tracks,
211 advanceHighFilterParameters={
"direction": direction},
212 reverseSeed=reverse_seed,
214 writeOutDirection=direction,
215 relationCheckForDirection=direction,
220 **module_parameters).set_name(f
"CDCToSVDSpacePointCKF_{direction}")
223 def add_cosmics_svd_ckf(
230 direction="backward"):
232 Convenience function to add the SVD ckf to the path with cosmics settings valid for phase2 and 3.
233 :param path: The path to add the module to
234 :param cdc_reco_tracks: The name of the already created CDC reco tracks
235 :param svd_reco_tracks: The name to output the SVD reco tracks to
236 :param use_mc_truth: Use the MC information in the CKF
237 :param use_best_results: CKF parameter for useNResults
238 :param use_best_seeds: CKF parameter for useBestNInSeed
239 :param direction: where to extrapolate to. Valid options are forward and backward
241 if direction ==
"forward":
247 module_parameters = dict(
248 firstHighFilter=
"truth",
249 secondHighFilter=
"all",
250 thirdHighFilter=
"all",
256 module_parameters = dict(
260 firstHighFilter=
"non_ip_crossing",
261 firstHighFilterParameters={
"direction": direction},
262 firstHighUseNStates=0,
264 secondHighFilter=
"residual",
265 secondHighFilterParameters={},
266 secondHighUseNStates=use_best_seeds,
268 thirdHighFilter=
"residual",
269 thirdHighFilterParameters={},
270 thirdHighUseNStates=use_best_seeds,
274 useBestNInSeed=use_best_results,
277 path.add_module(
"CDCToSVDSpacePointCKF",
278 inputRecoTrackStoreArrayName=cdc_reco_tracks,
279 outputRecoTrackStoreArrayName=svd_reco_tracks,
280 outputRelationRecoTrackStoreArrayName=cdc_reco_tracks,
281 relatedRecoTrackStoreArrayName=svd_reco_tracks,
283 advanceHighFilterParameters={
"direction": direction},
284 reverseSeed=reverse_seed,
286 writeOutDirection=direction,
287 relationCheckForDirection=direction,
291 **module_parameters).set_name(f
"CDCToSVDSpacePointCKF_{direction}")
294 def add_cosmics_pxd_ckf(
301 direction="backward"):
303 Convenience function to add the PXD ckf to the path with cosmics settings valid for phase2 and 3.
304 :param path: The path to add the module to
305 :param svd_cdc_reco_tracks: The name of the already created CDC reco tracks
306 :param pxd_reco_tracks: The name to output the SVD reco tracks to
307 :param use_mc_truth: Use the MC information in the CKF
308 :param use_best_results: CKF parameter for useNResults
309 :param use_best_seeds: CKF parameter for useBestNInSeed
310 :param direction: where to extrapolate to. Valid options are forward and backward
312 if "PXDSpacePointCreator" not in [m.name()
for m
in path.modules()]:
313 path.add_module(
"PXDSpacePointCreator")
315 path.add_module(
"DAFRecoFitter", recoTracksStoreArrayName=svd_cdc_reco_tracks)
317 if direction ==
"forward":
323 path.add_module(
"MCRecoTracksMatcher", UsePXDHits=
False, UseSVDHits=
True, UseCDCHits=
True,
324 mcRecoTracksStoreArrayName=
"MCRecoTracks",
325 prRecoTracksStoreArrayName=svd_cdc_reco_tracks)
327 module_parameters = dict(
328 firstHighFilter=
"truth",
329 secondHighFilter=
"all",
330 thirdHighFilter=
"all",
336 module_parameters = dict(
341 firstHighFilterParameters={
342 'DBPayloadName':
'ckf_ToPXDStateFilter_1Parameters',
343 "direction": direction},
344 firstHighUseNStates=use_best_seeds,
345 secondHighFilterParameters={
346 'DBPayloadName':
'ckf_ToPXDStateFilter_2Parameters'},
347 secondHighUseNStates=use_best_seeds,
348 thirdHighFilterParameters={
349 'DBPayloadName':
'ckf_ToPXDStateFilter_3Parameters'},
350 thirdHighUseNStates=use_best_seeds,
352 'DBPayloadName':
'ckf_PXDTrackCombinationParameters'},
353 useBestNInSeed=use_best_results,
358 path.add_module(
"ToPXDCKF",
359 advanceHighFilterParameters={
"direction": direction},
361 writeOutDirection=direction,
363 inputRecoTrackStoreArrayName=svd_cdc_reco_tracks,
364 relatedRecoTrackStoreArrayName=pxd_reco_tracks,
365 relationCheckForDirection=direction,
367 outputRecoTrackStoreArrayName=pxd_reco_tracks,
368 outputRelationRecoTrackStoreArrayName=svd_cdc_reco_tracks,
370 reverseSeed=reverse_seed,
371 reverseSeedState=reverse_seed,
372 **module_parameters).set_name(f
"ToPXDCKF_{direction}")