Belle II Software development
ResultRecordingTask Class Reference
Inheritance diagram for ResultRecordingTask:
LSFTask

Public Member Functions

 output (self)
 
 requires (self)
 
 create_result_recording_path (self, result_filter_records_name)
 
 create_path (self)
 
 remove_output (self)
 

Public Attributes

 job_name = self.task_id
 set the job name (inherited variable)
 

Static Public Attributes

 experiment_number = b2luigi.IntParameter()
 Experiment number of the conditions database, e.g.
 
 n_events_training = b2luigi.IntParameter()
 Number of events to generate.
 
 random_seed = b2luigi.Parameter()
 Random basf2 seed.
 
 result_filter_records_name = b2luigi.Parameter()
 Name of the records file for training the final result filter.
 
str batch_system = 'lsf'
 batch system
 
str queue = 's'
 queue
 

Detailed Description

Task to record data for the final result filter. This only requires found and MC-matched SVD and CDC tracks that need to be
merged, all state filters are set to "all"

Definition at line 378 of file cdc_and_svd_ckf_merger_mva_training.py.

Member Function Documentation

◆ create_path()

create_path ( self)
Create basf2 path to process with event generation and simulation.

Definition at line 478 of file cdc_and_svd_ckf_merger_mva_training.py.

478 def create_path(self):
479 """
480 Create basf2 path to process with event generation and simulation.
481 """
482 return self.create_result_recording_path(
483 result_filter_records_name=self.get_output_file_name(self.result_filter_records_name),
484 )
485

◆ create_result_recording_path()

create_result_recording_path ( self,
result_filter_records_name )
Create a path for the recording of the result filter. This file is then used to train the result filter.

:param result_filter_records_name: Name of the recording file.

Definition at line 413 of file cdc_and_svd_ckf_merger_mva_training.py.

413 def create_result_recording_path(self, result_filter_records_name):
414 """
415 Create a path for the recording of the result filter. This file is then used to train the result filter.
416
417 :param result_filter_records_name: Name of the recording file.
418 """
419
420 path = basf2.create_path()
421
422 # get all the file names from the list of input files that are meant for training
423 file_list = [fname for fname in self.get_all_input_file_names()
424 if "generated_mc_N" in fname and "training" in fname and fname.endswith(".root")]
425 path.add_module("RootInput", inputFileNames=file_list)
426
427 path.add_module("Gearbox")
428 path.add_module("Geometry")
429 path.add_module("SetupGenfitExtrapolation")
430
431 add_hit_preparation_modules(path, components=["SVD"])
432
433 # MCTrackFinding
434 mc_reco_tracks = "MCRecoTracks"
435 path.add_module('TrackFinderMCTruthRecoTracks',
436 RecoTracksStoreArrayName=mc_reco_tracks)
437
438 # CDC track finding and MC matching
439 cdc_reco_tracks = "CDCRecoTracks"
440 add_cdc_track_finding(path, output_reco_tracks=cdc_reco_tracks)
441 path.add_module("MCRecoTracksMatcher", UsePXDHits=False, UseSVDHits=False, UseCDCHits=True,
442 mcRecoTracksStoreArrayName=mc_reco_tracks,
443 prRecoTracksStoreArrayName=cdc_reco_tracks)
444
445 path.add_module("DAFRecoFitter", recoTracksStoreArrayName=cdc_reco_tracks)
446
447 # SVD track finding and MC matching
448 svd_reco_tracks = "SVDRecoTracks"
449 add_svd_standalone_tracking(path, reco_tracks=svd_reco_tracks)
450 path.add_module("MCRecoTracksMatcher", UsePXDHits=False, UseSVDHits=True, UseCDCHits=False,
451 mcRecoTracksStoreArrayName=mc_reco_tracks,
452 prRecoTracksStoreArrayName=svd_reco_tracks)
453
454 direction = "backward"
455 path.add_module("CDCToSVDSeedCKF",
456 inputRecoTrackStoreArrayName=cdc_reco_tracks,
457
458 fromRelationStoreArrayName=cdc_reco_tracks,
459 toRelationStoreArrayName=svd_reco_tracks,
460
461 relatedRecoTrackStoreArrayName=svd_reco_tracks,
462 cdcTracksStoreArrayName=cdc_reco_tracks,
463 vxdTracksStoreArrayName=svd_reco_tracks,
464
465 relationCheckForDirection=direction,
466 reverseSeed=False,
467 firstHighFilterParameters={"direction": direction},
468 advanceHighFilterParameters={"direction": direction},
469
470 writeOutDirection=direction,
471 endEarly=False,
472
473 filter="recording_with_relations",
474 filterParameters={"rootFileName": result_filter_records_name})
475
476 return path
477

◆ output()

output ( self)
Generate list of output files that the task should produce.
The task is considered finished if and only if the outputs all exist.

Definition at line 395 of file cdc_and_svd_ckf_merger_mva_training.py.

395 def output(self):
396 """
397 Generate list of output files that the task should produce.
398 The task is considered finished if and only if the outputs all exist.
399 """
400 yield self.add_to_output(self.result_filter_records_name)
401

◆ remove_output()

remove_output ( self)
Default function from base b2luigi.Task class.

Definition at line 486 of file cdc_and_svd_ckf_merger_mva_training.py.

486 def remove_output(self):
487 """
488 Default function from base b2luigi.Task class.
489 """
490 self._remove_output()
491
492

◆ requires()

requires ( self)
This task requires that the training SplitMergeSimTask is finished.

Definition at line 402 of file cdc_and_svd_ckf_merger_mva_training.py.

402 def requires(self):
403 """
404 This task requires that the training SplitMergeSimTask is finished.
405 """
406 yield SplitNMergeSimTask(
407 bkgfiles_dir=SummaryTask.bkgfiles_by_exp[self.experiment_number],
408 random_seed=self.random_seed,
409 n_events=self.n_events_training,
410 experiment_number=self.experiment_number,
411 )
412

Member Data Documentation

◆ batch_system

str batch_system = 'lsf'
staticinherited

batch system

Definition at line 177 of file cdc_and_svd_ckf_merger_mva_training.py.

◆ experiment_number

experiment_number = b2luigi.IntParameter()
static

Experiment number of the conditions database, e.g.

defines simulation geometry

Definition at line 385 of file cdc_and_svd_ckf_merger_mva_training.py.

◆ job_name

job_name = self.task_id
inherited

set the job name (inherited variable)

Definition at line 185 of file cdc_and_svd_ckf_merger_mva_training.py.

◆ n_events_training

n_events_training = b2luigi.IntParameter()
static

Number of events to generate.

Definition at line 387 of file cdc_and_svd_ckf_merger_mva_training.py.

◆ queue

str queue = 's'
staticinherited

queue

Definition at line 179 of file cdc_and_svd_ckf_merger_mva_training.py.

◆ random_seed

random_seed = b2luigi.Parameter()
static

Random basf2 seed.

It is further used to read of the production process to preserve clearness in the b2luigi output.

Definition at line 390 of file cdc_and_svd_ckf_merger_mva_training.py.

◆ result_filter_records_name

result_filter_records_name = b2luigi.Parameter()
static

Name of the records file for training the final result filter.

Definition at line 393 of file cdc_and_svd_ckf_merger_mva_training.py.


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