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::EnTransfCS_BGM Class Reference

Energy transfer cross-section. More...

#include <EnTransfCS_BGM.h>

Public Member Functions

 EnTransfCS_BGM ()=default
 Default constructor.
 
 EnTransfCS_BGM (double fparticle_mass, BGMesh *fmesh, int fs_primary_electron, HeedMatterDef *fhmd, long fparticle_charge=1)
 Constructor.
 
EnTransfCS_BGMcopy () const
 
void print (std::ostream &file, int l) const
 

Public Attributes

double particle_mass = 0.
 
long particle_charge = 0
 
int s_primary_electron = 0
 Sign that the primary particle is an electron.
 
HeedMatterDefhmd = nullptr
 
BGMeshmesh = nullptr
 
std::vector< EnTransfCSetcs_bgm
 

Detailed Description

Energy transfer cross-section.

Definition at line 10 of file EnTransfCS_BGM.h.

Constructor & Destructor Documentation

◆ EnTransfCS_BGM() [1/2]

Heed::EnTransfCS_BGM::EnTransfCS_BGM ( )
default

Default constructor.

Referenced by copy().

◆ EnTransfCS_BGM() [2/2]

Heed::EnTransfCS_BGM::EnTransfCS_BGM ( double  fparticle_mass,
BGMesh fmesh,
int  fs_primary_electron,
HeedMatterDef fhmd,
long  fparticle_charge = 1 
)

Constructor.

Definition at line 8 of file EnTransfCS_BGM.cpp.

11 : particle_mass(fparticle_mass),
12 particle_charge(fparticle_charge),
13 s_primary_electron(fs_primary_electron),
14 hmd(fhmd),
15 mesh(fmesh) {
16 mfunnamep("EnTransfCS_BGM::EnTransfCS_BGM(...)");
17
18 const long q = mesh->q;
19 etcs_bgm.resize(q);
20 for (long n = 0; n < q; n++) {
21 double bg = mesh->x[n];
22 // gamma - 1
23 double gamma_1 = sqrt(1.0 + (bg * bg)) - 1.0;
24 etcs_bgm[n] = EnTransfCS(fparticle_mass, gamma_1, fs_primary_electron, fhmd,
25 fparticle_charge);
26 }
27}
#define mfunnamep(string)
Definition: FunNameStack.h:49
long q
Total number of points (not number of intervals).
Definition: BGMesh.h:17
std::vector< double > x
Definition: BGMesh.h:18
std::vector< EnTransfCS > etcs_bgm
int s_primary_electron
Sign that the primary particle is an electron.
HeedMatterDef * hmd
DoubleAc sqrt(const DoubleAc &f)
Definition: DoubleAc.cpp:314

Member Function Documentation

◆ copy()

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

Definition at line 32 of file EnTransfCS_BGM.h.

32{ return new EnTransfCS_BGM(*this); }
EnTransfCS_BGM()=default
Default constructor.

◆ print()

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

Definition at line 29 of file EnTransfCS_BGM.cpp.

29 {
30 if (l <= 0) return;
31 Ifile << "EnTransfCS_BGM(l=" << l << "):\n";
32 indn.n += 2;
33 Ifile << "particle_mass=" << particle_mass
34 << " particle_charge=" << particle_charge << std::endl;
35 Ifile << "s_primary_electron=" << s_primary_electron << std::endl;
36 Ifile << "hmd:\n";
37 hmd->print(file, 1);
38 Ifile << "mesh:\n";
39 mesh->print(file, 1);
40
41 Ifile << "Array of Cross Section:\n";
42 Ifile << "Number of elements = " << etcs_bgm.size() << '\n';
43
44 if (l >= 2) {
45 const long q = mesh->q;
46 for (long n = 0; n < q; n++) {
47 Ifile << "n=" << std::setw(5) << n << " bg=" << std::setw(14)
48 << mesh->x[n] << " quan=" << std::setw(14) << etcs_bgm[n].quanC;
49#ifndef EXCLUDE_MEAN
50 file << " mean=" << std::setw(14) << etcs_bgm[n].meanC;
51#endif
52 file << '\n';
53 }
54 }
55 indn.n -= 2;
56}
void print(std::ostream &file, int l) const
Definition: BGMesh.cpp:25
void print(std::ostream &file, int l) const
indentation indn
Definition: prstream.cpp:15
#define Ifile
Definition: prstream.h:195

Member Data Documentation

◆ etcs_bgm

std::vector<EnTransfCS> Heed::EnTransfCS_BGM::etcs_bgm

Definition at line 30 of file EnTransfCS_BGM.h.

Referenced by EnTransfCS_BGM(), and print().

◆ hmd

HeedMatterDef* Heed::EnTransfCS_BGM::hmd = nullptr

Definition at line 28 of file EnTransfCS_BGM.h.

Referenced by print().

◆ mesh

BGMesh* Heed::EnTransfCS_BGM::mesh = nullptr

Definition at line 29 of file EnTransfCS_BGM.h.

Referenced by EnTransfCS_BGM(), and print().

◆ particle_charge

long Heed::EnTransfCS_BGM::particle_charge = 0

Particle charge in units of electron charges. It is squared, therefore the sign does not matter.

Definition at line 24 of file EnTransfCS_BGM.h.

Referenced by print().

◆ particle_mass

double Heed::EnTransfCS_BGM::particle_mass = 0.

Definition at line 21 of file EnTransfCS_BGM.h.

Referenced by print().

◆ s_primary_electron

int Heed::EnTransfCS_BGM::s_primary_electron = 0

Sign that the primary particle is an electron.

Definition at line 26 of file EnTransfCS_BGM.h.

Referenced by print().


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