Belle II Software development
RecoTrackQEHarvestingValidationTask Class Reference
Inheritance diagram for RecoTrackQEHarvestingValidationTask:
HarvestingValidationBaseTask

Public Member Functions

def requires (self)
 
def add_tracking_with_quality_estimation (self, path)
 

Static Public Attributes

b2luigi cdc_training_target = b2luigi.Parameter()
 Feature/variable to use as truth label for the CDC track quality estimator.
 
str validation_output_file_name = "reco_qe_harvesting_validation.root"
 Name of the "harvested" ROOT output file with variables that can be used for validation.
 
str reco_output_file_name = "reco_qe_reconstruction.root"
 Name of the output of the RootOutput module with reconstructed events.
 
RecoTrackQETeacherTask teacher_task = RecoTrackQETeacherTask
 Teacher task to require to provide a quality estimator weightfile for add_tracking_with_quality_estimation
 

Detailed Description

Run track reconstruction and write out (="harvest") a root file with variables
useful for validation of the MVA track Quality Estimator.

Definition at line 1648 of file combined_quality_estimator_teacher.py.

Member Function Documentation

◆ add_tracking_with_quality_estimation()

def add_tracking_with_quality_estimation (   self,
  path 
)
Add modules for reco tracking with all track quality estimators to basf2 path.

Reimplemented from HarvestingValidationBaseTask.

Definition at line 1706 of file combined_quality_estimator_teacher.py.

1706 def add_tracking_with_quality_estimation(self, path):
1707 """
1708 Add modules for reco tracking with all track quality estimators to basf2 path.
1709 """
1710
1711 # add tracking reconstruction with quality estimator modules added
1712 tracking.add_tracking_reconstruction(
1713 path,
1714 add_cdcTrack_QI=True,
1715 add_vxdTrack_QI=True,
1716 add_recoTrack_QI=True,
1717 skipGeometryAdding=True,
1718 skipHitPreparerAdding=False,
1719 )
1720
1721 # Replace the weightfiles of all quality estimator modules by those
1722 # produced in the training by b2luigi
1723 cdc_qe_mva_filter_parameters = {
1724 "identifier": self.get_input_file_names(
1725 CDCQETeacherTask.get_weightfile_xml_identifier(
1726 CDCQETeacherTask,
1727 fast_bdt_option=self.fast_bdt_option))[0]}
1728 basf2.set_module_parameters(
1729 path,
1730 name="TFCDC_TrackQualityEstimator",
1731 filterParameters=cdc_qe_mva_filter_parameters,
1732 )
1733 basf2.set_module_parameters(
1734 path,
1735 name="VXDQualityEstimatorMVA",
1736 WeightFileIdentifier=self.get_input_file_names(
1737 VXDQETeacherTask.get_weightfile_xml_identifier(VXDQETeacherTask, fast_bdt_option=self.fast_bdt_option)
1738 )[0],
1739 )
1740 basf2.set_module_parameters(
1741 path,
1742 name="TrackQualityEstimatorMVA",
1743 WeightFileIdentifier=self.get_input_file_names(
1744 RecoTrackQETeacherTask.get_weightfile_xml_identifier(RecoTrackQETeacherTask, fast_bdt_option=self.fast_bdt_option)
1745 )[0],
1746 )
1747
1748

◆ requires()

def requires (   self)
Generate list of luigi Tasks that this Task depends on.

Reimplemented from HarvestingValidationBaseTask.

Definition at line 1662 of file combined_quality_estimator_teacher.py.

1662 def requires(self):
1663 """
1664 Generate list of luigi Tasks that this Task depends on.
1665 """
1666 yield CDCQETeacherTask(
1667 n_events_training=self.n_events_training,
1668 experiment_number=self.experiment_number,
1669 process_type=self.process_type,
1670 training_target=self.cdc_training_target,
1671 exclude_variables=MasterTask.exclude_variables_cdc,
1672 fast_bdt_option=self.fast_bdt_option,
1673 )
1674 yield VXDQETeacherTask(
1675 n_events_training=self.n_events_training,
1676 experiment_number=self.experiment_number,
1677 process_type=self.process_type,
1678 exclude_variables=MasterTask.exclude_variables_vxd,
1679 fast_bdt_option=self.fast_bdt_option,
1680 )
1681
1682 yield self.teacher_task(
1683 n_events_training=self.n_events_training,
1684 experiment_number=self.experiment_number,
1685 process_type=self.process_type,
1686 exclude_variables=self.exclude_variables,
1687 cdc_training_target=self.cdc_training_target,
1688 fast_bdt_option=self.fast_bdt_option,
1689 )
1690 if 'USE' in self.process_type: # USESIM and USEREC
1691 if 'BB' in self.process_type:
1692 process = 'BBBAR'
1693 elif 'EE' in self.process_type:
1694 process = 'BHABHA'
1695 yield CheckExistingFile(
1696 filename='datafiles/generated_mc_N' + str(self.n_events_testing) + '_' + process + '_test.root'
1697 )
1698 else:
1699 yield SplitNMergeSimTask(
1700 bkgfiles_dir=MasterTask.bkgfiles_by_exp[self.experiment_number],
1701 random_seed=self.process_type + '_test',
1702 n_events=self.n_events_testing,
1703 experiment_number=self.experiment_number,
1704 )
1705

Member Data Documentation

◆ cdc_training_target

b2luigi cdc_training_target = b2luigi.Parameter()
static

Feature/variable to use as truth label for the CDC track quality estimator.

Definition at line 1654 of file combined_quality_estimator_teacher.py.

◆ reco_output_file_name

str reco_output_file_name = "reco_qe_reconstruction.root"
static

Name of the output of the RootOutput module with reconstructed events.

Definition at line 1658 of file combined_quality_estimator_teacher.py.

◆ teacher_task

Teacher task to require to provide a quality estimator weightfile for add_tracking_with_quality_estimation

Definition at line 1660 of file combined_quality_estimator_teacher.py.

◆ validation_output_file_name

str validation_output_file_name = "reco_qe_harvesting_validation.root"
static

Name of the "harvested" ROOT output file with variables that can be used for validation.

Definition at line 1656 of file combined_quality_estimator_teacher.py.


The documentation for this class was generated from the following file: