1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
#ifndef __CINT__
#ifndef EcalCalibBlock_H
#define EcalCalibBlock_H
#include <map>
#include <string>
#include <vector>
#include "CLHEP/Matrix/GenMatrix.h"
#include "CLHEP/Matrix/Matrix.h"
#include "CLHEP/Matrix/Vector.h"
#include "CLHEP/Random/RandGaussQ.h"
#include "Calibration/Tools/interface/InvMatrixCommonDefs.h"
#include "Calibration/EcalCalibAlgos/interface/VEcalCalibBlock.h"
/** \class EcalCalibBlock
\brief element for the single ECAL block intercalibration
*/
class IMACalibBlock : public VEcalCalibBlock {
public:
//! ctor
IMACalibBlock(const int);
//! dtor
~IMACalibBlock() override;
//! insert an entry
void Fill(std::map<int, double>::const_iterator,
std::map<int, double>::const_iterator,
double pTk,
double pSubtract,
double sigma = 1.) override;
//! reset the chi2 matrices
void reset() override;
//! solve the chi2 linear system
int solve(int usingBlockSolver, double min, double max) override;
private:
//! give the size of a chi2 matrix
int evalX2Size();
//! complete the triangolar chi2 matrix to a sym one
void complete();
//! copy a vector into a CLHEP object
void riempiMtr(const std::vector<double>& piena, CLHEP::HepMatrix& vuota);
//! copy a vector into a CLHEP object
void riempiVtr(const std::vector<double>& pieno, CLHEP::HepVector& vuoto);
//! fill the coefficients map from the CLHEP vector solution
void fillMap(const CLHEP::HepVector& result);
private:
//! vector for the chi2 inversion
std::vector<double> m_kaliVector;
//! matrix for the chi2 inversion
std::vector<double> m_kaliMatrix;
};
#endif
#endif
|