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

+ Inheritance diagram for Heed::ElElasticScatLowSigma:

Public Member Functions

double get_mean_coef (long Z, long ne) const
 
double get_coef (long Z, long ne) const
 
long get_qscat (void) const
 
ElElasticScatget_ees (void) const
 
 ElElasticScatLowSigma (void)
 
 ElElasticScatLowSigma (ElElasticScat *fees, const String &file_name)
 

Detailed Description

Definition at line 109 of file ElElasticScat.h.

Constructor & Destructor Documentation

◆ ElElasticScatLowSigma() [1/2]

Heed::ElElasticScatLowSigma::ElElasticScatLowSigma ( void  )
inline

Definition at line 115 of file ElElasticScat.h.

115{ ; }

◆ ElElasticScatLowSigma() [2/2]

Heed::ElElasticScatLowSigma::ElElasticScatLowSigma ( ElElasticScat fees,
const String file_name 
)

Definition at line 649 of file ElElasticScat.cpp.

651 : ees(fees) {
652 mfunnamep("ElElasticScatLowSigma::ElElasticScatLowSigma(...)");
653#ifdef USE_STLSTRING
654 std::ifstream file(file_name.c_str());
655#else
656 std::ifstream file(file_name);
657#endif
658 if (!file) {
659 funnw.ehdr(mcerr);
660 mcerr << "cannot open file " << file_name << std::endl;
661 spexit(mcerr);
662 }
663 int i = findmark(file, "$");
664 check_econd11(i, != 1, mcerr);
665 file >> qat >> qscat;
666 check_econd11(qat, <= 0, mcerr);
667 check_econd11(qscat, <= 0, mcerr);
668 mean_coef = DynLinArr<DynLinArr<double> >(qat);
669 coef = DynLinArr<DynLinArr<double> >(qat);
670 for (long nat = 0; nat < qat; ++nat) {
671 mean_coef[nat] = DynLinArr<double>(ees->get_qe());
672 coef[nat] = DynLinArr<double>(ees->get_qe());
673 long z;
674 file >> z;
675 check_econd12(z, !=, nat + 1, mcerr);
676 for (long ne = 0; ne < ees->get_qe(); ++ne) {
677 long fne;
678 double e;
679 mean_coef[nat][ne] = 0.0;
680 coef[nat][ne] = 0.0;
681 file >> fne >> e >> mean_coef[nat][ne] >> coef[nat][ne];
682 // file >> fne >> e >> coef[nat][ne]; // old format
683 check_econd12(fne, !=, ne, mcerr);
684 check_econd12(e, !=, ees->get_energy_mesh(ne), mcerr);
685 check_econd11(mean_coef[nat][ne], <= 0, mcerr);
686 check_econd11(coef[nat][ne], <= 0, mcerr);
687 }
688 }
689}
#define check_econd11(a, signb, stream)
Definition: FunNameStack.h:366
#define mfunnamep(string)
Definition: FunNameStack.h:77
#define spexit(stream)
Definition: FunNameStack.h:536
#define check_econd12(a, sign, b, stream)
Definition: FunNameStack.h:380
int findmark(std::istream &file, const char *s)
Definition: findmark.cpp:18
#define mcerr
Definition: prstream.h:135

Member Function Documentation

◆ get_coef()

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

Definition at line 112 of file ElElasticScat.h.

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

◆ get_ees()

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

Definition at line 114 of file ElElasticScat.h.

114{ return ees.get(); }

◆ get_mean_coef()

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

Definition at line 111 of file ElElasticScat.h.

111{ return mean_coef[Z - 1][ne]; }

◆ get_qscat()

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

Definition at line 113 of file ElElasticScat.h.

113{ return qscat; }

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