Garfield++ v2r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
Heed::linexi2 Class Reference

#include <linexi2.h>

+ Inheritance diagram for Heed::linexi2:

Public Member Functions

 linexi2 (const linexi2_coor &lc, const double *fay)
 
 linexi2 (const long fqlr, const double *fax, const double *fay)
 
linexi2operator= (linexi2 &lx)
 
 linexi2 (linexi2 &lx)
 
double line (const double x)
 
- Public Member Functions inherited from Heed::linexi2_coor
 linexi2_coor (const long fqlr, const double *fax)
 
 linexi2_coor (const linexi2_coor &lc)
 
linexi2_cooroperator= (const linexi2_coor &lc)
 

Public Attributes

const double * ay
 
double y_mean
 
double xy_mean
 
double a
 
double b
 
- Public Attributes inherited from Heed::linexi2_coor
long qlr
 
const double * ax
 
double x_mean
 
double Dx
 

Detailed Description

Definition at line 41 of file linexi2.h.

Constructor & Destructor Documentation

◆ linexi2() [1/3]

Heed::linexi2::linexi2 ( const linexi2_coor lc,
const double *  fay 
)

Definition at line 34 of file linexi2.cpp.

35 : linexi2_coor(lc), ay(fay) {
36 y_mean = 0;
37 xy_mean = 0;
38 for (long n = 0; n < qlr; n++) {
39 y_mean += ay[n];
40 xy_mean += ax[n] * ay[n];
41 }
42 y_mean /= qlr;
43 xy_mean /= qlr;
44 if (Dx > 0)
45 a = (xy_mean - x_mean * y_mean) / Dx;
46 else
47 a = DBL_MAX;
48 b = y_mean - a * x_mean;
49}
const double * ax
Definition: linexi2.h:23
linexi2_coor(const long fqlr, const double *fax)
Definition: linexi2.cpp:16
double xy_mean
Definition: linexi2.h:45
double b
Definition: linexi2.h:47
double y_mean
Definition: linexi2.h:44
const double * ay
Definition: linexi2.h:43
double a
Definition: linexi2.h:46

◆ linexi2() [2/3]

Heed::linexi2::linexi2 ( const long  fqlr,
const double *  fax,
const double *  fay 
)

Definition at line 50 of file linexi2.cpp.

51 : linexi2_coor(fqlr, fax), ay(fay) {
52 y_mean = 0;
53 xy_mean = 0;
54 for (long n = 0; n < qlr; n++) {
55 y_mean += ay[n];
56 xy_mean += ax[n] * ay[n];
57 }
58 y_mean /= qlr;
59 xy_mean /= qlr;
60 if (Dx > 0)
61 a = (xy_mean - x_mean * y_mean) / Dx;
62 else
63 a = DBL_MAX;
64 b = y_mean - a * x_mean;
65}

◆ linexi2() [3/3]

Heed::linexi2::linexi2 ( linexi2 lx)
inline

Definition at line 59 of file linexi2.h.

59 : linexi2_coor(lx) {
60 ay = lx.ay;
61 y_mean = lx.y_mean;
62 xy_mean = lx.xy_mean;
63 a = lx.a;
64 b = lx.b;
65 }

Member Function Documentation

◆ line()

double Heed::linexi2::line ( const double  x)
inline

Definition at line 66 of file linexi2.h.

66{ return a * x + b; }

Referenced by Heed::straight::straight().

◆ operator=()

linexi2 & Heed::linexi2::operator= ( linexi2 lx)
inline

Definition at line 50 of file linexi2.h.

50 {
51 *((linexi2_coor*)this) = (linexi2_coor&)lx;
52 ay = lx.ay;
53 y_mean = lx.y_mean;
54 xy_mean = lx.xy_mean;
55 a = lx.a;
56 b = lx.b;
57 return *this;
58 }

Member Data Documentation

◆ a

double Heed::linexi2::a

Definition at line 46 of file linexi2.h.

Referenced by line(), linexi2(), Heed::operator<<(), and operator=().

◆ ay

const double* Heed::linexi2::ay

Definition at line 43 of file linexi2.h.

Referenced by linexi2(), Heed::operator<<(), and operator=().

◆ b

double Heed::linexi2::b

Definition at line 47 of file linexi2.h.

Referenced by line(), linexi2(), Heed::operator<<(), and operator=().

◆ xy_mean

double Heed::linexi2::xy_mean

Definition at line 45 of file linexi2.h.

Referenced by linexi2(), Heed::operator<<(), and operator=().

◆ y_mean

double Heed::linexi2::y_mean

Definition at line 44 of file linexi2.h.

Referenced by linexi2(), Heed::operator<<(), and operator=().


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