Belle II Software  release-06-02-00
SystematicsCombinedLowMulti Class Reference
Inheritance diagram for SystematicsCombinedLowMulti:
Collaboration diagram for SystematicsCombinedLowMulti:

Public Member Functions

def __init__ (self, mdstOutput=True, **kwargs)
 
def __authors__ (self)
 
def __description__ (self)
 
def __category__ (self)
 
def __contact__ (self)
 
def __str__ (self)
 
def __name__ (self)
 
def __call__ (self, path)
 
def __iter__ (self)
 
def load_standard_lists (self, path)
 
def additional_setup (self, path)
 
def build_lists (self, path)
 
def output_udst (self, path)
 
def output_mdst_if_any_flag_passes (self, *path, **kwargs)
 
def apply_hlt_hadron_cut_if_required (self, path)
 
def set_skim_logging (self)
 
def TestFiles (self)
 
def flags (self)
 
def flag (self)
 
def initialise_skim_flag (self, path)
 
def update_skim_flag (self, path)
 
def produce_on_tau_samples (self)
 
def merge_data_structures (self)
 
def code (self)
 
def validation_histograms (self, path)
 
def postskim_path (self)
 
def skim_event_cuts (self, cut, *path)
 

Public Attributes

 Skims
 
 name
 
 SkimLists
 
 mc
 
 analysisGlobaltag
 
 mdst_kwargs
 
 OutputFileName
 
 additionalDataDescription
 

Static Public Attributes

bool produces_mdst_by_default = True
 
bool produce_on_tau_samples = True
 
 NoisyModules = None
 
string TestSampleProcess = "mixed"
 
dictionary MergeDataStructures = {}
 
bool ApplyHLTHadronCut = False
 
 validation_sample = None
 

Private Member Functions

def _check_duplicate_list_names (self)
 
def _method_unchanged (self, method)
 

Private Attributes

 _udstOutput
 
 _mdstOutput
 
 _validation
 

Static Private Attributes

list __authors__ = ["Marcel Hohmann"]
 
string __description__ = "Combined Skim of the systematic low multi skims: FourLepton, Radmumu, Bhabha, TauThrust."
 
 __contact__ = __liaison_leptonID__
 
string __category__ = "performance, leptonID"
 
string __name__ = "SystematicsCombinedLowMulti"
 
 _MainPath = None
 
 _ConditionalPath = None
 

Detailed Description

  Combined systematics skim for the four low multi channels:
      SystematicsFourLeptonFromHLTFlag,
      SystematicsRadmumuFromHLTFlag,
      SystematicsBhabha,
      TauThrust.

  This is required for  technical (data production) reasons, as it keeps the number of files low.
  See the definitions of the individual skims for the details.

Definition at line 862 of file systematics.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  mdstOutput = True,
**  kwargs 
)
 Initialiser.

Args:
    **kwargs: key-worded arguments. See CombinedSkim.__init__()

Definition at line 881 of file systematics.py.

Member Function Documentation

◆ __call__()

def __call__ (   self,
  path 
)
inherited
Produce the skim particle lists and write uDST file.

Parameters:
    path (basf2.Path): Skim path to be processed.

Reimplemented from BaseSkim.

Definition at line 581 of file core.py.

◆ _check_duplicate_list_names()

def _check_duplicate_list_names (   self)
privateinherited
Check for duplicate particle list names.

.. Note::

    Skims cannot be relied on to define their particle list names in advance, so
    this function can only be run after `build_lists` is run.

Definition at line 816 of file core.py.

◆ _method_unchanged()

def _method_unchanged (   self,
  method 
)
privateinherited
Check if the method of the class is the same as in its parent class, or if it has
been overridden.

Useful for determining if *e.g.* `validation_histograms` has been defined for a
particular skim.

Definition at line 375 of file core.py.

◆ additional_setup()

def additional_setup (   self,
  path 
)
inherited
Run the `BaseSkim.additional_setup` function of each skim.

Parameters:
    path (basf2.Path): Skim path to be processed.

Reimplemented from BaseSkim.

Definition at line 637 of file core.py.

◆ apply_hlt_hadron_cut_if_required()

def apply_hlt_hadron_cut_if_required (   self,
  path 
)
inherited
Run the `BaseSkim.apply_hlt_hadron_cut_if_required` function for each skim.

Parameters:
    path (basf2.Path): Skim path to be processed.

Reimplemented from BaseSkim.

Definition at line 721 of file core.py.

◆ build_lists()

def build_lists (   self,
  path 
)
inherited
Run the `BaseSkim.build_lists` function of each skim.

Parameters:
    path (basf2.Path): Skim path to be processed.

Reimplemented from BaseSkim.

Definition at line 646 of file core.py.

◆ code()

def code (   self)
inherited
Eight-digit code assigned to this skim in the registry.

Definition at line 126 of file core.py.

◆ flag()

def flag (   self)
inherited
Event-level variable indicating whether an event passes the combinedSkim or not.

Reimplemented from BaseSkim.

Definition at line 747 of file core.py.

◆ flags()

def flags (   self)
inherited
List of flags for each skim in combined skim.

Definition at line 740 of file core.py.

◆ initialise_skim_flag()

def initialise_skim_flag (   self,
  path 
)
inherited
Add the module `skim.utils.flags.InitialiseSkimFlag` to the path, to
initialise flags for each skim.

Reimplemented from BaseSkim.

Definition at line 753 of file core.py.

◆ load_standard_lists()

def load_standard_lists (   self,
  path 
)
inherited
Add all required standard list loading to the path.

Note:
    To avoid loading standard lists twice, this function creates dummy paths
    that are passed through ``load_standard_lists`` for each skim. These dummy
    paths are then inspected, and a list of unique module-parameter combinations
    is added to the main skim path.

Parameters:
    path (basf2.Path): Skim path to be processed.

Reimplemented from BaseSkim.

Definition at line 599 of file core.py.

◆ merge_data_structures()

def merge_data_structures (   self)
inherited
Read the values of `BaseSkim.MergeDataStructures` and merge data structures
accordingly.

For example, if ``MergeDataStructures`` has the value ``{"FEIChannelArgs":
_merge_boolean_dicts.__func__}``, then ``_merge_boolean_dicts`` is run on all
input skims with the attribute ``FEIChannelArgs``, and the value of
``FEIChannelArgs`` for that skim is set to the result.

In the FEI skims, this is used to merge configs which are passed to a cached
function, thus allowing us to apply the FEI once with all the required particles
available.

Definition at line 794 of file core.py.

◆ output_mdst_if_any_flag_passes()

def output_mdst_if_any_flag_passes (   self,
path,
**  kwargs 
)
inherited
Add MDST output to the path if the event passes any of the skim flags.
EventExtraInfo is included in the MDST output so that the flags are available in
the output.

The ``CombinedSkimName`` parameter in the `CombinedSkim` initialisation is used
for the output filename if ``filename`` is not included in kwargs.

Parameters:
    path (basf2.Path): Skim path to be processed.
    **kwargs: Passed on to `mdst.add_mdst_output`.

Definition at line 665 of file core.py.

◆ output_udst()

def output_udst (   self,
  path 
)
inherited
Run the `BaseSkim.output_udst` function of each skim.

Parameters:
    path (basf2.Path): Skim path to be processed.

Reimplemented from BaseSkim.

Definition at line 655 of file core.py.

◆ postskim_path()

def postskim_path (   self)
inherited
Return the skim path.

* If `BaseSkim.skim_event_cuts` has been run, then the skim lists will only be
  created on a conditional path, so subsequent modules should be added to the
  conditional path.

* If `BaseSkim.skim_event_cuts` has not been run, then the main analysis path is
  returned.

Definition at line 244 of file core.py.

◆ produce_on_tau_samples()

def produce_on_tau_samples (   self)
inherited
Corresponding value of this attribute for each individual skim.

A warning is issued if the individual skims in combined skim contain a mix of
True and False for this property.

Definition at line 769 of file core.py.

◆ set_skim_logging()

def set_skim_logging (   self)
inherited
Run `BaseSkim.set_skim_logging` for each skim.

Reimplemented from BaseSkim.

Definition at line 730 of file core.py.

◆ skim_event_cuts()

def skim_event_cuts (   self,
  cut,
path 
)
inherited
Apply event-level cuts in a skim-safe way.

Parameters:
    cut (str): Event-level cut to be applied.
    path (basf2.Path): Skim path to be processed.

Returns:
    Path on which the rest of this skim should be processed.
    On this path, only events which passed the event-level cut will
    be processed further.

.. Tip::
    If running this function in `BaseSkim.additional_setup` or
    `BaseSkim.build_lists`, redefine the ``path`` to the path returned by
    `BaseSkim.skim_event_cuts`, *e.g.*

    .. code-block:: python

        def build_lists(self, path):
            path = self.skim_event_cuts("nTracks>4", path=path)
            # rest of skim list building...

.. Note::
    The motivation for using this function over `applyEventCuts` is that
    `applyEventCuts` completely removes events from processing. If we combine
    multiple skims in a single steering file (which is done in production), and
    the first has a set of event-level cuts, then all the remaining skims will
    never even see those events.

    Internally, this function creates a new path, which is only processed for
    events passing the event-level cut. To avoid issues around particles not
    being available on the main path (leading to noisy error logs), we need to
    add the rest of the skim to this path. So this new path is assigned to the
    attribute ``BaseSkim._ConditionalPath``, and ``BaseSkim.__call__`` will run
    all remaining methods on this path.

Definition at line 272 of file core.py.

◆ TestFiles()

def TestFiles (   self)
inherited
Location of test MDST sample. To modify this, set the property
`BaseSkim.TestSampleProcess`, and this function will find an appropriate test
sample from the list in
``/group/belle2/dataprod/MC/SkimTraining/SampleLists/TestFiles.yaml``

If no sample can be found, an empty list is returned.

Reimplemented from BaseSkim.

Definition at line 736 of file core.py.

◆ update_skim_flag()

def update_skim_flag (   self,
  path 
)
inherited
Add the module `skim.utils.flags.UpdateSkimFlag` to the conditional path
of each skims.

Reimplemented from BaseSkim.

Definition at line 760 of file core.py.

◆ validation_histograms()

def validation_histograms (   self,
  path 
)
inherited
Create validation histograms for the skim.

Parameters:
    path (basf2.Path): Skim path to be processed.

Reimplemented in TDCPV_ccs, TDCPV_qqs, TauThrust, TauGeneric, TauLFV, SystematicsPhiGamma, SLUntagged, PRsemileptonicUntagged, CharmoniumPsi, LowMassTwoTrack, LeptonicUntagged, feiSLBplus, feiSLB0, feiHadronicBplus, feiHadronicB0, inclusiveBplusToKplusNuNu, BtoXll, BtoXgamma, BtoD0h_Kshh, BtoD0h_hh, BtoD0h_Kspipipi0, and BtoD0h_Kspi0.

Definition at line 206 of file core.py.


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