Garfield++ v1r0
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
19 public:
20 long qlr;
21 const double* ax; // address of coordinates, is not copied
22 double x_mean;
23 double Dx;
24 linexi2_coor(const long fqlr, const double* fax);
26 : qlr(lc.qlr), ax(lc.ax), x_mean(lc.x_mean), Dx(lc.Dx) {
27 ;
28 }
30 qlr = lc.qlr;
31 ax = lc.ax;
32 x_mean = lc.x_mean;
33 Dx = lc.Dx;
34 return *this;
35 }
36};
37std::ostream& operator<<(std::ostream& file, const linexi2_coor& l);
38
39class linexi2 : public linexi2_coor {
40 public:
41 const double* ay;
42 double y_mean;
43 double xy_mean;
44 double a;
45 double b;
46 linexi2(const linexi2_coor& lc, const double* fay);
47 linexi2(const long fqlr, const double* fax, const double* fay);
49 *((linexi2_coor*)this) = (linexi2_coor&)lx;
50 ay = lx.ay;
51 y_mean = lx.y_mean;
52 xy_mean = lx.xy_mean;
53 a = lx.a;
54 b = lx.b;
55 return *this;
56 }
58 ay = lx.ay;
59 y_mean = lx.y_mean;
60 xy_mean = lx.xy_mean;
61 a = lx.a;
62 b = lx.b;
63 }
64 double line(double x) {
65 return a * x + b;
66 } //??
67};
68std::ostream& operator<<(std::ostream& file, const linexi2& l);
69
70class linexi2B : public linexi2 {
71 public:
72 double** B;
73 linexi2B(linexi2& lx);
74 ~linexi2B() { delete B; }
75 void copy(const linexi2B& lxB);
76 linexi2B(const linexi2B& lxB);
78 copy(lxB);
79 return *this;
80 }
81};
82
83#endif
double ** B
Definition: linexi2.h:72
linexi2B & operator=(const linexi2B &lxB)
Definition: linexi2.h:77
void copy(const linexi2B &lxB)
Definition: linexi2.cpp:88
~linexi2B()
Definition: linexi2.h:74
linexi2_coor(const linexi2_coor &lc)
Definition: linexi2.h:25
double x_mean
Definition: linexi2.h:22
linexi2_coor & operator=(const linexi2_coor &lc)
Definition: linexi2.h:29
const double * ax
Definition: linexi2.h:21
double Dx
Definition: linexi2.h:23
long qlr
Definition: linexi2.h:20
double y_mean
Definition: linexi2.h:42
const double * ay
Definition: linexi2.h:41
double a
Definition: linexi2.h:44
linexi2 & operator=(linexi2 &lx)
Definition: linexi2.h:48
linexi2(linexi2 &lx)
Definition: linexi2.h:57
double line(double x)
Definition: linexi2.h:64
double xy_mean
Definition: linexi2.h:43
double b
Definition: linexi2.h:45
std::ostream & operator<<(std::ostream &file, const linexi2_coor &l)
Definition: linexi2.cpp:28