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

Public Member Functions

def load_standard_lists (self, path)
 
def build_lists (self, path)
 
def validation_histograms (self, path)
 
def __description__ (self)
 
def __category__ (self)
 
def __authors__ (self)
 
def __contact__ (self)
 
def code (self)
 
def additional_setup (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)
 

Public Attributes

 mc
 
 SkimLists
 
 name
 
 OutputFileName
 
 additionalDataDescription
 

Static Public Attributes

bool produce_on_tau_samples = False
 
 validation_sample = _VALIDATION_SAMPLE
 
 NoisyModules = None
 
string TestSampleProcess = "mixed"
 
dictionary MergeDataStructures = {}
 
bool ApplyHLTHadronCut = False
 
bool produces_mdst_by_default = False
 
bool mc = True
 
 analysisGlobaltag = None
 
list SkimLists = []
 

Private Member Functions

def _method_unchanged (self, method)
 

Private Attributes

 _udstOutput
 
 _validation
 

Static Private Attributes

list __authors__ = ["Kenji Inami"]
 
string __description__ = "Skim for Tau LFV decays."
 
 __contact__ = __liaison__
 
string __category__ = "physics, tau"
 
 _MainPath = None
 
 _ConditionalPath = None
 

Detailed Description

**Channel**: :math:`\\tau \\to l \\gamma, lll, l \\pi^0, l V^0, lhh, llp, phh`

**Output particle lists**: ``e+:taulfv, mu+:taulfv, pi+:taulfv, K+:taulfv, p+:taulfv``,
``gamma:taulfv, pi0:taulfv, K_S0:taulfv, eta:taulfv, eta':taulfv``,
``omega:taulfv``

**Criteria for 1 prong final states**: Number of good tracks < 5, :math:`1.0 < M < 2.0` GeV, :math:`-1.5 < \\Delta E < 0.5` GeV

**Criteria for >1 prong final states**: Number of good tracks < 7, :math:`1.4 < M < 2.0` GeV, :math:`-1.0 < \\Delta E < 0.5` GeV

Definition at line 95 of file taupair.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
Perform any setup steps necessary before running the skim.

Warning:
    Standard particle lists should *not* be loaded in here. This should be done
    by overriding the method `BaseSkim.load_standard_lists`. This is crucial for
    avoiding loading lists twice when combining skims for production.

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

Reimplemented in TDCPV_ccs, TDCPV_qqs, TauThrust, TauGeneric, Random, BaseFEISkim, InelasticDarkMatterWithDarkHiggs, ALP3Gamma, and CombinedSkim.

Definition at line 176 of file core.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 127 of file taupair.py.

127  def build_lists(self, path):
128  # particle selection
129  trackCuts = "-3.0 < dz < 3.0 and dr < 1.0"
130  ma.cutAndCopyList("e+:taulfv", "e+:all", trackCuts, path=path)
131  ma.cutAndCopyList("mu+:taulfv", "mu+:all", trackCuts, path=path)
132  ma.cutAndCopyList("pi+:taulfv", "pi+:all", trackCuts, path=path)
133  ma.cutAndCopyList("K+:taulfv", "K+:all", trackCuts, path=path)
134  ma.cutAndCopyList("p+:taulfv", "p+:all", trackCuts, path=path)
135 
136  ma.reconstructDecay("K_S0:taulfv -> pi+:all pi-:all", "0.3 < M < 0.7", path=path)
137 
138  gammaCuts = "E > 0.20 and clusterNHits > 1.5 and thetaInCDCAcceptance"
139  ma.cutAndCopyList("gamma:taulfv", "gamma:all", gammaCuts, path=path)
140 
141  gammaLooseCuts = "E > 0.1 and thetaInCDCAcceptance and clusterNHits > 1.5"
142  ma.cutAndCopyLists("gamma:taulfvloose", "gamma:all", gammaLooseCuts, path=path)
143  # pi0
144  ma.reconstructDecay("pi0:taulfv -> gamma:taulfvloose gamma:taulfvloose", "0.115 < M < 0.152", path=path)
145  # eta
146  ma.reconstructDecay("eta:taulfv1 -> gamma:taulfvloose gamma:taulfvloose", "0.4 < M < 0.6", path=path)
147  ma.reconstructDecay("eta:taulfv2 -> pi0:taulfv pi-:all pi+:all", "0.4 < M < 0.6", path=path)
148  ma.copyLists("eta:taulfv", ["eta:taulfv1", "eta:taulfv2"], path=path)
149  # eta"
150  ma.reconstructDecay("eta':taulfv1 -> pi+:all pi-:all gamma:taulfvloose", "0.8 < M < 1.1", path=path)
151  ma.reconstructDecay("eta':taulfv2 -> pi+:all pi-:all eta:taulfv", "0.8 < M < 1.1", path=path)
152  ma.copyLists("eta':taulfv", ["eta':taulfv1", "eta':taulfv2"], path=path)
153  # omega
154  ma.reconstructDecay("omega:taulfv -> pi0:taulfv pi-:all pi+:all", "0.73 < M < 0.83", path=path)
155 
156  # event selection
157  vm.addAlias("netChargeLFV", "formula(countInList(pi+:taulfv, charge == 1) - countInList(pi+:taulfv, charge == -1))")
158  tauLFVCuts1 = "nParticlesInList(pi+:taulfv) < 5 and 1.0 < M < 2.0 and -1.5 < deltaE < 0.5"
159  tauLFVCuts3 = "nParticlesInList(pi+:taulfv) < 7 and 1.4 < M < 2.0 and -1.0 < deltaE < 0.5"
160 
161  tau_lgamma_Channels = ["e+:taulfv gamma:taulfv",
162  "mu+:taulfv gamma:taulfv"
163  ]
164 
165  tau_lll_Channels = ["e+:taulfv e+:taulfv e-:taulfv",
166  "mu+:taulfv mu+:taulfv mu-:taulfv",
167  "mu+:taulfv e+:taulfv e-:taulfv",
168  "e+:taulfv mu+:taulfv mu-:taulfv",
169  "e+:taulfv e+:taulfv mu-:taulfv",
170  "mu+:taulfv mu+:taulfv e-:taulfv"
171  ]
172 
173  tau_lP01_Channels = ["e+:taulfv pi0:taulfv",
174  "mu+:taulfv pi0:taulfv",
175  "e+:taulfv eta:taulfv1",
176  "mu+:taulfv eta:taulfv1"
177  ]
178  tau_lP03_Channels = ["e+:taulfv eta:taulfv2",
179  "mu+:taulfv eta:taulfv2",
180  "e+:taulfv eta':taulfv",
181  "mu+:taulfv eta':taulfv",
182  "e+:taulfv K_S0:taulfv",
183  "mu+:taulfv K_S0:taulfv"
184  ]
185 
186  tau_lS0_Channels = ["e+:taulfv f_0:all",
187  "mu+:taulfv f_0:all"
188  ]
189 
190  tau_lV0_Channels = ["e+:taulfv rho0:all",
191  "mu+:taulfv rho0:all",
192  "e+:taulfv K*0:all",
193  "mu+:taulfv K*0:all",
194  "e+:taulfv anti-K*0:all",
195  "mu+:taulfv anti-K*0:all",
196  "e+:taulfv phi:all",
197  "mu+:taulfv phi:all",
198  "e+:taulfv omega:taulfv",
199  "mu+:taulfv omega:taulfv"
200  ]
201 
202  tau_lhh_Channels = ["e+:taulfv pi-:taulfv pi+:taulfv",
203  "mu+:taulfv pi-:taulfv pi+:taulfv",
204  "e-:taulfv pi+:taulfv pi+:taulfv",
205  "mu-:taulfv pi+:taulfv pi+:taulfv",
206  "e+:taulfv K-:taulfv K+:taulfv",
207  "mu+:taulfv K-:taulfv K+:taulfv",
208  "e-:taulfv K+:taulfv K+:taulfv",
209  "mu-:taulfv K+:taulfv K+:taulfv",
210  "e+:taulfv K-:taulfv pi+:taulfv",
211  "mu+:taulfv K-:taulfv pi+:taulfv",
212  "e-:taulfv K+:taulfv pi+:taulfv",
213  "mu-:taulfv K+:taulfv pi+:taulfv",
214  "e+:taulfv K_S0:taulfv K_S0:taulfv",
215  "mu+:taulfv K_S0:taulfv K_S0:taulfv"
216  ]
217 
218  tau_bnv_Channels = ["mu+:taulfv mu+:taulfv anti-p-:taulfv",
219  "mu-:taulfv mu+:taulfv p+:taulfv",
220  "anti-p-:taulfv pi+:taulfv pi+:taulfv",
221  "p+:taulfv pi-:taulfv pi+:taulfv",
222  "anti-p-:taulfv pi+:taulfv K+:taulfv",
223  "p+:taulfv pi-:taulfv K+:taulfv"
224  ]
225 
226  tau_lgamma_list = []
227  for chID, channel in enumerate(tau_lgamma_Channels):
228  ma.reconstructDecay("tau+:LFV_lgamma" + str(chID) + " -> " + channel, tauLFVCuts1, chID, path=path)
229  tau_lgamma_list.append("tau+:LFV_lgamma" + str(chID))
230 
231  tau_lll_list = []
232  for chID, channel in enumerate(tau_lll_Channels):
233  ma.reconstructDecay("tau+:LFV_lll" + str(chID) + " -> " + channel, tauLFVCuts3, chID, path=path)
234  tau_lll_list.append("tau+:LFV_lll" + str(chID))
235 
236  tau_lP0_list = []
237  for chID, channel in enumerate(tau_lP01_Channels):
238  ma.reconstructDecay("tau+:LFV_lP01" + str(chID) + " -> " + channel, tauLFVCuts1, chID, path=path)
239  tau_lP0_list.append("tau+:LFV_lP01" + str(chID))
240  for chID, channel in enumerate(tau_lP03_Channels):
241  ma.reconstructDecay("tau+:LFV_lP03" + str(chID) + " -> " + channel, tauLFVCuts3, chID, path=path)
242  tau_lP0_list.append("tau+:LFV_lP03" + str(chID))
243 
244  tau_lS0_list = []
245  for chID, channel in enumerate(tau_lS0_Channels):
246  ma.reconstructDecay("tau+:LFV_lS0" + str(chID) + " -> " + channel, tauLFVCuts3, chID, path=path)
247  tau_lS0_list.append("tau+:LFV_lS0" + str(chID))
248 
249  tau_lV0_list = []
250  for chID, channel in enumerate(tau_lV0_Channels):
251  ma.reconstructDecay("tau+:LFV_lV0" + str(chID) + " -> " + channel, tauLFVCuts3, chID, path=path)
252  tau_lV0_list.append("tau+:LFV_lV0" + str(chID))
253 
254  tau_lhh_list = []
255  for chID, channel in enumerate(tau_lhh_Channels):
256  ma.reconstructDecay("tau+:LFV_lhh" + str(chID) + " -> " + channel, tauLFVCuts3, chID, path=path)
257  tau_lhh_list.append("tau+:LFV_lhh" + str(chID))
258 
259  tau_bnv_list = []
260  for chID, channel in enumerate(tau_bnv_Channels):
261  ma.reconstructDecay("tau+:LFV_bnv" + str(chID) + " -> " + channel, tauLFVCuts3, chID, path=path)
262  tau_bnv_list.append("tau+:LFV_bnv" + str(chID))
263 
264  return tau_lgamma_list + tau_lll_list + tau_lP0_list + tau_lS0_list + tau_lV0_list + tau_lhh_list + tau_bnv_list
265 

◆ 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 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 
)
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 from BaseSkim.

Definition at line 115 of file taupair.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.

◆ 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 
)
Create validation histograms for the skim.

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

Reimplemented from BaseSkim.

Definition at line 266 of file taupair.py.


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