Belle II Software  release-05-02-19
PRSideTrackingValidationModule Class Reference
Inheritance diagram for PRSideTrackingValidationModule:
Collaboration diagram for PRSideTrackingValidationModule:

Public Member Functions

def __init__ (self, name, contact, output_file_name=None, reco_tracks_name='RecoTracks', mc_reco_tracks_name='MCRecoTracks', expert_level=None)
 
def initialize (self)
 
def prepare (self)
 
def pick (self, reco_track)
 
def peel (self, reco_track)
 
def peel_pr_to_mc_match_info (self, reco_track)
 

Public Attributes

 reco_tracks_name
 Name of the StoreArray of the tracks from pattern recognition.
 
 mc_reco_tracks_name
 Name of the StoreArray of the ideal mc tracks.
 
 track_match_look_up
 Reference to the track match lookup object reading the relation information constructed by the MCMatcherTracksModule.
 
 mc_reco_tracks_det_hit_ids
 Cache for the hit content of the Monte Carlo tracks - updated each event.
 
 mc_hit_lookup
 Cache for the MC hit lookup.
 

Static Public Attributes

int default_expert_level = 10
 the threshold value for the expert level
 
 save_tree = refiners.save_tree(folder_name="pr_tree", name="pr_tree", above_expert_level=default_expert_level)
 Save a tree of all collected variables in a sub folder.
 
 save_clone_rate
 Save RecoTrack clone-rate information. More...
 
 save_clone_rate_by_seed_tan_lambda_profile
 Make profile of the clone rate versus seed tan(lambda) Rename the quantities to names that display nicely by root latex translation. More...
 
 save_clone_rate_by_seed_phi0_profile
 Make profile of the clone rate versus seed phi0 Rename the quantities to names that display nicely by root latex translation. More...
 
 save_clone_rate_by_seed_pt_profile
 Make profile of the clone rate versus seed transverse momentum Rename the quantities to names that display nicely by root latex translation. More...
 
 save_fake_rate
 Save RecoTrack fake-rate information. More...
 
 save_fake_rate_by_seed_phi0_profile
 Make profile of the fake rate versus seed phi0 Rename the quantities to names that display nicely by root latex translation. More...
 
 save_fake_rate_by_seed_tan_lambda_profile
 Make profile of the fake rate versus seed tan(lambda) Rename the quantities to names that display nicely by root latex translation. More...
 
 save_fake_rate_by_seed_pt_profile
 Make profile of the fake rate versus seed transverse momentum Rename the quantities to names that display nicely by root latex translation. More...
 
 save_hit_counts_by_pt_profile
 Hit counts in each sub detector by the true pt value. More...
 
 save_hit_efficiency_by_pt_profile
 Hit efficiency in each sub detector by the true pt value. More...
 
 save_hit_purity_by_pt_profile
 Hit purity in each sub detector by the true pt value. More...
 
 save_hit_counts_by_tanlambda_profile
 Hit counts in each sub detector by the true tanlambda value. More...
 
 save_hit_efficiency_by_tanlambda_profile
 Hit efficiency in each sub detector by the true tanlambda value. More...
 
 save_hit_purity_by_tanlambda_profile
 Hit purity in each sub detector by the true tanlambda value. More...
 
 save_hit_efficiency
 Save simple FOM. More...
 
 save_pxd_hit_efficiency
 Save simple FOM. More...
 
 save_svd_hit_efficiency
 Save simple FOM. More...
 
 save_cdc_hit_efficiency
 Save simple FOM. More...
 
 save_hit_purity
 Save simple FOM. More...
 
 save_pxd_hit_purity
 Save simple FOM. More...
 
 save_svd_hit_purity
 Save simple FOM. More...
 
 save_cdc_hit_purity
 Save simple FOM. More...
 
 save_p_value_histogram
 Creates a distribution of p values from the Genfit track fit for match pr tracks. More...
 
 save_seed_omega_pull_analysis
 Pull of seed omega. More...
 
 save_seed_tan_lambda_pull_analysis
 Pull of seed tan(lambda) More...
 
 save_fitted_omega_pull_analysis
 Pull of fitted omega. More...
 
 save_fitted_tan_lambda_pull_analysis
 Pull of fitted tan(lambda) More...
 
 save_fitted_pt_pull_analysis
 Pull of fitted transverse momentum. More...
 
 save_fitted_x_pull_analysis
 Pull of fitted x coordinate grouped by true transverse momentum. More...
 
 save_fitted_y_pull_analysis
 Pull of fitted y coordinate grouped by true transverse momentum. More...
 
 save_fitted_z_pull_analysis
 Pull of fitted z coordinate grouped by true transverse momentum. More...
 
 save_resolutions_by_pt_profile
 Resolutions as a function of true p_t. More...
 

Detailed Description

Module to collect matching information about the found particles and to generate
   validation plots and figures of merit on the performance of track finding.
Expert level behavior:
    expert_level <= default_expert_level: all figures and plots from this module except tree entries
    expert_level > default_expert_level: everything including tree entries

Definition at line 19 of file pr_side_module.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  name,
  contact,
  output_file_name = None,
  reco_tracks_name = 'RecoTracks',
  mc_reco_tracks_name = 'MCRecoTracks',
  expert_level = None 
)
Constructor

Definition at line 30 of file pr_side_module.py.

30  def __init__(
31  self,
32  name,
33  contact,
34  output_file_name=None,
35  reco_tracks_name='RecoTracks',
36  mc_reco_tracks_name='MCRecoTracks',
37  expert_level=None):
38  """Constructor"""
39 
40  output_file_name = output_file_name or name + 'TrackingValidation.root'
41  super().__init__(foreach=reco_tracks_name,
42  name=name,
43  contact=contact,
44  output_file_name=output_file_name,
45  expert_level=expert_level)
46 
47 
48  self.reco_tracks_name = reco_tracks_name
49 
50 
51  self.mc_reco_tracks_name = mc_reco_tracks_name
52 
53 
54  self.track_match_look_up = None
55 
56 
57  self.mc_reco_tracks_det_hit_ids = []
58 
59 
61 

Member Function Documentation

◆ initialize()

def initialize (   self)
Receive signal at the start of event processing

Definition at line 62 of file pr_side_module.py.

◆ peel()

def peel (   self,
  reco_track 
)
Looks at the individual pattern recognition tracks and store information about them

Definition at line 86 of file pr_side_module.py.

◆ peel_pr_to_mc_match_info()

def peel_pr_to_mc_match_info (   self,
  reco_track 
)
Extracts track-match information from the MCMatcherTracksModule results

Definition at line 157 of file pr_side_module.py.

◆ pick()

def pick (   self,
  reco_track 
)
Method to filter the track candidates to reject part of them

Definition at line 82 of file pr_side_module.py.

◆ prepare()

def prepare (   self)
Called once at the start of each event

Definition at line 68 of file pr_side_module.py.

Member Data Documentation

◆ save_cdc_hit_efficiency

save_cdc_hit_efficiency
static
Initial value:
= refiners.save_fom(
name="{module.id}_subdetector_figures_of_merit",
title="Overview figures in {module.title}",
description="Hit efficiency in the subdetectors",
key="cdc hit efficiency",
select="mc_cdc_hit_efficiency",
aggregation=np.nanmean,
filter_on="is_matchedPrimary"
)

Save simple FOM.

Definition at line 434 of file pr_side_module.py.

◆ save_cdc_hit_purity

save_cdc_hit_purity
static
Initial value:
= refiners.save_fom(
name="{module.id}_subdetector_figures_of_merit",
title="Overview figures in {module.title}",
description="Hit purity in the subdetectors",
key="cdc hit purity",
select="cdc_hit_purity",
aggregation=np.nanmean,
filter_on="is_matchedPrimary"
)

Save simple FOM.

Definition at line 478 of file pr_side_module.py.

◆ save_clone_rate

save_clone_rate
static
Initial value:
= refiners.save_fom(
name="{module.id}_overview_figures_of_merit",
# Same as in the mc side module to combine the overview figures of merit into the same TNTuple
title="Overview figures in {module.title}",
description="clone_rate - ratio of clones divided the number of tracks that are related to a particle (clones and matches)",
key="clone rate",
select=["is_clone"],
aggregation=np.mean,
filter_on="is_clone_or_match",
)

Save RecoTrack clone-rate information.

Definition at line 196 of file pr_side_module.py.

◆ save_clone_rate_by_seed_phi0_profile

save_clone_rate_by_seed_phi0_profile
static
Initial value:
= refiners.save_profiles(
select={
'is_clone': 'clone rate',
'seed_phi0_estimate': 'seed #phi',
},
y='clone rate',
y_binary=True,
outlier_z_score=5.0,
bins=50
)

Make profile of the clone rate versus seed phi0 Rename the quantities to names that display nicely by root latex translation.

Definition at line 225 of file pr_side_module.py.

◆ save_clone_rate_by_seed_pt_profile

save_clone_rate_by_seed_pt_profile
static
Initial value:
= refiners.save_profiles(
filter_on="is_clone_or_match",
select={
'is_clone': 'clone rate',
'seed_pt_estimate': 'seed p_{t}',
},
y='clone rate',
y_binary=True,
outlier_z_score=5.0,
lower_bound=0,
upper_bound=1.7,
bins=50
)

Make profile of the clone rate versus seed transverse momentum Rename the quantities to names that display nicely by root latex translation.

Definition at line 238 of file pr_side_module.py.

◆ save_clone_rate_by_seed_tan_lambda_profile

save_clone_rate_by_seed_tan_lambda_profile
static
Initial value:
= refiners.save_profiles(
filter_on="is_clone_or_match",
select={
'is_clone': 'clone rate',
'seed_tan_lambda_estimate': 'seed tan #lambda',
},
y='clone rate',
y_binary=True,
outlier_z_score=5.0,
lower_bound=-1.73,
upper_bound=3.27,
bins=50
)

Make profile of the clone rate versus seed tan(lambda) Rename the quantities to names that display nicely by root latex translation.

Definition at line 209 of file pr_side_module.py.

◆ save_fake_rate

save_fake_rate
static
Initial value:
= refiners.save_fom(
name="{module.id}_overview_figures_of_merit",
# Same as in the mc side module to combine the overview figures of merit into the same TNTuple
title="Overview figures in {module.title}",
description="fake_rate - ratio of pattern recognition tracks that are not related to a particle" +
"(background, ghost) to all pattern recognition tracks",
key="fake rate",
select="is_fake",
aggregation=np.mean,
)

Save RecoTrack fake-rate information.

Definition at line 253 of file pr_side_module.py.

◆ save_fake_rate_by_seed_phi0_profile

save_fake_rate_by_seed_phi0_profile
static
Initial value:
= refiners.save_profiles(
select={
'is_fake': 'fake rate',
'seed_phi0_estimate': 'seed #phi',
},
y='fake rate',
y_binary=True,
outlier_z_score=5.0,
)

Make profile of the fake rate versus seed phi0 Rename the quantities to names that display nicely by root latex translation.

Definition at line 266 of file pr_side_module.py.

◆ save_fake_rate_by_seed_pt_profile

save_fake_rate_by_seed_pt_profile
static
Initial value:
= refiners.save_profiles(
select={
'is_fake': 'fake rate',
'seed_pt_estimate': 'seed p_{t}',
},
y='fake rate',
y_binary=True,
outlier_z_score=5.0,
lower_bound=0,
upper_bound=1.7,
)

Make profile of the fake rate versus seed transverse momentum Rename the quantities to names that display nicely by root latex translation.

Definition at line 292 of file pr_side_module.py.

◆ save_fake_rate_by_seed_tan_lambda_profile

save_fake_rate_by_seed_tan_lambda_profile
static
Initial value:
= refiners.save_profiles(
select={
'is_fake': 'fake rate',
'seed_tan_lambda_estimate': 'seed tan #lambda',
},
y='fake rate',
y_binary=True,
outlier_z_score=5.0,
lower_bound=-1.73,
upper_bound=3.27,
)

Make profile of the fake rate versus seed tan(lambda) Rename the quantities to names that display nicely by root latex translation.

Definition at line 278 of file pr_side_module.py.

◆ save_fitted_omega_pull_analysis

save_fitted_omega_pull_analysis
static
Initial value:
= refiners.save_pull_analysis(
filter_on="is_matched",
part_name="omega",
quantity_name="#omega",
folder_name="pull_fitted_omega",
unit="1/cm",
)

Pull of fitted omega.

Definition at line 520 of file pr_side_module.py.

◆ save_fitted_pt_pull_analysis

save_fitted_pt_pull_analysis
static
Initial value:
= refiners.save_pull_analysis(
filter_on="is_matched",
part_name="pt",
quantity_name="p_{t}",
folder_name="pull_fitted_p_t",
)

Pull of fitted transverse momentum.

Definition at line 537 of file pr_side_module.py.

◆ save_fitted_tan_lambda_pull_analysis

save_fitted_tan_lambda_pull_analysis
static
Initial value:
= refiners.save_pull_analysis(
filter_on="is_matched",
part_name="tan_lambda",
quantity_name="tan #lambda",
folder_name="pull_fitted_tan_lambda",
)

Pull of fitted tan(lambda)

Definition at line 529 of file pr_side_module.py.

◆ save_fitted_x_pull_analysis

save_fitted_x_pull_analysis
static
Initial value:
= refiners.save_pull_analysis(
filter_on="is_matched",
part_name="x",
quantity_name="x",
folder_name="pull_fitted_x{groupby_addition}",
groupby=[None, ("pt_truth", [0.070, 0.250, 0.600])],
)

Pull of fitted x coordinate grouped by true transverse momentum.

Definition at line 545 of file pr_side_module.py.

◆ save_fitted_y_pull_analysis

save_fitted_y_pull_analysis
static
Initial value:
= refiners.save_pull_analysis(
filter_on="is_matched",
part_name="y",
quantity_name="y",
folder_name="pull_fitted_y{groupby_addition}",
groupby=[None, ("pt_truth", [0.070, 0.250, 0.600])],
)

Pull of fitted y coordinate grouped by true transverse momentum.

Definition at line 554 of file pr_side_module.py.

◆ save_fitted_z_pull_analysis

save_fitted_z_pull_analysis
static
Initial value:
= refiners.save_pull_analysis(
filter_on="is_matched",
part_name="z",
quantity_name="z",
folder_name="pull_fitted_z{groupby_addition}",
groupby=[None, ("pt_truth", [0.070, 0.250, 0.600])],
)

Pull of fitted z coordinate grouped by true transverse momentum.

Definition at line 563 of file pr_side_module.py.

◆ save_hit_counts_by_pt_profile

save_hit_counts_by_pt_profile
static
Initial value:
= refiners.save_profiles(
filter_on="is_matched",
select={
"pt_truth": "true p_{t}",
"n_pxd_hits": "pxd hits",
"n_svd_hits": "svd hits",
"n_cdc_hits": "cdc hits",
},
y=[
"pxd hits",
"svd hits",
"cdc hits",
]
)

Hit counts in each sub detector by the true pt value.

Definition at line 305 of file pr_side_module.py.

◆ save_hit_counts_by_tanlambda_profile

save_hit_counts_by_tanlambda_profile
static
Initial value:
= refiners.save_profiles(
filter_on="is_matched",
select={
"tan_lambda_truth": "true tan #lambda",
"n_pxd_hits": "pxd hits",
"n_svd_hits": "svd hits",
"n_cdc_hits": "cdc hits",
},
y=[
"pxd hits",
"svd hits",
"cdc hits",
]
)

Hit counts in each sub detector by the true tanlambda value.

Definition at line 353 of file pr_side_module.py.

◆ save_hit_efficiency

save_hit_efficiency
static
Initial value:
= refiners.save_fom(
name="{module.id}_subdetector_figures_of_merit",
title="Overview figures in {module.title}",
description="Hit efficiency in the subdetectors",
key="hit efficiency",
select="mc_hit_efficiency",
aggregation=np.nanmean,
filter_on="is_matchedPrimary"
)

Save simple FOM.

Definition at line 401 of file pr_side_module.py.

◆ save_hit_efficiency_by_pt_profile

save_hit_efficiency_by_pt_profile
static
Initial value:
= refiners.save_profiles(
filter_on="is_matchedPrimary",
select={
"pt_truth": "true p_{t}",
"mc_pxd_hit_efficiency": "pxd hit efficiency",
"mc_svd_hit_efficiency": "svd hit efficiency",
"mc_cdc_hit_efficiency": "cdc hit efficiency",
},
y=[
"pxd hit efficiency",
"svd hit efficiency",
"cdc hit efficiency",
]
)

Hit efficiency in each sub detector by the true pt value.

Definition at line 321 of file pr_side_module.py.

◆ save_hit_efficiency_by_tanlambda_profile

save_hit_efficiency_by_tanlambda_profile
static
Initial value:
= refiners.save_profiles(
filter_on="is_matchedPrimary",
select={
"tan_lambda_truth": "true tan #lambda",
"mc_pxd_hit_efficiency": "pxd hit efficiency",
"mc_svd_hit_efficiency": "svd hit efficiency",
"mc_cdc_hit_efficiency": "cdc hit efficiency",
},
y=[
"pxd hit efficiency",
"svd hit efficiency",
"cdc hit efficiency",
]
)

Hit efficiency in each sub detector by the true tanlambda value.

Definition at line 369 of file pr_side_module.py.

◆ save_hit_purity

save_hit_purity
static
Initial value:
= refiners.save_fom(
name="{module.id}_subdetector_figures_of_merit",
title="Overview figures in {module.title}",
description="Hit purity in the subdetectors",
key="hit purity",
select="hit_purity",
aggregation=np.nanmean,
filter_on="is_matchedPrimary"
)

Save simple FOM.

Definition at line 445 of file pr_side_module.py.

◆ save_hit_purity_by_pt_profile

save_hit_purity_by_pt_profile
static
Initial value:
= refiners.save_profiles(
filter_on="is_matchedPrimary",
select={
"pt_truth": "true p_{t}",
"pxd_hit_purity": "pxd hit purity",
"svd_hit_purity": "svd hit purity",
"cdc_hit_purity": "cdc hit purity",
},
y=[
"pxd hit purity",
"svd hit purity",
"cdc hit purity",
]
)

Hit purity in each sub detector by the true pt value.

Definition at line 337 of file pr_side_module.py.

◆ save_hit_purity_by_tanlambda_profile

save_hit_purity_by_tanlambda_profile
static
Initial value:
= refiners.save_profiles(
filter_on="is_matchedPrimary",
select={
"tan_lambda_truth": "true tan #lambda",
"pxd_hit_purity": "pxd hit purity",
"svd_hit_purity": "svd hit purity",
"cdc_hit_purity": "cdc hit purity",
},
y=[
"pxd hit purity",
"svd hit purity",
"cdc hit purity",
]
)

Hit purity in each sub detector by the true tanlambda value.

Definition at line 385 of file pr_side_module.py.

◆ save_p_value_histogram

save_p_value_histogram
static
Initial value:
= refiners.save_histograms(
filter_on="is_matched",
select={"p_value": "Genfit p value"},
description=,
check="The distribution should be flat."
)

Creates a distribution of p values from the Genfit track fit for match pr tracks.

Definition at line 489 of file pr_side_module.py.

◆ save_pxd_hit_efficiency

save_pxd_hit_efficiency
static
Initial value:
= refiners.save_fom(
name="{module.id}_subdetector_figures_of_merit",
title="Overview figures in {module.title}",
description="Hit efficiency in the subdetectors",
key="pxd hit efficiency",
select="mc_pxd_hit_efficiency",
aggregation=np.nanmean,
filter_on="is_matchedPrimary"
)

Save simple FOM.

Definition at line 412 of file pr_side_module.py.

◆ save_pxd_hit_purity

save_pxd_hit_purity
static
Initial value:
= refiners.save_fom(
name="{module.id}_subdetector_figures_of_merit",
title="Overview figures in {module.title}",
description="Hit purity in the subdetectors",
key="pxd hit purity",
select="pxd_hit_purity",
aggregation=np.nanmean,
filter_on="is_matchedPrimary"
)

Save simple FOM.

Definition at line 456 of file pr_side_module.py.

◆ save_resolutions_by_pt_profile

save_resolutions_by_pt_profile
static
Initial value:
= refiners.save_profiles(
filter_on="is_matched",
select={
"pt_truth": "true p_{t}",
"d0_variance": "#sigma(d_{0})",
"z0_variance": "#sigma(z_{0})",
"pt_resolution": "#sigma(p_{t}) / p_{t}",
},
y=[
"#sigma(d_{0})",
"#sigma(z_{0})",
"#sigma(p_{t}) / p_{t}",
],
y_log=True,
)

Resolutions as a function of true p_t.

Definition at line 572 of file pr_side_module.py.

◆ save_seed_omega_pull_analysis

save_seed_omega_pull_analysis
static
Initial value:
= refiners.save_pull_analysis(
filter_on="is_matched",
part_name="seed_omega",
quantity_name="seed #omega",
folder_name="pull_seed_omega",
truth_name="omega_truth",
unit="1/cm",
)

Pull of seed omega.

Definition at line 501 of file pr_side_module.py.

◆ save_seed_tan_lambda_pull_analysis

save_seed_tan_lambda_pull_analysis
static
Initial value:
= refiners.save_pull_analysis(
filter_on="is_matched",
part_name="seed_tan_lambda",
quantity_name="seed tan #lambda",
folder_name="pull_seed_tan_lambda",
truth_name="tan_lambda_truth",
)

Pull of seed tan(lambda)

Definition at line 511 of file pr_side_module.py.

◆ save_svd_hit_efficiency

save_svd_hit_efficiency
static
Initial value:
= refiners.save_fom(
name="{module.id}_subdetector_figures_of_merit",
title="Overview figures in {module.title}",
description="Hit efficiency in the subdetectors",
key="svd hit efficiency",
select="mc_svd_hit_efficiency",
aggregation=np.nanmean,
filter_on="is_matchedPrimary"
)

Save simple FOM.

Definition at line 423 of file pr_side_module.py.

◆ save_svd_hit_purity

save_svd_hit_purity
static
Initial value:
= refiners.save_fom(
name="{module.id}_subdetector_figures_of_merit",
title="Overview figures in {module.title}",
description="Hit purity in the subdetectors",
key="svd hit purity",
select="svd_hit_purity",
aggregation=np.nanmean,
filter_on="is_matchedPrimary"
)

Save simple FOM.

Definition at line 467 of file pr_side_module.py.


The documentation for this class was generated from the following file:
Belle2::TrackFindingCDC::CDCMCHitLookUp::getInstance
static const CDCMCHitLookUp & getInstance()
Getter for the singletone instance.
Definition: CDCMCHitLookUp.cc:32