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