|
def | load_standard_lists (self, path) |
|
def | build_lists (self, path) |
|
def | __description__ (self) |
|
def | __category__ (self) |
|
def | __authors__ (self) |
|
def | __contact__ (self) |
|
def | code (self) |
|
def | additional_setup (self, path) |
|
def | validation_histograms (self, path) |
|
def | __call__ (self, path, *udstOutput=None, validation=None) |
|
def | postskim_path (self) |
|
def | skim_event_cuts (self, cut, *path) |
|
def | flag (self) |
|
def | initialise_skim_flag (self, path) |
|
def | update_skim_flag (self, path) |
|
def | get_skim_list_names (self) |
|
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) |
|
Reconstructed decays
* :math:`BBar \\to l^+l^-`
* :math:`BBar \\to l^+l^+`
* :math:`BBar \\to l^-l^-`
Definition at line 116 of file leptonic.py.
def additional_setup |
( |
|
self, |
|
|
|
path |
|
) |
| |
|
inherited |
Perform any setup steps necessary before running the skim. This may include:
* applying event-level cuts using `ifEventPasses`,
* adding the `MCMatcherParticles` module to the path,
* running the FEI.
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 CombinedSkim, Random, TauThrust, TDCPV_ccs, TauGeneric, BaseFEISkim, ALP3Gamma, and TDCPV_qqs.
Definition at line 612 of file skimExpertFunctions.py.
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. At the end of this method, the attribute
``SkimLists`` must be set so it can be used by `output_udst`.
Parameters:
path (basf2.Path): Skim path to be processed.
Reimplemented from BaseSkim.
Definition at line 134 of file leptonic.py.
134 def build_lists(self, path):
138 "abs(d0) < 1 and abs(z0) < 4 and p > 1.2 and electronID > 0.5",
145 "abs(d0) < 1 and abs(z0) < 4 and p > 1.2 and muonID > 0.5",
152 default_cleanup=
True,
157 harmonicMoments=
True,
161 checkForDuplicates=
False,
164 ma.applyEventCuts(cut=
'foxWolframR2 < 0.5 and nTracks > 3', path=path)
166 ma.reconstructDecay(
'Upsilon(4S):ee -> e+:pid e-:pid',
'M < 15', path=path)
167 ma.reconstructDecay(
'Upsilon(4S):emu -> e+:pid mu-:pid',
'M < 15', path=path)
168 ma.reconstructDecay(
'Upsilon(4S):mumu -> mu+:pid mu-:pid',
'M < 15', path=path)
170 ma.reconstructDecay(
'Delta++:ee -> e+:pid e+:pid',
'M < 15', path=path)
171 ma.reconstructDecay(
'Delta++:emu -> e+:pid mu+:pid',
'M < 15', path=path)
172 ma.reconstructDecay(
'Delta++:mumu -> mu+:pid mu+:pid',
'M < 15', path=path)
174 ma.copyLists(outputListName=
'Upsilon(4S):ll',
175 inputListNames=[
'Upsilon(4S):ee',
'Upsilon(4S):emu',
'Upsilon(4S):mumu'],
178 ma.copyLists(outputListName=
'Delta++:ll',
179 inputListNames=[
'Delta++:ee',
'Delta++:emu',
'Delta++:mumu'],
182 dileptonList = [
"Upsilon(4S):ll",
"Delta++:ll"]
183 self.SkimLists = dileptonList
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:
ConditionalPath (basf2.Path): 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 716 of file skimExpertFunctions.py.
def update_skim_flag |
( |
|
self, |
|
|
|
path |
|
) |
| |
|
inherited |
Add the module `skimExpertFunctions.InitialiseSkimFlag` to the path, which
initialises flag for this skim to zero.
.. 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 783 of file skimExpertFunctions.py.