Garfield++ 3.0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
MagboltzInterface.hh
Go to the documentation of this file.
1// Interface to Magboltz (version 9)
2
3#ifndef G_MAGBOLTZ_INTERFACE
4#define G_MAGBOLTZ_INTERFACE
5
6#ifndef __CINT__
7
8namespace Garfield {
9
10namespace Magboltz {
11
12constexpr unsigned int nEnergySteps = 4000;
13constexpr unsigned int nMaxIonisationTerms = 30;
14constexpr unsigned int nMaxInelasticTerms = 250;
15constexpr unsigned int nMaxAttachmentTerms = 8;
16constexpr unsigned int nMaxNullTerms = 10;
17constexpr unsigned int nMaxLevelsPerComponent = 300;
18constexpr unsigned int nCharDescr = 50;
19constexpr unsigned int nMaxLevels = 960;
20
21extern "C" {
22
23// Magboltz COMMON blocks
24
25// Magnetic field
26extern struct {
27 double eovb;
28 double wb;
29 double btheta, bmag;
31
32extern struct {
33 long long nGas;
34 long long nStep;
35 long long nAniso;
36 double efinal;
37 double estep;
38 double akt;
39 double ary;
40 double tempc;
41 double torr;
42 long long ipen;
44
45extern struct {
46 double tmax;
47 double small;
48 double api;
49 double estart;
50 double theta, phi;
51 double rstart;
52 double efield;
53 long long nmax;
55
56extern struct {
57 double amgas[6];
58 double vtmb[6];
59 double tcfmx;
60 double tcfmxg[6];
61 long long ithrm;
63
64// Physical constants
65extern struct {
66 double echarg;
67 double emass;
68 double amu;
69 double pir2;
71
72extern struct {
80
81extern struct { double den[nEnergySteps]; } dens_;
82
83extern struct {
84 double time[300];
85 long long icoll[30];
87 double tmax1;
88 double ave;
89 double den;
90 double xid;
91 double x;
92 double y;
93 double z;
94 double st;
95 long long nnull;
97 long long icolnn[60];
99
100extern struct {
104
105extern struct {
109 long long iarry[nMaxLevels];
113 long long last;
114 long long isize;
115 double penfra[nMaxLevels][3];
116 double tcfmax[8];
118
119// Definition of the gas mixture
120extern struct { long long ngasn[6]; } gasn_;
121
122extern struct {
123 double an1, an2, an3, an4, an5, an6, an;
124 double frac[6];
126
127// Calculation results
128// Drift velocity
129extern struct { double wx, wy, wz; } vel_;
130extern struct { double dwx, dwy, dwz; } velerr_;
131
132// Diffusion
133extern struct {
134 double difxx, difyy, difzz;
135 double difyz, difxy, difxz;
137extern struct {
138 double dxxer, dyyer, dzzer;
139 double dyzer, dxyer, dxzer;
141extern struct { double difln, diftr; } difvel_;
142extern struct { double dfler, dfter; } diferl_;
143
144// Townsend and attachment coefficient
145extern struct { double alpha, att; } ctowns_;
146extern struct { double alper, atter; } ctwner_;
147extern struct {
148 double ralpha, ralper;
151 double tofwr, tofwrer;
154
155void gasmix_(long long* ngs, double* q, double* qin, long long* nin, double* e,
156 double* ei, char* name, double* virl, double* eb, double* peqel,
157 double* peqin, double* penfra, long long* kel, long long* kin,
158 double* qion, double* peqion, double* eion, long long* nion,
159 double* qatt, long long* natt, double* qnull, long long* nnull,
160 double* scln, long long* nc0, double* ec0, double* wk, double* efl,
161 long long* ng1, double* eg1, long long* ng2, double* eg2,
163 char scrptn[nMaxNullTerms][nCharDescr]);
164
166}
167}
168}
169#endif
170#endif
struct Garfield::Magboltz::@8 scrip_
struct Garfield::Magboltz::@6 dens_
constexpr unsigned int nMaxInelasticTerms
struct Garfield::Magboltz::@15 diferb_
double ipn[nMaxLevels]
constexpr unsigned int nEnergySteps
char dscrpt[nMaxLevels][nCharDescr]
double den[nEnergySteps]
struct Garfield::Magboltz::@13 velerr_
double wpl[nMaxLevels]
constexpr unsigned int nMaxAttachmentTerms
double eroot[nEnergySteps]
constexpr unsigned int nCharDescr
double qt3[nEnergySteps]
constexpr unsigned int nMaxIonisationTerms
double rgas[nMaxLevels]
struct Garfield::Magboltz::@19 ctwner_
struct Garfield::Magboltz::@16 difvel_
struct Garfield::Magboltz::@7 outpt_
double eg[nEnergySteps]
struct Garfield::Magboltz::@11 ratio_
double penfra[nMaxLevels][3]
struct Garfield::Magboltz::@0 bfld_
struct Garfield::Magboltz::@2 setp_
void gasmix_(long long *ngs, double *q, double *qin, long long *nin, double *e, double *ei, char *name, double *virl, double *eb, double *peqel, double *peqin, double *penfra, long long *kel, long long *kin, double *qion, double *peqion, double *eion, long long *nion, double *qatt, long long *natt, double *qnull, long long *nnull, double *scln, long long *nc0, double *ec0, double *wk, double *efl, long long *ng1, double *eg1, long long *ng2, double *eg2, char scrpt[nMaxLevelsPerComponent][nCharDescr], char scrptn[nMaxNullTerms][nCharDescr])
struct Garfield::Magboltz::@12 vel_
constexpr unsigned int nMaxLevels
struct Garfield::Magboltz::@10 gasn_
struct Garfield::Magboltz::@1 inpt_
constexpr unsigned int nMaxNullTerms
double tcf[nEnergySteps]
double icoln[nMaxLevels]
double spec[nEnergySteps]
double qt4[nEnergySteps]
struct Garfield::Magboltz::@5 mix2_
struct Garfield::Magboltz::@3 thrm_
struct Garfield::Magboltz::@17 diferl_
double cf[nMaxLevels][nEnergySteps]
long long iarry[nMaxLevels]
struct Garfield::Magboltz::@14 diflab_
struct Garfield::Magboltz::@4 cnsts_
double qt1[nEnergySteps]
struct Garfield::Magboltz::@20 tofout_
double ein[nMaxLevels]
constexpr unsigned int nMaxLevelsPerComponent
struct Garfield::Magboltz::@9 large_
char dscrptn[60][nCharDescr]
double qt2[nEnergySteps]
struct Garfield::Magboltz::@18 ctowns_