BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/KalFitAlg/KalFitAlg-00-07-55-p03/KalFitAlg/lpav/Lpav.h
Go to the documentation of this file.
1// -*- C++ -*-
2//
3// Package: <package>
4// Module: Lpav
5//
6// Description: <one line class summary>
7//
8// Usage:
9// <usage>
10//
11// Author: KATAYAMA Nobuhiko
12// Created: Fri Feb 6 10:21:38 JST 1998
13
14#if !defined(PACKAGE_LPAV_H_INCLUDED)
15#define PACKAGE_LPAV_H_INCLUDED
16
17// system include files
18#include <iosfwd>
19
20// user include files
21#include "CLHEP/Matrix/SymMatrix.h"
22#include "KalFitAlg/lpav/Lpar.h"
23
24 using CLHEP::HepVector;
25 using CLHEP::Hep3Vector;
26 using CLHEP::HepMatrix;
27 using CLHEP::HepSymMatrix;
28
29using namespace CLHEP;
30
31// forward declarations
32
33class Lpav : public Lpar
34{
35 // friend classes and functions
36
37 public:
38 // constants, enums and typedefs
39
40 // Constructors and destructor
42 virtual ~Lpav();
43
44 // member functions
47 void calculate_average(double x, double y, double w=1);
48 void calculate_average3(double x, double y, double w=1);
49 double calculate_lpar(void);
50 double calculate_lpar3(void);
51 double fit();
52 double fit(double x, double y, double w=1);
53 inline void clear();
54 void add_point(double x, double y, double w=1);
55 void add_point_frac(double x, double y, double w, double f);
56
57 // const member functions
58 double nc() const { return m_nc; }
59 HepSymMatrix cov(int=0) const;
60 HepSymMatrix cov_c(int=0) const;
61 int extrapolate(double, double&, double&) const;
62 double similarity(double, double) const;
63 double delta_chisq(double x, double y, double w=1) const;
64 double chisq() const { return m_chisq; }
65 double prob() const;
66 double chi_deg() const;
67
68 // static member functions
69
70 // assignment operator(s)
71 inline const Lpav& operator=( const Lpav& );
72 const Lpav& operator=( const Lpar& );
73 const Lpav& operator+=( const Lpav& );
74
75 friend std::ostream& operator<<(std::ostream &o, const Lpav &s);
76 friend Lpav operator+(const Lpav &, const Lpav &);
77 class Singular {}; // exception class, no covarience matrix.
78 class Singular_c {}; // exception class, no covarience matrix_c
79
80 protected:
81 // protected member functions
82
83 // protected const member functions
84
85 private:
86 // Constructors and destructor
87 inline Lpav( const Lpav& );
88
89 // comparison operators
90 bool operator==( const Lpav& ) const;
91 bool operator!=( const Lpav& ) const;
92
93 // private member functions
94 void add(double x, double y, double w=1, double a=0, double b=0);
95 void sub(double x, double y, double w=1, double a=0, double b=0);
96 void calculate_average_n(double xxav, double yyav, double xyav,
97 double xrrav, double yrrav, double rrrrav);
98 double chisq(double chisq) { m_chisq = chisq; return m_chisq; }
99 double nc(double nc) { m_nc = nc; return m_nc; }
100 double solve_lambda(void);
101 double solve_lambda3(void);
102
103 // private const member functions
104
105 // data members
106 double m_wsum;
107 double m_xsum;
108 double m_ysum;
109 double m_xxsum;
110 double m_yysum;
111 double m_xysum;
112 double m_xrrsum;
113 double m_yrrsum;
114 double m_rrrrsum;
115
116 double m_wsum_temp;
117 double m_xav;
118 double m_yav;
119 double m_xyavp;
120
121 double m_rscale;
122 double m_xxavp;
123 double m_yyavp;
124 double m_xrravp;
125 double m_yrravp;
126 double m_rrrravp;
127 double m_sinrot;
128 double m_cosrot;
129
130 double m_nc;
131 double m_chisq;
132
133 // static data members
134
135};
136
137// inline function definitions
138inline const Lpav & Lpav::operator=(const Lpav &lp) {
139 Lpar::operator=(lp);
140 m_wsum = lp.m_wsum;
141 m_xsum = lp.m_xsum;
142 m_ysum = lp.m_ysum;
143 m_xxsum = lp.m_xxsum;
144 m_yysum = lp.m_yysum;
145 m_xysum = lp.m_xysum;
146 m_xrrsum = lp.m_xrrsum;
147 m_yrrsum = lp.m_yrrsum;
148 m_rrrrsum = lp.m_rrrrsum;
149
150 m_wsum_temp = lp. m_wsum_temp;
151 m_xav = lp.m_xav;
152 m_yav = lp.m_yav;
153 m_xyavp = lp.m_xyavp;
154
155 m_rscale = lp. m_rscale;
156 m_xxavp = lp.m_xxavp;
157 m_yyavp = lp.m_yyavp;
158 m_xrravp = lp.m_xrravp;
159 m_yrravp = lp.m_yrravp;
160 m_rrrravp = lp.m_rrrravp;
161 m_sinrot = lp.m_sinrot;
162 m_cosrot = lp.m_cosrot;
163
164 m_nc = lp. m_nc;
165 m_chisq = lp.m_chisq;
166 return *this;
167}
168
169inline Lpav::Lpav(const Lpav &lp) : Lpar(lp) {
170 m_wsum = lp.m_wsum;
171 m_xsum = lp.m_xsum;
172 m_ysum = lp.m_ysum;
173 m_xxsum = lp.m_xxsum;
174 m_yysum = lp.m_yysum;
175 m_xysum = lp.m_xysum;
176 m_xrrsum = lp.m_xrrsum;
177 m_yrrsum = lp.m_yrrsum;
178 m_rrrrsum = lp.m_rrrrsum;
179
180 m_wsum_temp = lp. m_wsum_temp;
181 m_xav = lp.m_xav;
182 m_yav = lp.m_yav;
183 m_xyavp = lp.m_xyavp;
184
185 m_rscale = lp. m_rscale;
186 m_xxavp = lp.m_xxavp;
187 m_yyavp = lp.m_yyavp;
188 m_xrravp = lp.m_xrravp;
189 m_yrravp = lp.m_yrravp;
190 m_rrrravp = lp.m_rrrravp;
191 m_sinrot = lp.m_sinrot;
192 m_cosrot = lp.m_cosrot;
193
194 m_nc = lp. m_nc;
195 m_chisq = lp.m_chisq;
196 return;
197}
198
199inline void Lpav::clear() {
200 m_wsum = m_xsum = m_ysum = m_xxsum = m_yysum = m_xysum
201 = m_xrrsum = m_yrrsum = m_rrrrsum = m_rscale = m_nc = 0;
202 m_chisq = -1;
203}
204
205#endif /* PACKAGE_LPAV_H_INCLUDED */
206
double w
XmlRpcServer s
Definition: HelloServer.cpp:11
const Lpar & operator=(const Lpar &)
double calculate_lpar3(void)
void add_point(double x, double y, double w=1)
friend Lpav operator+(const Lpav &, const Lpav &)
double fit(double x, double y, double w=1)
HepSymMatrix cov_c(int=0) const
void calculate_average3(void)
void calculate_average(void)
double calculate_lpar(void)
friend std::ostream & operator<<(std::ostream &o, const Lpav &s)
virtual ~Lpav()
void clear()
void add_point_frac(double x, double y, double w, double f)
void calculate_average3(double x, double y, double w=1)
double delta_chisq(double x, double y, double w=1) const
int extrapolate(double, double &, double &) const
const Lpav & operator=(const Lpav &)
double chi_deg() const
const Lpav & operator+=(const Lpav &)
double prob() const
const Lpav & operator=(const Lpar &)
double similarity(double, double) const
HepSymMatrix cov(int=0) const
void calculate_average(double x, double y, double w=1)
double fit()