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

#include <ElElasticScat.h>

Public Member Functions

double get_mean_coef (const long Z, const long ne) const
 
double get_coef (const long Z, const long ne) const
 
long get_qscat (void) const
 
ElElasticScatget_ees () const
 
 ElElasticScatLowSigma ()=default
 Default constructor.
 
 ElElasticScatLowSigma (ElElasticScat *fees, const std::string &file_name)
 

Detailed Description

Definition at line 76 of file ElElasticScat.h.

Constructor & Destructor Documentation

◆ ElElasticScatLowSigma() [1/2]

Heed::ElElasticScatLowSigma::ElElasticScatLowSigma ( )
default

Default constructor.

◆ ElElasticScatLowSigma() [2/2]

Heed::ElElasticScatLowSigma::ElElasticScatLowSigma ( ElElasticScat fees,
const std::string &  file_name 
)

Definition at line 264 of file ElElasticScat.cpp.

266 : ees(fees) {
267 mfunnamep("ElElasticScatLowSigma::ElElasticScatLowSigma(...)");
268 std::ifstream file(file_name.c_str());
269 if (!file) {
270 funnw.ehdr(mcerr);
271 mcerr << "cannot open file " << file_name << std::endl;
272 spexit(mcerr);
273 }
274 int i = findmark(file, "$");
275 check_econd11(i, != 1, mcerr);
276 file >> qat >> qscat;
277 check_econd11(qat, <= 0, mcerr);
278 check_econd11(qscat, <= 0, mcerr);
279 mean_coef.resize(qat);
280 coef.resize(qat);
281 for (long nat = 0; nat < qat; ++nat) {
282 mean_coef[nat].resize(ees->get_qe());
283 coef[nat].resize(ees->get_qe());
284 long z;
285 file >> z;
286 check_econd12(z, !=, nat + 1, mcerr);
287 for (long ne = 0; ne < ees->get_qe(); ++ne) {
288 long fne;
289 double e;
290 mean_coef[nat][ne] = 0.0;
291 coef[nat][ne] = 0.0;
292 file >> fne >> e >> mean_coef[nat][ne] >> coef[nat][ne];
293 check_econd12(fne, !=, ne, mcerr);
294 check_econd12(e, !=, ees->get_energy_mesh(ne), mcerr);
295 check_econd11(mean_coef[nat][ne], <= 0, mcerr);
296 check_econd11(coef[nat][ne], <= 0, mcerr);
297 }
298 }
299}
#define check_econd11(a, signb, stream)
Definition: FunNameStack.h:155
#define mfunnamep(string)
Definition: FunNameStack.h:49
#define spexit(stream)
Definition: FunNameStack.h:256
#define check_econd12(a, sign, b, stream)
Definition: FunNameStack.h:163
double get_energy_mesh(long ne) const
Definition: ElElasticScat.h:54
long get_qe(void) const
Definition: ElElasticScat.h:53
int findmark(std::istream &file, const char *s)
Definition: findmark.cpp:19
#define mcerr
Definition: prstream.h:128

Member Function Documentation

◆ get_coef()

double Heed::ElElasticScatLowSigma::get_coef ( const long  Z,
const long  ne 
) const
inline

Definition at line 81 of file ElElasticScat.h.

81{ return coef[Z - 1][ne]; }

Referenced by Heed::HeedDeltaElectronCS::HeedDeltaElectronCS().

◆ get_ees()

ElElasticScat * Heed::ElElasticScatLowSigma::get_ees ( ) const
inline

Definition at line 83 of file ElElasticScat.h.

83{ return ees; }

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

◆ get_mean_coef()

double Heed::ElElasticScatLowSigma::get_mean_coef ( const long  Z,
const long  ne 
) const
inline

Definition at line 78 of file ElElasticScat.h.

78 {
79 return mean_coef[Z - 1][ne];
80 }

Referenced by Heed::HeedDeltaElectronCS::HeedDeltaElectronCS().

◆ get_qscat()

long Heed::ElElasticScatLowSigma::get_qscat ( void  ) const
inline

Definition at line 82 of file ElElasticScat.h.

82{ return qscat; }

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