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 fucntion 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 Alternativly 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 adjecent 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(path, fit_tracks=True, reco_tracks="RecoTracks", trackFitHypotheses=None):
285 This function adds the mva based selections and the flipping of the recoTracks
287 :param path: The path to add the tracking reconstruction modules to
288 :param fit_tracks: fit the flipped recotracks
or not
289 :param reco_tracks: Name of the StoreArray where the reco tracks should be flipped
290 :param trackFitHypotheses: Which pdg hypothesis to fit. Defaults to [211, 321, 2212].
293 path.add_module("FlipQuality", recoTracksStoreArrayName=reco_tracks,
294 identifier=
'TRKTrackFlipAndRefit_MVA1_weightfile',
295 indexOfFlippingMVA=1).set_name(
"FlipQuality_1stMVA")
297 reco_tracks_flipped =
"RecoTracks_flipped"
298 path.add_module(
"RecoTracksReverter", inputStoreArrayName=reco_tracks,
299 outputStoreArrayName=reco_tracks_flipped)
301 path.add_module(
"DAFRecoFitter", recoTracksStoreArrayName=reco_tracks_flipped).set_name(
"Combined_DAFRecoFitter_flipped")
302 path.add_module(
"IPTrackTimeEstimator",
303 recoTracksStoreArrayName=reco_tracks_flipped, useFittedInformation=
False)
304 path.add_module(
"TrackCreator", trackColName=
"Tracks_flipped",
305 trackFitResultColName=
"TrackFitResults_flipped",
306 recoTrackColName=reco_tracks_flipped,
310 2212]
if not trackFitHypotheses
else trackFitHypotheses).set_name(
"TrackCreator_flipped")
311 path.add_module(
"FlipQuality", recoTracksStoreArrayName=reco_tracks,
312 identifier=
'TRKTrackFlipAndRefit_MVA2_weightfile',
313 indexOfFlippingMVA=2).set_name(
"FlipQuality_2ndMVA")
314 path.add_module(
"FlippedRecoTracksMerger",
315 inputStoreArrayName=reco_tracks,
316 inputStoreArrayNameFlipped=reco_tracks_flipped)
319def add_pxd_track_finding(path, components, input_reco_tracks, output_reco_tracks, use_mc_truth=False,
320 add_both_directions=False, temporary_reco_tracks="PXDRecoTracks", **kwargs):
321 """Add the pxd track finding to the path"""
322 if not is_pxd_used(components):
327 path.add_module(
"MCRecoTracksMatcher", UsePXDHits=
False,
328 UseSVDHits=is_svd_used(components), UseCDCHits=is_cdc_used(components),
329 mcRecoTracksStoreArrayName=
"MCRecoTracks",
330 prRecoTracksStoreArrayName=input_reco_tracks)
332 add_pxd_ckf(path, svd_cdc_reco_tracks=input_reco_tracks, pxd_reco_tracks=temporary_reco_tracks,
333 direction=
"backward", use_mc_truth=use_mc_truth, **kwargs)
335 if add_both_directions:
336 add_pxd_ckf(path, svd_cdc_reco_tracks=input_reco_tracks, pxd_reco_tracks=temporary_reco_tracks,
337 direction=
"forward", use_mc_truth=use_mc_truth, **kwargs)
339 path.add_module(
"RelatedTracksCombiner", CDCRecoTracksStoreArrayName=input_reco_tracks,
340 VXDRecoTracksStoreArrayName=temporary_reco_tracks, recoTracksStoreArrayName=output_reco_tracks)
343def add_pxd_cr_track_finding(path, components, input_reco_tracks, output_reco_tracks, use_mc_truth=False,
344 add_both_directions=False, temporary_reco_tracks="PXDRecoTracks", **kwargs):
345 """Add the pxd track finding to the path"""
346 if not is_pxd_used(components):
351 path.add_module(
"MCRecoTracksMatcher", UsePXDHits=
False,
352 UseSVDHits=is_svd_used(components), UseCDCHits=is_cdc_used(components),
353 mcRecoTracksStoreArrayName=
"MCRecoTracks",
354 prRecoTracksStoreArrayName=input_reco_tracks)
356 add_cosmics_pxd_ckf(path, svd_cdc_reco_tracks=input_reco_tracks, pxd_reco_tracks=temporary_reco_tracks,
357 direction=
"backward", use_mc_truth=use_mc_truth, **kwargs)
359 if add_both_directions:
360 add_cosmics_pxd_ckf(path, svd_cdc_reco_tracks=input_reco_tracks, pxd_reco_tracks=temporary_reco_tracks,
361 direction=
"forward", use_mc_truth=use_mc_truth, **kwargs)
363 path.add_module(
"RelatedTracksCombiner", CDCRecoTracksStoreArrayName=input_reco_tracks,
364 VXDRecoTracksStoreArrayName=temporary_reco_tracks, recoTracksStoreArrayName=output_reco_tracks)
367def add_svd_track_finding(
372 svd_ckf_mode="SVD_after",
374 add_both_directions=True,
375 temporary_reco_tracks="SVDRecoTracks",
376 temporary_svd_cdc_reco_tracks="SVDPlusCDCStandaloneRecoTracks",
377 use_svd_to_cdc_ckf=True,
378 prune_temporary_tracks=True,
379 add_mva_quality_indicator=False,
380 svd_standalone_mode="VXDTF2",
384 Add SVD track finding to the path.
386 :param path: The path to add the tracking reconstruction modules to
387 :param components: The list of geometry components in use
or None for all components.
388 :param input_reco_tracks: Name of the StoreArray
with the input reco tracks (usually
from CDC) that are used
in the
389 CKF track finding
and are merged
with the newly found SVD tracks into the ``output_reco_tracks``.
390 :param output_reco_tracks: Name of the StoreArray where the reco tracks outputted by the SVD track finding should be
392 :param svd_ckf_mode: String designating the mode of the CDC-to-SVD CKF, that
is how it
is combined
with the SVD
393 standalone track finding. One of
"SVD_after",
"SVD_before",
"SVD_before_with_second_ckf",
394 "only_ckf",
"SVD_alone",
"cosmics".
395 :param use_mc_truth: Add mc matching
and use the MC information
in the CKF (but
not in the VXDTF2)
396 :param add_both_directions: Whether to add the CKF
with both forward
and backward extrapolation directions instead
398 :param temporary_reco_tracks: Intermediate store array where the SVD tracks
from the SVD standalone track finding
399 are stored, before they are merged
with CDC tracks
and extended via the CKF tracking.
400 :param temporary_svd_cdc_reco_tracks: Intermediate store array where the combination of ``temporary_reco_tracks``
401 (
from SVD)
and ``input_reco_tracks`` (
from CDC standalone)
is stored, before the CKF
is applied.
402 It
is only used
if ``use_svd_to_cdc_ckf``
is true. Otherwise, the combination
is stored directly
in
403 ``output_reco_tracks``.
404 :param use_svd_to_cdc_ckf: Whether to enable the CKF extrapolation
from the SVD into the CDC.
405 That CKF application
is not affected by ``svd_ckf_mode``.
406 :param prune_temporary_tracks: Delete all hits expect the first
and last
from intermediate track objects.
407 :param add_mva_quality_indicator: Add the VXDQualityEstimatorMVA module to set the quality indicator
408 property
for tracks
from VXDTF2 standalone tracking
409 (ATTENTION: Standard triplet QI of VXDTF2
is replaced
in this case
410 -> setting this option to
'True' will have some influence on the final track collection)
411 :param svd_standalone_mode: Which SVD standalone tracking
is used.
412 Options are
"VXDTF2",
"SVDHough",
"VXDTF2_and_SVDHough",
and "SVDHough_and_VXDTF2".
416 if not is_svd_used(components):
419 if not input_reco_tracks:
421 add_svd_standalone_tracking(path, components=[
"SVD"],
422 svd_standalone_mode=svd_standalone_mode,
423 reco_tracks=output_reco_tracks,
424 add_mva_quality_indicator=add_mva_quality_indicator)
429 path.add_module(
"MCRecoTracksMatcher", UsePXDHits=
False, UseSVDHits=
False,
430 UseCDCHits=is_cdc_used(components),
431 mcRecoTracksStoreArrayName=
"MCRecoTracks",
432 prRecoTracksStoreArrayName=input_reco_tracks)
434 if svd_ckf_mode ==
"SVD_before":
435 add_svd_standalone_tracking(path, components=[
"SVD"],
436 svd_standalone_mode=svd_standalone_mode,
437 reco_tracks=temporary_reco_tracks,
438 add_mva_quality_indicator=add_mva_quality_indicator)
439 add_ckf_based_merger(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
440 use_mc_truth=use_mc_truth, direction=
"backward", **kwargs)
441 if add_both_directions:
442 add_ckf_based_merger(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
443 use_mc_truth=use_mc_truth, direction=
"forward", **kwargs)
445 elif svd_ckf_mode ==
"SVD_before_with_second_ckf":
446 add_svd_standalone_tracking(path, components=[
"SVD"],
447 svd_standalone_mode=svd_standalone_mode,
448 reco_tracks=temporary_reco_tracks,
449 add_mva_quality_indicator=add_mva_quality_indicator)
450 add_ckf_based_merger(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
451 use_mc_truth=use_mc_truth, direction=
"backward", **kwargs)
452 if add_both_directions:
453 add_ckf_based_merger(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
454 use_mc_truth=use_mc_truth, direction=
"forward", **kwargs)
455 add_svd_ckf(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_svd_ckf(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
459 use_mc_truth=use_mc_truth, direction=
"forward", **kwargs)
461 elif svd_ckf_mode ==
"only_ckf":
462 add_svd_ckf(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
463 use_mc_truth=use_mc_truth, direction=
"backward", **kwargs)
464 if add_both_directions:
465 add_svd_ckf(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
466 use_mc_truth=use_mc_truth, direction=
"forward", **kwargs)
468 elif svd_ckf_mode ==
"SVD_after":
469 add_svd_ckf(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
470 use_mc_truth=use_mc_truth, direction=
"backward", **kwargs)
471 if add_both_directions:
472 add_svd_ckf(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
473 use_mc_truth=use_mc_truth, direction=
"forward", **kwargs)
475 add_svd_standalone_tracking(path, components=[
"SVD"],
476 svd_standalone_mode=svd_standalone_mode,
477 reco_tracks=temporary_reco_tracks,
478 add_mva_quality_indicator=add_mva_quality_indicator)
479 add_ckf_based_merger(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
480 use_mc_truth=use_mc_truth, direction=
"backward", **kwargs)
481 if add_both_directions:
482 add_ckf_based_merger(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
483 use_mc_truth=use_mc_truth, direction=
"forward", **kwargs)
485 elif svd_ckf_mode ==
"SVD_alone":
486 add_svd_standalone_tracking(path, components=[
"SVD"],
487 svd_standalone_mode=svd_standalone_mode,
488 reco_tracks=temporary_reco_tracks,
489 add_mva_quality_indicator=add_mva_quality_indicator)
490 path.add_module(
'VXDCDCTrackMerger',
491 CDCRecoTrackColName=input_reco_tracks,
492 VXDRecoTrackColName=temporary_reco_tracks)
494 elif svd_ckf_mode ==
"cosmics":
495 add_cosmics_svd_ckf(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
496 use_mc_truth=use_mc_truth, direction=
"backward", **kwargs)
497 if add_both_directions:
498 add_cosmics_svd_ckf(path, cdc_reco_tracks=input_reco_tracks, svd_reco_tracks=temporary_reco_tracks,
499 use_mc_truth=use_mc_truth, direction=
"forward", **kwargs)
502 raise ValueError(f
"Do not understand the svd_ckf_mode {svd_ckf_mode}")
504 if use_svd_to_cdc_ckf:
505 combined_svd_cdc_standalone_tracks = temporary_svd_cdc_reco_tracks
507 combined_svd_cdc_standalone_tracks = output_reco_tracks
510 path.add_module(
"RelatedTracksCombiner", VXDRecoTracksStoreArrayName=temporary_reco_tracks,
511 CDCRecoTracksStoreArrayName=input_reco_tracks,
512 recoTracksStoreArrayName=combined_svd_cdc_standalone_tracks)
514 if use_svd_to_cdc_ckf:
515 path.add_module(
"ToCDCCKF",
516 inputWireHits=
"CDCWireHitVector",
517 inputRecoTrackStoreArrayName=combined_svd_cdc_standalone_tracks,
518 relatedRecoTrackStoreArrayName=
"CKFCDCRecoTracks",
519 relationCheckForDirection=
"backward",
520 ignoreTracksWithCDChits=
True,
521 outputRecoTrackStoreArrayName=
"CKFCDCRecoTracks",
522 outputRelationRecoTrackStoreArrayName=combined_svd_cdc_standalone_tracks,
523 writeOutDirection=
"backward",
524 stateBasicFilterParameters={
"maximalHitDistance": 0.15},
525 pathFilter=
"arc_length",
528 path.add_module(
"CDCCKFTracksCombiner",
529 CDCRecoTracksStoreArrayName=
"CKFCDCRecoTracks",
530 VXDRecoTracksStoreArrayName=combined_svd_cdc_standalone_tracks,
531 recoTracksStoreArrayName=output_reco_tracks)
533 if prune_temporary_tracks:
534 for temp_reco_track
in [combined_svd_cdc_standalone_tracks,
"CKFCDCRecoTracks"]:
535 path.add_module(
'PruneRecoTracks', storeArrayName=temp_reco_track)
538def add_svd_standalone_tracking(path,
541 svd_standalone_mode="VXDTF2",
542 reco_tracks="SVDRecoTracks",
543 add_mva_quality_indicator=False,
546 Convenience function to add the SVD standalone tracking
548 :param path: basf2 path
549 :param components: components to use, defaults to SVD
550 :param svd_clusters: Name of the SVDClusters StoreArray used for tracking
551 :param svd_standalone_mode: Which SVD standalone tracking
is used.
552 Options are
"VXDTF2",
"SVDHough",
"VXDTF2_and_SVDHough",
and "SVDHough_and_VXDTF2".
554 :param reco_tracks: In case the only SVD standalone tracking
is performed, these are the final RecoTracks,
555 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.
556 :param add_mva_quality_indicator: Add the VXDQualityEstimatorMVA module to set the quality indicator
557 property
for tracks
from VXDTF2 standalone tracking
558 (ATTENTION: Standard triplet QI of VXDTF2
is replaced
in this case
559 -> setting this option to
'True' will have some influence on the final track collection)
560 :param suffix: all names of intermediate Storearrays will have the suffix appended. Useful
in cases someone needs to
561 put several instances of track finding
in one path.
563 if svd_standalone_mode ==
"VXDTF2":
564 add_vxd_track_finding_vxdtf2(path, components=components, svd_clusters=svd_clusters, reco_tracks=reco_tracks,
565 add_mva_quality_indicator=add_mva_quality_indicator, suffix=suffix)
567 elif svd_standalone_mode ==
"SVDHough":
568 add_svd_hough_tracking(path, reco_tracks=reco_tracks, suffix=suffix)
570 elif svd_standalone_mode ==
"VXDTF2_and_SVDHough":
571 add_vxd_track_finding_vxdtf2(path,
572 components=components,
573 svd_clusters=svd_clusters,
574 nameSPTCs=
"SPTrackCands"+
"VXDTF2",
575 reco_tracks=reco_tracks+
"VXDTF2",
576 add_mva_quality_indicator=add_mva_quality_indicator,
578 add_svd_hough_tracking(path,
579 reco_tracks=reco_tracks+
"Hough",
580 svd_space_point_track_candidates=
"SPTrackCands"+
"Hough",
583 path.add_module(
'RecoTrackStoreArrayCombiner',
584 Temp1RecoTracksStoreArrayName=reco_tracks+
"VXDTF2",
585 Temp2RecoTracksStoreArrayName=reco_tracks+
"Hough",
586 recoTracksStoreArrayName=reco_tracks)
587 path.add_module(
'PruneRecoTracks', storeArrayName=reco_tracks+
"VXDTF2")
588 path.add_module(
'PruneRecoTracks', storeArrayName=reco_tracks+
"Hough")
590 elif svd_standalone_mode ==
"SVDHough_and_VXDTF2":
591 add_svd_hough_tracking(path,
592 reco_tracks=reco_tracks+
"Hough",
593 svd_space_point_track_candidates=
"SPTrackCands"+
"Hough",
595 add_vxd_track_finding_vxdtf2(path,
596 components=components,
597 svd_clusters=svd_clusters,
598 nameSPTCs=
"SPTrackCands"+
"VXDTF2",
599 reco_tracks=reco_tracks+
"VXDTF2",
600 add_mva_quality_indicator=add_mva_quality_indicator,
603 path.add_module(
'RecoTrackStoreArrayCombiner',
604 Temp1RecoTracksStoreArrayName=reco_tracks+
"Hough",
605 Temp2RecoTracksStoreArrayName=reco_tracks+
"VXDTF2",
606 recoTracksStoreArrayName=reco_tracks)
607 path.add_module(
'PruneRecoTracks', storeArrayName=reco_tracks+
"Hough")
608 path.add_module(
'PruneRecoTracks', storeArrayName=reco_tracks+
"VXDTF2")
611 raise ValueError(f
"Do not understand the svd_standalone_mode {svd_standalone_mode}")
614def add_cdc_track_finding(path, output_reco_tracks="RecoTracks", with_ca=False,
615 use_second_hits=False, add_mva_quality_indicator=True,
616 reattach_hits=False):
618 Convenience function for adding all cdc track finder modules
621 The result
is a StoreArray
with name
@param reco_tracks full of RecoTracks (
not TrackCands any more!).
622 Use the GenfitTrackCandidatesCreator Module to convert back.
624 :param path: basf2 path
625 :param output_reco_tracks: Name of the output RecoTracks. Defaults to RecoTracks.
626 :param use_second_hits: If true, the second hit information will be used
in the CDC track finding.
627 :param add_mva_quality_indicator: Add the TFCDC_TrackQualityEstimator module to set the CDC quality
628 indicator property of the CDC ``output_reco_tracks``
629 :param cdc_quality_estimator_weightfile: Weightfile identifier
for the TFCDC_TrackQualityEstimator
630 :param reattach_hits:
if true, use the ReattachCDCWireHitsToRecoTracks module at the end of the CDC track finding
631 to readd hits
with bad ADC
or TOT rejected by the TFCDC_WireHitPreparer module.
634 if 'RegisterEventLevelTrackingInfo' not in path:
635 path.add_module(
'RegisterEventLevelTrackingInfo')
638 path.add_module(
"TFCDC_WireHitPreparer",
639 wirePosition=
"aligned",
640 useSecondHits=use_second_hits,
641 flightTimeEstimation=
"outwards",
643 filterParameters={
'DBPayloadName':
'trackfindingcdc_WireHitBackgroundDetectorParameters'})
646 path.add_module(
"TFCDC_ClusterPreparer",
648 ClusterFilterParameters={})
651 path.add_module(
"TFCDC_SegmentFinderFacetAutomaton",
652 SegmentRelationFilterParameters={
'DBPayloadName':
'trackfindingcdc_RealisticSegmentRelationFilterParameters'})
655 path.add_module(
"TFCDC_AxialTrackFinderLegendre")
658 path.add_module(
"TFCDC_TrackQualityAsserter",
662 path.add_module(
'TFCDC_StereoHitFinder')
665 path.add_module(
'TFCDC_SegmentTrackCombiner',
666 segmentTrackFilter=
"mva",
667 segmentTrackFilterParameters={
'DBPayloadName':
'trackfindingcdc_SegmentTrackFilterParameters'},
669 trackFilterParameters={
'DBPayloadName':
'trackfindingcdc_TrackFilterParameters'})
671 output_tracks =
"CDCTrackVector"
674 output_tracks =
"CombinedCDCTrackVector"
675 path.add_module(
"TFCDC_TrackFinderSegmentPairAutomaton",
676 tracks=
"CDCTrackVector2")
679 path.add_module(
"TFCDC_TrackCombiner",
680 inputTracks=
"CDCTrackVector",
681 secondaryInputTracks=
"CDCTrackVector2",
682 tracks=output_tracks)
685 path.add_module(
"TFCDC_TrackQualityAsserter",
686 inputTracks=output_tracks,
695 path.add_module(
"TFCDC_TrackCreatorSingleSegments",
696 inputTracks=output_tracks,
697 MinimalHitsBySuperLayerId={0: 15})
699 if add_mva_quality_indicator:
702 "TFCDC_TrackQualityEstimator",
703 inputTracks=output_tracks,
705 filterParameters={
'DBPayloadName':
'trackfindingcdc_TrackQualityEstimatorParameters'},
711 path.add_module(
"TFCDC_TrackExporter",
712 inputTracks=output_tracks,
713 RecoTracksStoreArrayName=
"CDCRecoTracksBeforeReattaching" if reattach_hits
else output_reco_tracks)
717 if 'SetupGenfitExtrapolation' not in path:
719 path.add_module(
'SetupGenfitExtrapolation')
722 path.add_module(
"ReattachCDCWireHitsToRecoTracks",
723 inputRecoTracksStoreArrayName=
"CDCRecoTracksBeforeReattaching",
724 outputRecoTracksStoreArrayName=output_reco_tracks)
727 path.add_module(
"IPTrackTimeEstimator",
728 useFittedInformation=
False,
729 recoTracksStoreArrayName=output_reco_tracks)
732 path.add_module(
"CDCHitBasedT0Extraction")
735 path.add_module(
"CDCTrackingEventLevelMdstInfoFiller")
738def add_eclcdc_track_finding(path, components, output_reco_tracks="RecoTracks", prune_temporary_tracks=True):
740 Convenience function for adding all track finder modules to the path that are based on ecl seeds.
742 The result
is a StoreArray
with name
@param reco_tracks full of RecoTracks.
743 Use the GenfitTrackCandidatesCreator Module to convert back.
745 :param path: basf2 path
746 :param components: the list of geometry components
in use
or None for all components.
747 :param output_reco_tracks: Name of the output RecoTracks. Defaults to RecoTracks.
748 :param pruneTracks: Delete all hits expect the first
and the last
from the found tracks.
750 if not is_cdc_used(components)
or not is_ecl_used(components):
753 ecl_cdc_reco_tracks =
"ECLCDCRecoTracks"
755 if not is_svd_used(components):
756 ecl_cdc_reco_tracks = output_reco_tracks
759 temporary_reco_track_list = []
761 path.add_module(
"ToCDCFromEclCKF",
762 inputWireHits=
"CDCWireHitVector",
763 minimalEnRequirementCluster=0.3,
764 eclSeedRecoTrackStoreArrayName=
'EclSeedRecoTracks',
765 hitFindingDirection=
"backward",
766 outputRecoTrackStoreArrayName=
"CDCRecoTracksFromEcl",
767 outputRelationRecoTrackStoreArrayName=
"EclSeedRecoTracks",
768 writeOutDirection=
"forward",
769 stateBasicFilterParameters={
"maximalHitDistance": 7.5,
"maximalHitDistanceEclSeed": 75.0},
770 stateExtrapolationFilterParameters={
"direction":
"backward"},
771 pathFilter=
"arc_length_fromEcl",
772 inputECLshowersStoreArrayName=
"ECLShowers",
773 trackFindingDirection=
"backward",
778 path.add_module(
"ToCDCCKF",
779 inputWireHits=
"CDCWireHitVector",
780 inputRecoTrackStoreArrayName=
"CDCRecoTracksFromEcl",
781 relatedRecoTrackStoreArrayName=ecl_cdc_reco_tracks,
782 relationCheckForDirection=
"backward",
783 outputRecoTrackStoreArrayName=ecl_cdc_reco_tracks,
784 outputRelationRecoTrackStoreArrayName=
"CDCRecoTracksFromEcl",
785 writeOutDirection=
"backward",
786 stateBasicFilterParameters={
"maximalHitDistance": 0.75},
787 stateExtrapolationFilterParameters={
"direction":
"forward"},
788 pathFilter=
"arc_length",
792 temporary_reco_track_list.append(
'CDCRecoTracksFromEcl')
809 if is_svd_used(components):
810 add_svd_track_finding(path, components=components, input_reco_tracks=ecl_cdc_reco_tracks,
811 output_reco_tracks=output_reco_tracks, use_mc_truth=
False,
812 svd_ckf_mode=
"only_ckf", add_both_directions=
False,
813 temporary_reco_tracks=
"ECLSVDRecoTracks", use_svd_to_cdc_ckf=
False,
814 prune_temporary_tracks=prune_temporary_tracks)
815 temporary_reco_track_list.append(ecl_cdc_reco_tracks)
816 temporary_reco_track_list.append(
'ECLSVDRecoTracks')
818 if prune_temporary_tracks:
819 for temporary_reco_track_name
in temporary_reco_track_list:
820 if temporary_reco_track_name != output_reco_tracks:
821 path.add_module(
'PruneRecoTracks', storeArrayName=temporary_reco_track_name)
824def add_cdc_cr_track_finding(path, output_reco_tracks="RecoTracks", trigger_point=(0, 0, 0), merge_tracks=
True,
825 use_second_cdc_hits=
False):
827 Convenience function for adding all cdc track finder modules currently dedicated
for the CDC-TOP testbeam
830 The result
is a StoreArray
with name
@param reco_tracks full of RecoTracks (
not TrackCands any more!).
835 The path to be filled
836 output_reco_tracks: str
837 Name of the output RecoTracks. Defaults to RecoTracks.
839 The upper
and lower half of the tracks should be merged together
in one track
840 use_second_hits: bool
841 If true, the second hit information will be used
in the CDC track finding.
845 path.add_module(
"TFCDC_WireHitPreparer",
846 useSecondHits=use_second_cdc_hits,
847 flightTimeEstimation=
"downwards",
848 filter=
"cuts_from_DB",
849 triggerPoint=trigger_point)
852 path.add_module(
"TFCDC_ClusterPreparer",
853 ClusterFilter=
"mva_bkg",
854 ClusterFilterParameters={
'DBPayloadName':
'trackfindingcdc_ClusterFilterParameters'})
857 path.add_module(
"TFCDC_SegmentFinderFacetAutomaton",
858 SegmentOrientation=
"downwards")
861 path.add_module(
"TFCDC_AxialTrackFinderLegendre")
864 path.add_module(
"TFCDC_TrackQualityAsserter",
868 path.add_module(
'TFCDC_StereoHitFinder')
871 path.add_module(
'TFCDC_SegmentTrackCombiner',
872 segmentTrackFilter=
"mva",
873 segmentTrackFilterParameters={
'DBPayloadName':
'trackfindingcdc_SegmentTrackFilterParameters'},
875 trackFilterParameters={
'DBPayloadName':
'trackfindingcdc_TrackFilterParameters'})
878 path.add_module(
"TFCDC_TrackQualityAsserter",
879 corrections=[
"LayerBreak",
"OneSuperlayer",
"Small"],
883 path.add_module(
"TFCDC_TrackOrienter",
884 inputTracks=
"CDCTrackVector",
885 tracks=
"OrientedCDCTrackVector",
886 TrackOrientation=
"downwards",
889 output_tracks =
"OrientedCDCTrackVector"
893 path.add_module(
"TFCDC_TrackLinker",
894 inputTracks=
"OrientedCDCTrackVector",
895 tracks=
"MergedCDCTrackVector",
898 output_tracks =
"MergedCDCTrackVector"
902 path.add_module(
"TFCDC_TrackFlightTimeAdjuster",
903 inputTracks=
"OrientedCDCTrackVector",
907 path.add_module(
"TFCDC_TrackExporter",
908 inputTracks=
"OrientedCDCTrackVector",
909 RecoTracksStoreArrayName=
"NonMergedRecoTracks")
912 path.add_module(
"TFCDC_TrackFlightTimeAdjuster",
913 inputTracks=output_tracks,
917 path.add_module(
"TFCDC_TrackExporter",
918 inputTracks=output_tracks,
919 RecoTracksStoreArrayName=output_reco_tracks)
922 path.add_module(
"CDCHitBasedT0Extraction")
925def add_vxd_track_finding_vxdtf2(
928 reco_tracks="RecoTracks",
929 nameSPTCs='SPTrackCands',
932 useTwoStepSelection=True,
935 custom_setup_name=None,
937 filter_overlapping=True,
938 add_mva_quality_indicator=False,
941 Convenience function for adding all vxd track finder Version 2 modules
944 The result
is a StoreArray
with name
@param reco_tracks full of RecoTracks (
not TrackCands any more!).
945 Use the GenfitTrackCandidatesCreator Module to convert back.
947 :param path: basf2 path
948 :param svd_clusters: SVDCluster collection name
949 :param reco_tracks: Name of the output RecoTracks, Defaults to RecoTracks.
950 :param nameSPTCs: Name of the SpacePointTrackCands StoreArray
951 :param components: List of the detector components to be used
in the reconstruction. Defaults to
None which means
953 :param suffix: all names of intermediate Storearrays will have the suffix appended. Useful
in cases someone needs to
954 put several instances of track finding
in one path.
955 :param useTwoStepSelection:
if True Families will be defined during path creation
and will be used to create only
956 the best candidate per family.
957 :param PXDminSVDSPs: When using PXD require at least this number of SVD SPs
for the SPTCs
958 :param sectormap_file:
if set to a finite value, a file will be used instead of the sectormap
in the database.
959 :param custom_setup_name: Set a custom setup name
for the tree
in the sector map.
960 :param min_SPTC_quality: minimal qualityIndicator value to keeps SPTCs after the QualityEstimation.
961 0 means no cut. Default: 0
962 :param filter_overlapping: Whether to use SVDOverlapResolver, Default:
True
963 :param add_mva_quality_indicator: Whether to use the MVA Quality Estimator module
for VXDTF2 tracks to set the
964 quality_indicator property of the found ``reco_tracks``. Default:
False.
971 if is_pxd_used(components):
972 setup_name =
"SVDPXDDefault"
973 db_sec_map_file =
"VXDSectorMap_v000.root"
976 setup_name =
"SVDOnlyDefault"
977 db_sec_map_file =
"SVDSectorMap_v000.root"
986 nameTrackingInfoModule =
"RegisterEventLevelTrackingInfo" + suffix
987 nameEventTrackingInfo =
"EventLevelTrackingInfo" + suffix
988 if nameTrackingInfoModule
not in path:
990 registerEventlevelTrackingInfo = register_module(
'RegisterEventLevelTrackingInfo')
991 registerEventlevelTrackingInfo.set_name(nameTrackingInfoModule)
992 registerEventlevelTrackingInfo.param(
'EventLevelTrackingInfoName', nameEventTrackingInfo)
993 path.add_module(registerEventlevelTrackingInfo)
995 nameSPs =
'SpacePoints' + suffix
997 pxdSPCreatorName =
'PXDSpacePointCreator' + suffix
998 if pxdSPCreatorName
not in [e.name()
for e
in path.modules()]:
1000 spCreatorPXD = register_module(
'PXDSpacePointCreator')
1001 spCreatorPXD.set_name(pxdSPCreatorName)
1002 spCreatorPXD.param(
'NameOfInstance',
'PXDSpacePoints')
1003 spCreatorPXD.param(
'SpacePoints',
"PXD" + nameSPs)
1004 path.add_module(spCreatorPXD)
1007 secMapBootStrap = register_module(
'SectorMapBootstrap')
1008 secMapBootStrap.param(
'ReadSectorMap', sectormap_file
is not None)
1009 secMapBootStrap.param(
'ReadSecMapFromDB', sectormap_file
is None)
1010 secMapBootStrap.param(
'SectorMapsInputFile', sectormap_file
or db_sec_map_file)
1011 secMapBootStrap.param(
'SetupToRead', custom_setup_name
or setup_name)
1012 secMapBootStrap.param(
'WriteSectorMap',
False)
1013 path.add_module(secMapBootStrap)
1020 spacePointArrayNames = [
"SVD" + nameSPs]
1022 spacePointArrayNames += [
"PXD" + nameSPs]
1024 nameSegNet =
'SegmentNetwork' + suffix
1026 segNetProducer = register_module(
'SegmentNetworkProducer')
1027 segNetProducer.param(
'NetworkOutputName', nameSegNet)
1028 segNetProducer.param(
'SpacePointsArrayNames', spacePointArrayNames)
1029 segNetProducer.param(
'sectorMapName', custom_setup_name
or setup_name)
1030 segNetProducer.param(
'EventLevelTrackingInfoName', nameEventTrackingInfo)
1031 path.add_module(segNetProducer)
1041 trackFinder = register_module(
'TrackFinderVXDCellOMat')
1042 trackFinder.param(
'NetworkName', nameSegNet)
1043 trackFinder.param(
'SpacePointTrackCandArrayName', nameSPTCs)
1044 trackFinder.param(
'printNetworks',
False)
1045 trackFinder.param(
'setFamilies', useTwoStepSelection)
1046 trackFinder.param(
'selectBestPerFamily', useTwoStepSelection)
1047 trackFinder.param(
'xBestPerFamily', 30)
1048 trackFinder.param(
'EventLevelTrackingInfoName', nameEventTrackingInfo)
1049 path.add_module(trackFinder)
1051 if useTwoStepSelection:
1052 subSetModule = register_module(
'AddVXDTrackCandidateSubSets')
1053 subSetModule.param(
'NameSpacePointTrackCands', nameSPTCs)
1054 path.add_module(subSetModule)
1063 pxdSVDCut = register_module(
'PXDSVDCut')
1064 pxdSVDCut.param(
'minSVDSPs', PXDminSVDSPs)
1065 pxdSVDCut.param(
'SpacePointTrackCandsStoreArrayName', nameSPTCs)
1066 path.add_module(pxdSVDCut)
1068 if add_mva_quality_indicator:
1070 "VXDQualityEstimatorMVA",
1071 SpacePointTrackCandsStoreArrayName=nameSPTCs,
1075 'QualityEstimatorVXD',
1076 EstimationMethod=
'tripletFit',
1077 SpacePointTrackCandsStoreArrayName=nameSPTCs,
1080 if min_SPTC_quality > 0.:
1081 qualityIndicatorCutter = register_module(
'VXDTrackCandidatesQualityIndicatorCutter')
1082 qualityIndicatorCutter.param(
'minRequiredQuality', min_SPTC_quality)
1083 qualityIndicatorCutter.param(
'NameSpacePointTrackCands', nameSPTCs)
1084 path.add_module(qualityIndicatorCutter)
1087 maxCandidateSelection = register_module(
'BestVXDTrackCandidatesSelector')
1088 maxCandidateSelection.param(
'NameSpacePointTrackCands', nameSPTCs)
1089 maxCandidateSelection.param(
'NewNameSpacePointTrackCands', nameSPTCs)
1090 maxCandidateSelection.param(
'SubsetCreation',
False)
1091 path.add_module(maxCandidateSelection)
1094 vIPRemover = register_module(
'SPTCvirtualIPRemover')
1095 vIPRemover.param(
'tcArrayName', nameSPTCs)
1097 vIPRemover.param(
'maxTCLengthForVIPKeeping', 0)
1098 path.add_module(vIPRemover)
1105 if filter_overlapping:
1106 overlapResolver = register_module(
'SVDOverlapResolver')
1107 overlapResolver.param(
'NameSpacePointTrackCands', nameSPTCs)
1108 overlapResolver.param(
'ResolveMethod',
'greedy')
1109 overlapResolver.param(
'NameSVDClusters', svd_clusters)
1110 path.add_module(overlapResolver)
1117 momSeedRetriever = register_module(
'SPTCmomentumSeedRetriever')
1118 momSeedRetriever.param(
'tcArrayName', nameSPTCs)
1119 path.add_module(momSeedRetriever)
1121 converter = register_module(
'SPTC2RTConverter')
1122 converter.param(
'recoTracksStoreArrayName', reco_tracks)
1123 converter.param(
'spacePointsTCsStoreArrayName', nameSPTCs)
1124 converter.param(
'svdClustersName', svd_clusters)
1125 converter.param(
'svdHitsStoreArrayName', svd_clusters)
1126 path.add_module(converter)
1129def add_svd_hough_tracking(path,
1130 svd_space_points='SVDSpacePoints',
1131 svd_clusters='SVDClusters',
1132 reco_tracks='RecoTracks',
1133 svd_space_point_track_candidates='SPTrackCands',
1136 Convenience function to add the SVDHoughTracking to the path.
1137 :param path: The path to add the SVDHoughTracking module to.
1138 :param svd_space_points: Name of the StoreArray containing the SVDSpacePoints
1139 :param svd_clusters: Name of the StoreArray containing the SVDClusters
1140 :param reco_tracks: Name of the StoreArray containing the RecoTracks
1141 :param svd_space_point_track_candidates: Name of the StoreArray containing the SpacePointTrackCandidates
1142 :param suffix: all names of intermediate StoreArrays will have the suffix appended. Useful in cases someone needs to
1143 put several instances of track finding
in one path.
1146 path.add_module('SVDHoughTracking',
1147 SVDSpacePointStoreArrayName=svd_space_points + suffix,
1148 SVDClustersStoreArrayName=svd_clusters + suffix,
1149 finalOverlapResolverNameSVDClusters=svd_clusters + suffix,
1150 refinerOverlapResolverNameSVDClusters=svd_clusters + suffix,
1151 RecoTracksStoreArrayName=reco_tracks + suffix,
1152 SVDSpacePointTrackCandsStoreArrayName=svd_space_point_track_candidates + suffix,
1153 relationFilter=
'angleAndTime',
1154 twoHitUseNBestHits=4,
1155 threeHitUseNBestHits=3,
1156 fourHitUseNBestHits=3,
1157 fiveHitUseNBestHits=2,
1161def is_svd_used(components):
1162 """Return true, if the SVD is present in the components list"""
1163 return components
is None or 'SVD' in components
1166def is_pxd_used(components):
1167 """Return true, if the PXD is present in the components list"""
1168 return components
is None or 'PXD' in components
1171def is_cdc_used(components):
1172 """Return true, if the CDC is present in the components list"""
1173 return components
is None or 'CDC' in components
1176def is_ecl_used(components):
1177 """Return true, if the ECL is present in the components list"""
1178 return components
is None or 'ECL' in components