Belle II Software development
ResultRecordingTask Class Reference
Inheritance 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 333 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 433 of file cdc_and_svd_ckf_merger_mva_training.py.

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

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

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

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

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

◆ requires()

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

Definition at line 357 of file cdc_and_svd_ckf_merger_mva_training.py.

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

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 340 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 342 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 345 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 348 of file cdc_and_svd_ckf_merger_mva_training.py.


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