Belle II Software  release-06-01-15
pr_side_module.py
1 
8 
9 import ROOT
10 from ROOT import Belle2
11 
12 
13 import numpy as np
14 
15 import tracking.harvest.harvesting as harvesting
16 import tracking.harvest.refiners as refiners
17 import tracking.validation.utilities as utilities
18 
19 from tracking.validation.utilities import getObjectList
20 
21 import tracking.harvest.peelers as peelers
22 ROOT.gSystem.Load("libtracking")
23 
24 
25 class PRSideTrackingValidationModule(harvesting.HarvestingModule):
26  """Module to collect matching information about the found particles and to generate
27  validation plots and figures of merit on the performance of track finding."""
28 
29  """ Expert level behavior:
30  expert_level <= default_expert_level: all figures and plots from this module except tree entries
31  expert_level > default_expert_level: everything including tree entries
32  """
33 
34  default_expert_level = 10
35 
36  def __init__(
37  self,
38  name,
39  contact,
40  output_file_name=None,
41  reco_tracks_name='RecoTracks',
42  mc_reco_tracks_name='MCRecoTracks',
43  expert_level=None):
44  """Constructor"""
45 
46  output_file_name = output_file_name or name + 'TrackingValidation.root'
47  super().__init__(foreach=reco_tracks_name,
48  name=name,
49  contact=contact,
50  output_file_name=output_file_name,
51  expert_level=expert_level)
52 
53 
54  self.reco_tracks_namereco_tracks_name = reco_tracks_name
55 
56 
57  self.mc_reco_tracks_namemc_reco_tracks_name = mc_reco_tracks_name
58 
59 
60  self.track_match_look_uptrack_match_look_up = None
61 
62 
63  self.mc_reco_tracks_det_hit_idsmc_reco_tracks_det_hit_ids = []
64 
65 
67 
68  def initialize(self):
69  """Receive signal at the start of event processing"""
70  super().initialize()
71  self.track_match_look_uptrack_match_look_up = Belle2.TrackMatchLookUp(self.mc_reco_tracks_namemc_reco_tracks_name,
72  self.reco_tracks_namereco_tracks_name)
73 
74  def prepare(self):
75  """Called once at the start of each event"""
76  super().prepare()
77  mc_reco_tracks = Belle2.PyStoreArray(self.mc_reco_tracks_namemc_reco_tracks_name)
78  mc_reco_tracks_det_hit_ids = []
79 
80  for mc_reco_track in mc_reco_tracks:
81  mc_reco_track_det_hit_ids = utilities.get_det_hit_ids(mc_reco_track)
82  mc_reco_tracks_det_hit_ids.append(mc_reco_track_det_hit_ids)
83 
84  self.mc_reco_tracks_det_hit_idsmc_reco_tracks_det_hit_ids = mc_reco_tracks_det_hit_ids
85 
86  self.mc_hit_lookupmc_hit_lookup.fill()
87 
88  def pick(self, reco_track):
89  """Method to filter the track candidates to reject part of them"""
90  return True
91 
92  def peel(self, reco_track):
93  """Looks at the individual pattern recognition tracks and store information about them"""
94  track_match_look_up = self.track_match_look_uptrack_match_look_up
95 
96  # Matching information
97  mc_reco_track = track_match_look_up.getRelatedMCRecoTrack(reco_track)
98  mc_particle = track_match_look_up.getRelatedMCParticle(reco_track)
99  mc_particle_crops = peelers.peel_mc_particle(mc_particle)
100 
101  hit_content_crops = peelers.peel_reco_track_hit_content(reco_track)
102 
103  pr_to_mc_match_info_crops = self.peel_pr_to_mc_match_infopeel_pr_to_mc_match_info(reco_track)
104 
105  # Peel function to get hit purity of subdetectors
106  subdetector_hit_purity_crops = peelers.peel_subdetector_hit_purity(reco_track, mc_reco_track)
107 
108  # Information on TrackFinders
109  trackfinder_crops = peelers.peel_trackfinder(reco_track)
110 
111  # Basic peel function to get Quality Indicators
112  qualityindicator_crops = peelers.peel_quality_indicators(reco_track)
113 
114  # Get the fit results
115  seed_fit_crops = peelers.peel_reco_track_seed(reco_track)
116 
117  fit_result = track_match_look_up.getRelatedTrackFitResult(reco_track)
118  fit_crops = peelers.peel_track_fit_result(fit_result)
119  fit_status_crops = peelers.peel_fit_status(reco_track)
120 
121  correct_rl_information = sum(peelers.is_correct_rl_information(cdc_hit, reco_track, self.mc_hit_lookupmc_hit_lookup)
122  for cdc_hit in getObjectList(reco_track.getCDCHitList()))
123 
124  crops = dict(
125  correct_rl_information=correct_rl_information,
126  **mc_particle_crops,
127  **hit_content_crops,
128  **pr_to_mc_match_info_crops,
129  **subdetector_hit_purity_crops, # Custom
130  **trackfinder_crops,
131  **qualityindicator_crops,
132  **seed_fit_crops,
133  **fit_crops,
134  **fit_status_crops,
135  )
136 
137  if self.expert_level >= self.default_expert_leveldefault_expert_level:
138 
139  # Event Info
140  event_meta_data = Belle2.PyStoreObj("EventMetaData")
141  event_crops = peelers.peel_event_info(event_meta_data)
142 
143  # Store Array for easier joining
144  store_array_crops = peelers.peel_store_array_info(reco_track, key="pr_{part_name}")
145  mc_store_array_crops = peelers.peel_store_array_info(mc_reco_track, key="mc_{part_name}")
146 
147  # Information on PR reco track
148  mc_efficiency_information = {
149  "mc_hit_efficiency": track_match_look_up.getRelatedEfficiency(mc_reco_track) if mc_reco_track else float("nan"),
150  **peelers.peel_subdetector_hit_efficiency(reco_track=reco_track, mc_reco_track=mc_reco_track,
151  key="mc_{part_name}")
152  }
153 
154  crops.update(
155  **event_crops,
156  **store_array_crops,
157  **mc_store_array_crops,
158  **mc_efficiency_information
159  )
160 
161  return crops
162 
163  def peel_pr_to_mc_match_info(self, reco_track):
164  """Extracts track-match information from the MCMatcherTracksModule results"""
165  track_match_look_up = self.track_match_look_uptrack_match_look_up
166  is_matched = track_match_look_up.isMatchedPRRecoTrack(reco_track)
167  is_clone = track_match_look_up.isClonePRRecoTrack(reco_track)
168  is_background = track_match_look_up.isBackgroundPRRecoTrack(reco_track)
169  is_ghost = track_match_look_up.isGhostPRRecoTrack(reco_track)
170 
171  reco_track_det_hit_ids = utilities.get_det_hit_ids(reco_track)
172  n_intersecting_mc_tracks = 0
173  for mc_reco_track_det_hit_ids in self.mc_reco_tracks_det_hit_idsmc_reco_tracks_det_hit_ids:
174  intersects = len(mc_reco_track_det_hit_ids & reco_track_det_hit_ids) > 0
175  if intersects:
176  n_intersecting_mc_tracks += 1
177 
178  mc_particle = track_match_look_up.getRelatedMCParticle(reco_track)
179  mc_is_primary = False
180  if mc_particle:
181  mc_is_primary = bool(mc_particle.hasStatus(Belle2.MCParticle.c_PrimaryParticle))
182 
183  return dict(
184  is_matched=is_matched,
185  is_matchedPrimary=is_matched and mc_is_primary,
186  is_clone=is_clone,
187  is_background=is_background,
188  is_ghost=is_ghost,
189  is_clone_or_match=(is_matched or is_clone),
190  is_fake=not (is_matched or is_clone),
191  hit_purity=track_match_look_up.getRelatedPurity(reco_track),
192  n_intersecting_mc_tracks=n_intersecting_mc_tracks,
193  )
194 
195  # Refiners to be executed on terminate #
196  # #################################### #
197 
198 
199  save_tree = refiners.save_tree(
200 
201  folder_name="pr_tree", name="pr_tree", above_expert_level=default_expert_level
202 
203  )
204 
205 
206  save_clone_rate = refiners.save_fom(
207 
208  name="{module.id}_overview_figures_of_merit",
209  # Same as in the mc side module to combine the overview figures of merit into the same TNTuple
210  title="Overview figures in {module.title}",
211  description="clone_rate - ratio of clones divided the number of tracks that are related to a particle (clones and matches)",
212  key="clone rate",
213  select=["is_clone"],
214  aggregation=np.mean,
215  filter_on="is_clone_or_match",
216 
217  )
218 
219 
221  save_clone_rate_by_seed_tan_lambda_profile = refiners.save_profiles(
222 
223  filter_on="is_clone_or_match",
224  select={
225  'is_clone': 'clone rate',
226  'seed_tan_lambda_estimate': 'seed tan #lambda',
227  },
228  y='clone rate',
229  y_binary=True,
230  outlier_z_score=5.0,
231  lower_bound=-1.73,
232  upper_bound=3.27,
233  bins=50
234 
235  )
236 
237 
239  save_clone_rate_by_seed_phi0_profile = refiners.save_profiles(
240 
241  select={
242  'is_clone': 'clone rate',
243  'seed_phi0_estimate': 'seed #phi',
244  },
245  y='clone rate',
246  y_binary=True,
247  outlier_z_score=5.0,
248  bins=50
249 
250  )
251 
252 
254  save_clone_rate_by_seed_pt_profile = refiners.save_profiles(
255 
256  filter_on="is_clone_or_match",
257  select={
258  'is_clone': 'clone rate',
259  'seed_pt_estimate': 'seed p_{t}',
260  },
261  y='clone rate',
262  y_binary=True,
263  outlier_z_score=5.0,
264  lower_bound=0,
265  upper_bound=1.7,
266  bins=50
267 
268  )
269 
270 
272  save_clone_rate_by_seed_pt_profile_groupbyCharge = refiners.save_profiles(
273 
274  filter_on="is_clone_or_match",
275  select={
276  'is_clone': 'clone rate',
277  'seed_pt_estimate': 'seed p_{t}',
278  },
279  y='clone rate',
280  y_binary=True,
281  groupby=[("charge_truth", [0.])],
282  outlier_z_score=5.0,
283  lower_bound=0,
284  upper_bound=1.7,
285  bins=50
286 
287  )
288 
289 
291  save_clone_rate_by_seed_tan_lambda_profile_groupbyCharge = refiners.save_profiles(
292 
293  filter_on="is_clone_or_match",
294  select={
295  'is_clone': 'clone rate',
296  'seed_tan_lambda_estimate': 'seed tan #lambda',
297  },
298  y='clone rate',
299  y_binary=True,
300  groupby=[("charge_truth", [0.])],
301  outlier_z_score=5.0,
302  lower_bound=-1.73,
303  upper_bound=3.27,
304  bins=50
305 
306  )
307 
308 
309  save_fake_rate = refiners.save_fom(
310 
311  name="{module.id}_overview_figures_of_merit",
312  # Same as in the mc side module to combine the overview figures of merit into the same TNTuple
313  title="Overview figures in {module.title}",
314  description="fake_rate - ratio of pattern recognition tracks that are not related to a particle" +
315  "(background, ghost) to all pattern recognition tracks",
316  key="fake rate",
317  select="is_fake",
318  aggregation=np.mean,
319 
320  )
321 
322 
324  save_fake_rate_by_seed_phi0_profile = refiners.save_profiles(
325 
326  select={
327  'is_fake': 'fake rate',
328  'seed_phi0_estimate': 'seed #phi',
329  },
330  y='fake rate',
331  y_binary=True,
332  outlier_z_score=5.0,
333 
334  )
335 
336 
338  save_fake_rate_by_seed_tan_lambda_profile = refiners.save_profiles(
339 
340  select={
341  'is_fake': 'fake rate',
342  'seed_tan_lambda_estimate': 'seed tan #lambda',
343  },
344  y='fake rate',
345  y_binary=True,
346  outlier_z_score=5.0,
347  lower_bound=-1.73,
348  upper_bound=3.27,
349 
350  )
351 
352 
354  save_fake_rate_by_seed_pt_profile = refiners.save_profiles(
355 
356  select={
357  'is_fake': 'fake rate',
358  'seed_pt_estimate': 'seed p_{t}',
359  },
360  y='fake rate',
361  y_binary=True,
362  outlier_z_score=5.0,
363  lower_bound=0,
364  upper_bound=1.7,
365 
366  )
367 
368 
370  save_fake_rate_by_seed_tan_lambda_profile_groupbyCharge = refiners.save_profiles(
371 
372  filter_on="has_trackFitResult",
373  select={
374  'is_fake': 'fake rate',
375  'seed_tan_lambda_estimate': 'seed tan #lambda',
376  },
377  y='fake rate',
378  y_binary=True,
379  outlier_z_score=5.0,
380  lower_bound=-1.73,
381  upper_bound=3.27,
382  groupby=[("track_charge", [0.])],
383 
384  )
385 
386 
388  save_fake_rate_by_seed_pt_profile_groupbyCharge = refiners.save_profiles(
389 
390  filter_on="has_trackFitResult",
391  select={
392  'is_fake': 'fake rate',
393  'seed_pt_estimate': 'seed p_{t}',
394  },
395  y='fake rate',
396  y_binary=True,
397  outlier_z_score=5.0,
398  lower_bound=0,
399  upper_bound=1.7,
400  groupby=[("track_charge", [0.])],
401 
402  )
403 
404 
405  save_hit_counts_by_pt_profile = refiners.save_profiles(
406 
407  filter_on="is_matched",
408  select={
409  "pt_truth": "true p_{t}",
410  "n_pxd_hits": "pxd hits",
411  "n_svd_hits": "svd hits",
412  "n_cdc_hits": "cdc hits",
413  },
414  y=[
415  "pxd hits",
416  "svd hits",
417  "cdc hits",
418  ],
419  outlier_z_score=5.0,
420  lower_bound=0,
421  upper_bound=1.7,
422 
423  )
424 
425 
426  save_hit_efficiency_by_pt_profile = refiners.save_profiles(
427 
428  filter_on="is_matchedPrimary",
429  select={
430  "pt_truth": "true p_{t}",
431  "mc_pxd_hit_efficiency": "pxd hit efficiency",
432  "mc_svd_hit_efficiency": "svd hit efficiency",
433  "mc_cdc_hit_efficiency": "cdc hit efficiency",
434  },
435  y=[
436  "pxd hit efficiency",
437  "svd hit efficiency",
438  "cdc hit efficiency",
439  ],
440  outlier_z_score=5.0,
441  lower_bound=0,
442  upper_bound=1.7,
443 
444  )
445 
446 
447  save_hit_purity_by_pt_profile = refiners.save_profiles(
448 
449  filter_on="is_matchedPrimary",
450  select={
451  "pt_truth": "true p_{t}",
452  "pxd_hit_purity": "pxd hit purity",
453  "svd_hit_purity": "svd hit purity",
454  "cdc_hit_purity": "cdc hit purity",
455  },
456  y=[
457  "pxd hit purity",
458  "svd hit purity",
459  "cdc hit purity",
460  ],
461  outlier_z_score=5.0,
462  lower_bound=0,
463  upper_bound=1.7,
464 
465  )
466 
467 
468  save_hit_counts_by_tanlambda_profile = refiners.save_profiles(
469 
470  filter_on="is_matched",
471  select={
472  "tan_lambda_truth": "true tan #lambda",
473  "n_pxd_hits": "pxd hits",
474  "n_svd_hits": "svd hits",
475  "n_cdc_hits": "cdc hits",
476  },
477  y=[
478  "pxd hits",
479  "svd hits",
480  "cdc hits",
481  ],
482  outlier_z_score=5.0,
483  lower_bound=-1.73,
484  upper_bound=3.27,
485 
486  )
487 
488 
489  save_hit_efficiency_by_tanlambda_profile = refiners.save_profiles(
490 
491  filter_on="is_matchedPrimary",
492  select={
493  "tan_lambda_truth": "true tan #lambda",
494  "mc_pxd_hit_efficiency": "pxd hit efficiency",
495  "mc_svd_hit_efficiency": "svd hit efficiency",
496  "mc_cdc_hit_efficiency": "cdc hit efficiency",
497  },
498  y=[
499  "pxd hit efficiency",
500  "svd hit efficiency",
501  "cdc hit efficiency",
502  ],
503  outlier_z_score=5.0,
504  lower_bound=-1.73,
505  upper_bound=3.27,
506 
507  )
508 
509 
510  save_hit_purity_by_tanlambda_profile = refiners.save_profiles(
511 
512  filter_on="is_matchedPrimary",
513  select={
514  "tan_lambda_truth": "true tan #lambda",
515  "pxd_hit_purity": "pxd hit purity",
516  "svd_hit_purity": "svd hit purity",
517  "cdc_hit_purity": "cdc hit purity",
518  },
519  y=[
520  "pxd hit purity",
521  "svd hit purity",
522  "cdc hit purity",
523  ],
524  outlier_z_score=5.0,
525  lower_bound=-1.73,
526  upper_bound=3.27,
527 
528  )
529 
530 
532  save_hit_counts_by_pt_profile_groupbyCharge = refiners.save_profiles(
533 
534  filter_on="is_matched",
535  select={
536  "pt_truth": "true p_{t}",
537  "n_pxd_hits": "pxd hits",
538  "n_svd_hits": "svd hits",
539  "n_cdc_hits": "cdc hits",
540  },
541  y=[
542  "pxd hits",
543  "svd hits",
544  "cdc hits",
545  ],
546  groupby=[("charge_truth", [0.])],
547  outlier_z_score=5.0,
548  lower_bound=0,
549  upper_bound=1.7,
550 
551  )
552 
553 
555  save_hit_counts_by_tanlambda_profile_groupbyCharge = refiners.save_profiles(
556 
557  filter_on="is_matched",
558  select={
559  "tan_lambda_truth": "true tan #lambda",
560  "n_pxd_hits": "pxd hits",
561  "n_svd_hits": "svd hits",
562  "n_cdc_hits": "cdc hits",
563  },
564  y=[
565  "pxd hits",
566  "svd hits",
567  "cdc hits",
568  ],
569  groupby=[("charge_truth", [0.])],
570  outlier_z_score=5.0,
571  lower_bound=-1.73,
572  upper_bound=3.27,
573 
574  )
575 
576 
578  save_hit_efficiency_by_pt_profile_groupbyCharge = refiners.save_profiles(
579 
580  filter_on="is_matchedPrimary",
581  select={
582  "pt_truth": "true p_{t}",
583  "mc_pxd_hit_efficiency": "pxd hit efficiency",
584  "mc_svd_hit_efficiency": "svd hit efficiency",
585  "mc_cdc_hit_efficiency": "cdc hit efficiency",
586  },
587  y=[
588  "pxd hit efficiency",
589  "svd hit efficiency",
590  "cdc hit efficiency",
591  ],
592  groupby=[("charge_truth", [0.])],
593  outlier_z_score=5.0,
594  lower_bound=0,
595  upper_bound=1.7,
596 
597  )
598 
599 
601  save_hit_efficiency_by_tanlambda_profile_groupbyCharge = refiners.save_profiles(
602 
603  filter_on="is_matchedPrimary",
604  select={
605  "tan_lambda_truth": "true tan #lambda",
606  "mc_pxd_hit_efficiency": "pxd hit efficiency",
607  "mc_svd_hit_efficiency": "svd hit efficiency",
608  "mc_cdc_hit_efficiency": "cdc hit efficiency",
609  },
610  y=[
611  "pxd hit efficiency",
612  "svd hit efficiency",
613  "cdc hit efficiency",
614  ],
615  groupby=[("charge_truth", [0.])],
616  outlier_z_score=5.0,
617  lower_bound=-1.73,
618  upper_bound=3.27,
619 
620  )
621 
622 
623  save_hit_efficiency = refiners.save_fom(
624 
625  name="{module.id}_subdetector_figures_of_merit",
626  title="Overview figures in {module.title}",
627  description="Hit efficiency in the subdetectors",
628  key="hit efficiency",
629  select="mc_hit_efficiency",
630  aggregation=np.nanmean,
631  filter_on="is_matchedPrimary"
632 
633  )
634 
635 
636  save_pxd_hit_efficiency = refiners.save_fom(
637 
638  name="{module.id}_subdetector_figures_of_merit",
639  title="Overview figures in {module.title}",
640  description="Hit efficiency in the subdetectors",
641  key="pxd hit efficiency",
642  select="mc_pxd_hit_efficiency",
643  aggregation=np.nanmean,
644  filter_on="is_matchedPrimary"
645 
646  )
647 
648 
649  save_svd_hit_efficiency = refiners.save_fom(
650 
651  name="{module.id}_subdetector_figures_of_merit",
652  title="Overview figures in {module.title}",
653  description="Hit efficiency in the subdetectors",
654  key="svd hit efficiency",
655  select="mc_svd_hit_efficiency",
656  aggregation=np.nanmean,
657  filter_on="is_matchedPrimary"
658 
659  )
660 
661 
662  save_cdc_hit_efficiency = refiners.save_fom(
663 
664  name="{module.id}_subdetector_figures_of_merit",
665  title="Overview figures in {module.title}",
666  description="Hit efficiency in the subdetectors",
667  key="cdc hit efficiency",
668  select="mc_cdc_hit_efficiency",
669  aggregation=np.nanmean,
670  filter_on="is_matchedPrimary"
671 
672  )
673 
674 
675  save_hit_purity = refiners.save_fom(
676 
677  name="{module.id}_subdetector_figures_of_merit",
678  title="Overview figures in {module.title}",
679  description="Hit purity in the subdetectors",
680  key="hit purity",
681  select="hit_purity",
682  aggregation=np.nanmean,
683  filter_on="is_matchedPrimary"
684 
685  )
686 
687 
688  save_pxd_hit_purity = refiners.save_fom(
689 
690  name="{module.id}_subdetector_figures_of_merit",
691  title="Overview figures in {module.title}",
692  description="Hit purity in the subdetectors",
693  key="pxd hit purity",
694  select="pxd_hit_purity",
695  aggregation=np.nanmean,
696  filter_on="is_matchedPrimary"
697 
698  )
699 
700 
701  save_svd_hit_purity = refiners.save_fom(
702 
703  name="{module.id}_subdetector_figures_of_merit",
704  title="Overview figures in {module.title}",
705  description="Hit purity in the subdetectors",
706  key="svd hit purity",
707  select="svd_hit_purity",
708  aggregation=np.nanmean,
709  filter_on="is_matchedPrimary"
710 
711  )
712 
713 
714  save_cdc_hit_purity = refiners.save_fom(
715 
716  name="{module.id}_subdetector_figures_of_merit",
717  title="Overview figures in {module.title}",
718  description="Hit purity in the subdetectors",
719  key="cdc hit purity",
720  select="cdc_hit_purity",
721  aggregation=np.nanmean,
722  filter_on="is_matchedPrimary"
723 
724  )
725 
726 
727  save_p_value_histogram = refiners.save_histograms(
728 
729  filter_on="is_matched",
730  select={"p_value": "Genfit p value"},
731  description="""
732  The distribution of p values from the Genfit track fit.
733  If all errors are propagated correctly the distribution should be flat.
734  Generally some peaking behvaiour towards zero is too be expected if the errors are underestimated.
735  """,
736  check="The distribution should be flat."
737 
738  )
739 
740 
741  save_seed_omega_pull_analysis = refiners.save_pull_analysis(
742 
743  filter_on="is_matched",
744  part_name="seed_omega",
745  quantity_name="seed #omega",
746  folder_name="pull_seed_omega",
747  truth_name="omega_truth",
748  unit="1/cm",
749 
750  )
751 
752 
753  save_seed_tan_lambda_pull_analysis = refiners.save_pull_analysis(
754 
755  filter_on="is_matched",
756  part_name="seed_tan_lambda",
757  quantity_name="seed tan #lambda",
758  folder_name="pull_seed_tan_lambda",
759  truth_name="tan_lambda_truth",
760 
761  )
762 
763 
764  save_fitted_omega_pull_analysis = refiners.save_pull_analysis(
765 
766  filter_on="is_matched",
767  part_name="omega",
768  quantity_name="#omega",
769  folder_name="pull_fitted_omega",
770  unit="1/cm",
771 
772  )
773 
774 
775  save_fitted_tan_lambda_pull_analysis = refiners.save_pull_analysis(
776 
777  filter_on="is_matched",
778  part_name="tan_lambda",
779  quantity_name="tan #lambda",
780  folder_name="pull_fitted_tan_lambda",
781 
782  )
783 
784 
785  save_fitted_pt_pull_analysis = refiners.save_pull_analysis(
786 
787  filter_on="is_matched",
788  part_name="pt",
789  quantity_name="p_{t}",
790  folder_name="pull_fitted_p_t",
791 
792  )
793 
794 
795  save_fitted_x_pull_analysis = refiners.save_pull_analysis(
796 
797  filter_on="is_matched",
798  part_name="x",
799  quantity_name="x",
800  folder_name="pull_fitted_x{groupby_addition}",
801  groupby=[None, ("pt_truth", [0.070, 0.250, 0.600])],
802 
803  )
804 
805 
806  save_fitted_y_pull_analysis = refiners.save_pull_analysis(
807 
808  filter_on="is_matched",
809  part_name="y",
810  quantity_name="y",
811  folder_name="pull_fitted_y{groupby_addition}",
812  groupby=[None, ("pt_truth", [0.070, 0.250, 0.600])],
813 
814  )
815 
816 
817  save_fitted_z_pull_analysis = refiners.save_pull_analysis(
818 
819  filter_on="is_matched",
820  part_name="z",
821  quantity_name="z",
822  folder_name="pull_fitted_z{groupby_addition}",
823  groupby=[None, ("pt_truth", [0.070, 0.250, 0.600])],
824 
825  )
826 
827 
828  save_resolutions_by_pt_profile = refiners.save_profiles(
829 
830  filter_on="is_matched",
831  select={
832  "pt_truth": "true p_{t}",
833  "d0_variance": "#sigma(d_{0})",
834  "z0_variance": "#sigma(z_{0})",
835  "pt_resolution": "#sigma(p_{t}) / p_{t}",
836  },
837  y=[
838  "#sigma(d_{0})",
839  "#sigma(z_{0})",
840  "#sigma(p_{t}) / p_{t}",
841  ],
842  y_log=True,
843 
844  )
a (simplified) python wrapper for StoreArray.
Definition: PyStoreArray.h:56
a (simplified) python wrapper for StoreObjPtr.
Definition: PyStoreObj.h:67
static const CDCMCHitLookUp & getInstance()
Getter for the singletone instance.
Class to provide convenient methods to look up matching information between pattern recognition and M...
mc_reco_tracks_det_hit_ids
Cache for the hit content of the Monte Carlo tracks - updated each event.
track_match_look_up
Reference to the track match lookup object reading the relation information constructed by the MCMatc...
def __init__(self, name, contact, output_file_name=None, reco_tracks_name='RecoTracks', mc_reco_tracks_name='MCRecoTracks', expert_level=None)
reco_tracks_name
Name of the StoreArray of the tracks from pattern recognition.