BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
Lpav Class Reference

#include <Lpav.h>

+ Inheritance diagram for Lpav:

Classes

class  Singular
 
class  Singular_c
 

Public Member Functions

 Lpav ()
 
virtual ~Lpav ()
 
void calculate_average (void)
 
void calculate_average3 (void)
 
void calculate_average (double x, double y, double w=1)
 
void calculate_average3 (double x, double y, double w=1)
 
double calculate_lpar (void)
 
double calculate_lpar3 (void)
 
double fit ()
 
double fit (double x, double y, double w=1)
 
void clear ()
 
void add_point (double x, double y, double w=1)
 
void add_point_frac (double x, double y, double w, double f)
 
double nc () const
 
HepSymMatrix cov (int=0) const
 
HepSymMatrix cov_c (int=0) const
 
int extrapolate (double, double &, double &) const
 
double similarity (double, double) const
 
double delta_chisq (double x, double y, double w=1) const
 
double chisq () const
 
double prob () const
 
double chi_deg () const
 
const Lpavoperator= (const Lpav &)
 
const Lpavoperator= (const Lpar &)
 
const Lpavoperator+= (const Lpav &)
 
 Lpav ()
 
virtual ~Lpav ()
 
void calculate_average (void)
 
void calculate_average3 (void)
 
void calculate_average (double x, double y, double w=1)
 
void calculate_average3 (double x, double y, double w=1)
 
double calculate_lpar (void)
 
double calculate_lpar3 (void)
 
double fit ()
 
double fit (double x, double y, double w=1)
 
void clear ()
 
void add_point (double x, double y, double w=1)
 
void add_point_frac (double x, double y, double w, double f)
 
double nc () const
 
HepSymMatrix cov (int=0) const
 
HepSymMatrix cov_c (int=0) const
 
int extrapolate (double, double &, double &) const
 
double similarity (double, double) const
 
double delta_chisq (double x, double y, double w=1) const
 
double chisq () const
 
double prob () const
 
double chi_deg () const
 
const Lpavoperator= (const Lpav &)
 
const Lpavoperator= (const Lpar &)
 
const Lpavoperator+= (const Lpav &)
 
 Lpav ()
 
virtual ~Lpav ()
 
void calculate_average (void)
 
void calculate_average3 (void)
 
void calculate_average (double x, double y, double w=1)
 
void calculate_average3 (double x, double y, double w=1)
 
double calculate_lpar (void)
 
double calculate_lpar3 (void)
 
double fit ()
 
double fit (double x, double y, double w=1)
 
void clear ()
 
void add_point (double x, double y, double w=1)
 
void add_point_frac (double x, double y, double w, double f)
 
double nc () const
 
HepSymMatrix cov (int=0) const
 
HepSymMatrix cov_c (int=0) const
 
int extrapolate (double, double &, double &) const
 
double similarity (double, double) const
 
double delta_chisq (double x, double y, double w=1) const
 
double chisq () const
 
double prob () const
 
double chi_deg () const
 
const Lpavoperator= (const Lpav &)
 
const Lpavoperator= (const Lpar &)
 
const Lpavoperator+= (const Lpav &)
 
 Lpav ()
 
virtual ~Lpav ()
 
void calculate_average (void)
 
void calculate_average3 (void)
 
void calculate_average (double x, double y, double w=1)
 
void calculate_average3 (double x, double y, double w=1)
 
double calculate_lpar (void)
 
double calculate_lpar3 (void)
 
double fit ()
 
double fit (double x, double y, double w=1)
 
void clear ()
 
void add_point (double x, double y, double w=1)
 
void add_point_frac (double x, double y, double w, double f)
 
double nc () const
 
HepSymMatrix cov (int=0) const
 
HepSymMatrix cov_c (int=0) const
 
int extrapolate (double, double &, double &) const
 
double similarity (double, double) const
 
double delta_chisq (double x, double y, double w=1) const
 
double chisq () const
 
double prob () const
 
double chi_deg () const
 
const Lpavoperator= (const Lpav &)
 
const Lpavoperator= (const Lpar &)
 
const Lpavoperator+= (const Lpav &)
 
- Public Member Functions inherited from Lpar
 Lpar ()
 
virtual ~Lpar ()
 
const Lparoperator= (const Lpar &)
 
void neg ()
 
void circle (double x1, double y1, double x2, double y2, double x3, double y3)
 
double kappa () const
 
double radius () const
 
HepVector center () const
 
double s (double x, double y) const
 
double d (double x, double y) const
 
double dr (double x, double y) const
 
double s (double r, int dir=0) const
 
double phi (double r, int dir=0) const
 
int sd (double r, double x, double y, double limit, double &s, double &d) const
 
HepVector Hpar (const HepPoint3D &pivot) const
 
 Lpar ()
 
virtual ~Lpar ()
 
const Lparoperator= (const Lpar &)
 
void neg ()
 
void circle (double x1, double y1, double x2, double y2, double x3, double y3)
 
double kappa () const
 
double radius () const
 
HepVector center () const
 
double s (double x, double y) const
 
double d (double x, double y) const
 
double dr (double x, double y) const
 
double s (double r, int dir=0) const
 
double phi (double r, int dir=0) const
 
int sd (double r, double x, double y, double limit, double &s, double &d) const
 
HepVector Hpar (const HepPoint3D &pivot) const
 
 Lpar ()
 
virtual ~Lpar ()
 
const Lparoperator= (const Lpar &)
 
void neg ()
 
void circle (double x1, double y1, double x2, double y2, double x3, double y3)
 
double kappa () const
 
double radius () const
 
HepVector center () const
 
double s (double x, double y) const
 
double d (double x, double y) const
 
double dr (double x, double y) const
 
double s (double r, int dir=0) const
 
double phi (double r, int dir=0) const
 
int sd (double r, double x, double y, double limit, double &s, double &d) const
 
HepVector Hpar (const HepPoint3D &pivot) const
 
 Lpar ()
 
virtual ~Lpar ()
 
const Lparoperator= (const Lpar &)
 
void neg ()
 
void circle (double x1, double y1, double x2, double y2, double x3, double y3)
 
double kappa () const
 
double radius () const
 
HepVector center () const
 
double s (double x, double y) const
 
double d (double x, double y) const
 
double dr (double x, double y) const
 
double s (double r, int dir=0) const
 
double phi (double r, int dir=0) const
 
int sd (double r, double x, double y, double limit, double &s, double &d) const
 
HepVector Hpar (const HepPoint3D &pivot) const
 

Friends

std::ostream & operator<< (std::ostream &o, const Lpav &s)
 
Lpav operator+ (const Lpav &, const Lpav &)
 
std::ostream & operator<< (std::ostream &o, const Lpav &s)
 
Lpav operator+ (const Lpav &, const Lpav &)
 
std::ostream & operator<< (std::ostream &o, const Lpav &s)
 
Lpav operator+ (const Lpav &, const Lpav &)
 
std::ostream & operator<< (std::ostream &o, const Lpav &s)
 
Lpav operator+ (const Lpav &, const Lpav &)
 

Detailed Description

Constructor & Destructor Documentation

◆ Lpav() [1/4]

Lpav::Lpav ( )

◆ ~Lpav() [1/4]

Lpav::~Lpav ( )
virtual

Definition at line 61 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

62{
63}

◆ Lpav() [2/4]

Lpav::Lpav ( )

◆ ~Lpav() [2/4]

virtual Lpav::~Lpav ( )
virtual

◆ Lpav() [3/4]

Lpav::Lpav ( )

◆ ~Lpav() [3/4]

virtual Lpav::~Lpav ( )
virtual

◆ Lpav() [4/4]

Lpav::Lpav ( )

◆ ~Lpav() [4/4]

virtual Lpav::~Lpav ( )
virtual

Member Function Documentation

◆ add_point() [1/4]

void Lpav::add_point ( double  x,
double  y,
double  w = 1 
)

◆ add_point() [2/4]

void Lpav::add_point ( double  x,
double  y,
double  w = 1 
)

◆ add_point() [3/4]

void Lpav::add_point ( double  x,
double  y,
double  w = 1 
)

◆ add_point() [4/4]

void Lpav::add_point ( double  x,
double  y,
double  w = 1 
)

◆ add_point_frac() [1/4]

void Lpav::add_point_frac ( double  x,
double  y,
double  w,
double  f 
)

Definition at line 583 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

583 {
584 register double wi = w * a;
585 m_wsum += wi;
586 m_xsum += wi * xi;
587 m_ysum += wi * yi;
588 m_xxsum += wi * xi * xi;
589 m_yysum += wi * yi * yi;
590 m_xysum += wi * xi * yi;
591 register double rri = ( xi * xi + yi * yi );
592 register double wrri = wi * rri;
593 m_xrrsum += wrri * xi;
594 m_yrrsum += wrri * yi;
595 m_rrrrsum += wrri * rri;
596 m_nc += a;
597}

◆ add_point_frac() [2/4]

void Lpav::add_point_frac ( double  x,
double  y,
double  w,
double  f 
)

◆ add_point_frac() [3/4]

void Lpav::add_point_frac ( double  x,
double  y,
double  w,
double  f 
)

◆ add_point_frac() [4/4]

void Lpav::add_point_frac ( double  x,
double  y,
double  w,
double  f 
)

◆ calculate_average() [1/8]

void Lpav::calculate_average ( double  x,
double  y,
double  w = 1 
)

Definition at line 86 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

86 {
87 if(m_wsum<=0) return;
88 m_wsum_temp = m_wsum + wi;
89 double rri(xi * xi + yi * yi);
90 double wrri(wi * rri);
91 double wsum_inv(1/m_wsum_temp);
92 m_xav = (m_xsum + wi * xi) * wsum_inv;
93 m_yav = (m_ysum + wi * yi) * wsum_inv;
94
95 double xxav((m_xxsum + wi * xi * xi) * wsum_inv);
96 double yyav((m_yysum + wi * yi * yi) * wsum_inv);
97 double xyav((m_xysum + wi * xi * yi) * wsum_inv);
98 double xrrav((m_xrrsum + xi * wrri) * wsum_inv);
99 double yrrav((m_yrrsum + yi * wrri) * wsum_inv);
100 double rrrrav((m_rrrrsum + wrri * rri) * wsum_inv);
101
102 calculate_average_n(xxav, yyav, xyav, xrrav, yrrav, rrrrav);
103
104}

◆ calculate_average() [2/8]

void Lpav::calculate_average ( double  x,
double  y,
double  w = 1 
)

◆ calculate_average() [3/8]

void Lpav::calculate_average ( double  x,
double  y,
double  w = 1 
)

◆ calculate_average() [4/8]

void Lpav::calculate_average ( double  x,
double  y,
double  w = 1 
)

◆ calculate_average() [5/8]

void Lpav::calculate_average ( void  )

Definition at line 106 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

106 {
107 if(m_wsum<=0) return;
108 m_wsum_temp = m_wsum;
109 double wsum_inv(1/m_wsum_temp);
110 m_xav = m_xsum * wsum_inv;
111 m_yav = m_ysum * wsum_inv;
112
113 double xxav(m_xxsum * wsum_inv);
114 double yyav(m_yysum * wsum_inv);
115 double xyav(m_xysum * wsum_inv);
116 double xrrav(m_xrrsum * wsum_inv);
117 double yrrav(m_yrrsum * wsum_inv);
118 double rrrrav(m_rrrrsum * wsum_inv);
119
120 calculate_average_n(xxav, yyav, xyav, xrrav, yrrav, rrrrav);
121}

Referenced by fit().

◆ calculate_average() [6/8]

void Lpav::calculate_average ( void  )

◆ calculate_average() [7/8]

void Lpav::calculate_average ( void  )

◆ calculate_average() [8/8]

void Lpav::calculate_average ( void  )

◆ calculate_average3() [1/8]

void Lpav::calculate_average3 ( double  x,
double  y,
double  w = 1 
)

Definition at line 192 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

192 {
193 if(m_wsum<=0) return;
194 m_wsum_temp = m_wsum + wi;
195 double wsum_inv(1/m_wsum_temp);
196 double rri(xi * xi + yi * yi);
197 m_xav = (m_xsum + wi * xi) * wsum_inv;
198 m_yav = (m_ysum + wi * yi) * wsum_inv;
199
200 m_rscale = 1;
201 m_cosrot = 1;
202 m_sinrot = 0;
203 m_xxavp = (m_xxsum + wi * xi * xi) * wsum_inv;
204 m_xyavp = (m_xysum + wi * xi * yi) * wsum_inv;
205 m_yyavp = (m_yysum + wi * yi * yi) * wsum_inv;
206 double wrri(wi * rri);
207 m_xrravp = (m_xrrsum + xi * wrri) * wsum_inv;
208 m_yrravp = (m_yrrsum + yi * wrri) * wsum_inv;
209 m_rrrravp = (m_rrrrsum + rri * wrri) * wsum_inv;
210}

◆ calculate_average3() [2/8]

void Lpav::calculate_average3 ( double  x,
double  y,
double  w = 1 
)

◆ calculate_average3() [3/8]

void Lpav::calculate_average3 ( double  x,
double  y,
double  w = 1 
)

◆ calculate_average3() [4/8]

void Lpav::calculate_average3 ( double  x,
double  y,
double  w = 1 
)

◆ calculate_average3() [5/8]

void Lpav::calculate_average3 ( void  )

Definition at line 212 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

212 {
213 if(m_wsum<=0) return;
214 m_wsum_temp = m_wsum;
215 double wsum_inv(1/m_wsum_temp);
216 m_xav = m_xsum * wsum_inv;
217 m_yav = m_ysum * wsum_inv;
218
219 m_rscale = 1;
220 m_cosrot = 1;
221 m_sinrot = 0;
222 m_xxavp = m_xxsum * wsum_inv;
223 m_xyavp = m_xysum * wsum_inv;
224 m_yyavp = m_yysum * wsum_inv;
225 m_xrravp = m_xrrsum * wsum_inv;
226 m_yrravp = m_yrrsum * wsum_inv;
227 m_rrrravp = m_rrrrsum * wsum_inv;
228}

Referenced by fit().

◆ calculate_average3() [6/8]

void Lpav::calculate_average3 ( void  )

◆ calculate_average3() [7/8]

void Lpav::calculate_average3 ( void  )

◆ calculate_average3() [8/8]

void Lpav::calculate_average3 ( void  )

◆ calculate_lpar() [1/4]

double Lpav::calculate_lpar ( void  )

Definition at line 315 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

315 {
316 double lambda = solve_lambda();
317// changed on Oct-13-93
318// if (lambda<=0) return -1;
319 if (lambda<0) return -1;
320 double h11 = m_xxavp - lambda;
321 double h22 = m_yyavp - lambda;
322 if (h11==0.0) return -1;
323 double h14 = m_xrravp;
324 double h24 = m_yrravp;
325 double h34 = 1 + 2 * lambda;
326 double rootsq = (h14*h14/h11/h11) + 4 * h34;
327 if ( std::fabs(h22) > std::fabs(h24) ) {
328 if(h22==0.0) return -1;
329 double ratio = h24/h22;
330 rootsq += ratio * ratio ;
331 m_kappa = 1/std::sqrt(rootsq);
332 m_beta = - ratio * m_kappa;
333 } else {
334 if(h24==0.0) return -1;
335 double ratio = h22 / h24;
336 rootsq = 1 + ratio * ratio * rootsq;
337 m_beta = 1 / std::sqrt(rootsq);
338 m_beta = h24>0 ? -m_beta : m_beta;
339 m_kappa = -ratio * m_beta;
340 }
341 m_alpha = - (h14/h11)*m_kappa;
342 m_gamma = - h34 * m_kappa;
343// if (lambda<0.0001) {
344// cout << " lambda=" << lambda << " h34=" << h34
345// << " rootsq=" << rootsq << " h22=" << h22
346// << " h11=" << h11 << " h14=" << h14 << " h24=" << h24 <<
347// " " << *this << endl;
348// }
349//
350//C TRANSFORM THESE INTO THE LAB COORDINATE SYSTEM
351//
352//C FIRST GET KAPPA AND GAMMA BACK TO REAL DIMENSIONS
353//
354 scale(m_rscale);
355//
356//C NEXT ROTATE ALPHA AND BETA
357//
358 rotate(m_cosrot, -m_sinrot);
359//
360//C THEN TRANSLATE BY (XAV,YAV)
361//
362 move(-m_xav, -m_yav);
363 if (m_yrravp < 0) neg();
364 if (lambda>=0) m_chisq = lambda * m_wsum_temp * m_rscale * m_rscale;
365 return lambda;
366}

Referenced by fit().

◆ calculate_lpar() [2/4]

double Lpav::calculate_lpar ( void  )

◆ calculate_lpar() [3/4]

double Lpav::calculate_lpar ( void  )

◆ calculate_lpar() [4/4]

double Lpav::calculate_lpar ( void  )

◆ calculate_lpar3() [1/4]

double Lpav::calculate_lpar3 ( void  )

Definition at line 368 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

368 {
369 double lambda = solve_lambda3();
370// changed on Oct-13-93
371// if (lambda<=0) return -1;
372 if (lambda<0) return -1;
373 double h11 = m_xxavp - lambda;
374 double h22 = m_yyavp - lambda;
375 double h14 = m_xrravp;
376 double h24 = m_yrravp;
377 m_gamma = 0;
378 double h12 = m_xyavp;
379 double det = h11*h22-h12*h12;
380 if (det!=0) {
381 double r1 = (h14*h22-h24*h12)/(det);
382 double r2 = (h24*h11-h14*h12)/(det);
383 double kinvsq = r1*r1 + r2*r2;
384 m_kappa = std::sqrt(1/kinvsq);
385 if(h11!=0) m_alpha = -m_kappa * r1;
386 else m_alpha = 1;
387 if(h22!=0) m_beta = -m_kappa * r2;
388 else m_beta = 1;
389 } else {
390 m_kappa = 0;
391 if (h11!=0 && h22!=0) {
392 m_beta = 1/std::sqrt(1+h12*h12/h11/h11);
393 m_alpha = std::sqrt(1-m_beta*m_beta);
394 } else if (h11!=0) {
395 m_beta = 1;
396 m_alpha = 0;
397 } else {
398 m_beta = 0;
399 m_alpha = 1;
400 }
401 }
402 if((m_alpha*m_xav + m_beta*m_yav) *
403 (m_beta*m_xav - m_alpha*m_yav)<0) neg();
404// if (std::fabs(m_alpha)<0.01 && std::fabs(m_beta)<0.01) {
405// cout << " lambda=" << lambda << " " << *this << endl;
406// }
407 if (lambda>=0) m_chisq = lambda * m_wsum_temp * m_rscale * m_rscale;
408 return lambda;
409}

Referenced by fit().

◆ calculate_lpar3() [2/4]

double Lpav::calculate_lpar3 ( void  )

◆ calculate_lpar3() [3/4]

double Lpav::calculate_lpar3 ( void  )

◆ calculate_lpar3() [4/4]

double Lpav::calculate_lpar3 ( void  )

◆ chi_deg() [1/4]

double Lpav::chi_deg ( ) const

Definition at line 659 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

659 {
660 if (m_nc<=3) return -1;
661 else return m_chisq/(m_nc-3);
662}

Referenced by operator+().

◆ chi_deg() [2/4]

double Lpav::chi_deg ( ) const

◆ chi_deg() [3/4]

double Lpav::chi_deg ( ) const

◆ chi_deg() [4/4]

double Lpav::chi_deg ( ) const

◆ chisq() [1/4]

double Lpav::chisq ( ) const
inline

◆ chisq() [2/4]

double Lpav::chisq ( ) const
inline

Definition at line 59 of file InstallArea/include/TrackUtil/TrackUtil/Lpav.h.

59{ return m_chisq; }

◆ chisq() [3/4]

double Lpav::chisq ( ) const
inline

Definition at line 64 of file Reconstruction/KalFitAlg/KalFitAlg-00-07-55-p03/KalFitAlg/lpav/Lpav.h.

64{ return m_chisq; }

◆ chisq() [4/4]

double Lpav::chisq ( ) const
inline

Definition at line 59 of file Reconstruction/TrackUtil/TrackUtil-00-00-08/TrackUtil/Lpav.h.

59{ return m_chisq; }

◆ clear() [1/4]

void Lpav::clear ( )
inline

Definition at line 199 of file InstallArea/include/KalFitAlg/KalFitAlg/lpav/Lpav.h.

199 {
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}

Referenced by Lpav(), FTTrack::r_phi2Fit(), FTTrack::r_phi3Fit(), FTTrack::r_phi4Fit(), FTTrack::r_phiFit(), and FTTrack::r_phiReFit().

◆ clear() [2/4]

void Lpav::clear ( )
inline

◆ clear() [3/4]

void Lpav::clear ( )
inline

◆ clear() [4/4]

void Lpav::clear ( )
inline

◆ cov() [1/4]

HepSymMatrix Lpav::cov ( int  inv = 0) const

Definition at line 443 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

446{
447#else
448{
449 HepSymMatrix vret(4);
450#endif
451 vret(1,1) = m_xxsum;
452 vret(2,1) = m_xysum;
453 vret(2,2) = m_yysum;
454 vret(3,1) = m_xsum;
455 vret(3,2) = m_ysum;
456 vret(3,3) = m_wsum;
457 vret(4,1) = m_xrrsum;
458 vret(4,2) = m_yrrsum;
459 vret(4,3) = m_xxsum + m_yysum;
460 vret(4,4) = m_rrrrsum;
461 if(inv==0) {
462// int i=vret.Inv();
463 int i;
464 vret.invert(i);
465 if (i!=0) {
466 std::cerr << "Lpav::cov:could not invert nc=" << m_nc << vret;
467#ifdef HAVE_EXCEPTION
468 THROW(Lpav::cov,Singular);
469#endif
470 }
471 }
472 return vret;
473}

Referenced by extrapolate(), and similarity().

◆ cov() [2/4]

HepSymMatrix Lpav::cov ( int  = 0) const

◆ cov() [3/4]

HepSymMatrix Lpav::cov ( int  = 0) const

◆ cov() [4/4]

HepSymMatrix Lpav::cov ( int  = 0) const

◆ cov_c() [1/4]

HepSymMatrix Lpav::cov_c ( int  inv = 0) const

Definition at line 475 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

478{
479#else
480{
481 HepSymMatrix vret(3);
482#endif
483#ifdef HAVE_EXCEPTION
484 try {
485#endif
486 vret = cov(1).similarity(dldc());
487#ifdef HAVE_EXCEPTION
488 }
489 catch (Lpav::Singular) {
490 THROW(Lpav::cov_c1,Singular_c);
491 }
492#endif
493 if(inv==0) {
494// int i = vret.Inv();
495 int i;
496 vret.invert(i);
497 if (i!=0) {
498 std::cerr << "Lpav::cov_c:could not invert " << vret;
499#ifdef HAVE_EXCEPTION
500 THROW(Lpav::cov_c2,Singular_c);
501#endif
502 }
503 }
504 return vret;
505}

◆ cov_c() [2/4]

HepSymMatrix Lpav::cov_c ( int  = 0) const

◆ cov_c() [3/4]

HepSymMatrix Lpav::cov_c ( int  = 0) const

◆ cov_c() [4/4]

HepSymMatrix Lpav::cov_c ( int  = 0) const

◆ delta_chisq() [1/4]

double Lpav::delta_chisq ( double  x,
double  y,
double  w = 1 
) const

Definition at line 664 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

664 {
665 double sim = similarity(x,y);
666 if(sim<0) return -1;
667 double d = d0(x,y);
668 double delta = std::sqrt(d) * w / (1 + sim * w);
669 return delta;
670}
double d(double x, double y) const
double similarity(double, double) const

Referenced by operator+().

◆ delta_chisq() [2/4]

double Lpav::delta_chisq ( double  x,
double  y,
double  w = 1 
) const

◆ delta_chisq() [3/4]

double Lpav::delta_chisq ( double  x,
double  y,
double  w = 1 
) const

◆ delta_chisq() [4/4]

double Lpav::delta_chisq ( double  x,
double  y,
double  w = 1 
) const

◆ extrapolate() [1/4]

int Lpav::extrapolate ( double  r,
double &  phi,
double &  dphi 
) const

Definition at line 507 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

507 {
508 double x, y;
509 if (m_chisq<0) return -1;
510 if (xy(r, x, y)!=0) return -1;
511 phi = std::atan2(y,x);
512 if (phi<0) phi += (2*M_PI);
513 HepVector v(4);
514 v(1) = x;
515 v(2) = y;
516 v(3) = 1;
517 v(4) = r * r;
518// HepSymMatrix l = cov().similarityT(v);
519#ifdef HAVE_EXCEPTION
520 try {
521#endif
522// HepSymMatrix l = cov().similarity(v.T());
523// // cout << "delta d^2=" << l(1,1);
524// if (l(1,1)>0) {
525 double l = cov().similarity(v);
526 if(l>0) {
527 double ls = std::sqrt(l);
528 dphi = ls / r;
529 // cout << " delta d=" << ls << " dphi=" << dphi;
530 }
531#ifdef HAVE_EXCEPTION
532 }
533 catch (Lpav::Singular) {
534 return -1;
535 }
536#endif
537// cout << endl;
538 return 0;
539}
Double_t x[10]
**********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
#define M_PI
Definition: TConstant.h:4
double phi(double r, int dir=0) const

◆ extrapolate() [2/4]

int Lpav::extrapolate ( double  ,
double &  ,
double &   
) const

◆ extrapolate() [3/4]

int Lpav::extrapolate ( double  ,
double &  ,
double &   
) const

◆ extrapolate() [4/4]

int Lpav::extrapolate ( double  ,
double &  ,
double &   
) const

◆ fit() [1/8]

double Lpav::fit ( void  )

Definition at line 427 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

427 {
428 if (m_nc<=3) return -1;
429 m_chisq = -1;
430 double q;
431 if (m_nc<4) {
433 q = calculate_lpar3();
434 if (q>0) m_chisq = q * m_wsum_temp * m_rscale * m_rscale;
435 } else {
437 q = calculate_lpar();
438 if (q>0) m_chisq = q * m_wsum_temp * m_rscale * m_rscale;
439 }
440 return m_chisq;
441}
****INTEGER imax DOUBLE PRECISION m_pi *DOUBLE PRECISION m_amfin DOUBLE PRECISION m_Chfin DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_sinw2 DOUBLE PRECISION m_GFermi DOUBLE PRECISION m_MfinMin DOUBLE PRECISION m_ta2 INTEGER m_out INTEGER m_KeyFSR INTEGER m_KeyQCD *COMMON c_Semalib $ !copy of input $ !CMS energy $ !beam mass $ !final mass $ !beam charge $ !final charge $ !smallest final mass $ !Z mass $ !Z width $ !EW mixing angle $ !Gmu Fermi $ alphaQED at q
Definition: KKsem.h:33

Referenced by TCircleFitter::fit(), TCircle::fitForCurl(), FTTrack::r_phi2Fit(), FTTrack::r_phi3Fit(), FTTrack::r_phi4Fit(), FTTrack::r_phiFit(), and FTTrack::r_phiReFit().

◆ fit() [2/8]

double Lpav::fit ( )

◆ fit() [3/8]

double Lpav::fit ( )

◆ fit() [4/8]

double Lpav::fit ( )

◆ fit() [5/8]

double Lpav::fit ( double  x,
double  y,
double  w = 1 
)

Definition at line 411 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

411 {
412 if (m_nc<=3) return -1;
413 m_chisq = -1;
414 double q;
415 if (m_nc<4) {
416 calculate_average3(x,y,w);
417 double q = calculate_lpar3();
418 if (q>0) m_chisq = q * m_wsum_temp * m_rscale * m_rscale;
419 } else {
420 calculate_average(x,y,w);
421 q = calculate_lpar();
422 if (q>0) m_chisq = q * m_wsum_temp * m_rscale * m_rscale;
423 }
424 return m_chisq;
425}

◆ fit() [6/8]

double Lpav::fit ( double  x,
double  y,
double  w = 1 
)

◆ fit() [7/8]

double Lpav::fit ( double  x,
double  y,
double  w = 1 
)

◆ fit() [8/8]

double Lpav::fit ( double  x,
double  y,
double  w = 1 
)

◆ nc() [1/4]

double Lpav::nc ( ) const
inline

◆ nc() [2/4]

double Lpav::nc ( ) const
inline

Definition at line 53 of file InstallArea/include/TrackUtil/TrackUtil/Lpav.h.

53{ return m_nc; }

◆ nc() [3/4]

double Lpav::nc ( ) const
inline

Definition at line 58 of file Reconstruction/KalFitAlg/KalFitAlg-00-07-55-p03/KalFitAlg/lpav/Lpav.h.

58{ return m_nc; }

◆ nc() [4/4]

double Lpav::nc ( ) const
inline

Definition at line 53 of file Reconstruction/TrackUtil/TrackUtil-00-00-08/TrackUtil/Lpav.h.

53{ return m_nc; }

◆ operator+=() [1/4]

const Lpav & Lpav::operator+= ( const Lpav la1)

Definition at line 615 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

615 {
616 m_wsum += la1.m_wsum;
617 m_xsum += la1.m_xsum;
618 m_ysum += la1.m_ysum;
619 m_xxsum += la1.m_xxsum;
620 m_yysum += la1.m_yysum;
621 m_xysum += la1.m_xysum;
622 m_xrrsum += la1.m_xrrsum;
623 m_yrrsum += la1.m_yrrsum;
624 m_rrrrsum += la1.m_rrrrsum;
625 m_nc += la1.m_nc;
626 return *this;
627}

◆ operator+=() [2/4]

const Lpav & Lpav::operator+= ( const Lpav )

◆ operator+=() [3/4]

const Lpav & Lpav::operator+= ( const Lpav )

◆ operator+=() [4/4]

const Lpav & Lpav::operator+= ( const Lpav )

◆ operator=() [1/8]

const Lpav & Lpav::operator= ( const Lpar )

◆ operator=() [2/8]

const Lpav & Lpav::operator= ( const Lpar )

◆ operator=() [3/8]

const Lpav & Lpav::operator= ( const Lpar )

◆ operator=() [4/8]

const Lpav & Lpav::operator= ( const Lpar )

◆ operator=() [5/8]

const Lpav & Lpav::operator= ( const Lpav lp)
inline

Definition at line 138 of file InstallArea/include/KalFitAlg/KalFitAlg/lpav/Lpav.h.

138 {
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}
const Lpar & operator=(const Lpar &)

◆ operator=() [6/8]

const Lpav & Lpav::operator= ( const Lpav )
inline

◆ operator=() [7/8]

const Lpav & Lpav::operator= ( const Lpav )
inline

◆ operator=() [8/8]

const Lpav & Lpav::operator= ( const Lpav )
inline

◆ prob() [1/4]

double Lpav::prob ( ) const

Definition at line 650 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

650 {
651 if (m_nc<=3) return 0;
652 if (m_chisq<0) return 0;
653 float c = m_chisq;
654 int nci = (int)m_nc - 3;
655 double p = (double) prob_(&c, &nci);
656 return p;
657}
float prob_(float *, int *)

Referenced by operator+().

◆ prob() [2/4]

double Lpav::prob ( ) const

◆ prob() [3/4]

double Lpav::prob ( ) const

◆ prob() [4/4]

double Lpav::prob ( ) const

◆ similarity() [1/4]

double Lpav::similarity ( double  x,
double  y 
) const

Definition at line 541 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

541 {
542 if (m_nc<=3) return -1;
543 HepVector v(4);
544 v(1) = x;
545 v(2) = y;
546 v(3) = 1;
547 v(4) = x * x + y * y;
548 double l;
549#ifdef HAVE_EXCEPTION
550 try {
551#endif
552 l = cov().similarity(v);
553#ifdef HAVE_EXCEPTION
554 }
555 catch (Lpav::Singular) {
556 return -1;
557 }
558#endif
559 return l;
560}

Referenced by delta_chisq(), and operator+().

◆ similarity() [2/4]

double Lpav::similarity ( double  ,
double   
) const

◆ similarity() [3/4]

double Lpav::similarity ( double  ,
double   
) const

◆ similarity() [4/4]

double Lpav::similarity ( double  ,
double   
) const

Friends And Related Function Documentation

◆ operator+ [1/4]

Lpav operator+ ( const Lpav la1,
const Lpav la2 
)
friend

Definition at line 629 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

632{
633#else
634{
635 Lpav la;
636#endif
637 la.m_wsum = la1.m_wsum + la2.m_wsum;
638 la.m_xsum = la1.m_xsum + la2.m_xsum;
639 la.m_ysum = la1.m_ysum + la2.m_ysum;
640 la.m_xxsum = la1.m_xxsum + la2.m_xxsum;
641 la.m_yysum = la1.m_yysum + la2.m_yysum;
642 la.m_xysum = la1.m_xysum + la2.m_xysum;
643 la.m_xrrsum = la1.m_xrrsum + la2.m_xrrsum;
644 la.m_yrrsum = la1.m_yrrsum + la2.m_yrrsum;
645 la.m_rrrrsum = la1.m_rrrrsum + la2.m_rrrrsum;
646 la.m_nc = la1.m_nc + la2.m_nc;
647 return la;
648}

◆ operator+ [2/4]

Lpav operator+ ( const Lpav la1,
const Lpav la2 
)
friend

Definition at line 629 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

632{
633#else
634{
635 Lpav la;
636#endif
637 la.m_wsum = la1.m_wsum + la2.m_wsum;
638 la.m_xsum = la1.m_xsum + la2.m_xsum;
639 la.m_ysum = la1.m_ysum + la2.m_ysum;
640 la.m_xxsum = la1.m_xxsum + la2.m_xxsum;
641 la.m_yysum = la1.m_yysum + la2.m_yysum;
642 la.m_xysum = la1.m_xysum + la2.m_xysum;
643 la.m_xrrsum = la1.m_xrrsum + la2.m_xrrsum;
644 la.m_yrrsum = la1.m_yrrsum + la2.m_yrrsum;
645 la.m_rrrrsum = la1.m_rrrrsum + la2.m_rrrrsum;
646 la.m_nc = la1.m_nc + la2.m_nc;
647 return la;
648}

◆ operator+ [3/4]

Lpav operator+ ( const Lpav la1,
const Lpav la2 
)
friend

Definition at line 629 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

632{
633#else
634{
635 Lpav la;
636#endif
637 la.m_wsum = la1.m_wsum + la2.m_wsum;
638 la.m_xsum = la1.m_xsum + la2.m_xsum;
639 la.m_ysum = la1.m_ysum + la2.m_ysum;
640 la.m_xxsum = la1.m_xxsum + la2.m_xxsum;
641 la.m_yysum = la1.m_yysum + la2.m_yysum;
642 la.m_xysum = la1.m_xysum + la2.m_xysum;
643 la.m_xrrsum = la1.m_xrrsum + la2.m_xrrsum;
644 la.m_yrrsum = la1.m_yrrsum + la2.m_yrrsum;
645 la.m_rrrrsum = la1.m_rrrrsum + la2.m_rrrrsum;
646 la.m_nc = la1.m_nc + la2.m_nc;
647 return la;
648}

◆ operator+ [4/4]

Lpav operator+ ( const Lpav la1,
const Lpav la2 
)
friend

Definition at line 629 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

632{
633#else
634{
635 Lpav la;
636#endif
637 la.m_wsum = la1.m_wsum + la2.m_wsum;
638 la.m_xsum = la1.m_xsum + la2.m_xsum;
639 la.m_ysum = la1.m_ysum + la2.m_ysum;
640 la.m_xxsum = la1.m_xxsum + la2.m_xxsum;
641 la.m_yysum = la1.m_yysum + la2.m_yysum;
642 la.m_xysum = la1.m_xysum + la2.m_xysum;
643 la.m_xrrsum = la1.m_xrrsum + la2.m_xrrsum;
644 la.m_yrrsum = la1.m_yrrsum + la2.m_yrrsum;
645 la.m_rrrrsum = la1.m_rrrrsum + la2.m_rrrrsum;
646 la.m_nc = la1.m_nc + la2.m_nc;
647 return la;
648}

◆ operator<< [1/4]

std::ostream & operator<< ( std::ostream &  o,
const Lpav s 
)
friend

Definition at line 240 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

240 {
241// o << "wsum=" << a.m_wsum << " xsum=" << a.m_xsum << " ysum=" << a.m_ysum
242// << " xxsum=" << a.m_xxsum << " xysum=" << a.m_xysum
243// << " yysum=" << a.m_yysum
244// << " xrrsum=" << a.m_xrrsum << " yrrsum=" << a.m_yrrsum
245// << " rrrrsum=" << a.m_rrrrsum;
246// o << " rscale=" << a.m_rscale
247// << " xxavp=" << a.m_xxavp << " yyavp=" << a.m_yyavp
248// << " xrravp=" << a.m_xrravp << " yrravp=" << a.m_yrravp
249// << " rrrravp=" << a.m_rrrravp << " cosrot=" << a.m_cosrot
250// << " sinrot=" << a.m_sinrot
251// << endl;
252 o << " nc=" << a.m_nc << " chisq=" << a.m_chisq << " " << (Lpar&) a;
253 return o;
254}

◆ operator<< [2/4]

std::ostream & operator<< ( std::ostream &  o,
const Lpav s 
)
friend

Definition at line 240 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

240 {
241// o << "wsum=" << a.m_wsum << " xsum=" << a.m_xsum << " ysum=" << a.m_ysum
242// << " xxsum=" << a.m_xxsum << " xysum=" << a.m_xysum
243// << " yysum=" << a.m_yysum
244// << " xrrsum=" << a.m_xrrsum << " yrrsum=" << a.m_yrrsum
245// << " rrrrsum=" << a.m_rrrrsum;
246// o << " rscale=" << a.m_rscale
247// << " xxavp=" << a.m_xxavp << " yyavp=" << a.m_yyavp
248// << " xrravp=" << a.m_xrravp << " yrravp=" << a.m_yrravp
249// << " rrrravp=" << a.m_rrrravp << " cosrot=" << a.m_cosrot
250// << " sinrot=" << a.m_sinrot
251// << endl;
252 o << " nc=" << a.m_nc << " chisq=" << a.m_chisq << " " << (Lpar&) a;
253 return o;
254}

◆ operator<< [3/4]

std::ostream & operator<< ( std::ostream &  o,
const Lpav s 
)
friend

Definition at line 240 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

240 {
241// o << "wsum=" << a.m_wsum << " xsum=" << a.m_xsum << " ysum=" << a.m_ysum
242// << " xxsum=" << a.m_xxsum << " xysum=" << a.m_xysum
243// << " yysum=" << a.m_yysum
244// << " xrrsum=" << a.m_xrrsum << " yrrsum=" << a.m_yrrsum
245// << " rrrrsum=" << a.m_rrrrsum;
246// o << " rscale=" << a.m_rscale
247// << " xxavp=" << a.m_xxavp << " yyavp=" << a.m_yyavp
248// << " xrravp=" << a.m_xrravp << " yrravp=" << a.m_yrravp
249// << " rrrravp=" << a.m_rrrravp << " cosrot=" << a.m_cosrot
250// << " sinrot=" << a.m_sinrot
251// << endl;
252 o << " nc=" << a.m_nc << " chisq=" << a.m_chisq << " " << (Lpar&) a;
253 return o;
254}

◆ operator<< [4/4]

std::ostream & operator<< ( std::ostream &  o,
const Lpav s 
)
friend

Definition at line 240 of file KalFitAlg/KalFitAlg-00-07-55-p03/src/lpav/Lpav.cxx.

240 {
241// o << "wsum=" << a.m_wsum << " xsum=" << a.m_xsum << " ysum=" << a.m_ysum
242// << " xxsum=" << a.m_xxsum << " xysum=" << a.m_xysum
243// << " yysum=" << a.m_yysum
244// << " xrrsum=" << a.m_xrrsum << " yrrsum=" << a.m_yrrsum
245// << " rrrrsum=" << a.m_rrrrsum;
246// o << " rscale=" << a.m_rscale
247// << " xxavp=" << a.m_xxavp << " yyavp=" << a.m_yyavp
248// << " xrravp=" << a.m_xrravp << " yrravp=" << a.m_yrravp
249// << " rrrravp=" << a.m_rrrravp << " cosrot=" << a.m_cosrot
250// << " sinrot=" << a.m_sinrot
251// << endl;
252 o << " nc=" << a.m_nc << " chisq=" << a.m_chisq << " " << (Lpar&) a;
253 return o;
254}

The documentation for this class was generated from the following files: