Belle II Software  release-06-01-15
feiSL Class Reference
Inheritance diagram for feiSL:
Collaboration diagram for feiSL:

Public Member Functions

def build_lists (self, path)
 
def __authors__ (self)
 
def __contact__ (self)
 
def __category__ (self)
 
def additional_setup (self, path)
 
def __description__ (self)
 
def code (self)
 
def load_standard_lists (self, path)
 
def validation_histograms (self, path)
 
def __call__ (self, path)
 
def postskim_path (self)
 
def skim_event_cuts (self, cut, *path)
 
def TestFiles (self)
 
def flag (self)
 
def initialise_skim_flag (self, path)
 
def update_skim_flag (self, path)
 
def __str__ (self)
 
def __name__ (self)
 
def set_skim_logging (self)
 
def output_udst (self, path)
 
def apply_hlt_hadron_cut_if_required (self, path)
 

Static Public Member Functions

def fei_precuts (path)
 
def run_fei_for_skims (FEIChannelArgs, FEIPrefix, analysisGlobaltag, *path)
 
def setup_fei_aliases (FEIChannelArgs)
 

Public Attributes

 mc
 
 SkimLists
 
 name
 
 OutputFileName
 
 additionalDataDescription
 

Static Public Attributes

dictionary FEIChannelArgs
 
string FEIPrefix = "FEIv4_2022_MC15_light-2205-abys"
 
dictionary MergeDataStructures = {"FEIChannelArgs": _merge_boolean_dicts}
 
list NoisyModules = ["ParticleCombiner"]
 
bool ApplyHLTHadronCut = True
 
bool produce_on_tau_samples = False
 
string TestSampleProcess = "mixed"
 
bool produces_mdst_by_default = False
 
 validation_sample = None
 
bool mc = True
 
 analysisGlobaltag = None
 
list SkimLists = []
 

Private Member Functions

def _method_unchanged (self, method)
 

Private Attributes

 _ConditionalPath
 
 _udstOutput
 
 _validation
 

Static Private Attributes

string __description__ = "FEI-tagged neutral and charged :math:`B`'s decaying semileptonically."
 
list __authors__ = ["Racha Cheaib", "Hannah Wakeling", "Phil Grace"]
 
 __contact__ = __liaison__
 
string __category__ = "physics, Full Event Interpretation"
 
 _MainPath = None
 

Detailed Description

Tag side :math:`B` cuts:

* :math:`-4 < \\cos\\theta_{BY} < 3`
* :math:`\\log_{10}(\\text{signal probability}) > -2.4`
* :math:`p_{\\ell}^{*} > 1.0~{\\rm GeV}` in CMS frame

SL :math:`B^0` and :math:`B^+` tags are reconstructed. Hadronic :math:`B` with SL
:math:`D` are not reconstructed, as these are rare and time-intensive.

<CHANNELS>

See also:
    `BaseFEISkim.FEIPrefix` for FEI training used, and `BaseFEISkim.fei_precuts` for
    event-level cuts made before applying the FEI.

Definition at line 659 of file fei.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 in CombinedSkim.

Definition at line 214 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
Apply pre-FEI event-level cuts and apply the FEI. This setup function is run
by all FEI skims, so they all have the save event-level pre-cuts.

This function passes `FEIChannelArgs` to the cached function `run_fei_for_skims`
to avoid applying the FEI twice.

See also:
    `fei_precuts` for event-level cut definitions.

Reimplemented from BaseSkim.

Definition at line 225 of file fei.py.

◆ apply_hlt_hadron_cut_if_required()

def apply_hlt_hadron_cut_if_required (   self,
  path 
)
inherited
Apply the ``hlt_hadron`` selection if the property ``ApplyHLTHadronCut`` is True.

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

Reimplemented in CombinedSkim.

Definition at line 452 of file core.py.

◆ build_lists()

def build_lists (   self,
  path 
)
Create the skim lists to be saved in the output uDST. This function is where
the main skim cuts should be applied. This function should return a list of
particle list names.

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

.. versionchanged:: release-06-00-00

   Previously, this function was expected to set the attribute
   `BaseSkim.SkimLists`. Now this is handled by `BaseSkim`, and this function is
   expected to return the list of particle list names.

Reimplemented from BaseSkim.

Definition at line 688 of file fei.py.

◆ code()

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

Definition at line 126 of file core.py.

◆ fei_precuts()

def fei_precuts (   path)
staticinherited
Skim pre-cuts are applied before running the FEI, to reduce computation time.
This setup function is run by all FEI skims, so they all have the save
event-level pre-cuts:

* :math:`n_{\\text{cleaned tracks}} \\geq 3`
* :math:`n_{\\text{cleaned ECL clusters}} \\geq 3`
* :math:`\\text{Visible energy of event (CMS frame)}>4~{\\rm GeV}`

We define "cleaned" tracks and clusters as:

* Cleaned tracks (``pi+:FEI_cleaned``): :math:`d_0 < 0.5~{\\rm cm}`,
  :math:`|z_0| < 2~{\\rm cm}`, and :math:`p_T > 0.1~{\\rm GeV}` * Cleaned ECL
  clusters (``gamma:FEI_cleaned``): :math:`0.296706 < \\theta < 2.61799`, and
  :math:`E>0.1~{\\rm GeV}`

Definition at line 121 of file fei.py.

◆ flag()

def flag (   self)
inherited
Event-level variable indicating whether an event passes the skim or not. To use
the skim flag without writing uDST output, use the argument ``udstOutput=False``
when instantiating the skim class.

Reimplemented in CombinedSkim.

Definition at line 347 of file core.py.

◆ initialise_skim_flag()

def initialise_skim_flag (   self,
  path 
)
inherited
Add the module `skim.utils.flags.InitialiseSkimFlag` to the path, which
initialises flag for this skim to zero.

Reimplemented in CombinedSkim.

Definition at line 355 of file core.py.

◆ load_standard_lists()

def load_standard_lists (   self,
  path 
)
inherited
Load any standard lists. This code will be run before any
`BaseSkim.additional_setup` and `BaseSkim.build_lists`.

Note:
    This is separated into its own function so that when skims are combined, any
    standard lists used by two skims can be loaded just once.

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

Reimplemented in TDCPV_ccs, TDCPV_qqs, TauThrust, TauGeneric, TauLFV, SystematicsBhabha, SystematicsKshort, SystematicsJpsi, SystematicsRadMuMuFromHLTFlag, SystematicsFourLeptonFromHLTFlag, Random, SystematicsPhiGamma, SystematicsLambda, SystematicsRadEE, SystematicsEELL, SystematicsRadMuMu, Resonance, SystematicsTracking, SystematicsDstar, B0toDstarl_Kpi_Kpipi0_Kpipipi, SLUntagged, PRsemileptonicUntagged, InclusiveLambda, CharmoniumPsi, BottomoniumUpsilon, BottomoniumEtabExclusive, SingleTagPseudoScalar, dilepton, LeptonicUntagged, BtoXll_LFV, BtoXll, BtoXgamma, AA2uuuu, InelasticDarkMatterWithDarkHiggs, BtoKplusLLP, InelasticDarkMatter, RadBhabhaV0Control, DielectronPlusMissingEnergy, GammaGammaControlKLMDark, EGammaControlDark, LFVZpVisible, ElectronMuonPlusMissingEnergy, DimuonPlusMissingEnergy, SinglePhotonDark, DstToD0Pi_D0ToVGamma, EarlyData_DstToD0Pi_D0ToHpHmPi0, EarlyData_DstToD0Pi_D0ToHpJmPi0, DstToD0Pi_D0ToHpJmKs, DstToD0Pi_D0ToNeutrals, DstToD0Pi_D0ToHpJmEta, DstToD0Pi_D0ToHpHmHpJm, DstToD0Pi_D0ToKsOmega, DstToD0Pi_D0ToHpHmPi0, DstToD0Pi_D0ToHpJmPi0, DstToD0Pi_D0ToHpJm, DstToDpPi0_DpToHpPi0, LambdacTopHpJm, XToDp_DpToHpHmJp, XToDp_DpToKsHp, DstToD0Pi_D0ToRare, XToD0_D0ToNeutrals, BtoRhopRhom, BtoHad3Tracks1Pi0, BtoHad1Pi0, BtoHadTracks, BtoPi0Pi0, B0toD0Kpipi0_pi0, B0toDstarD, B0toDD_Kpipi_Kspi, BtoD0rho_Kpipipi_Kpipi0, BtoD0rho_Kpi, BtoD0h_Kshh, BtoD0h_Kpipipi_Kpipi0, BtoD0h_Kpi, BtoD0h_hh, B0toDstarRho_D0pi_Kpipipi_Kpipi0, B0toDstarRho_D0pi_Kpi, B0toDrho_Kspi, B0toDrho_Kpipi, B0toDstarPi_D0pi_Kpipipi_Kpipi0, B0toDstarPi_D0pi_Kpi, B0toDpi_Kspi, B0toDpi_Kpipi, BtoD0h_Kspipipi0, BtoD0h_Kspi0, and CombinedSkim.

Definition at line 163 of file core.py.

◆ output_udst()

def output_udst (   self,
  path 
)
inherited
Write the skim particle lists to an output uDST and print a summary of the
skim list statistics.

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

Reimplemented in CombinedSkim.

Definition at line 425 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.

◆ run_fei_for_skims()

def run_fei_for_skims (   FEIChannelArgs,
  FEIPrefix,
  analysisGlobaltag,
path 
)
staticinherited
Reconstruct hadronic and semileptonic :math:`B^0` and :math:`B^+` tags using
the generically trained FEI.

Parameters:
    FEIChannelArgs (dict(str, bool)): A dict of keyword-boolean pairs to be
        passed to `fei.get_default_channels`.
    FEIPrefix (str): Prefix label for the FEI training used in the FEI skims.
    path (`basf2.Path`): The skim path to be processed.

Definition at line 176 of file fei.py.

◆ set_skim_logging()

def set_skim_logging (   self)
inherited
Turns the log level to ERROR for selected modules to decrease the total size
of the skim log files. Additional modules can be silenced by setting the attribute
`NoisyModules` for an individual skim.

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

.. warning::

    This method works by inspecting the modules added to the path, and setting
    the log level to ERROR. This method should be called *after* all
    skim-related modules are added to the path.

Reimplemented in CombinedSkim.

Definition at line 399 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 in CombinedSkim.

Definition at line 324 of file core.py.

◆ update_skim_flag()

def update_skim_flag (   self,
  path 
)
inherited
Add the module `skim.utils.flags.UpdateSkimFlag` to the path, which
updates flag for this skim.

.. Warning::

    If a conditional path has been created before this, then this function
    *must* run on the conditional path, since the skim lists are not guaranteed
    to exist for all events on the main path.

Reimplemented in CombinedSkim.

Definition at line 362 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.

Member Data Documentation

◆ FEIChannelArgs

dictionary FEIChannelArgs
static
Initial value:
= {
"neutralB": True,
"chargedB": True,
"hadronic": False,
"semileptonic": True,
"KLong": False,
"baryonic": True,
"removeSLD": True
}

Definition at line 678 of file fei.py.


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