Garfield++ 4.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
linexi2.h
Go to the documentation of this file.
1#ifndef LINEXI2_H
2#define LINEXI2_H
3
4#include <iostream>
5
6/*
7Drawing straight line by a range of points by method xi2
8
9Copyright (c) 2000 I. B. Smirnov
10
11Permission to use, copy, modify, distribute and sell this file for any purpose
12is hereby granted without fee, provided that the above copyright notice,
13this permission notice, and notices about any modifications of the original
14text appear in all copies and in supporting documentation.
15The file is provided "as is" without express or implied warranty.
16*/
17
18namespace Heed {
19
21 public:
22 long qlr;
23 const double* ax; // address of coordinates, is not copied
24 double x_mean;
25 double Dx;
26 linexi2_coor(const long fqlr, const double* fax);
28 : qlr(lc.qlr), ax(lc.ax), x_mean(lc.x_mean), Dx(lc.Dx) {
29 ;
30 }
32 qlr = lc.qlr;
33 ax = lc.ax;
34 x_mean = lc.x_mean;
35 Dx = lc.Dx;
36 return *this;
37 }
38};
39std::ostream& operator<<(std::ostream& file, const linexi2_coor& l);
40
41class linexi2 : public linexi2_coor {
42 public:
43 const double* ay;
44 double y_mean;
45 double xy_mean;
46 double a;
47 double b;
48 linexi2(const linexi2_coor& lc, const double* fay);
49 linexi2(const long fqlr, const double* fax, const double* fay);
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 }
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 }
66 double line(const double x) { return a * x + b; }
67};
68std::ostream& operator<<(std::ostream& file, const linexi2& l);
69
70}
71#endif
const double * ax
Definition: linexi2.h:23
linexi2_coor(const linexi2_coor &lc)
Definition: linexi2.h:27
linexi2_coor & operator=(const linexi2_coor &lc)
Definition: linexi2.h:31
linexi2(linexi2 &lx)
Definition: linexi2.h:59
double xy_mean
Definition: linexi2.h:45
double b
Definition: linexi2.h:47
linexi2 & operator=(linexi2 &lx)
Definition: linexi2.h:50
double line(const double x)
Definition: linexi2.h:66
double y_mean
Definition: linexi2.h:44
const double * ay
Definition: linexi2.h:43
double a
Definition: linexi2.h:46
Definition: BGMesh.cpp:6
std::ostream & operator<<(std::ostream &file, const BGMesh &bgm)
Definition: BGMesh.cpp:37