10def 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 module_parameters = dict(
173 firstHighFilterParameters={
174 "direction": direction,
175 'DBPayloadName': f
'ckf_CDCSVDStateFilter_1_{direction}_Parameters'},
176 firstHighUseNStates=use_best_seeds,
177 secondHighFilterParameters={
178 'DBPayloadName': f
'ckf_CDCSVDStateFilter_2_{direction}_Parameters'},
179 secondHighUseNStates=use_best_seeds,
180 thirdHighFilterParameters={
181 'DBPayloadName': f
'ckf_CDCSVDStateFilter_3_{direction}_Parameters'},
182 thirdHighUseNStates=use_best_seeds,
184 'DBPayloadName':
'ckf_CDCToSVDResultParameters'},
185 useBestNInSeed=use_best_results,
188 path.add_module(
"CDCToSVDSpacePointCKF",
189 inputRecoTrackStoreArrayName=cdc_reco_tracks,
190 outputRecoTrackStoreArrayName=svd_reco_tracks,
191 outputRelationRecoTrackStoreArrayName=cdc_reco_tracks,
192 relatedRecoTrackStoreArrayName=svd_reco_tracks,
194 advanceHighFilterParameters={
"direction": direction},
195 reverseSeed=reverse_seed,
197 writeOutDirection=direction,
198 relationCheckForDirection=direction,
203 **module_parameters).set_name(f
"CDCToSVDSpacePointCKF_{direction}")
206def add_cosmics_svd_ckf(
213 direction="backward"):
215 Convenience function to add the SVD ckf to the path with cosmics settings valid
for phase2
and 3.
216 :param path: The path to add the module to
217 :param cdc_reco_tracks: The name of the already created CDC reco tracks
218 :param svd_reco_tracks: The name to output the SVD reco tracks to
219 :param use_mc_truth: Use the MC information
in the CKF
220 :param use_best_results: CKF parameter
for useNResults
221 :param use_best_seeds: CKF parameter
for useBestNInSeed
222 :param direction: where to extrapolate to. Valid options are forward
and backward
224 if direction ==
"forward":
230 module_parameters = dict(
231 firstHighFilter=
"truth",
232 secondHighFilter=
"all",
233 thirdHighFilter=
"all",
239 module_parameters = dict(
243 firstHighFilter=
"non_ip_crossing",
244 firstHighFilterParameters={
"direction": direction},
245 firstHighUseNStates=0,
247 secondHighFilter=
"residual",
248 secondHighFilterParameters={},
249 secondHighUseNStates=use_best_seeds,
251 thirdHighFilter=
"residual",
252 thirdHighFilterParameters={},
253 thirdHighUseNStates=use_best_seeds,
257 useBestNInSeed=use_best_results,
260 path.add_module(
"CDCToSVDSpacePointCKF",
261 inputRecoTrackStoreArrayName=cdc_reco_tracks,
262 outputRecoTrackStoreArrayName=svd_reco_tracks,
263 outputRelationRecoTrackStoreArrayName=cdc_reco_tracks,
264 relatedRecoTrackStoreArrayName=svd_reco_tracks,
266 advanceHighFilterParameters={
"direction": direction},
267 reverseSeed=reverse_seed,
269 writeOutDirection=direction,
270 relationCheckForDirection=direction,
274 **module_parameters).set_name(f
"CDCToSVDSpacePointCKF_{direction}")
277def add_cosmics_pxd_ckf(
284 direction="backward"):
286 Convenience function to add the PXD ckf to the path with cosmics settings valid
for phase2
and 3.
287 :param path: The path to add the module to
288 :param svd_cdc_reco_tracks: The name of the already created CDC reco tracks
289 :param pxd_reco_tracks: The name to output the SVD reco tracks to
290 :param use_mc_truth: Use the MC information
in the CKF
291 :param use_best_results: CKF parameter
for useNResults
292 :param use_best_seeds: CKF parameter
for useBestNInSeed
293 :param direction: where to extrapolate to. Valid options are forward
and backward
295 if "PXDSpacePointCreator" not in [m.name()
for m
in path.modules()]:
296 path.add_module(
"PXDSpacePointCreator")
298 path.add_module(
"DAFRecoFitter", recoTracksStoreArrayName=svd_cdc_reco_tracks)
300 if direction ==
"forward":
306 path.add_module(
"MCRecoTracksMatcher", UsePXDHits=
False, UseSVDHits=
True, UseCDCHits=
True,
307 mcRecoTracksStoreArrayName=
"MCRecoTracks",
308 prRecoTracksStoreArrayName=svd_cdc_reco_tracks)
310 module_parameters = dict(
311 firstHighFilter=
"truth",
312 secondHighFilter=
"all",
313 thirdHighFilter=
"all",
319 module_parameters = dict(
324 firstHighFilterParameters={
325 'DBPayloadName':
'ckf_ToPXDStateFilter_1Parameters',
326 "direction": direction},
327 firstHighUseNStates=use_best_seeds,
328 secondHighFilterParameters={
329 'DBPayloadName':
'ckf_ToPXDStateFilter_2Parameters'},
330 secondHighUseNStates=use_best_seeds,
331 thirdHighFilterParameters={
332 'DBPayloadName':
'ckf_ToPXDStateFilter_3Parameters'},
333 thirdHighUseNStates=use_best_seeds,
335 'DBPayloadName':
'ckf_PXDTrackCombinationParameters'},
336 useBestNInSeed=use_best_results,
341 path.add_module(
"ToPXDCKF",
342 advanceHighFilterParameters={
"direction": direction},
344 writeOutDirection=direction,
346 inputRecoTrackStoreArrayName=svd_cdc_reco_tracks,
347 relatedRecoTrackStoreArrayName=pxd_reco_tracks,
348 relationCheckForDirection=direction,
350 outputRecoTrackStoreArrayName=pxd_reco_tracks,
351 outputRelationRecoTrackStoreArrayName=svd_cdc_reco_tracks,
353 reverseSeed=reverse_seed,
354 reverseSeedState=reverse_seed,
355 **module_parameters).set_name(f
"ToPXDCKF_{direction}")