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).set_name(f
"DAFRecoFitter {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).set_name(f
"DAFRecoFitter {svd_cdc_reco_tracks}")
84 if direction ==
"forward":
90 module_parameters = dict(
91 firstHighFilter=
"truth",
92 secondHighFilter=
"all",
93 thirdHighFilter=
"all",
99 module_parameters = dict(
100 firstHighFilterParameters={
101 'DBPayloadName':
'ckf_ToPXDStateFilter_1Parameters',
102 "direction": direction},
103 firstHighUseNStates=use_best_seeds,
104 secondHighFilterParameters={
105 'DBPayloadName':
'ckf_ToPXDStateFilter_2Parameters'},
106 secondHighUseNStates=use_best_seeds,
107 thirdHighFilterParameters={
108 'DBPayloadName':
'ckf_ToPXDStateFilter_3Parameters'},
109 thirdHighUseNStates=use_best_seeds,
111 'DBPayloadName':
'ckf_PXDTrackCombinationParameters'},
112 useBestNInSeed=use_best_results,
115 module_parameters[
"seedHitJumping"] = -1
116 module_parameters[
"hitHitJumping"] = 0
118 path.add_module(
"ToPXDCKF",
119 advanceHighFilterParameters={
"direction": direction},
121 writeOutDirection=direction,
123 inputRecoTrackStoreArrayName=svd_cdc_reco_tracks,
124 relatedRecoTrackStoreArrayName=pxd_reco_tracks,
125 relationCheckForDirection=direction,
127 outputRecoTrackStoreArrayName=pxd_reco_tracks,
128 outputRelationRecoTrackStoreArrayName=svd_cdc_reco_tracks,
130 reverseSeed=reverse_seed,
131 reverseSeedState=reverse_seed,
132 **module_parameters).set_name(f
"ToPXDCKF_{direction}")
142 direction="backward"):
144 Convenience function to add the SVD ckf to the path.
145 :param path: The path to add the module to
146 :param cdc_reco_tracks: The name of the already created CDC reco tracks
147 :param svd_reco_tracks: The name to output the SVD reco tracks to
148 :param use_mc_truth: Use the MC information in the CKF
149 :param use_best_results: CKF parameter
for useNResults
150 :param use_best_seeds: CKF parameter
for useBestNInSeed
151 :param direction: where to extrapolate to. Valid options are forward
and backward
153 if direction ==
"forward":
159 module_parameters = dict(
160 firstHighFilter=
"truth",
161 secondHighFilter=
"all",
162 thirdHighFilter=
"all",
168 module_parameters = dict(
169 firstHighFilterParameters={
170 "direction": direction,
171 'DBPayloadName': f
'ckf_CDCSVDStateFilter_1_{direction}_Parameters'},
172 firstHighUseNStates=use_best_seeds,
173 secondHighFilterParameters={
174 'DBPayloadName': f
'ckf_CDCSVDStateFilter_2_{direction}_Parameters'},
175 secondHighUseNStates=use_best_seeds,
176 thirdHighFilterParameters={
177 'DBPayloadName': f
'ckf_CDCSVDStateFilter_3_{direction}_Parameters'},
178 thirdHighUseNStates=use_best_seeds,
180 'DBPayloadName':
'ckf_CDCToSVDResultParameters'},
181 useBestNInSeed=use_best_results,
184 path.add_module(
"CDCToSVDSpacePointCKF",
185 inputRecoTrackStoreArrayName=cdc_reco_tracks,
186 outputRecoTrackStoreArrayName=svd_reco_tracks,
187 outputRelationRecoTrackStoreArrayName=cdc_reco_tracks,
188 relatedRecoTrackStoreArrayName=svd_reco_tracks,
190 advanceHighFilterParameters={
"direction": direction},
191 reverseSeed=reverse_seed,
193 writeOutDirection=direction,
194 relationCheckForDirection=direction,
199 **module_parameters).set_name(f
"CDCToSVDSpacePointCKF_{direction}")
202def add_cosmics_svd_ckf(
209 direction="backward"):
211 Convenience function to add the SVD ckf to the path with cosmics settings valid
for phase2
and 3.
212 :param path: The path to add the module to
213 :param cdc_reco_tracks: The name of the already created CDC reco tracks
214 :param svd_reco_tracks: The name to output the SVD reco tracks to
215 :param use_mc_truth: Use the MC information
in the CKF
216 :param use_best_results: CKF parameter
for useNResults
217 :param use_best_seeds: CKF parameter
for useBestNInSeed
218 :param direction: where to extrapolate to. Valid options are forward
and backward
220 if direction ==
"forward":
226 module_parameters = dict(
227 firstHighFilter=
"truth",
228 secondHighFilter=
"all",
229 thirdHighFilter=
"all",
235 module_parameters = dict(
239 firstHighFilter=
"non_ip_crossing",
240 firstHighFilterParameters={
"direction": direction},
241 firstHighUseNStates=0,
243 secondHighFilter=
"residual",
244 secondHighFilterParameters={},
245 secondHighUseNStates=use_best_seeds,
247 thirdHighFilter=
"residual",
248 thirdHighFilterParameters={},
249 thirdHighUseNStates=use_best_seeds,
253 useBestNInSeed=use_best_results,
256 path.add_module(
"CDCToSVDSpacePointCKF",
257 inputRecoTrackStoreArrayName=cdc_reco_tracks,
258 outputRecoTrackStoreArrayName=svd_reco_tracks,
259 outputRelationRecoTrackStoreArrayName=cdc_reco_tracks,
260 relatedRecoTrackStoreArrayName=svd_reco_tracks,
262 advanceHighFilterParameters={
"direction": direction},
263 reverseSeed=reverse_seed,
265 writeOutDirection=direction,
266 relationCheckForDirection=direction,
270 **module_parameters).set_name(f
"CDCToSVDSpacePointCKF_{direction}")
273def add_cosmics_pxd_ckf(
280 direction="backward"):
282 Convenience function to add the PXD ckf to the path with cosmics settings valid
for phase2
and 3.
283 :param path: The path to add the module to
284 :param svd_cdc_reco_tracks: The name of the already created CDC reco tracks
285 :param pxd_reco_tracks: The name to output the SVD reco tracks to
286 :param use_mc_truth: Use the MC information
in the CKF
287 :param use_best_results: CKF parameter
for useNResults
288 :param use_best_seeds: CKF parameter
for useBestNInSeed
289 :param direction: where to extrapolate to. Valid options are forward
and backward
291 if "PXDSpacePointCreator" not in [m.name()
for m
in path.modules()]:
292 path.add_module(
"PXDSpacePointCreator")
294 path.add_module(
"DAFRecoFitter", recoTracksStoreArrayName=svd_cdc_reco_tracks).set_name(f
"DAFRecoFitter {svd_cdc_reco_tracks}")
296 if direction ==
"forward":
302 path.add_module(
"MCRecoTracksMatcher", UsePXDHits=
False, UseSVDHits=
True, UseCDCHits=
True,
303 mcRecoTracksStoreArrayName=
"MCRecoTracks",
304 prRecoTracksStoreArrayName=svd_cdc_reco_tracks)
306 module_parameters = dict(
307 firstHighFilter=
"truth",
308 secondHighFilter=
"all",
309 thirdHighFilter=
"all",
315 module_parameters = dict(
320 firstHighFilterParameters={
321 'DBPayloadName':
'ckf_ToPXDStateFilter_1Parameters',
322 "direction": direction},
323 firstHighUseNStates=use_best_seeds,
324 secondHighFilterParameters={
325 'DBPayloadName':
'ckf_ToPXDStateFilter_2Parameters'},
326 secondHighUseNStates=use_best_seeds,
327 thirdHighFilterParameters={
328 'DBPayloadName':
'ckf_ToPXDStateFilter_3Parameters'},
329 thirdHighUseNStates=use_best_seeds,
331 'DBPayloadName':
'ckf_PXDTrackCombinationParameters'},
332 useBestNInSeed=use_best_results,
337 path.add_module(
"ToPXDCKF",
338 advanceHighFilterParameters={
"direction": direction},
340 writeOutDirection=direction,
342 inputRecoTrackStoreArrayName=svd_cdc_reco_tracks,
343 relatedRecoTrackStoreArrayName=pxd_reco_tracks,
344 relationCheckForDirection=direction,
346 outputRecoTrackStoreArrayName=pxd_reco_tracks,
347 outputRelationRecoTrackStoreArrayName=svd_cdc_reco_tracks,
349 reverseSeed=reverse_seed,
350 reverseSeedState=reverse_seed,
351 **module_parameters).set_name(f
"ToPXDCKF_{direction}")