CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PulseChiSqSNNLS.h
Go to the documentation of this file.
1 #ifndef PulseChiSqSNNLS_h
2 #define PulseChiSqSNNLS_h
3 
4 #define EIGEN_NO_DEBUG // kill throws in eigen code
6 
7 #include <set>
8 #include <array>
9 
11  public:
12 
13  typedef BXVector::Index Index;
14 
17 
18 
19  bool DoFit(const SampleVector &samples, const SampleMatrix &samplecor, double pederr, const BXVector &bxs, const FullSampleVector &fullpulse, const FullSampleMatrix &fullpulsecov);
20 
21  const SamplePulseMatrix &pulsemat() const { return _pulsemat; }
22  const SampleMatrix &invcov() const { return _invcov; }
23 
24  const PulseVector &X() const { return _ampvecmin; }
25  const PulseVector &Errors() const { return _errvec; }
26  const BXVector &BXs() const { return _bxsmin; }
27 
28  double ChiSq() const { return _chisq; }
30 
31  protected:
32 
33  bool Minimize(const SampleMatrix &samplecor, double pederr, const FullSampleMatrix &fullpulsecov);
34  bool NNLS();
35  bool updateCov(const SampleMatrix &samplecor, double pederr, const FullSampleMatrix &fullpulsecov);
36  double ComputeChiSq();
37  double ComputeApproxUncertainty(unsigned int ipulse);
38 
39 
46 
51 
54  unsigned int _npulsetot;
55  unsigned int _nP;
56 
62 
64 
65  double _chisq;
67 };
68 
69 #endif
PulseMatrix aTamat
unsigned int _npulsetot
unsigned int _nP
PulseVector _ampvecmin
void disableErrorCalculation()
const PulseVector & Errors() const
Eigen::Matrix< double, 10, 1 > SampleVector
Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 10, 1 > PulseVector
PulseVector aTbvec
Eigen::LDLT< PulseMatrix > PulseDecompLDLT
SampleMatrix _covdecompLinv
PulseVector ampvecpermtest
Eigen::Matrix< double, 19, 19 > FullSampleMatrix
const PulseVector & X() const
Eigen::Matrix< double, 10, Eigen::Dynamic, 0, 10, 10 > SamplePulseMatrix
SamplePulseMatrix _pulsemat
bool updateCov(const SampleMatrix &samplecor, double pederr, const FullSampleMatrix &fullpulsecov)
double ComputeApproxUncertainty(unsigned int ipulse)
SampleDecompLLT _covdecomp
PulseVector wvec
PulseDecompLDLT _pulsedecomp
Eigen::Matrix< double, 19, 1 > FullSampleVector
const SamplePulseMatrix & pulsemat() const
PulseMatrix _topleft_work
Eigen::LLT< SampleMatrix > SampleDecompLLT
double ChiSq() const
PulseVector updatework
SampleVector _sampvec
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, 0, 10, 10 > PulseMatrix
SampleMatrix _invcov
const BXVector & BXs() const
bool Minimize(const SampleMatrix &samplecor, double pederr, const FullSampleMatrix &fullpulsecov)
PulseVector _errvec
BXVector::Index Index
Eigen::Matrix< double, 10, 10 > SampleMatrix
SamplePulseMatrix invcovp
PulseVector _ampvec
bool DoFit(const SampleVector &samples, const SampleMatrix &samplecor, double pederr, const BXVector &bxs, const FullSampleVector &fullpulse, const FullSampleMatrix &fullpulsecov)
const SampleMatrix & invcov() const