SQLamarr
The stand-alone ultra-fast simulation option for the LHCb experiment
PVFinder.py
1 # (c) Copyright 2022 CERN for the benefit of the LHCb Collaboration.
2 #
3 # This software is distributed under the terms of the GNU General Public
4 # Licence version 3 (GPL Version 3), copied verbatim in the file "LICENCE".
5 #
6 # In applying this licence, CERN does not waive the privileges and immunities
7 # granted to it by virtue of its status as an Intergovernmental Organization
8 # or submit itself to any jurisdiction.
9 
10 import ctypes
11 from ctypes import POINTER
12 from SQLamarr import clib, c_TransformerPtr
13 
14 from SQLamarr.db_functions import SQLite3DB
15 
16 clib.new_PVFinder.argtypes = (ctypes.c_void_p, ctypes.c_int)
17 clib.new_PVFinder.restype = c_TransformerPtr
18 
19 class PVFinder:
20  """Identify the primary vertex of each GenEvent (collision process)
21 
22  Python binding of `SQLamarr::PVFinder`.
23  """
24  def __init__ (self, db: SQLite3DB, signal_status_code: int = 889):
25  """
26  Acquires the reference to an open connection to the DB.
27 
28  @param db: SQLite3DB reference to an open connection
29  @param signal_status_code: HepMC status code identifying a signal canidate
30  """
31  self._self_self = clib.new_PVFinder(db.get(), signal_status_code)
32 
33  def __del__(self):
34  """@private: Release the bound class instance"""
35  clib.del_Transformer(self._self_self)
36 
37  @property
38  def raw_pointer(self):
39  """@private: Return the raw pointer to the algorithm."""
40  return self._self_self
41 
42 
Identify the primary vertex of each GenEvent (collision process)
Definition: PVFinder.py:19
def __init__(self, SQLite3DB db, int signal_status_code=889)
Acquires the reference to an open connection to the DB.
Definition: PVFinder.py:24