ToolDAQFramework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
dimfit.h
Go to the documentation of this file.
1 #ifndef dimfit_H
2 #define dimfit_H
3 
4 #include <string>
5 #include <iostream>
6 
7 #include "Tool.h"
8 #include "TimeDelta.h"
9 #include "Stopwatch.h"
10 
11 class dimfit: public Tool {
12 
13 
14  public:
15 
16  dimfit();
17  bool Initialise(std::string configfile,DataModel &data);
18  bool Execute();
19  bool Finalise();
20 
21 
22  private:
23 
25  std::string fInputFilterName;
26 
27  std::vector<double> * fEventPos;
31 
32  double fCentr[15];
33  double fRot[9];
34  double fRMean[5];
35  int fDim;
37 
38  double R2MIN;
39  double LOWDBIAS;
40  double GOODPOINT;
41  double MAXMEANPOS;
42 
46 
47  int dimfit_(int n,double *points,double *centr,double *rot,double *rmean, int &dim,int &exitpoint, bool verbose);
48  double d_pythag(double a,double b);
49  int d_iszero(double *matrix,int sta);
50  void setvec(double *vectors,short int vect,double val1,double val2,double val3);
51  void rotate(double *vectors,short int vect,double si,double co);
52  int planegivens(double *matrix,double *rot,double shift);
53  void tridiag(double *matrix,double *rot);
54  void d_swap(double *val,double *rot,int c1,int c2);
55  void eigen(double *matrix,double *rot);
56 
60  std::string m_stopwatch_file;
61 
62  int m_verbose;
63 
64  std::stringstream ss;
65 
66  void StreamToLog(int level) {
67  Log(ss.str(), level, m_verbose);
68  ss.str("");
69  }
70 
71  enum LogLevel {FATAL=-1, ERROR=0, WARN=1, INFO=2, DEBUG1=3, DEBUG2=4, DEBUG3=5};
72 
73 
74 };
75 
76 
77 #endif
TimeDelta m_time_window
Definition: dimfit.h:28
std::stringstream ss
Definition: dimfit.h:64
int dimfit_(int n, double *points, double *centr, double *rot, double *rmean, int &dim, int &exitpoint, bool verbose)
Definition: dimfit.cpp:215
std::string m_stopwatch_file
Image filename to save the histogram to, if required.
Definition: dimfit.h:60
int fDim
Definition: dimfit.h:35
Definition: dimfit.h:11
bool Finalise()
Definition: dimfit.cpp:172
double fCentr[15]
Definition: dimfit.h:32
void d_swap(double *val, double *rot, int c1, int c2)
Definition: dimfit.cpp:466
void tridiag(double *matrix, double *rot)
Definition: dimfit.cpp:441
int min_events
Definition: dimfit.h:30
void StreamToLog(int level)
Definition: dimfit.h:66
double MAXMEANPOS
Definition: dimfit.h:41
bool Initialise(std::string configfile, DataModel &data)
Definition: dimfit.cpp:6
void setvec(double *vectors, short int vect, double val1, double val2, double val3)
Definition: dimfit.cpp:381
std::string fInputFilterName
Definition: dimfit.h:25
util::Stopwatch * m_stopwatch
The stopwatch, if we&#39;re using one.
Definition: dimfit.h:58
bool Execute()
Definition: dimfit.cpp:98
TimeDelta m_time_window_step
Definition: dimfit.h:29
int nclusters_silent_warning
Definition: dimfit.h:43
double R2MIN
Definition: dimfit.h:38
void rotate(double *vectors, short int vect, double si, double co)
Definition: dimfit.cpp:388
int nclusters_normal_warning
Definition: dimfit.h:44
int nclusters_golden_warning
Definition: dimfit.h:45
int fExitPoint
Definition: dimfit.h:36
int m_verbose
Definition: dimfit.h:62
std::vector< double > * fEventPos
Definition: dimfit.h:27
double LOWDBIAS
Definition: dimfit.h:39
int planegivens(double *matrix, double *rot, double shift)
Definition: dimfit.cpp:405
void Log(const std::string &message, const int message_level)
Format messages in the same way as for tools.
Definition: Utilities.cpp:276
LogLevel
Definition: dimfit.h:71
double fRot[9]
Definition: dimfit.h:33
int d_iszero(double *matrix, int sta)
Definition: dimfit.cpp:375
ReconInfo * fInFilter
Definition: dimfit.h:24
double GOODPOINT
Definition: dimfit.h:40
double fRMean[5]
Definition: dimfit.h:34
dimfit()
Definition: dimfit.cpp:3
double d_pythag(double a, double b)
Definition: dimfit.cpp:360
void eigen(double *matrix, double *rot)
Definition: dimfit.cpp:476