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

Public Member Functions

 output (self)
 
 requires (self)
 
 create_state_recording_path (self, layer, records1_fname, records2_fname, records3_fname)
 
 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.
 
 random_seed = b2luigi.Parameter()
 Random basf2 seed.
 
 n_events = b2luigi.IntParameter()
 Number of events to generate for training.
 
 layer = b2luigi.IntParameter()
 Layer on which to toggle for recording the information for training.
 
str batch_system = 'lsf'
 batch system
 
str queue = 's'
 queue
 

Detailed Description

Record the data for the three state filters for the CDCToSVDSpacePointCKF.

This task requires that the events used for training have been simulated before, which is done using the
``SplitMergeSimTask``.

Definition at line 389 of file combined_cdc_to_svd_ckf_mva_training.py.

Member Function Documentation

◆ create_path()

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

Definition at line 507 of file combined_cdc_to_svd_ckf_mva_training.py.

507 def create_path(self):
508 """
509 Create basf2 path to process with event generation and simulation.
510 """
511 return self.create_state_recording_path(
512 layer=self.layer,
513 records1_fname=self.get_output_file_name("records1.root"),
514 records2_fname=self.get_output_file_name("records2.root"),
515 records3_fname=self.get_output_file_name("records3.root"),
516 )
517

◆ create_state_recording_path()

create_state_recording_path ( self,
layer,
records1_fname,
records2_fname,
records3_fname )
Create a path for the recording. To record the data for the SVD state filters, CDC tracks are required, and these must
be truth matched before. The data have to recorded for each layer of the SVD, i.e. layers 3 to 6, but also an artificial
layer 7.

:param layer: The layer for which the data are recorded.
:param records1_fname: Name of the records1 file.
:param records2_fname: Name of the records2 file.
:param records3_fname: Name of the records3 file.

Definition at line 426 of file combined_cdc_to_svd_ckf_mva_training.py.

426 def create_state_recording_path(self, layer, records1_fname, records2_fname, records3_fname):
427 """
428 Create a path for the recording. To record the data for the SVD state filters, CDC tracks are required, and these must
429 be truth matched before. The data have to recorded for each layer of the SVD, i.e. layers 3 to 6, but also an artificial
430 layer 7.
431
432 :param layer: The layer for which the data are recorded.
433 :param records1_fname: Name of the records1 file.
434 :param records2_fname: Name of the records2 file.
435 :param records3_fname: Name of the records3 file.
436 """
437 path = basf2.create_path()
438
439 # get all the file names from the list of input files that are meant for training
440 file_list = [fname for fname in self.get_all_input_file_names()
441 if "generated_mc_N" in fname and "training" in fname and fname.endswith(".root")]
442 path.add_module("RootInput", inputFileNames=file_list)
443
444 path.add_module("Gearbox")
445 path.add_module("Geometry")
446 path.add_module("SetupGenfitExtrapolation")
447
448 add_hit_preparation_modules(path, components=["SVD"])
449
450 add_track_finding(path, reco_tracks="CDCRecoTracks", components=["CDC"], prune_temporary_tracks=False)
451
452 path.add_module('TrackFinderMCTruthRecoTracks',
453 RecoTracksStoreArrayName="MCRecoTracks",
454 WhichParticles=[],
455 UsePXDHits=True,
456 UseSVDHits=True,
457 UseCDCHits=True)
458
459 path.add_module("MCRecoTracksMatcher", UsePXDHits=False, UseSVDHits=False, UseCDCHits=True,
460 mcRecoTracksStoreArrayName="MCRecoTracks",
461 prRecoTracksStoreArrayName="CDCRecoTracks")
462 path.add_module("DAFRecoFitter", recoTracksStoreArrayName="CDCRecoTracks")
463
464 path.add_module("CDCToSVDSpacePointCKF",
465 inputRecoTrackStoreArrayName="CDCRecoTracks",
466 outputRecoTrackStoreArrayName="VXDRecoTracks",
467 outputRelationRecoTrackStoreArrayName="CDCRecoTracks",
468
469 relationCheckForDirection="backward",
470 reverseSeed=False,
471 writeOutDirection="backward",
472
473 firstHighFilter="truth",
474 firstEqualFilter="recording",
475 firstEqualFilterParameters={"treeName": "records1", "rootFileName":
476 records1_fname, "returnWeight": 1.0},
477 firstLowFilter="none",
478 firstHighUseNStates=0,
479 firstToggleOnLayer=layer,
480
481 advanceHighFilter="advance",
482
483 secondHighFilter="truth",
484 secondEqualFilter="recording",
485 secondEqualFilterParameters={"treeName": "records2", "rootFileName":
486 records2_fname, "returnWeight": 1.0},
487 secondLowFilter="none",
488 secondHighUseNStates=0,
489 secondToggleOnLayer=layer,
490
491 updateHighFilter="fit",
492
493 thirdHighFilter="truth",
494 thirdEqualFilter="recording",
495 thirdEqualFilterParameters={"treeName": "records3", "rootFileName": records3_fname},
496 thirdLowFilter="none",
497 thirdHighUseNStates=0,
498 thirdToggleOnLayer=layer,
499
500 filter="none",
501 exportTracks=False,
502
503 enableOverlapResolving=False)
504
505 return path
506

◆ 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 407 of file combined_cdc_to_svd_ckf_mva_training.py.

407 def output(self):
408 """
409 Generate list of output files that the task should produce.
410 The task is considered finished if and only if the outputs all exist.
411 """
412 for record_fname in ["records1.root", "records2.root", "records3.root"]:
413 yield self.add_to_output(record_fname)
414

◆ remove_output()

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

Definition at line 518 of file combined_cdc_to_svd_ckf_mva_training.py.

518 def remove_output(self):
519 """
520 Default function from base b2luigi.Task class.
521 """
522 self._remove_output()
523
524

◆ requires()

requires ( self)
This task only requires that the input files have been created.

Definition at line 415 of file combined_cdc_to_svd_ckf_mva_training.py.

415 def requires(self):
416 """
417 This task only requires that the input files have been created.
418 """
419 yield SplitNMergeSimTask(
420 bkgfiles_dir=SummaryTask.bkgfiles_by_exp[self.experiment_number],
421 experiment_number=self.experiment_number,
422 random_seed=self.random_seed,
423 n_events=self.n_events,
424 )
425

Member Data Documentation

◆ batch_system

str batch_system = 'lsf'
staticinherited

batch system

Definition at line 189 of file combined_cdc_to_svd_ckf_mva_training.py.

◆ experiment_number

experiment_number = b2luigi.IntParameter()
static

Experiment number of the conditions database, e.g.

defines simulation geometry

Definition at line 397 of file combined_cdc_to_svd_ckf_mva_training.py.

◆ job_name

job_name = self.task_id
inherited

set the job name (inherited variable)

Definition at line 197 of file combined_cdc_to_svd_ckf_mva_training.py.

◆ layer

layer = b2luigi.IntParameter()
static

Layer on which to toggle for recording the information for training.

Definition at line 405 of file combined_cdc_to_svd_ckf_mva_training.py.

◆ n_events

n_events = b2luigi.IntParameter()
static

Number of events to generate for training.

Definition at line 402 of file combined_cdc_to_svd_ckf_mva_training.py.

◆ queue

str queue = 's'
staticinherited

queue

Definition at line 191 of file combined_cdc_to_svd_ckf_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 400 of file combined_cdc_to_svd_ckf_mva_training.py.


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