Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:58:39

0001 #ifndef __CINT__
0002 #ifndef EcalCalibBlock_H
0003 #define EcalCalibBlock_H
0004 
0005 #include <map>
0006 #include <string>
0007 #include <vector>
0008 
0009 #include "CLHEP/Matrix/GenMatrix.h"
0010 #include "CLHEP/Matrix/Matrix.h"
0011 #include "CLHEP/Matrix/Vector.h"
0012 #include "CLHEP/Random/RandGaussQ.h"
0013 
0014 #include "Calibration/Tools/interface/InvMatrixCommonDefs.h"
0015 #include "Calibration/EcalCalibAlgos/interface/VEcalCalibBlock.h"
0016 
0017 /** \class EcalCalibBlock
0018  
0019     \brief element for the single ECAL block intercalibration  
0020 
0021 */
0022 class IMACalibBlock : public VEcalCalibBlock {
0023 public:
0024   //! ctor
0025   IMACalibBlock(const int);
0026   //! dtor
0027   ~IMACalibBlock() override;
0028 
0029   //! insert an entry
0030   void Fill(std::map<int, double>::const_iterator,
0031             std::map<int, double>::const_iterator,
0032             double pTk,
0033             double pSubtract,
0034             double sigma = 1.) override;
0035 
0036   //! reset the chi2 matrices
0037   void reset() override;
0038   //! solve the chi2 linear system
0039   int solve(int usingBlockSolver, double min, double max) override;
0040 
0041 private:
0042   //! give the size of a chi2 matrix
0043   int evalX2Size();
0044   //! complete the triangolar chi2 matrix to a sym one
0045   void complete();
0046   //! copy a vector into a CLHEP object
0047   void riempiMtr(const std::vector<double>& piena, CLHEP::HepMatrix& vuota);
0048   //! copy a vector into a CLHEP object
0049   void riempiVtr(const std::vector<double>& pieno, CLHEP::HepVector& vuoto);
0050   //! fill the coefficients map from the CLHEP vector solution
0051   void fillMap(const CLHEP::HepVector& result);
0052 
0053 private:
0054   //! vector for the chi2 inversion
0055   std::vector<double> m_kaliVector;
0056   //! matrix for the chi2 inversion
0057   std::vector<double> m_kaliMatrix;
0058 };
0059 
0060 #endif
0061 #endif