Garfield++ v2r0
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>

+ Inheritance diagram for Heed::BGMesh:

Public Member Functions

 BGMesh ()
 
 BGMesh (double fxmin, double fxmax, long fq)
 
virtual void print (std::ostream &file, int l) const
 
virtual BGMeshcopy () const
 
- Public Member Functions inherited from Heed::RegPassivePtr
 RegPassivePtr (void)
 
 RegPassivePtr (char fs_ban_del, char fs_ban_sub, char fs_ban_cop=0)
 
 RegPassivePtr (const RegPassivePtr &f)
 
RegPassivePtroperator= (const RegPassivePtr &f)
 
CountPP_ns::CountPassivePtrbook (void) const
 
void clear_pointers (void) const
 
virtual RegPassivePtrcopy () const
 
virtual ~RegPassivePtr ()
 
virtual void print (std::ostream &file, int l=1) const
 
void set_s_ban_del (char fs_ban_del)
 
char get_s_ban_del (void) const
 
void set_s_ban_sub (char fs_ban_sub)
 
char get_s_ban_sub (void) const
 
void set_s_ban_cop (char fs_ban_cop)
 
char get_s_ban_cop (void) const
 
void set_s_allow_del_at_zero_count (char fs_allow_del_at_zero_count)
 
char get_s_allow_del_at_zero_count (void) const
 
long get_total_number_of_references (void) const
 

Public Attributes

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

Additional Inherited Members

- Static Public Member Functions inherited from Heed::RegPassivePtr
static void set_s_ban_del_ignore (char fs_ban_del_ignore)
 
static char get_s_ban_del_ignore (void)
 
static void set_s_print_adr_cpp (char fs_print_adr_cpp)
 
static char get_s_print_adr_cpp (void)
 

Detailed Description

Mesh of $\beta\gamma$ values.

Definition at line 12 of file BGMesh.h.

Constructor & Destructor Documentation

◆ BGMesh() [1/2]

Heed::BGMesh::BGMesh ( )
inline

Definition at line 14 of file BGMesh.h.

14: xmin(0.0), xmax(0.0), q(0), x(0) {}
long q
Total number of points (not number of intervals).
Definition: BGMesh.h:19
double xmin
Definition: BGMesh.h:16
std::vector< double > x
Definition: BGMesh.h:20
double xmax
Definition: BGMesh.h:17

Referenced by copy().

◆ BGMesh() [2/2]

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

Definition at line 7 of file BGMesh.cpp.

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

Member Function Documentation

◆ copy()

virtual BGMesh * Heed::BGMesh::copy ( ) const
inlinevirtual

Reimplemented from Heed::RegPassivePtr.

Definition at line 22 of file BGMesh.h.

22{ return new BGMesh(*this); }

◆ print()

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

Reimplemented from Heed::RegPassivePtr.

Definition at line 24 of file BGMesh.cpp.

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

Referenced by Heed::operator<<().

Member Data Documentation

◆ q

long Heed::BGMesh::q

Total number of points (not number of intervals).

Definition at line 19 of file BGMesh.h.

Referenced by print().

◆ x

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

Definition at line 20 of file BGMesh.h.

Referenced by BGMesh(), and print().

◆ xmax

double Heed::BGMesh::xmax

Definition at line 17 of file BGMesh.h.

Referenced by print().

◆ xmin

double Heed::BGMesh::xmin

Definition at line 16 of file BGMesh.h.

Referenced by print().


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