Belle II Software release-09-00-00
ResultRecordingTask Class Reference
Inheritance diagram for ResultRecordingTask:
Collaboration diagram for ResultRecordingTask:

Public Member Functions

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

Static Public Attributes

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

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 332 of file cdc_and_svd_ckf_merger_mva_training.py.

Member Function Documentation

◆ create_path()

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

Definition at line 432 of file cdc_and_svd_ckf_merger_mva_training.py.

432 def create_path(self):
433 """
434 Create basf2 path to process with event generation and simulation.
435 """
436 return self.create_result_recording_path(
437 result_filter_records_name=self.get_output_file_name(self.result_filter_records_name),
438 )
439
440

◆ create_result_recording_path()

def 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 367 of file cdc_and_svd_ckf_merger_mva_training.py.

367 def create_result_recording_path(self, result_filter_records_name):
368 """
369 Create a path for the recording of the result filter. This file is then used to train the result filter.
370
371 :param result_filter_records_name: Name of the recording file.
372 """
373
374 path = basf2.create_path()
375
376 # get all the file names from the list of input files that are meant for training
377 file_list = [fname for sublist in self.get_input_file_names().values()
378 for fname in sublist if "generated_mc_N" in fname and "training" in fname and fname.endswith(".root")]
379 path.add_module("RootInput", inputFileNames=file_list)
380
381 path.add_module("Gearbox")
382 path.add_module("Geometry")
383 path.add_module("SetupGenfitExtrapolation")
384
385 add_hit_preparation_modules(path, components=["SVD"])
386
387 # MCTrackFinding
388 mc_reco_tracks = "MCRecoTracks"
389 path.add_module('TrackFinderMCTruthRecoTracks',
390 RecoTracksStoreArrayName=mc_reco_tracks)
391
392 # CDC track finding and MC matching
393 cdc_reco_tracks = "CDCRecoTracks"
394 add_cdc_track_finding(path, output_reco_tracks=cdc_reco_tracks)
395 path.add_module("MCRecoTracksMatcher", UsePXDHits=False, UseSVDHits=False, UseCDCHits=True,
396 mcRecoTracksStoreArrayName=mc_reco_tracks,
397 prRecoTracksStoreArrayName=cdc_reco_tracks)
398
399 path.add_module("DAFRecoFitter", recoTracksStoreArrayName=cdc_reco_tracks)
400
401 # SVD track finding and MC matching
402 svd_reco_tracks = "SVDRecoTracks"
403 add_svd_standalone_tracking(path, reco_tracks=svd_reco_tracks)
404 path.add_module("MCRecoTracksMatcher", UsePXDHits=False, UseSVDHits=True, UseCDCHits=False,
405 mcRecoTracksStoreArrayName=mc_reco_tracks,
406 prRecoTracksStoreArrayName=svd_reco_tracks)
407
408 direction = "backward"
409 path.add_module("CDCToSVDSeedCKF",
410 inputRecoTrackStoreArrayName=cdc_reco_tracks,
411
412 fromRelationStoreArrayName=cdc_reco_tracks,
413 toRelationStoreArrayName=svd_reco_tracks,
414
415 relatedRecoTrackStoreArrayName=svd_reco_tracks,
416 cdcTracksStoreArrayName=cdc_reco_tracks,
417 vxdTracksStoreArrayName=svd_reco_tracks,
418
419 relationCheckForDirection=direction,
420 reverseSeed=False,
421 firstHighFilterParameters={"direction": direction},
422 advanceHighFilterParameters={"direction": direction},
423
424 writeOutDirection=direction,
425 endEarly=False,
426
427 filter="recording_with_relations",
428 filterParameters={"rootFileName": result_filter_records_name})
429
430 return path
431

◆ output()

def 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 349 of file cdc_and_svd_ckf_merger_mva_training.py.

349 def output(self):
350 """
351 Generate list of output files that the task should produce.
352 The task is considered finished if and only if the outputs all exist.
353 """
354 yield self.add_to_output(self.result_filter_records_name)
355

◆ requires()

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

Definition at line 356 of file cdc_and_svd_ckf_merger_mva_training.py.

356 def requires(self):
357 """
358 This task requires that the training SplitMergeSimTask is finished.
359 """
360 yield SplitNMergeSimTask(
361 bkgfiles_dir=MainTask.bkgfiles_by_exp[self.experiment_number],
362 random_seed=self.random_seed,
363 n_events=self.n_events_training,
364 experiment_number=self.experiment_number,
365 )
366

Member Data Documentation

◆ experiment_number

b2luigi experiment_number = b2luigi.IntParameter()
static

Experiment number of the conditions database, e.g.

defines simulation geometry

Definition at line 339 of file cdc_and_svd_ckf_merger_mva_training.py.

◆ n_events_training

b2luigi n_events_training = b2luigi.IntParameter()
static

Number of events to generate.

Definition at line 341 of file cdc_and_svd_ckf_merger_mva_training.py.

◆ random_seed

b2luigi 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 344 of file cdc_and_svd_ckf_merger_mva_training.py.

◆ result_filter_records_name

b2luigi result_filter_records_name = b2luigi.Parameter()
static

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

Definition at line 347 of file cdc_and_svd_ckf_merger_mva_training.py.


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