Belle II Software development
Lpav.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9//-----------------------------------------------------------------------------
10// Description :
11//-----------------------------------------------------------------------------
12
13// system include files
14
15#include <iosfwd>
16
17#include "CLHEP/Matrix/SymMatrix.h"
18#include "trg/cdc/Lpar.h"
19
20#ifdef TRGCDC_SHORT_NAMES
21#define TCLpav TRGCDCLpav
22#endif
23
24namespace Belle2 {
31 class TRGCDCLpav : public TRGCDCLpar {
32 // friend classes and functions
33
34 public:
35 // constants, enums and typedefs
36
38 TRGCDCLpav();
40 virtual ~TRGCDCLpav();
41
43 void calculate_average(void);
45 void calculate_average3(void);
47 void calculate_average(double x, double y, double w = 1);
49 void calculate_average3(double x, double y, double w = 1);
51 double calculate_lpar(void);
53 double calculate_lpar3(void);
55 double fit();
57 double fit(double x, double y, double w = 1);
59 inline void clear();
61 void add_point(double x, double y, double w = 1);
63 void add_point_frac(double x, double y, double w, double f);
64
66 double nc() const { return m_nc; }
68 CLHEP::HepSymMatrix cov(int = 0) const;
70 CLHEP::HepSymMatrix cov_c(int = 0) const;
72 int extrapolate(double, double&, double&) const;
74 double similarity(double, double) const;
76 double delta_chisq(double x, double y, double w = 1) const;
78 double chisq() const { return m_chisq; }
80 double prob() const;
82 double chi_deg() const;
83
84 // static member functions
85
87 inline TRGCDCLpav& operator=(const TRGCDCLpav&);
91 const TRGCDCLpav& operator+=(const TRGCDCLpav&);
92
94 friend std::ostream& operator<<(std::ostream& o, const TRGCDCLpav& s);
96 friend TRGCDCLpav operator+(const TRGCDCLpav&, const TRGCDCLpav&);
98 class Singular {};
100 class Singular_c {};
101
102 protected:
103 // protected member functions
104
105 // protected const member functions
106
107 private:
109 inline TRGCDCLpav(const TRGCDCLpav&);
110
112 bool operator==(const TRGCDCLpav&) const;
114 bool operator!=(const TRGCDCLpav&) const;
115
117// void add(double x, double y, double w = 1, double a = 0, double b = 0);
119 void sub(double x, double y, double w = 1, double a = 0, double b = 0);
121 void calculate_average_n(double xxav, double yyav, double xyav,
122 double xrrav, double yrrav, double rrrrav);
124 double chisq(double chisq) { m_chisq = chisq; return m_chisq; }
126 double nc(double nc) { m_nc = nc; return m_nc; }
128 double solve_lambda(void);
130 double solve_lambda3(void);
131
132 // private const member functions
133
135 double m_wsum;
137 double m_xsum;
139 double m_ysum;
141 double m_xxsum;
143 double m_yysum;
145 double m_xysum;
147 double m_xrrsum;
149 double m_yrrsum;
151 double m_rrrrsum;
152
156 double m_xav;
158 double m_yav;
160 double m_xyavp;
161
163 double m_rscale;
165 double m_xxavp;
167 double m_yyavp;
169 double m_xrravp;
171 double m_yrravp;
173 double m_rrrravp;
175 double m_sinrot;
177 double m_cosrot;
178
180 double m_nc;
182 double m_chisq;
183
184 // static data members
185
186 };
187
190 {
192 m_wsum = lp.m_wsum;
193 m_xsum = lp.m_xsum;
194 m_ysum = lp.m_ysum;
195 m_xxsum = lp.m_xxsum;
196 m_yysum = lp.m_yysum;
197 m_xysum = lp.m_xysum;
198 m_xrrsum = lp.m_xrrsum;
199 m_yrrsum = lp.m_yrrsum;
200 m_rrrrsum = lp.m_rrrrsum;
201
203 m_xav = lp.m_xav;
204 m_yav = lp.m_yav;
205 m_xyavp = lp.m_xyavp;
206
207 m_rscale = lp. m_rscale;
208 m_xxavp = lp.m_xxavp;
209 m_yyavp = lp.m_yyavp;
210 m_xrravp = lp.m_xrravp;
211 m_yrravp = lp.m_yrravp;
212 m_rrrravp = lp.m_rrrravp;
213 m_sinrot = lp.m_sinrot;
214 m_cosrot = lp.m_cosrot;
215
216 m_nc = lp. m_nc;
217 m_chisq = lp.m_chisq;
218 return *this;
219 }
220
222 {
223 m_wsum = lp.m_wsum;
224 m_xsum = lp.m_xsum;
225 m_ysum = lp.m_ysum;
226 m_xxsum = lp.m_xxsum;
227 m_yysum = lp.m_yysum;
228 m_xysum = lp.m_xysum;
229 m_xrrsum = lp.m_xrrsum;
230 m_yrrsum = lp.m_yrrsum;
231 m_rrrrsum = lp.m_rrrrsum;
232
234 m_xav = lp.m_xav;
235 m_yav = lp.m_yav;
236 m_xyavp = lp.m_xyavp;
237
238 m_rscale = lp. m_rscale;
239 m_xxavp = lp.m_xxavp;
240 m_yyavp = lp.m_yyavp;
241 m_xrravp = lp.m_xrravp;
242 m_yrravp = lp.m_yrravp;
243 m_rrrravp = lp.m_rrrravp;
244 m_sinrot = lp.m_sinrot;
245 m_cosrot = lp.m_cosrot;
246
247 m_nc = lp. m_nc;
248 m_chisq = lp.m_chisq;
249 return;
250 }
251
252 inline void TRGCDCLpav::clear()
253 {
256 m_chisq = -1;
257 }
258
260} // namespace Belle2
261
TRGCDCLpar class.
Definition: Lpar.h:35
exception class, no covarience matrix_c
Definition: Lpav.h:100
exception class, no covarience matrix.
Definition: Lpav.h:98
TRGCDCLpav class.
Definition: Lpav.h:31
double m_xsum
data members
Definition: Lpav.h:137
double m_xyavp
data members
Definition: Lpav.h:160
friend std::ostream & operator<<(std::ostream &o, const TRGCDCLpav &s)
ostream operator
Definition: Lpav.cc:265
double m_xav
data members
Definition: Lpav.h:156
double m_rrrravp
data members
Definition: Lpav.h:173
double m_xrravp
data members
Definition: Lpav.h:169
double m_rrrrsum
data members
Definition: Lpav.h:151
double m_chisq
data members
Definition: Lpav.h:182
double chisq() const
get chisq
Definition: Lpav.h:78
double m_wsum
data members
Definition: Lpav.h:135
double chisq(double chisq)
private member function chisq
Definition: Lpav.h:124
double m_sinrot
data members
Definition: Lpav.h:175
double m_cosrot
data members
Definition: Lpav.h:177
double m_nc
data members
Definition: Lpav.h:180
double m_xxsum
data members
Definition: Lpav.h:141
friend TRGCDCLpav operator+(const TRGCDCLpav &, const TRGCDCLpav &)
Definition: Lpav.cc:676
double m_ysum
data members
Definition: Lpav.h:139
double m_xrrsum
data members
Definition: Lpav.h:147
double m_yav
data members
Definition: Lpav.h:158
double nc() const
const member function nc
Definition: Lpav.h:66
double m_rscale
data members
Definition: Lpav.h:163
double m_yysum
data members
Definition: Lpav.h:143
double m_yrravp
data members
Definition: Lpav.h:171
double m_xxavp
data members
Definition: Lpav.h:165
double nc(double nc)
private member function nc
Definition: Lpav.h:126
const TRGCDCLpav & operator=(const TRGCDCLpar &)
assignment operator(s)
double m_xysum
data members
Definition: Lpav.h:145
bool operator==(const TRGCDCLpav &) const
comparison operators
double m_wsum_temp
data members
Definition: Lpav.h:154
bool operator!=(const TRGCDCLpav &) const
comparison operators
double m_yrrsum
data members
Definition: Lpav.h:149
double m_yyavp
data members
Definition: Lpav.h:167
void add_point(double x, double y, double w=1)
member functions to add point
Definition: Lpav.cc:602
int extrapolate(double, double &, double &) const
const member function for extrapolation
Definition: Lpav.cc:541
double s(double x, double y) const
const member functions
Definition: Lpar.cc:210
void calculate_average(void)
member functions for calculation
Definition: Lpav.cc:127
void calculate_average_n(double xxav, double yyav, double xyav, double xrrav, double yrrav, double rrrrav)
private member function calculate_average_n
Definition: Lpav.cc:145
CLHEP::HepSymMatrix cov(int=0) const
const member function cov
Definition: Lpav.cc:474
double solve_lambda(void)
private member function solve_lambda
Definition: Lpav.cc:282
void calculate_average3(void)
member functions for calculation
Definition: Lpav.cc:236
double x(double r) const
private const member functions
Definition: Lpar.cc:174
double fit()
member functions for fit
Definition: Lpav.cc:457
double delta_chisq(double x, double y, double w=1) const
const member function for delta chisq
Definition: Lpav.cc:715
double solve_lambda3(void)
private member function solve_lambda3
Definition: Lpav.cc:319
TRGCDCLpav & operator=(const TRGCDCLpav &)
assignment operator(s)
Definition: Lpav.h:189
void sub(double x, double y, double w=1, double a=0, double b=0)
private member functions
Definition: Lpav.cc:641
CLHEP::HepSymMatrix cov_c(int=0) const
const member function cov_c
Definition: Lpav.cc:507
TRGCDCLpav()
Constructor.
Definition: Lpav.cc:49
double calculate_lpar(void)
member functions for calculation
Definition: Lpav.cc:343
double calculate_lpar3(void)
member functions for calculation
Definition: Lpav.cc:397
virtual ~TRGCDCLpav()
Destructor.
Definition: Lpav.cc:81
double chi_deg() const
const member function chi_deg
Definition: Lpav.cc:709
double prob() const
const member function prob
Definition: Lpav.cc:697
void clear()
member functions for clear
Definition: Lpav.h:252
double y(double r) const
private const member functions
Definition: Lpar.cc:181
const TRGCDCLpav & operator+=(const TRGCDCLpav &)
assignment operator(s)
Definition: Lpav.cc:661
double similarity(double, double) const
const member function similarity
Definition: Lpav.cc:575
TRGCDCLpar & operator=(const TRGCDCLpar &)
assignment operator(s)
Definition: Lpar.h:211
void add_point_frac(double x, double y, double w, double f)
member functions to add point
Definition: Lpav.cc:621
Abstract base class for different kinds of events.