15 :
VEcalCalibBlock(numberOfElements), m_kaliVector(m_numberOfElements), m_kaliMatrix(evalX2Size()) {
26 std::map<int, double>::const_iterator MapEnd,
31 double inverror = 1. / sigma;
33 for (std::map<int, double>::const_iterator itMap1 = MapBegin; itMap1 != MapEnd; ++itMap1) {
35 for (std::map<int, double>::const_iterator itMap2 = itMap1; itMap2 != MapEnd; ++itMap2) {
37 double dummy = itMap1->second * itMap2->second;
46 dummy *= itMap1->second;
90 CLHEP::HepVector
result = CLHEP::solve(kaliMatrix, kaliVector);
91 for (
int i = 0;
i < kaliVector.num_row(); ++
i)
92 if (
result.normsq() <
min * kaliVector.num_row() ||
result.normsq() >
max * kaliVector.num_row()) {
93 if (usingBlockSolver) {
98 for (
int i = 0;
i < kaliVector.num_row(); ++
i)
118 for (
unsigned int i = 0;
i <
max; ++
i)
119 for (
unsigned int j = 0;
j <
max; ++
j)
123 vuota[
i][
j] = piena[
i *
max +
j];
133 for (
int i = 0;
i <
max; ++
i)
IMACalibBlock(const int)
ctor
element for the single ECAL block intercalibration
constexpr bool isNotFinite(T x)
std::vector< double > m_kaliVector
vector for the chi2 inversion
void riempiMtr(const std::vector< double > &piena, CLHEP::HepMatrix &vuota)
copy a vector into a CLHEP object
std::vector< double > m_kaliMatrix
matrix for the chi2 inversion
void riempiVtr(const std::vector< double > &pieno, CLHEP::HepVector &vuoto)
copy a vector into a CLHEP object
void Fill(std::map< int, double >::const_iterator, std::map< int, double >::const_iterator, double pTk, double pSubtract, double sigma=1.) override
insert an entry
int evalX2Size()
give the size of a chi2 matrix
solves at best the matrix invertion for calibration
std::map< unsigned int, float > m_coefficients
map of coefficients
unsigned int m_numberOfElements
The only parameter!
void reset() override
reset the chi2 matrices
void fillMap(const CLHEP::HepVector &result)
fill the coefficients map from the CLHEP vector solution
Log< level::Warning, false > LogWarning
int solve(int usingBlockSolver, double min, double max) override
solve the chi2 linear system
~IMACalibBlock() override
dtor
void complete()
complete the triangolar chi2 matrix to a sym one