CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
Cgem/CgemAlignAlg/CgemAlignAlg-00-00-08/CgemAlignAlg/Millepede.h
Go to the documentation of this file.
1#ifndef MILLEPEDE_H
2#define MILLEPEDE_H 1
3
4/** @class Millepede Millepede.h AlignmentTools/Millepede.h
5 *
6 *
7 * @author Sebastien Viret
8 * @date 2005-07-29
9 */
10
11#include <vector>
12#include <iostream>
13#include <fstream>
14#include <fstream>
15/* #include "MdcAlignAlg/Alignment.h" */
16
17/* using namespace Alignment; */
18
20public:
21 /// Standard constructor
22 Millepede();
23 ~Millepede( ); ///< Destructor
24
25 /// Initialization
26 bool initialize();
27
28 bool InitMille(bool DOF[], double Sigm[], int nlay, int nglo_on_lay
29 , int nloc, double startfact, int nstd
30 , double res_cut, double res_cut_init);
31 bool MakeGlobalFit(double par[], double error[], double pull[]);
32 bool ParGlo(int index, double param);
33 bool ParSig(int index, double sigma);
34 bool ConstF(double dercs[], double rhs);
35 bool EquLoc(double dergb[], double derlc[], double dernl[], double rmeas, double sigma);
36 bool ZerLoc(double dergb[], double derlc[], double dernl[]);
37 bool FitLoc(int n, double track_params[], int single_fit);
38 int GetTrackNumber();
39 void SetTrackNumber(int value);
40
41private:
42
43 //std::ofstream fmill;
44
45// Option set-up here
46
47 static const bool m_iteration = true;
48 static const bool debug_mode = false; // More printouts */
49 static const bool verbose_mode = false; // Definitely more printouts (matrices,...) */
50 static const bool verbose_reject = false;
51
52// Max. dimensions
53
54 static const int mglobl = 40; // Max. number of global parameters
55 static const int mlocal = 10; // Max. number of local parameters
56 static const int mcs = 36; // Max. number of constraint equations, default value is 10
57 //static const int mgl = 410; // mglobl+mlocal
58 static const int mgl = 100; // mglobl+mlocal
59
60
61 bool record_mill; // More printouts */
62 bool record_err; // Definitely more printouts (matrices,...) */
63
64
65// Private methods
66
67 bool InitUn (double cutfac);
68 bool PrtGlo();
69
70 double ErrPar(int i);
71 double CorPar(int i, int j);
72 int SpmInv(double v[][mgl], double b[], int n, double diag[], bool flag[]);
73 int SpmInv(double v[][mlocal], double b[], int n, double diag[], bool flag[]);
74 bool SpAVAt(double v[][mlocal], double a[][mlocal], double w[][mglobl], int n, int m);
75 bool SpAX(double a[][mlocal], double x[], double y[], int n, int m);
76 double chindl(int n, int nd);
77
78// Matrices
79
80 double cgmat[mgl][mgl];
81 double clmat[mlocal][mlocal];
82 double clcmat[mglobl][mlocal];
83 double corrm[mglobl][mglobl];
84 double adercs[mcs][mglobl];
85
86
87// Vectors and useful variables
88
89 double corrv[mglobl], psigm[mglobl], pparm[mglobl], dparm[mglobl];
90 double scdiag[mglobl], blvec[mlocal], arhs[mcs], diag[mgl], bgvec[mgl];
91
92 int indgb[mglobl], nlnpa[mglobl], indnz[mglobl], indbk[mglobl], indlc[mlocal];
93
94 bool scflag[mglobl];
95
96 std::vector<int> indst;
97 std::vector<double> arest;
98 std::vector<double> arenl;
99
100 std::vector<int> storeind;
101 std::vector<int> storeplace;
102 std::vector<double> storeare;
103 std::vector<double> storenl;
104
105 int store_row_size;
106
107 int m_track_number;
108 double m_residual_cut_init;
109 double m_residual_cut;
110
111 // cfactref : Reference value for Chi^2/ndof cut
112 double cfactr, cfactref; // what is the first variables ? it is the initial cut factor !!
113
114 int itert, nst, nfl, ncs, nstdev;
115 int loctot, locrej, nagb, nglolay, nalc, nrank;
116
117};
118#endif // MILLEPEDE_H
const Int_t n
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35
bool initialize()
Initialization.
bool InitMille(bool DOF[], double Sigm[], int nlay, int nglo_on_lay, int nloc, double startfact, int nstd, double res_cut, double res_cut_init)
bool ZerLoc(double dergb[], double derlc[], double dernl[])
bool EquLoc(double dergb[], double derlc[], double dernl[], double rmeas, double sigma)
bool MakeGlobalFit(double par[], double error[], double pull[])
bool FitLoc(int n, double track_params[], int single_fit)