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  void setMaxIters(int n) { _maxiters = n;}
32 
33  protected:
34 
35  bool Minimize(const SampleMatrix &samplecor, double pederr, const FullSampleMatrix &fullpulsecov);
36  bool NNLS();
37  bool OnePulseMinimize();
38  bool updateCov(const SampleMatrix &samplecor, double pederr, const FullSampleMatrix &fullpulsecov);
39  double ComputeChiSq();
40  double ComputeApproxUncertainty(unsigned int ipulse);
41 
42 
49 
54 
57  unsigned int _npulsetot;
58  unsigned int _nP;
59 
65 
67 
68  double _chisq;
70  int _maxiters;
72 };
73 
74 #endif
PulseMatrix aTamat
void setMaxIterWarnings(bool b)
void setMaxIters(int n)
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
double b
Definition: hdecay.h:120
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