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

Public Member Functions

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

Static Public Attributes

b2luigi training_target = b2luigi.Parameter()
 Feature/variable to use as truth label in the quality estimator MVA classifier.
 
str validation_output_file_name = "cdc_qe_harvesting_validation.root"
 Name of the "harvested" ROOT output file with variables that can be used for validation.
 
str reco_output_file_name = "cdc_qe_reconstruction.root"
 Name of the output of the RootOutput module with reconstructed events.
 
CDCQETeacherTask teacher_task = CDCQETeacherTask
 Teacher task to require to provide a quality estimator weightfile for add_tracking_with_quality_estimation
 

Detailed Description

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

Definition at line 1581 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 CDC standalone tracking with CDC quality estimator to basf2 path.

Reimplemented from HarvestingValidationBaseTask.

Definition at line 1624 of file combined_quality_estimator_teacher.py.

1624 def add_tracking_with_quality_estimation(self, path):
1625 """
1626 Add modules for CDC standalone tracking with CDC quality estimator to basf2 path.
1627 """
1628 tracking.add_cdc_track_finding(
1629 path,
1630 output_reco_tracks="RecoTracks",
1631 add_mva_quality_indicator=True,
1632 )
1633 # change weightfile of quality estimator to the one produced by this training script
1634 cdc_qe_mva_filter_parameters = {
1635 "identifier": self.get_input_file_names(
1636 CDCQETeacherTask.get_weightfile_xml_identifier(
1637 CDCQETeacherTask,
1638 fast_bdt_option=self.fast_bdt_option))[0]}
1639 basf2.set_module_parameters(
1640 path,
1641 name="TFCDC_TrackQualityEstimator",
1642 filterParameters=cdc_qe_mva_filter_parameters,
1643 )
1644 tracking.add_mc_matcher(path, components=["CDC"])
1645 tracking.add_track_fit_and_track_creator(path, components=["CDC"])
1646
1647

◆ requires()

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

Reimplemented from HarvestingValidationBaseTask.

Definition at line 1596 of file combined_quality_estimator_teacher.py.

1596 def requires(self):
1597 """
1598 Generate list of luigi Tasks that this Task depends on.
1599 """
1600 yield self.teacher_task(
1601 n_events_training=self.n_events_training,
1602 experiment_number=self.experiment_number,
1603 process_type=self.process_type,
1604 training_target=self.training_target,
1605 exclude_variables=self.exclude_variables,
1606 fast_bdt_option=self.fast_bdt_option,
1607 )
1608 if 'USE' in self.process_type: # USESIM and USEREC
1609 if 'BB' in self.process_type:
1610 process = 'BBBAR'
1611 elif 'EE' in self.process_type:
1612 process = 'BHABHA'
1613 yield CheckExistingFile(
1614 filename='datafiles/generated_mc_N' + str(self.n_events_testing) + '_' + process + '_test.root'
1615 )
1616 else:
1617 yield SplitNMergeSimTask(
1618 bkgfiles_dir=MasterTask.bkgfiles_by_exp[self.experiment_number],
1619 random_seed=self.process_type + '_test',
1620 n_events=self.n_events_testing,
1621 experiment_number=self.experiment_number,
1622 )
1623

Member Data Documentation

◆ reco_output_file_name

str reco_output_file_name = "cdc_qe_reconstruction.root"
static

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

Definition at line 1591 of file combined_quality_estimator_teacher.py.

◆ teacher_task

CDCQETeacherTask teacher_task = CDCQETeacherTask
static

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

Definition at line 1593 of file combined_quality_estimator_teacher.py.

◆ training_target

b2luigi training_target = b2luigi.Parameter()
static

Feature/variable to use as truth label in the quality estimator MVA classifier.

Definition at line 1587 of file combined_quality_estimator_teacher.py.

◆ validation_output_file_name

str validation_output_file_name = "cdc_qe_harvesting_validation.root"
static

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

Definition at line 1589 of file combined_quality_estimator_teacher.py.


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