Skip to content

Commit

Permalink
improved (hopefully) PVReco covariance
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucio Anderlini authored and Lucio Anderlini committed Jul 4, 2024
1 parent e801210 commit 2ca723c
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/PVReconstruction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

// Standard C
#include <math.h>

// STL
#include <iostream>
Expand Down Expand Up @@ -195,16 +197,16 @@ namespace SQLamarr

for (int iCoord = 0; iCoord < 3; ++iCoord)
{
float min_sigma = m_parametrization.data[iCoord].sigma1;
if (m_parametrization.data[iCoord].sigma2 < min_sigma)
min_sigma = m_parametrization.data[iCoord].sigma2;
if (m_parametrization.data[iCoord].sigma3 < min_sigma)
min_sigma = m_parametrization.data[iCoord].sigma3;

sqlite3_bind_double(reco_pv, slot_id++, min_sigma);
const SmearingParametrization_1D& param = m_parametrization.data[iCoord];

float sigma = sqrt(
param.f1 * param.sigma1 * param.sigma1 +
param.f2 * param.sigma2 * param.sigma2 +
(1 - param.f1 - param.f2) * param.sigma3 * param.sigma3
);
sqlite3_bind_double(reco_pv, slot_id++, sigma);
}


exec_stmt(reco_pv);
}
}

0 comments on commit 2ca723c

Please sign in to comment.