Belle II Software  release-08-01-10
SegmentFakeRatesModule Class Reference
Inheritance diagram for SegmentFakeRatesModule:
Collaboration diagram for SegmentFakeRatesModule:

Public Member Functions

def __init__ (self, output_file_name, local_track_cands_store_array_name="LocalTrackCands", mc_track_cands_store_array_name="MCTrackCands", legendre_track_cand_store_array_name="LegendreTrackCands")
 
def prepare (self)
 
def peel (self, local_track_cand)
 
def id (self)
 
def initialize (self)
 
def event (self)
 
def terminate (self)
 
def barn (self)
 
def gather (self)
 
def pick (self, crop)
 
def refine (self, crops)
 

Static Public Member Functions

def create_crop_part_collection ()
 
def iter_store_obj (store_obj)
 

Public Attributes

 mc_track_cands_store_array_name
 cached name of the TrackCands StoreArray
 
 legendre_track_cand_store_array_name
 cached name of the Legendre TrackCands StoreArray
 
 mc_track_matcher_local
 function to match local tracks to MC tracks
 
 mc_track_matcher_legendre
 function to match Legendre tracks to MC tracks
 
 cdcHits
 cached CDCHits StoreArray
 
 foreach
 Name of the StoreArray or iterable StoreObjPtr that contains the objects to be harvested.
 
 output_file_name
 Name of the ROOT output file to be generated.
 
 title
 Name of this harvest. More...
 
 contact
 Contact email address to be displayed on the validation page.
 
 expert_level
 Integer expert level that controlls to detail of plots to be generated.
 
 refiners
 A list of additional refiner instances to be executed on top of the refiner methods that are members of this class.
 
 show_results
 Switch to show the result ROOT file in a TBrowser on terminate.
 
 stash
 stash of the harvested crops (start with those in the barn)
 
 raw_crops
 the dictionaries from peel as a numpy.array of doubles
 
 crops
 the dictionaries from peel
 

Static Public Attributes

 save_tree
 Refiners to be executed at the end of the harvesting / termination of the module Save a tree of all collected variables in a sub folder. More...
 
int default_expert_level = 1
 The default value of expert_level if not specified explicitly by the caller.
 

Detailed Description

Harvesting module to check for basic matching information of the found segments.
If you want to have matching information, please use the MC matcher module to make all possible
combinations between legendre, local and MC track candidates.
Also, the Segments must be transformed into GF track cands.

Definition at line 141 of file harvester.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  output_file_name,
  local_track_cands_store_array_name = "LocalTrackCands",
  mc_track_cands_store_array_name = "MCTrackCands",
  legendre_track_cand_store_array_name = "LegendreTrackCands" 
)
Initialize the harvesting module with
Arguments
---------
  output_file_name Name of the root file
  local_track_cands_store_array_name Name of the StoreArray for local track cands
  mc_track_cands_store_array_name Name of the StoreArray for MC track cands
  legendre_track_cand_store_array_name Name of the StoreArray for legendre track cands

Definition at line 150 of file harvester.py.

Member Function Documentation

◆ barn()

def barn (   self)
inherited
Coroutine that receives the dictionaries of names and values from peel and store them.

Reimplemented in PickleHarvestingModule.

Definition at line 289 of file harvesting.py.

◆ create_crop_part_collection()

def create_crop_part_collection ( )
staticinherited
Create the storing objects for the crop values

Currently a numpy.array of doubles is used to store all values in memory.

Definition at line 281 of file harvesting.py.

◆ event()

def event (   self)
inherited
Event method of the module

* Does invoke the prepare method before the iteration starts.
* In each event fetch the StoreArray / iterable StoreObjPtr,
* Iterate through all instances
* Feed each instance to the pick method to deside it the instance is relevant
* Forward it to the peel method that should generated a dictionary of values
* Store each dictionary of values

Definition at line 241 of file harvesting.py.

◆ gather()

def gather (   self)
inherited
Iterator that yield the instances form the StoreArray / iterable StoreObj.

Yields
------
Object instances from the StoreArray, iterable StoreObj or the StoreObj itself
in case it is not iterable.

Definition at line 334 of file harvesting.py.

◆ id()

def id (   self)
inherited
Working around that name() is a method.

Exposing the name as a property using a different name

Definition at line 226 of file harvesting.py.

◆ initialize()

def initialize (   self)
inherited
Initialisation method of the module.

Prepares the receiver stash of objects to be harvestered.

Definition at line 233 of file harvesting.py.

◆ iter_store_obj()

def iter_store_obj (   store_obj)
staticinherited
Obtain a iterator from a StoreObj

Repeatly calls iter(store_obj) or store_obj.__iter__()
until the final iterator returns itself

Returns
-------
iterator of the StoreObj

Definition at line 452 of file harvesting.py.

◆ peel()

def peel (   self,
  local_track_cand 
)
 Extract the information from the segments. 

Reimplemented from HarvestingModule.

Definition at line 189 of file harvester.py.

◆ pick()

def pick (   self,
  crop 
)
inherited
Indicate whether the instance should be forwarded to the peeling

Returns
-------
bool : Indicator if the instance is valueable in the current harverst.

Reimplemented in VxdCdcMergerHarvester, MCParticleHarvester, and VxdCdcMergerHarvesterMCSide.

Definition at line 398 of file harvesting.py.

◆ prepare()

def prepare (   self)
 Prepare the CDC lookup. 

Reimplemented from HarvestingModule.

Definition at line 183 of file harvester.py.

◆ refine()

def refine (   self,
  crops 
)
inherited
Receive the gathered crops and forward them to the refiners.

Reimplemented in PickleHarvestingModule.

Definition at line 407 of file harvesting.py.

◆ terminate()

def terminate (   self)
inherited
Termination method of the module.

Finalize the collected crops.
Start the refinement.

Definition at line 265 of file harvesting.py.

Member Data Documentation

◆ save_tree

save_tree
static
Initial value:
= refiners.save_tree(
)

Refiners to be executed at the end of the harvesting / termination of the module Save a tree of all collected variables in a sub folder.

Definition at line 268 of file harvester.py.

◆ title

title
inherited

Name of this harvest.

Title particle of this harvest

Definition at line 210 of file harvesting.py.


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