|
| 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
|
|
|
| save_tree = SaveTreeRefiner() |
| Refiners to be executed at the end of the harvesting / termination of the module Store the output of the module in a root file.
|
|
int | default_expert_level = 1 |
| The default value of expert_level if not specified explicitly by the caller.
|
|
Collects variables of interest for the V0Validation and the v0ValidationCreatePlots script.
Definition at line 28 of file v0ValidationGenerateSample.py.
◆ __init__()
Initialize the harvester.
Defines over which StoreArray is iterated and the output file.
Definition at line 31 of file v0ValidationGenerateSample.py.
32 """Initialize the harvester.
33 Defines over which StoreArray is iterated and the output file.
35 HarvestingModule.__init__(self, foreach=
"MCParticles", output_file_name=
"../V0ValidationHarvested.root")
◆ barn()
◆ 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()
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()
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()
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()
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()
Selects MCTrue variables of interest for all KShort in the sample. If the KShort has a related reconstructed
V0, these values are written out too. Variables of interest are:
R: Radial (in xy) distance to origin.
Theta: Theta Angle of decay vertex.
Phi: Phi Angle of decay vertex.
P: Momentum of the KShort.
M: Invariant mass of the KShort.
Chi2: Chi2 of vertex fit.
isFound: True if MCParticle has a related V0.
If the MCParticle has no related V0, the variables are filled with NaN's.
:param mc: Belle2::MCParticle
:return: dict with the variables of interest.
Reimplemented from HarvestingModule.
Definition at line 45 of file v0ValidationGenerateSample.py.
◆ pick()
def pick |
( |
|
self, |
|
|
|
mc_particle |
|
) |
| |
◆ prepare()
◆ refine()
def refine |
( |
|
self, |
|
|
|
crops |
|
) |
| |
|
inherited |
◆ terminate()
Termination method of the module.
Finalize the collected crops.
Start the refinement.
Definition at line 265 of file harvesting.py.
◆ title
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: