Emulates the reconstruction of the primary vertex. More...
#include <PVReconstruction.h>
Classes | |
class | PVReconstruction |
Transform the MCVertices objects identified as primary vertices into Vertices, smearing their position according to a triple-Gaussian, diagonal resolution function. More... | |
struct | SmearingParametrization |
Set of parmeters defining three 3-Gaussian functions for x, y and z. More... | |
struct | SmearingParametrization_1D |
Set of parameters defining a 3-Gaussian resolution function in 1D. More... | |
Public Member Functions | |
PVReconstruction (SQLite3DB &db, const SmearingParametrization ¶metrization) | |
Constructor. More... | |
void | execute () override |
Execute the algorithm adding primary vertices to Vertices table. More... | |
Public Member Functions inherited from SQLamarr::BaseSqlInterface | |
BaseSqlInterface (SQLite3DB &db) | |
Constructor, acquiring the database without ownership. More... | |
virtual | ~BaseSqlInterface () |
void | sync_database (const std::string &db_uri) |
void | invalidate_cache (void) |
Invalidate the cache of the queries. More... | |
Static Public Member Functions | |
static SmearingParametrization | load_parametrization (const std::string file_path, const std::string table_name, const std::string condition) |
Instanciate a SmearingParametrization object from an SQLite file. More... | |
Public Attributes | |
argtypes | |
restype | |
Additional Inherited Members | |
Protected Member Functions inherited from SQLamarr::BaseSqlInterface | |
sqlite3_stmt * | get_statement (const std::string &name, const std::string &query) |
Creates or retrieve from cache a statement. More... | |
void | begin_transaction () |
Begin an SQL transaction stopping update to disk util end_transaction() is issued More... | |
void | end_transaction () |
End an SQL transaction re-enabling disk updates. More... | |
int | last_insert_row () |
Return the index of the last rows inserted in any table. More... | |
void | using_sql_function (const std::string &name, int argc, void(*xFunc)(sqlite3_context *, int, sqlite3_value **)) |
Register a static function in DB, enabling usage from SQL. More... | |
bool | exec_stmt (sqlite3_stmt *) |
Execute a statement, possibly throwing an exception on failure. More... | |
Protected Attributes inherited from SQLamarr::BaseSqlInterface | |
SQLite3DB & | m_database |
Reference to the SQLite database (not owned). More... | |
Emulates the reconstruction of the primary vertex.
The position of each primary vertex is smeared according to a parametrization loaded from a configuration file. The covariance matrix defining the uncertainty on the position of the PV is also generated based on a parametrization.
The resolution model used to describe the difference between the true and reconstructed positions of the PV is the sum of three Gaussian distributions sharing their central values.
This simplified model includes two strong assumptions:
Using PVReconstruction::load_parametrization(), the parametrization can be loaded from an SQLite table defining the following columns:
condition
, a string representing the datataking conditionsmu
, the mean of the Gaussiansf1
, the core-fraction of the first Gaussianf2
, the core-fraction of the second Gaussiansigma1
, the standard deviation of the first Gaussiansigma2
, the standard deviation of the second Gaussiansigma3
, the standard deviation of the third Gaussian Definition at line 51 of file PVReconstruction.h.
SQLamarr::PVReconstruction::PVReconstruction | ( | SQLite3DB & | db, |
const SmearingParametrization & | parametrization | ||
) |
Constructor.
db | Reference to database (not owned) |
parametrization | 3-Gaussian parametrization of the resolution function |
Definition at line 62 of file PVReconstruction.cpp.
|
overridevirtual |
Execute the algorithm adding primary vertices to Vertices
table.
Implements SQLamarr::Transformer.
Definition at line 161 of file PVReconstruction.cpp.
|
static |
Instanciate a SmearingParametrization object from an SQLite file.
file_path | SQLite database defining the parametrization |
table_name | Name of the table defining the parametrization |
condition | Datataking Condition |
Definition at line 112 of file PVReconstruction.cpp.
SQLamarr.PVReconstruction.argtypes |
Definition at line 16 of file PVReconstruction.py.
SQLamarr.PVReconstruction.restype |
Definition at line 19 of file PVReconstruction.py.