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

Mesh of $\beta\gamma$ values. More...

#include <BGMesh.h>

Public Member Functions

 BGMesh ()=default
 
 BGMesh (double fxmin, double fxmax, long fq)
 
void print (std::ostream &file, int l) const
 
BGMeshcopy () const
 

Public Attributes

double xmin = 0.
 
double xmax = 0.
 
long q = 0
 Total number of points (not number of intervals).
 
std::vector< double > x
 

Detailed Description

Mesh of $\beta\gamma$ values.

Definition at line 10 of file BGMesh.h.

Constructor & Destructor Documentation

◆ BGMesh() [1/2]

Heed::BGMesh::BGMesh ( )
default

Referenced by copy().

◆ BGMesh() [2/2]

Heed::BGMesh::BGMesh ( double  fxmin,
double  fxmax,
long  fq 
)

Definition at line 8 of file BGMesh.cpp.

9 : xmin(fxmin), xmax(fxmax), q(fq) {
10
11 mfunname("BGMesh::BGMesh(double fxmin, double fxmax, long fq)");
12 // The minimum is one interval and two points.
13 check_econd11(fq, <= 1, mcerr);
14 const double rk = pow(fxmax / fxmin, 1. / double(fq - 1));
15 x.resize(fq);
16 x[0] = fxmin;
17 x[fq - 1] = fxmax;
18 double xr = fxmin;
19 for (long n = 1; n < fq - 1; n++) {
20 xr *= rk;
21 x[n] = xr;
22 }
23}
#define check_econd11(a, signb, stream)
Definition: FunNameStack.h:155
#define mfunname(string)
Definition: FunNameStack.h:45
long q
Total number of points (not number of intervals).
Definition: BGMesh.h:17
double xmin
Definition: BGMesh.h:14
std::vector< double > x
Definition: BGMesh.h:18
double xmax
Definition: BGMesh.h:15
DoubleAc pow(const DoubleAc &f, double p)
Definition: DoubleAc.cpp:337
#define mcerr
Definition: prstream.h:128

Member Function Documentation

◆ copy()

BGMesh * Heed::BGMesh::copy ( ) const
inline

Definition at line 20 of file BGMesh.h.

20{ return new BGMesh(*this); }
BGMesh()=default

◆ print()

void Heed::BGMesh::print ( std::ostream &  file,
int  l 
) const

Definition at line 25 of file BGMesh.cpp.

25 {
26 if (l <= 0) return;
27 Ifile << "BGMesh (l=" << l << "): \n";
28 indn.n += 2;
29 Ifile << "xmin=" << xmin << " xmax=" << xmax << " quantity of intervals=" << q
30 << '\n';
31 if (l > 1) {
32 for (long k = 1; k < q; ++k) Iprintn(mcout, x[k]);
33 }
34 indn.n -= 2;
35}
indentation indn
Definition: prstream.cpp:15
#define mcout
Definition: prstream.h:126
#define Ifile
Definition: prstream.h:195
#define Iprintn(file, name)
Definition: prstream.h:204

Referenced by Heed::operator<<(), and Heed::EnTransfCS_BGM::print().

Member Data Documentation

◆ q

long Heed::BGMesh::q = 0

Total number of points (not number of intervals).

Definition at line 17 of file BGMesh.h.

Referenced by Heed::EnTransfCS_BGM::EnTransfCS_BGM(), print(), and Heed::EnTransfCS_BGM::print().

◆ x

std::vector<double> Heed::BGMesh::x

◆ xmax

double Heed::BGMesh::xmax = 0.

Definition at line 15 of file BGMesh.h.

Referenced by print().

◆ xmin

double Heed::BGMesh::xmin = 0.

Definition at line 14 of file BGMesh.h.

Referenced by print().


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