10from pybasf2
import B2WARNING
12from basf2
import register_module
13from ckf.path_functions import add_pxd_ckf, add_ckf_based_merger, add_svd_ckf, add_cosmics_svd_ckf, add_cosmics_pxd_ckf
14from pxd
import add_pxd_reconstruction
15from svd
import add_svd_reconstruction
19def use_local_sectormap(path, pathToLocalSM):
20 """ Helper function that sets up the SectorMapBootstrapModule in that way that a local sectormap will be
21 loaded instead the one
from the DB. Has to be applied on the path after the SectorMapBootstrap was
22 put into the path (usually
in add_reconstructin)
24 :param path: The path the SectorMapBootstrapModule
is in.
25 :param pathToLocalSM: the local storage position of the sectormap (including the name)
28 B2WARNING("Warning will load local SectorMap from: " + pathToLocalSM)
29 adjust_module(path,
'SectorMapBootstrap', **{
"ReadSecMapFromDB":
False,
30 "ReadSectorMap":
True,
"SectorMapsInputFile": pathToLocalSM})
33def add_geometry_modules(path, components=None):
35 Helper function to add the geometry related modules needed for tracking
38 :param path: The path to add the tracking reconstruction modules to
39 :param components: the list of geometry components
in use
or None for all components.
42 if 'Geometry' not in path:
43 path.add_module(
'Geometry', useDB=
True)
44 if components
is not None:
45 B2WARNING(
"Custom detector components specified: Will still build full geometry")
48 if 'SetupGenfitExtrapolation' not in path:
49 path.add_module(
'SetupGenfitExtrapolation',
50 energyLossBrems=
False, noiseBrems=
False)
53def add_hit_preparation_modules(path, components=None, pxd_filtering_offline=False, create_intercepts_for_pxd_ckf=False):
55 Helper function to prepare the hit information to be used by tracking.
57 :param path: The path to add the tracking reconstruction modules to
58 :param components: the list of geometry components in use
or None for all components.
59 :param pxd_filtering_offline: PXD data reduction
is performed after CDC
and SVD tracking,
60 so PXD reconstruction has to wait until the ROIs are calculated.
61 :param create_intercepts_for_pxd_ckf: If
True, the PXDROIFinder
is added to the path to create PXDIntercepts to be used
62 for hit filtering when creating the CKF relations. This independent of the offline PXD digit filtering which
is
63 steered by
'pxd_filtering_offline'. This can be applied
for both data
and MC.
67 if is_svd_used(components):
68 add_svd_reconstruction(path)
71 if is_pxd_used(components)
and not pxd_filtering_offline
and not create_intercepts_for_pxd_ckf:
72 add_pxd_reconstruction(path)
75def add_track_fit_and_track_creator(path, components=None, pruneTracks=False, trackFitHypotheses=None,
76 reco_tracks="RecoTracks", add_mva_quality_indicator=False, v0_finding=True):
78 Helper function to add the modules performing the
79 track fit, the V0 fit and the Belle2 track creation to the path.
81 :param path: The path to add the tracking reconstruction modules to
82 :param components: the list of geometry components
in use
or None for all components.
83 :param pruneTracks: Delete all hits expect the first
and the last
from the found tracks.
84 :param reco_tracks: Name of the StoreArray where the reco tracks should be stored
85 :param v0_finding:
if false, the V0Finder module
is not executed
86 :param add_mva_quality_indicator: If true, add the MVA track quality estimation
87 to the path that sets the quality indicator property of the found tracks.
90 add_prefilter_track_fit_and_track_creator(path,
91 trackFitHypotheses=trackFitHypotheses,
92 reco_tracks=reco_tracks,
93 add_mva_quality_indicator=add_mva_quality_indicator)
97 path.add_module(
'V0Finder', RecoTracks=reco_tracks, v0FitterMode=1)
100 add_prune_tracks(path, components=components, reco_tracks=reco_tracks)
103def add_prefilter_track_fit_and_track_creator(path, trackFitHypotheses=None,
104 reco_tracks="RecoTracks", add_mva_quality_indicator=False):
106 Helper function to add only the modules required to calculate HLT filter decision:
107 performing the track fit and the Belle2 track creation to the path.
109 :param path: The path to add the tracking reconstruction modules to
110 :param reco_tracks: Name of the StoreArray where the reco tracks should be stored
111 :param add_mva_quality_indicator: If true, add the MVA track quality estimation
112 to the path that sets the quality indicator property of the found tracks.
116 path.add_module(
"IPTrackTimeEstimator",
117 recoTracksStoreArrayName=reco_tracks, useFittedInformation=
False)
119 path.add_module(
"DAFRecoFitter", recoTracksStoreArrayName=reco_tracks).set_name(
120 "Combined_DAFRecoFitter")
124 if add_mva_quality_indicator:
125 path.add_module(
"TrackQualityEstimatorMVA", collectEventFeatures=
True)
133 path.add_module(
'TrackCreator', recoTrackColName=reco_tracks,
134 pdgCodes=[211, 321, 2212]
if not trackFitHypotheses
else trackFitHypotheses)
137def add_cr_track_fit_and_track_creator(path, components=None,
138 prune_tracks=False, event_timing_extraction=True,
139 reco_tracks="RecoTracks", tracks=""):
141 Helper function to add the modules performing the cdc cr track fit
142 and track creation to the path.
144 :param path: The path to which to add the tracking reconstruction modules
145 :param components: the list of geometry components
in use
or None for all components.
146 :param reco_tracks: The name of the reco tracks to use
147 :param tracks: the name of the output Belle tracks
148 :param prune_tracks: Delete all hits expect the first
and the last
from the found tracks.
149 :param event_timing_extraction: extract the event time
153 path.add_module(
"PlaneTriggerTrackTimeEstimator",
154 recoTracksStoreArrayName=reco_tracks,
155 pdgCodeToUseForEstimation=13,
156 triggerPlanePosition=[0., 0., 0.],
157 triggerPlaneDirection=[0., 1., 0.],
158 useFittedInformation=
False)
161 path.add_module(
"DAFRecoFitter",
162 recoTracksStoreArrayName=reco_tracks,
164 pdgCodesToUseForFitting=13)
167 path.add_module(
"PlaneTriggerTrackTimeEstimator",
168 recoTracksStoreArrayName=reco_tracks,
169 pdgCodeToUseForEstimation=13,
170 triggerPlanePosition=[0., 0., 0.],
171 triggerPlaneDirection=[0., 1., 0.],
172 useFittedInformation=
True)
175 path.add_module(
"DAFRecoFitter",
176 recoTracksStoreArrayName=reco_tracks,
177 pdgCodesToUseForFitting=13
180 if event_timing_extraction:
182 path.add_module(
"FullGridChi2TrackTimeExtractor",
183 RecoTracksStoreArrayName=reco_tracks,
184 GridMaximalT0Value=40,
185 GridMinimalT0Value=-40,
190 path.add_module(
"DAFRecoFitter",
192 recoTracksStoreArrayName=reco_tracks,
193 pdgCodesToUseForFitting=13
197 path.add_module(
'TrackCreator',
199 recoTrackColName=reco_tracks,
201 useClosestHitToIP=
True,
207 add_prune_tracks(path=path, components=components,
208 reco_tracks=reco_tracks)
211def add_mc_matcher(path, components=None, mc_reco_tracks="MCRecoTracks",
212 reco_tracks="RecoTracks", use_second_cdc_hits=False,
213 split_after_delta_t=-1.0, matching_method="hit",
214 chi2_cutoffs=[128024, 95, 173, 424, 90, 424],
217 Match the tracks to the MC truth. The matching works based on
218 the output of the TrackFinderMCTruthRecoTracks.
219 Alternatively one can use the Chi2MCTrackMatcher based on chi2 values
220 calculated from the helixparameters of Tracks
and MCParticles.
222 :param path: The path to add the tracking reconstruction modules to
223 :param components: the list of geometry components
in use
or None for all components.
224 :param mc_reco_tracks: Name of the StoreArray where the mc reco tracks will be stored
225 :param reco_tracks: Name of the StoreArray where the reco tracks should be stored
226 :param use_second_cdc_hits: If true, the second hit information will be used
in the CDC track finding.
227 :param split_after_delta_t: If positive, split MCRecoTrack into multiple MCRecoTracks
if the time
228 distance between two adjacent SimHits
is more than the given value
229 :param matching_method: hit: uses the hit-matching
230 chi2: uses the chi2-matching
231 :param chi2_cutoffs: If chi2 matching method
is used, this list defines the individual cut-off values
232 for the chi2 values. Thereby each charged stable particle gets its cut-off
233 value. The order of the pdgs
is [11,13,211,2212,321,1000010020]. The default
234 values are determined
from a small study investigating chi2 value distribution of
235 trivial matching pairs.
236 :param chi2_linalg: If chi2 matching
is used, this defines package used to invert the covariance5
237 matrix. ROOT has been shown to be faster than eigen. If
False ROOT
is used. If
True
240 if (matching_method ==
"hit"):
241 path.add_module(
'TrackFinderMCTruthRecoTracks',
242 RecoTracksStoreArrayName=mc_reco_tracks,
244 UseSecondCDCHits=use_second_cdc_hits,
245 UsePXDHits=is_pxd_used(components),
246 UseSVDHits=is_svd_used(components),
247 UseCDCHits=is_cdc_used(components),
248 SplitAfterDeltaT=split_after_delta_t)
250 path.add_module(
'MCRecoTracksMatcher',
251 mcRecoTracksStoreArrayName=mc_reco_tracks,
252 prRecoTracksStoreArrayName=reco_tracks,
253 UsePXDHits=is_pxd_used(components),
254 UseSVDHits=is_svd_used(components),
255 UseCDCHits=is_cdc_used(components))
257 path.add_module(
'TrackToMCParticleRelator')
259 elif (matching_method ==
"chi2"):
260 print(
"Warning: The Chi2MCTrackMatcherModule is currently not fully developed and tested!")
261 path.add_module(
'Chi2MCTrackMatcherModule',
262 CutOffs=chi2_cutoffs,
266def add_prune_tracks(path, components=None, reco_tracks="RecoTracks"):
268 Adds removal of the intermediate states at each measurement from the fitted tracks.
270 :param path: The path to add the tracking reconstruction modules to
271 :param components: the list of geometry components
in use
or None for all components.
272 :param reco_tracks: Name of the StoreArray where the reco tracks should be stored
276 if components
and not (
'SVD' in components
or 'CDC' in components):
279 path.add_module(
'PruneRecoTracks', storeArrayName=reco_tracks)
280 path.add_module(
"PruneGenfitTracks")
283def add_flipping_of_recoTracks(
286 reco_tracks="RecoTracks",
287 trackFitHypotheses=None,
288 reco_tracks_flipped="RecoTracks_flipped"):
290 This function adds the mva based selections and the flipping of the recoTracks
292 :param path: The path to add the tracking reconstruction modules to
293 :param fit_tracks: fit the flipped recotracks
or not
294 :param reco_tracks: Name of the StoreArray where the reco tracks should be flipped
295 :param trackFitHypotheses: Which pdg hypothesis to fit. Defaults to [211, 321, 2212].
296 :param reco_tracks_flipped: Name of the temporary StoreArray
for the flipped RecoTracks
299 path.add_module("FlipQuality", recoTracksStoreArrayName=reco_tracks,
300 identifier=
'TRKTrackFlipAndRefit_MVA1_weightfile',
301 indexOfFlippingMVA=1).set_name(
"FlipQuality_1stMVA")
303 path.add_module(
"RecoTracksReverter", inputStoreArrayName=reco_tracks,
304 outputStoreArrayName=reco_tracks_flipped)
306 path.add_module(
"DAFRecoFitter", recoTracksStoreArrayName=reco_tracks_flipped).set_name(
"Combined_DAFRecoFitter_flipped")
307 path.add_module(
"IPTrackTimeEstimator",
308 recoTracksStoreArrayName=reco_tracks_flipped, useFittedInformation=
False)
309 path.add_module(
"TrackCreator", trackColName=
"Tracks_flipped",
310 trackFitResultColName=
"TrackFitResults_flipped",
311 recoTrackColName=reco_tracks_flipped,
315 2212]
if not trackFitHypotheses
else trackFitHypotheses).set_name(
"TrackCreator_flipped")
316 path.add_module(
"FlipQuality", recoTracksStoreArrayName=reco_tracks,
317 identifier=
'TRKTrackFlipAndRefit_MVA2_weightfile',
318 indexOfFlippingMVA=2).set_name(
"FlipQuality_2ndMVA")
319 path.add_module(
"FlippedRecoTracksMerger",
320 inputStoreArrayName=reco_tracks,
321 inputStoreArrayNameFlipped=reco_tracks_flipped)
324def add_pxd_track_finding(path, components, input_reco_tracks, output_reco_tracks, use_mc_truth=False,
325 add_both_directions=False, temporary_reco_tracks="PXDRecoTracks", **kwargs):
326 """Add the pxd track finding to the path"""
327 if not is_pxd_used(components):
332 path.add_module(
"MCRecoTracksMatcher", UsePXDHits=
False,
333 UseSVDHits=is_svd_used(components), UseCDCHits=is_cdc_used(components),
334 mcRecoTracksStoreArrayName=
"MCRecoTracks",
335 prRecoTracksStoreArrayName=input_reco_tracks)
337 add_pxd_ckf(path, svd_cdc_reco_tracks=input_reco_tracks, pxd_reco_tracks=temporary_reco_tracks,
338 direction=
"backward", use_mc_truth=use_mc_truth, **kwargs)
340 if add_both_directions:
341 add_pxd_ckf(path, svd_cdc_reco_tracks=input_reco_tracks, pxd_reco_tracks=temporary_reco_tracks,
342 direction=
"forward", use_mc_truth=use_mc_truth, **kwargs)
344 path.add_module(
"RelatedTracksCombiner", CDCRecoTracksStoreArrayName=input_reco_tracks,
345 VXDRecoTracksStoreArrayName=temporary_reco_tracks, recoTracksStoreArrayName=output_reco_tracks)
348def add_pxd_cr_track_finding(path, components, input_reco_tracks, output_reco_tracks, use_mc_truth=False,
349 add_both_directions=False, temporary_reco_tracks="PXDRecoTracks", **kwargs):
350 """Add the pxd track finding to the path"""
351 if not is_pxd_used(components):
356 path.add_module(
"MCRecoTracksMatcher", UsePXDHits=
False,
357 UseSVDHits=is_svd_used(components), UseCDCHits=is_cdc_used(components),
358 mcRecoTracksStoreArrayName=
"MCRecoTracks",
359 prRecoTracksStoreArrayName=input_reco_tracks)
361 add_cosmics_pxd_ckf(path, svd_cdc_reco_tracks=input_reco_tracks, pxd_reco_tracks=temporary_reco_tracks,
362 direction=
"backward", use_mc_truth=use_mc_truth, **kwargs)
364 if add_both_directions:
365 add_cosmics_pxd_ckf(path, svd_cdc_reco_tracks=input_reco_tracks, pxd_reco_tracks=temporary_reco_tracks,
366 direction=
"forward", use_mc_truth=use_mc_truth, **kwargs)
368 path.add_module(
"RelatedTracksCombiner", CDCRecoTracksStoreArrayName=input_reco_tracks,
369 VXDRecoTracksStoreArrayName=temporary_reco_tracks, recoTracksStoreArrayName=output_reco_tracks)
372def add_svd_track_finding(
377 svd_ckf_mode="SVD_after",
379 add_both_directions=True,
380 temporary_reco_tracks="SVDRecoTracks",
381 temporary_svd_cdc_reco_tracks="SVDPlusCDCStandaloneRecoTracks",
382 use_svd_to_cdc_ckf=True,
383 prune_temporary_tracks=True,
384 add_mva_quality_indicator=False,
385 svd_standalone_mode="VXDTF2",
389 Add SVD track finding to the path.
391 :param path: The path to add the tracking reconstruction modules to
392 :param components: The list of geometry components in use
or None for all components.
393 :param input_reco_tracks: Name of the StoreArray
with the input reco tracks (usually
from CDC) that are used
in the
394 CKF track finding
and are merged
with the newly found SVD tracks into the ``output_reco_tracks``.
395 :param output_reco_tracks: Name of the StoreArray where the reco tracks outputted by the SVD track finding should be
397 :param svd_ckf_mode: String designating the mode of the CDC-to-SVD CKF, that
is how it
is combined
with the SVD
398 standalone track finding. One of
"SVD_after",
"SVD_before",
"SVD_before_with_second_ckf",
399 "only_ckf",
"SVD_alone",
"cosmics".
400 :param use_mc_truth: Add mc matching
and use the MC information
in the CKF (but
not in the VXDTF2)
401 :param add_both_directions: Whether to add the CKF
with both forward
and backward extrapolation directions instead
403 :param temporary_reco_tracks: Intermediate store array where the SVD tracks
from the SVD standalone track finding
404 are stored, before they are merged
with CDC tracks
and extended via the CKF tracking.
405 :param temporary_svd_cdc_reco_tracks: Intermediate store array where the combination of ``temporary_reco_tracks``
406 (
from SVD)
and ``input_reco_tracks`` (
from CDC standalone)
is stored, before the CKF
is applied.
407 It
is only used
if ``use_svd_to_cdc_ckf``
is true. Otherwise, the combination
is stored directly
in
408 ``output_reco_tracks``.
409 :param use_svd_to_cdc_ckf: Whether to enable the CKF extrapolation
from the SVD into the CDC.
410 That CKF application
is not affected by ``svd_ckf_mode``.
411 :param prune_temporary_tracks: Delete all hits expect the first
and last
from intermediate track objects.
412 :param add_mva_quality_indicator: Add the VXDQualityEstimatorMVA module to set the quality indicator
413 property
for tracks
from VXDTF2 standalone tracking
414 (ATTENTION: Standard triplet QI of VXDTF2
is replaced
in this case
415 -> setting this option to
'True' will have some influence on the final track collection)
416 :param svd_standalone_mode: Which SVD standalone tracking
is used.
417 Options are
"VXDTF2",
"SVDHough",
"VXDTF2_and_SVDHough",
and "SVDHough_and_VXDTF2".
421 if not is_svd_used(components):
424 if not input_reco_tracks:
426 add_svd_standalone_tracking(path, components=[
"SVD"],
427 svd_standalone_mode=svd_standalone_mode,
428 reco_tracks=output_reco_tracks,
429 add_mva_quality_indicator=add_mva_quality_indicator)
434 path.add_module(
"MCRecoTracksMatcher", UsePXDHits=
False, UseSVDHits=
False,
435 UseCDCHits=is_cdc_used(components),
436 mcRecoTracksStoreArrayName=
"MCRecoTracks",
437 prRecoTracksStoreArrayName=input_reco_tracks)
439 if svd_ckf_mode ==
"SVD_before":
440 add_svd_standalone_tracking(path, components=[
"SVD"],
441 svd_standalone_mode=svd_standalone_mode,
442 reco_tracks=temporary_reco_tracks,
443 add_mva_quality_indicator=add_mva_quality_indicator)
444 add_ckf_based_merger(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
445 use_mc_truth=use_mc_truth, direction=
"backward", **kwargs)
446 if add_both_directions:
447 add_ckf_based_merger(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
448 use_mc_truth=use_mc_truth, direction=
"forward", **kwargs)
450 elif svd_ckf_mode ==
"SVD_before_with_second_ckf":
451 add_svd_standalone_tracking(path, components=[
"SVD"],
452 svd_standalone_mode=svd_standalone_mode,
453 reco_tracks=temporary_reco_tracks,
454 add_mva_quality_indicator=add_mva_quality_indicator)
455 add_ckf_based_merger(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
456 use_mc_truth=use_mc_truth, direction=
"backward", **kwargs)
457 if add_both_directions:
458 add_ckf_based_merger(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
459 use_mc_truth=use_mc_truth, direction=
"forward", **kwargs)
460 add_svd_ckf(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
461 use_mc_truth=use_mc_truth, direction=
"backward", **kwargs)
462 if add_both_directions:
463 add_svd_ckf(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
464 use_mc_truth=use_mc_truth, direction=
"forward", **kwargs)
466 elif svd_ckf_mode ==
"only_ckf":
467 add_svd_ckf(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
468 use_mc_truth=use_mc_truth, direction=
"backward", **kwargs)
469 if add_both_directions:
470 add_svd_ckf(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
471 use_mc_truth=use_mc_truth, direction=
"forward", **kwargs)
473 elif svd_ckf_mode ==
"SVD_after":
474 add_svd_ckf(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
475 use_mc_truth=use_mc_truth, direction=
"backward", **kwargs)
476 if add_both_directions:
477 add_svd_ckf(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
478 use_mc_truth=use_mc_truth, direction=
"forward", **kwargs)
480 add_svd_standalone_tracking(path, components=[
"SVD"],
481 svd_standalone_mode=svd_standalone_mode,
482 reco_tracks=temporary_reco_tracks,
483 add_mva_quality_indicator=add_mva_quality_indicator)
484 add_ckf_based_merger(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
485 use_mc_truth=use_mc_truth, direction=
"backward", **kwargs)
486 if add_both_directions:
487 add_ckf_based_merger(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
488 use_mc_truth=use_mc_truth, direction=
"forward", **kwargs)
490 elif svd_ckf_mode ==
"SVD_alone":
491 add_svd_standalone_tracking(path, components=[
"SVD"],
492 svd_standalone_mode=svd_standalone_mode,
493 reco_tracks=temporary_reco_tracks,
494 add_mva_quality_indicator=add_mva_quality_indicator)
495 path.add_module(
'VXDCDCTrackMerger',
496 CDCRecoTrackColName=input_reco_tracks,
497 VXDRecoTrackColName=temporary_reco_tracks)
499 elif svd_ckf_mode ==
"cosmics":
500 add_cosmics_svd_ckf(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
501 use_mc_truth=use_mc_truth, direction=
"backward", **kwargs)
502 if add_both_directions:
503 add_cosmics_svd_ckf(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
504 use_mc_truth=use_mc_truth, direction=
"forward", **kwargs)
507 raise ValueError(f
"Do not understand the svd_ckf_mode {svd_ckf_mode}")
509 if use_svd_to_cdc_ckf:
510 combined_svd_cdc_standalone_tracks = temporary_svd_cdc_reco_tracks
512 combined_svd_cdc_standalone_tracks = output_reco_tracks
515 path.add_module(
"RelatedTracksCombiner", VXDRecoTracksStoreArrayName=temporary_reco_tracks,
516 CDCRecoTracksStoreArrayName=input_reco_tracks,
517 recoTracksStoreArrayName=combined_svd_cdc_standalone_tracks)
519 if use_svd_to_cdc_ckf:
520 path.add_module(
"ToCDCCKF",
521 inputWireHits=
"CDCWireHitVector",
522 inputRecoTrackStoreArrayName=combined_svd_cdc_standalone_tracks,
523 relatedRecoTrackStoreArrayName=
"CKFCDCRecoTracks",
524 relationCheckForDirection=
"backward",
525 ignoreTracksWithCDChits=
True,
526 outputRecoTrackStoreArrayName=
"CKFCDCRecoTracks",
527 outputRelationRecoTrackStoreArrayName=combined_svd_cdc_standalone_tracks,
528 writeOutDirection=
"backward",
529 stateBasicFilterParameters={
"maximalHitDistance": 0.15},
530 pathFilter=
"arc_length",
533 path.add_module(
"CDCCKFTracksCombiner",
534 CDCRecoTracksStoreArrayName=
"CKFCDCRecoTracks",
535 VXDRecoTracksStoreArrayName=combined_svd_cdc_standalone_tracks,
536 recoTracksStoreArrayName=output_reco_tracks)
538 if prune_temporary_tracks:
539 for temp_reco_track
in [combined_svd_cdc_standalone_tracks,
"CKFCDCRecoTracks"]:
540 path.add_module(
'PruneRecoTracks', storeArrayName=temp_reco_track)
543def add_svd_standalone_tracking(path,
546 svd_standalone_mode="VXDTF2",
547 reco_tracks="SVDRecoTracks",
548 add_mva_quality_indicator=False,
551 Convenience function to add the SVD standalone tracking
553 :param path: basf2 path
554 :param components: components to use, defaults to SVD
555 :param svd_clusters: Name of the SVDClusters StoreArray used for tracking
556 :param svd_standalone_mode: Which SVD standalone tracking
is used.
557 Options are
"VXDTF2",
"SVDHough",
"VXDTF2_and_SVDHough",
and "SVDHough_and_VXDTF2".
559 :param reco_tracks: In case the only SVD standalone tracking
is performed, these are the final RecoTracks,
560 otherwise it
's an intermediate StoreaArray where the SVD tracks from the SVD standalone track finding are stored, before they are merged with CDC tracks
and extended via the CKF tracking.
561 :param add_mva_quality_indicator: Add the VXDQualityEstimatorMVA module to set the quality indicator
562 property
for tracks
from VXDTF2 standalone tracking
563 (ATTENTION: Standard triplet QI of VXDTF2
is replaced
in this case
564 -> setting this option to
'True' will have some influence on the final track collection)
565 :param suffix: all names of intermediate Storearrays will have the suffix appended. Useful
in cases someone needs to
566 put several instances of track finding
in one path.
568 if svd_standalone_mode ==
"VXDTF2":
569 add_vxd_track_finding_vxdtf2(path, components=components, svd_clusters=svd_clusters, reco_tracks=reco_tracks,
570 add_mva_quality_indicator=add_mva_quality_indicator, suffix=suffix)
572 elif svd_standalone_mode ==
"SVDHough":
573 add_svd_hough_tracking(path, reco_tracks=reco_tracks, suffix=suffix)
575 elif svd_standalone_mode ==
"VXDTF2_and_SVDHough":
576 add_vxd_track_finding_vxdtf2(path,
577 components=components,
578 svd_clusters=svd_clusters,
579 nameSPTCs=
"SPTrackCands"+
"VXDTF2",
580 reco_tracks=reco_tracks+
"VXDTF2",
581 add_mva_quality_indicator=add_mva_quality_indicator,
583 add_svd_hough_tracking(path,
584 reco_tracks=reco_tracks+
"Hough",
585 svd_space_point_track_candidates=
"SPTrackCands"+
"Hough",
588 path.add_module(
'RecoTrackStoreArrayCombiner',
589 Temp1RecoTracksStoreArrayName=reco_tracks+
"VXDTF2",
590 Temp2RecoTracksStoreArrayName=reco_tracks+
"Hough",
591 recoTracksStoreArrayName=reco_tracks)
592 path.add_module(
'PruneRecoTracks', storeArrayName=reco_tracks+
"VXDTF2")
593 path.add_module(
'PruneRecoTracks', storeArrayName=reco_tracks+
"Hough")
595 elif svd_standalone_mode ==
"SVDHough_and_VXDTF2":
596 add_svd_hough_tracking(path,
597 reco_tracks=reco_tracks+
"Hough",
598 svd_space_point_track_candidates=
"SPTrackCands"+
"Hough",
600 add_vxd_track_finding_vxdtf2(path,
601 components=components,
602 svd_clusters=svd_clusters,
603 nameSPTCs=
"SPTrackCands"+
"VXDTF2",
604 reco_tracks=reco_tracks+
"VXDTF2",
605 add_mva_quality_indicator=add_mva_quality_indicator,
608 path.add_module(
'RecoTrackStoreArrayCombiner',
609 Temp1RecoTracksStoreArrayName=reco_tracks+
"Hough",
610 Temp2RecoTracksStoreArrayName=reco_tracks+
"VXDTF2",
611 recoTracksStoreArrayName=reco_tracks)
612 path.add_module(
'PruneRecoTracks', storeArrayName=reco_tracks+
"Hough")
613 path.add_module(
'PruneRecoTracks', storeArrayName=reco_tracks+
"VXDTF2")
616 raise ValueError(f
"Do not understand the svd_standalone_mode {svd_standalone_mode}")
619def add_cdc_track_finding(path, output_reco_tracks="RecoTracks", with_ca=False,
620 use_second_hits=False, add_mva_quality_indicator=True,
621 reattach_hits=False):
623 Convenience function for adding all cdc track finder modules
626 The result
is a StoreArray
with name
@param reco_tracks full of RecoTracks (
not TrackCands any more!).
627 Use the GenfitTrackCandidatesCreator Module to convert back.
629 :param path: basf2 path
630 :param output_reco_tracks: Name of the output RecoTracks. Defaults to RecoTracks.
631 :param use_second_hits: If true, the second hit information will be used
in the CDC track finding.
632 :param add_mva_quality_indicator: Add the TFCDC_TrackQualityEstimator module to set the CDC quality
633 indicator property of the CDC ``output_reco_tracks``
634 :param cdc_quality_estimator_weightfile: Weightfile identifier
for the TFCDC_TrackQualityEstimator
635 :param reattach_hits:
if true, use the ReattachCDCWireHitsToRecoTracks module at the end of the CDC track finding
636 to read hits
with bad ADC
or TOT rejected by the TFCDC_WireHitPreparer module.
639 if 'RegisterEventLevelTrackingInfo' not in path:
640 path.add_module(
'RegisterEventLevelTrackingInfo')
643 path.add_module(
"TFCDC_WireHitPreparer",
644 wirePosition=
"aligned",
645 useSecondHits=use_second_hits,
646 flightTimeEstimation=
"outwards",
648 filterParameters={
'DBPayloadName':
'trackfindingcdc_WireHitBackgroundDetectorParameters'})
651 path.add_module(
"TFCDC_ClusterPreparer",
653 ClusterFilterParameters={})
656 path.add_module(
"TFCDC_SegmentFinderFacetAutomaton",
657 SegmentRelationFilterParameters={
'DBPayloadName':
'trackfindingcdc_RealisticSegmentRelationFilterParameters'})
660 path.add_module(
"TFCDC_AxialTrackFinderLegendre")
663 path.add_module(
"TFCDC_TrackQualityAsserter",
667 path.add_module(
'TFCDC_StereoHitFinder')
670 path.add_module(
'TFCDC_SegmentTrackCombiner',
671 segmentTrackFilter=
"mva",
672 segmentTrackFilterParameters={
'DBPayloadName':
'trackfindingcdc_SegmentTrackFilterParameters'},
674 trackFilterParameters={
'DBPayloadName':
'trackfindingcdc_TrackFilterParameters'})
676 output_tracks =
"CDCTrackVector"
679 output_tracks =
"CombinedCDCTrackVector"
680 path.add_module(
"TFCDC_TrackFinderSegmentPairAutomaton",
681 tracks=
"CDCTrackVector2")
684 path.add_module(
"TFCDC_TrackCombiner",
685 inputTracks=
"CDCTrackVector",
686 secondaryInputTracks=
"CDCTrackVector2",
687 tracks=output_tracks)
690 path.add_module(
"TFCDC_TrackQualityAsserter",
691 inputTracks=output_tracks,
700 path.add_module(
"TFCDC_TrackCreatorSingleSegments",
701 inputTracks=output_tracks,
702 MinimalHitsBySuperLayerId={0: 15})
704 if add_mva_quality_indicator:
707 "TFCDC_TrackQualityEstimator",
708 inputTracks=output_tracks,
710 filterParameters={
'DBPayloadName':
'trackfindingcdc_TrackQualityEstimatorParameters'},
716 path.add_module(
"TFCDC_TrackExporter",
717 inputTracks=output_tracks,
718 RecoTracksStoreArrayName=
"CDCRecoTracksBeforeReattaching" if reattach_hits
else output_reco_tracks)
722 if 'SetupGenfitExtrapolation' not in path:
724 path.add_module(
'SetupGenfitExtrapolation')
727 path.add_module(
"ReattachCDCWireHitsToRecoTracks",
728 inputRecoTracksStoreArrayName=
"CDCRecoTracksBeforeReattaching",
729 outputRecoTracksStoreArrayName=output_reco_tracks)
732 path.add_module(
"IPTrackTimeEstimator",
733 useFittedInformation=
False,
734 recoTracksStoreArrayName=output_reco_tracks)
737 path.add_module(
"CDCHitBasedT0Extraction")
740 path.add_module(
"CDCTrackingEventLevelMdstInfoFillerFromHits")
741 path.add_module(
"CDCTrackingEventLevelMdstInfoFillerFromSegments")
744def add_eclcdc_track_finding(path, components, output_reco_tracks="RecoTracks", prune_temporary_tracks=True):
746 Convenience function for adding all track finder modules to the path that are based on ecl seeds.
748 The result
is a StoreArray
with name
@param reco_tracks full of RecoTracks.
749 Use the GenfitTrackCandidatesCreator Module to convert back.
751 :param path: basf2 path
752 :param components: the list of geometry components
in use
or None for all components.
753 :param output_reco_tracks: Name of the output RecoTracks. Defaults to RecoTracks.
754 :param pruneTracks: Delete all hits expect the first
and the last
from the found tracks.
756 if not is_cdc_used(components)
or not is_ecl_used(components):
759 ecl_cdc_reco_tracks =
"ECLCDCRecoTracks"
761 if not is_svd_used(components):
762 ecl_cdc_reco_tracks = output_reco_tracks
765 temporary_reco_track_list = []
767 path.add_module(
"ToCDCFromEclCKF",
768 inputWireHits=
"CDCWireHitVector",
769 minimalEnRequirementCluster=0.3,
770 eclSeedRecoTrackStoreArrayName=
'EclSeedRecoTracks',
771 hitFindingDirection=
"backward",
772 outputRecoTrackStoreArrayName=
"CDCRecoTracksFromEcl",
773 outputRelationRecoTrackStoreArrayName=
"EclSeedRecoTracks",
774 writeOutDirection=
"forward",
775 stateBasicFilterParameters={
"maximalHitDistance": 7.5,
"maximalHitDistanceEclSeed": 75.0},
776 stateExtrapolationFilterParameters={
"direction":
"backward"},
777 pathFilter=
"arc_length_fromEcl",
778 inputECLshowersStoreArrayName=
"ECLShowers",
779 trackFindingDirection=
"backward",
784 path.add_module(
"ToCDCCKF",
785 inputWireHits=
"CDCWireHitVector",
786 inputRecoTrackStoreArrayName=
"CDCRecoTracksFromEcl",
787 relatedRecoTrackStoreArrayName=ecl_cdc_reco_tracks,
788 relationCheckForDirection=
"backward",
789 outputRecoTrackStoreArrayName=ecl_cdc_reco_tracks,
790 outputRelationRecoTrackStoreArrayName=
"CDCRecoTracksFromEcl",
791 writeOutDirection=
"backward",
792 stateBasicFilterParameters={
"maximalHitDistance": 0.75},
793 stateExtrapolationFilterParameters={
"direction":
"forward"},
794 pathFilter=
"arc_length",
798 temporary_reco_track_list.append(
'CDCRecoTracksFromEcl')
815 if is_svd_used(components):
816 add_svd_track_finding(path, components=components, input_reco_tracks=ecl_cdc_reco_tracks,
817 output_reco_tracks=output_reco_tracks, use_mc_truth=
False,
818 svd_ckf_mode=
"only_ckf", add_both_directions=
False,
819 temporary_reco_tracks=
"ECLSVDRecoTracks", use_svd_to_cdc_ckf=
False,
820 prune_temporary_tracks=prune_temporary_tracks)
821 temporary_reco_track_list.append(ecl_cdc_reco_tracks)
822 temporary_reco_track_list.append(
'ECLSVDRecoTracks')
824 if prune_temporary_tracks:
825 for temporary_reco_track_name
in temporary_reco_track_list:
826 if temporary_reco_track_name != output_reco_tracks:
827 path.add_module(
'PruneRecoTracks', storeArrayName=temporary_reco_track_name)
830def add_cdc_cr_track_finding(path, output_reco_tracks="RecoTracks", trigger_point=(0, 0, 0), merge_tracks=
True,
831 use_second_cdc_hits=
False):
833 Convenience function for adding all cdc track finder modules currently dedicated
for the CDC-TOP testbeam
836 The result
is a StoreArray
with name
@param reco_tracks full of RecoTracks (
not TrackCands any more!).
841 The path to be filled
842 output_reco_tracks: str
843 Name of the output RecoTracks. Defaults to RecoTracks.
845 The upper
and lower half of the tracks should be merged together
in one track
846 use_second_hits: bool
847 If true, the second hit information will be used
in the CDC track finding.
851 path.add_module(
"TFCDC_WireHitPreparer",
852 useSecondHits=use_second_cdc_hits,
853 flightTimeEstimation=
"downwards",
854 filter=
"cuts_from_DB",
855 triggerPoint=trigger_point)
858 path.add_module(
"TFCDC_ClusterPreparer",
859 ClusterFilter=
"mva_bkg",
860 ClusterFilterParameters={
'DBPayloadName':
'trackfindingcdc_ClusterFilterParameters'})
863 path.add_module(
"TFCDC_SegmentFinderFacetAutomaton",
864 SegmentOrientation=
"downwards")
867 path.add_module(
"TFCDC_AxialTrackFinderLegendre")
870 path.add_module(
"TFCDC_TrackQualityAsserter",
874 path.add_module(
'TFCDC_StereoHitFinder')
877 path.add_module(
'TFCDC_SegmentTrackCombiner',
878 segmentTrackFilter=
"mva",
879 segmentTrackFilterParameters={
'DBPayloadName':
'trackfindingcdc_SegmentTrackFilterParameters'},
881 trackFilterParameters={
'DBPayloadName':
'trackfindingcdc_TrackFilterParameters'})
884 path.add_module(
"TFCDC_TrackQualityAsserter",
885 corrections=[
"LayerBreak",
"OneSuperlayer",
"Small"],
889 path.add_module(
"TFCDC_TrackOrienter",
890 inputTracks=
"CDCTrackVector",
891 tracks=
"OrientedCDCTrackVector",
892 TrackOrientation=
"downwards",
895 output_tracks =
"OrientedCDCTrackVector"
899 path.add_module(
"TFCDC_TrackLinker",
900 inputTracks=
"OrientedCDCTrackVector",
901 tracks=
"MergedCDCTrackVector",
904 output_tracks =
"MergedCDCTrackVector"
908 path.add_module(
"TFCDC_TrackFlightTimeAdjuster",
909 inputTracks=
"OrientedCDCTrackVector",
913 path.add_module(
"TFCDC_TrackExporter",
914 inputTracks=
"OrientedCDCTrackVector",
915 RecoTracksStoreArrayName=
"NonMergedRecoTracks")
918 path.add_module(
"TFCDC_TrackFlightTimeAdjuster",
919 inputTracks=output_tracks,
923 path.add_module(
"TFCDC_TrackExporter",
924 inputTracks=output_tracks,
925 RecoTracksStoreArrayName=output_reco_tracks)
928 path.add_module(
"CDCHitBasedT0Extraction")
931def add_vxd_track_finding_vxdtf2(
934 reco_tracks="RecoTracks",
935 nameSPTCs='SPTrackCands',
938 useTwoStepSelection=True,
941 custom_setup_name=None,
943 filter_overlapping=True,
944 add_mva_quality_indicator=False,
947 Convenience function for adding all vxd track finder Version 2 modules
950 The result
is a StoreArray
with name
@param reco_tracks full of RecoTracks (
not TrackCands any more!).
951 Use the GenfitTrackCandidatesCreator Module to convert back.
953 :param path: basf2 path
954 :param svd_clusters: SVDCluster collection name
955 :param reco_tracks: Name of the output RecoTracks, Defaults to RecoTracks.
956 :param nameSPTCs: Name of the SpacePointTrackCands StoreArray
957 :param components: List of the detector components to be used
in the reconstruction. Defaults to
None which means
959 :param suffix: all names of intermediate Storearrays will have the suffix appended. Useful
in cases someone needs to
960 put several instances of track finding
in one path.
961 :param useTwoStepSelection:
if True Families will be defined during path creation
and will be used to create only
962 the best candidate per family.
963 :param PXDminSVDSPs: When using PXD require at least this number of SVD SPs
for the SPTCs
964 :param sectormap_file:
if set to a finite value, a file will be used instead of the sectormap
in the database.
965 :param custom_setup_name: Set a custom setup name
for the tree
in the sector map.
966 :param min_SPTC_quality: minimal qualityIndicator value to keeps SPTCs after the QualityEstimation.
967 0 means no cut. Default: 0
968 :param filter_overlapping: Whether to use SVDOverlapResolver, Default:
True
969 :param add_mva_quality_indicator: Whether to use the MVA Quality Estimator module
for VXDTF2 tracks to set the
970 quality_indicator property of the found ``reco_tracks``. Default:
False.
977 if is_pxd_used(components):
978 setup_name =
"SVDPXDDefault"
979 db_sec_map_file =
"VXDSectorMap_v000.root"
982 setup_name =
"SVDOnlyDefault"
983 db_sec_map_file =
"SVDSectorMap_v000.root"
992 nameTrackingInfoModule =
"RegisterEventLevelTrackingInfo" + suffix
993 nameEventTrackingInfo =
"EventLevelTrackingInfo" + suffix
994 if nameTrackingInfoModule
not in path:
996 registerEventlevelTrackingInfo = register_module(
'RegisterEventLevelTrackingInfo')
997 registerEventlevelTrackingInfo.set_name(nameTrackingInfoModule)
998 registerEventlevelTrackingInfo.param(
'EventLevelTrackingInfoName', nameEventTrackingInfo)
999 path.add_module(registerEventlevelTrackingInfo)
1001 nameSPs =
'SpacePoints' + suffix
1003 pxdSPCreatorName =
'PXDSpacePointCreator' + suffix
1004 if pxdSPCreatorName
not in [e.name()
for e
in path.modules()]:
1006 spCreatorPXD = register_module(
'PXDSpacePointCreator')
1007 spCreatorPXD.set_name(pxdSPCreatorName)
1008 spCreatorPXD.param(
'NameOfInstance',
'PXDSpacePoints')
1009 spCreatorPXD.param(
'SpacePoints',
"PXD" + nameSPs)
1010 path.add_module(spCreatorPXD)
1013 secMapBootStrap = register_module(
'SectorMapBootstrap')
1014 secMapBootStrap.param(
'ReadSectorMap', sectormap_file
is not None)
1015 secMapBootStrap.param(
'ReadSecMapFromDB', sectormap_file
is None)
1016 secMapBootStrap.param(
'SectorMapsInputFile', sectormap_file
or db_sec_map_file)
1017 secMapBootStrap.param(
'SetupToRead', custom_setup_name
or setup_name)
1018 secMapBootStrap.param(
'WriteSectorMap',
False)
1019 path.add_module(secMapBootStrap)
1026 spacePointArrayNames = [
"SVD" + nameSPs]
1028 spacePointArrayNames += [
"PXD" + nameSPs]
1030 nameSegNet =
'SegmentNetwork' + suffix
1032 segNetProducer = register_module(
'SegmentNetworkProducer')
1033 segNetProducer.param(
'NetworkOutputName', nameSegNet)
1034 segNetProducer.param(
'SpacePointsArrayNames', spacePointArrayNames)
1035 segNetProducer.param(
'sectorMapName', custom_setup_name
or setup_name)
1036 segNetProducer.param(
'EventLevelTrackingInfoName', nameEventTrackingInfo)
1037 path.add_module(segNetProducer)
1047 trackFinder = register_module(
'TrackFinderVXDCellOMat')
1048 trackFinder.param(
'NetworkName', nameSegNet)
1049 trackFinder.param(
'SpacePointTrackCandArrayName', nameSPTCs)
1050 trackFinder.param(
'printNetworks',
False)
1051 trackFinder.param(
'setFamilies', useTwoStepSelection)
1052 trackFinder.param(
'selectBestPerFamily', useTwoStepSelection)
1053 trackFinder.param(
'xBestPerFamily', 30)
1054 trackFinder.param(
'EventLevelTrackingInfoName', nameEventTrackingInfo)
1055 path.add_module(trackFinder)
1057 if useTwoStepSelection:
1058 subSetModule = register_module(
'AddVXDTrackCandidateSubSets')
1059 subSetModule.param(
'NameSpacePointTrackCands', nameSPTCs)
1060 path.add_module(subSetModule)
1069 pxdSVDCut = register_module(
'PXDSVDCut')
1070 pxdSVDCut.param(
'minSVDSPs', PXDminSVDSPs)
1071 pxdSVDCut.param(
'SpacePointTrackCandsStoreArrayName', nameSPTCs)
1072 path.add_module(pxdSVDCut)
1074 if add_mva_quality_indicator:
1076 "VXDQualityEstimatorMVA",
1077 SpacePointTrackCandsStoreArrayName=nameSPTCs,
1081 'QualityEstimatorVXD',
1082 EstimationMethod=
'tripletFit',
1083 SpacePointTrackCandsStoreArrayName=nameSPTCs,
1086 if min_SPTC_quality > 0.:
1087 qualityIndicatorCutter = register_module(
'VXDTrackCandidatesQualityIndicatorCutter')
1088 qualityIndicatorCutter.param(
'minRequiredQuality', min_SPTC_quality)
1089 qualityIndicatorCutter.param(
'NameSpacePointTrackCands', nameSPTCs)
1090 path.add_module(qualityIndicatorCutter)
1093 maxCandidateSelection = register_module(
'BestVXDTrackCandidatesSelector')
1094 maxCandidateSelection.param(
'NameSpacePointTrackCands', nameSPTCs)
1095 maxCandidateSelection.param(
'NewNameSpacePointTrackCands', nameSPTCs)
1096 maxCandidateSelection.param(
'SubsetCreation',
False)
1097 path.add_module(maxCandidateSelection)
1100 vIPRemover = register_module(
'SPTCvirtualIPRemover')
1101 vIPRemover.param(
'tcArrayName', nameSPTCs)
1103 vIPRemover.param(
'maxTCLengthForVIPKeeping', 0)
1104 path.add_module(vIPRemover)
1111 if filter_overlapping:
1112 overlapResolver = register_module(
'SVDOverlapResolver')
1113 overlapResolver.param(
'NameSpacePointTrackCands', nameSPTCs)
1114 overlapResolver.param(
'ResolveMethod',
'greedy')
1115 overlapResolver.param(
'NameSVDClusters', svd_clusters)
1116 path.add_module(overlapResolver)
1123 momSeedRetriever = register_module(
'SPTCmomentumSeedRetriever')
1124 momSeedRetriever.param(
'tcArrayName', nameSPTCs)
1125 path.add_module(momSeedRetriever)
1127 converter = register_module(
'SPTC2RTConverter')
1128 converter.param(
'recoTracksStoreArrayName', reco_tracks)
1129 converter.param(
'spacePointsTCsStoreArrayName', nameSPTCs)
1130 converter.param(
'svdClustersName', svd_clusters)
1131 converter.param(
'svdHitsStoreArrayName', svd_clusters)
1132 path.add_module(converter)
1135def add_svd_hough_tracking(path,
1136 svd_space_points='SVDSpacePoints',
1137 svd_clusters='SVDClusters',
1138 reco_tracks='RecoTracks',
1139 svd_space_point_track_candidates='SPTrackCands',
1142 Convenience function to add the SVDHoughTracking to the path.
1143 :param path: The path to add the SVDHoughTracking module to.
1144 :param svd_space_points: Name of the StoreArray containing the SVDSpacePoints
1145 :param svd_clusters: Name of the StoreArray containing the SVDClusters
1146 :param reco_tracks: Name of the StoreArray containing the RecoTracks
1147 :param svd_space_point_track_candidates: Name of the StoreArray containing the SpacePointTrackCandidates
1148 :param suffix: all names of intermediate StoreArrays will have the suffix appended. Useful in cases someone needs to
1149 put several instances of track finding
in one path.
1152 path.add_module('SVDHoughTracking',
1153 SVDSpacePointStoreArrayName=svd_space_points + suffix,
1154 SVDClustersStoreArrayName=svd_clusters + suffix,
1155 finalOverlapResolverNameSVDClusters=svd_clusters + suffix,
1156 refinerOverlapResolverNameSVDClusters=svd_clusters + suffix,
1157 RecoTracksStoreArrayName=reco_tracks + suffix,
1158 SVDSpacePointTrackCandsStoreArrayName=svd_space_point_track_candidates + suffix,
1159 relationFilter=
'angleAndTime',
1160 twoHitUseNBestHits=4,
1161 threeHitUseNBestHits=3,
1162 fourHitUseNBestHits=3,
1163 fiveHitUseNBestHits=2,
1167def is_svd_used(components):
1168 """Return true, if the SVD is present in the components list"""
1169 return components
is None or 'SVD' in components
1172def is_pxd_used(components):
1173 """Return true, if the PXD is present in the components list"""
1174 return components
is None or 'PXD' in components
1177def is_cdc_used(components):
1178 """Return true, if the CDC is present in the components list"""
1179 return components
is None or 'CDC' in components
1182def is_ecl_used(components):
1183 """Return true, if the ECL is present in the components list"""
1184 return components
is None or 'ECL' in components