Garfield++ v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
Heed::SimpleAtomPhotoAbsCS Class Reference

#include <PhotoAbsCS.h>

+ Inheritance diagram for Heed::SimpleAtomPhotoAbsCS:

Public Member Functions

virtual double get_threshold (int nshell) const
 
virtual double get_ACS (double energy) const
 
virtual double get_integral_ACS (double energy1, double energy2) const
 
virtual double get_ACS (int nshell, double energy) const
 
virtual double get_integral_ACS (int nshell, double energy1, double energy2y) const
 
virtual double get_ICS (double energy) const
 
virtual double get_integral_ICS (double energy1, double energy2) const
 
virtual double get_ICS (int nshell, double energy) const
 
virtual double get_integral_ICS (int nshell, double energy1, double energy2) const
 
virtual int get_main_shell_number (int nshell) const
 
virtual void print (std::ostream &file, int l) const
 
 macro_copy_total (SimpleAtomPhotoAbsCS)
 
 SimpleAtomPhotoAbsCS (void)
 
 SimpleAtomPhotoAbsCS (int fZ, const String &ffile_name)
 
 SimpleAtomPhotoAbsCS (int fZ, const PhotoAbsCS &fasc)
 
virtual ~SimpleAtomPhotoAbsCS ()
 
- Public Member Functions inherited from Heed::AtomPhotoAbsCS
int get_Z () const
 
int get_qshell () const
 
virtual double get_threshold (int nshell) const =0
 
virtual double get_I_min (void) const
 
virtual double get_ACS (double energy) const =0
 
virtual double get_integral_ACS (double energy1, double energy2) const =0
 
virtual double get_ACS (int nshell, double energy) const =0
 
virtual double get_integral_ACS (int nshell, double energy1, double energy2) const =0
 
virtual double get_ICS (double energy) const =0
 
virtual double get_TICS (double energy, double factual_minimal_threshold) const
 
virtual double get_integral_ICS (double energy1, double energy2) const =0
 
virtual double get_integral_TICS (double energy1, double energy2, double factual_minimal_threshold) const
 
virtual double get_ICS (int nshell, double energy) const =0
 
virtual double get_TICS (int nshell, double energy, double factual_minimal_threshold) const
 
virtual double get_integral_ICS (int nshell, double energy1, double energy2) const =0
 
virtual double get_integral_TICS (int nshell, double energy1, double energy2, double factual_minimal_threshold) const
 
virtual void get_escape_particles (int nshell, double energy, DynLinArr< double > &el_energy, DynLinArr< double > &ph_energy) const
 
virtual int get_main_shell_number (int nshell) const =0
 
virtual void remove_shell (int nshell)
 
virtual void restore_shell (int nshell)
 
virtual void print (std::ostream &file, int l) const
 
 macro_copy_total_zero (AtomPhotoAbsCS)
 
 AtomPhotoAbsCS (void)
 
AtomicSecondaryProductsget_asp (int nshell)
 

Protected Attributes

String file_name
 
DynLinArr< ActivePtr< PhotoAbsCS > > acs
 
- Protected Attributes inherited from Heed::AtomPhotoAbsCS
String name
 
int Z
 
int qshell
 
DynLinArr< int > s_ignore_shell
 
DynLinArr< AtomicSecondaryProductsasp
 

Detailed Description

Definition at line 401 of file PhotoAbsCS.h.

Constructor & Destructor Documentation

◆ SimpleAtomPhotoAbsCS() [1/3]

Heed::SimpleAtomPhotoAbsCS::SimpleAtomPhotoAbsCS ( void  )

Definition at line 1345 of file PhotoAbsCS.cpp.

1345: AtomPhotoAbsCS() {}

◆ SimpleAtomPhotoAbsCS() [2/3]

Heed::SimpleAtomPhotoAbsCS::SimpleAtomPhotoAbsCS ( int  fZ,
const String ffile_name 
)

Definition at line 1347 of file PhotoAbsCS.cpp.

1348 : file_name(ffile_name) {
1349 mfunnamep("SimpleAtomPhotoAbsCS::SimpleAtomPhotoAbsCS(int fZ, const String& "
1350 "ffile_name)");
1351 check_econd11(fZ, < 1, mcerr);
1352#ifdef USE_STLSTRING
1353 std::ifstream file(file_name.c_str());
1354#else
1355 std::ifstream file(file_name);
1356#endif
1357 if (!file) {
1358 funnw.ehdr(mcerr);
1359 mcerr << "cannot open file " << file_name << std::endl;
1360 spexit(mcerr);
1361 }
1362 while (findmark(file, "#") == 1) {
1363 file >> Z;
1364 if (Z == fZ) {
1365 file >> qshell;
1366 check_econd21(qshell, < 1 ||, > 10000, mcerr);
1368 file >> name;
1372 int sZshell = 0;
1373 for (int nshell = 0; nshell < qshell; ++nshell) {
1374 double thr = 0.0;
1375 int Zshell = 0;
1376 //double fl;
1377 String shell_name;
1378 file >> thr;
1379 check_econd11(thr, <= 0.0, mcerr);
1380 file >> Zshell;
1381 check_econd11(Zshell, <= 0, mcerr);
1382 sZshell += Zshell;
1383 file >> fl[nshell];
1384 findmark(file, "!");
1385 file >> shell_name;
1386 //PhotoAbsCS* ap = new PhenoPhotoAbsCS(shell_name, Zshell, thr);
1387 //acs[nshell].pass( ap );
1388 acs[nshell].pass(new PhenoPhotoAbsCS(shell_name, Zshell, thr * 1.0e-6));
1389 }
1390 check_econd12(sZshell, !=, Z, mcerr);
1391
1392 int n_min = 0;
1393 double st = DBL_MAX;
1394 for (int nshell = 0; nshell < qshell; ++nshell) {
1395 // currently the minimal shell is the last,
1396 // but to avoid this assumption we check all
1397 if (get_threshold(nshell) < st) n_min = nshell;
1398 }
1399 for (int nshell = 0; nshell < qshell; ++nshell) {
1400 if (fl[nshell] > 0) {
1401 check_econd12(nshell, ==, n_min, mcerr);
1402 DynLinArr<double> felectron_energy(0);
1403 DynLinArr<double> fphoton_energy(1);
1404 fphoton_energy[0] = get_threshold(nshell) - get_threshold(n_min);
1405 asp[nshell].add_channel(fl[nshell], felectron_energy, fphoton_energy);
1406 }
1407 }
1408 return;
1409 }
1410 }
1411 funnw.ehdr(mcerr);
1412 mcerr << "there is no element Z=" << fZ << " in file " << file_name
1413 << std::endl;
1414 spexit(mcerr);
1415}
#define check_econd21(a, sign1_b1_sign0, sign2_b2, stream)
Definition: FunNameStack.h:428
#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
std::string String
Definition: String.h:75
void put_qel(long fqel)
Definition: AbsArr.h:774
void pass(long fqel, T *fel)
Definition: AbsArr.h:265
DynLinArr< int > s_ignore_shell
Definition: PhotoAbsCS.h:388
DynLinArr< AtomicSecondaryProducts > asp
Definition: PhotoAbsCS.h:394
DynLinArr< ActivePtr< PhotoAbsCS > > acs
Definition: PhotoAbsCS.h:430
virtual double get_threshold(int nshell) const
int findmark(std::istream &file, const char *s)
Definition: findmark.cpp:18
#define mcerr
Definition: prstream.h:135

◆ SimpleAtomPhotoAbsCS() [3/3]

Heed::SimpleAtomPhotoAbsCS::SimpleAtomPhotoAbsCS ( int  fZ,
const PhotoAbsCS &  fasc 
)

Definition at line 1417 of file PhotoAbsCS.cpp.

1417 {
1418 mfunname("SimpleAtomPhotoAbsCS::SimpleAtomPhotoAbsCS(int fZ, const "
1419 "PhotoAbsCS& facs)");
1420 check_econd11(fZ, <= 0, mcerr);
1421 check_econd12(fZ, !=, facs.get_Z(), mcerr);
1422 Z = fZ;
1423 qshell = 1;
1425 name = facs.get_name();
1426 acs.put_qel(1);
1427 acs[0].put(&facs);
1428}
#define mfunname(string)
Definition: FunNameStack.h:67

◆ ~SimpleAtomPhotoAbsCS()

virtual Heed::SimpleAtomPhotoAbsCS::~SimpleAtomPhotoAbsCS ( )
inlinevirtual

Definition at line 426 of file PhotoAbsCS.h.

426{}

Member Function Documentation

◆ get_ACS() [1/2]

double Heed::SimpleAtomPhotoAbsCS::get_ACS ( double  energy) const
virtual

Implements Heed::AtomPhotoAbsCS.

Definition at line 1436 of file PhotoAbsCS.cpp.

1436 {
1437 mfunname("double SimpleAtomPhotoAbsCS::get_ACS(double energy) const");
1438 double s = 0.0;
1439 for (int n = 0; n < qshell; ++n) {
1440 if (s_ignore_shell[n] == 0) {
1441 s += acs[n]->get_CS(energy);
1442 }
1443 }
1444 return s;
1445}

◆ get_ACS() [2/2]

double Heed::SimpleAtomPhotoAbsCS::get_ACS ( int  nshell,
double  energy 
) const
virtual

Implements Heed::AtomPhotoAbsCS.

Definition at line 1468 of file PhotoAbsCS.cpp.

1468 {
1469 mfunname("double SimpleAtomPhotoAbsCS::get_ACS(int nshell, double energy)");
1470 check_econd21(nshell, < 0 ||, > qshell, mcerr);
1471 if (s_ignore_shell[nshell] == 0) {
1472 return acs[nshell]->get_CS(energy);
1473 }
1474 return 0.0;
1475}

◆ get_ICS() [1/2]

double Heed::SimpleAtomPhotoAbsCS::get_ICS ( double  energy) const
virtual

Implements Heed::AtomPhotoAbsCS.

Definition at line 1488 of file PhotoAbsCS.cpp.

1488 {
1489 mfunname("double SimpleAtomPhotoAbsCS::get_ICS(double energy) const");
1490 double s = 0.0;
1491 for (int n = 0; n < qshell; ++n) {
1492 if (s_ignore_shell[n] == 0) {
1493 s += acs[n]->get_CS(energy);
1494 }
1495 }
1496 return s;
1497}

◆ get_ICS() [2/2]

double Heed::SimpleAtomPhotoAbsCS::get_ICS ( int  nshell,
double  energy 
) const
virtual

Implements Heed::AtomPhotoAbsCS.

Definition at line 1512 of file PhotoAbsCS.cpp.

1512 {
1513 mfunname("double SimpleAtomPhotoAbsCS::get_ICS(int nshell, double energy)");
1514 check_econd21(nshell, < 0 ||, > qshell, mcerr);
1515 if (s_ignore_shell[nshell] == 0) {
1516 return acs[nshell]->get_CS(energy);
1517 }
1518 return 0.0;
1519}

◆ get_integral_ACS() [1/2]

double Heed::SimpleAtomPhotoAbsCS::get_integral_ACS ( double  energy1,
double  energy2 
) const
virtual

Implements Heed::AtomPhotoAbsCS.

Definition at line 1446 of file PhotoAbsCS.cpp.

1447 {
1448 mfunnamep(
1449 "double SimpleAtomPhotoAbsCS::get_integral_ACS(double energy)const");
1450 double s = 0.0;
1451 for (int n = 0; n < qshell; ++n) {
1452 if (s_ignore_shell[n] == 0) {
1453 double t;
1454 s += (t = acs[n]->get_integral_CS(energy1, energy2));
1455 if (t < 0) {
1456 funnw.ehdr(mcout);
1457 mcout << "t < 0\n";
1458 Iprintn(mcout, t);
1459 print(mcout, 4);
1460 spexit(mcout);
1461 }
1462 }
1463 //check_econd11a(t , < 0 , "n="<<n<<'\n', mcerr);
1464 }
1465 return s;
1466}
virtual void print(std::ostream &file, int l) const
#define mcout
Definition: prstream.h:133
#define Iprintn(file, name)
Definition: prstream.h:216

◆ get_integral_ACS() [2/2]

double Heed::SimpleAtomPhotoAbsCS::get_integral_ACS ( int  nshell,
double  energy1,
double  energy2y 
) const
virtual

Implements Heed::AtomPhotoAbsCS.

Definition at line 1477 of file PhotoAbsCS.cpp.

1478 {
1479 mfunname("double SimpleAtomPhotoAbsCS::get_integral_ACS(int nshell, double "
1480 "energy1, double energy2)");
1481 check_econd21(nshell, < 0 ||, > qshell, mcerr);
1482 if (s_ignore_shell[nshell] == 0) {
1483 return acs[nshell]->get_integral_CS(energy1, energy2);
1484 }
1485 return 0.0;
1486}

◆ get_integral_ICS() [1/2]

double Heed::SimpleAtomPhotoAbsCS::get_integral_ICS ( double  energy1,
double  energy2 
) const
virtual

Implements Heed::AtomPhotoAbsCS.

Definition at line 1499 of file PhotoAbsCS.cpp.

1500 {
1501 mfunname("double SimpleAtomPhotoAbsCS::get_integral_ICS(double energy1, "
1502 "double energy2) const");
1503 double s = 0.0;
1504 for (int n = 0; n < qshell; ++n) {
1505 if (s_ignore_shell[n] == 0) {
1506 s += acs[n]->get_integral_CS(energy1, energy2);
1507 }
1508 }
1509 return s;
1510}

◆ get_integral_ICS() [2/2]

double Heed::SimpleAtomPhotoAbsCS::get_integral_ICS ( int  nshell,
double  energy1,
double  energy2 
) const
virtual

Implements Heed::AtomPhotoAbsCS.

Definition at line 1521 of file PhotoAbsCS.cpp.

1522 {
1523 mfunname("double SimpleAtomPhotoAbsCS::get_integral_ICS(int nshell, double "
1524 "energy1, double energy2)");
1525 check_econd21(nshell, < 0 ||, > qshell, mcerr);
1526 if (s_ignore_shell[nshell] == 0) {
1527 return acs[nshell]->get_integral_CS(energy1, energy2);
1528 }
1529 return 0.0;
1530}

◆ get_main_shell_number()

int Heed::SimpleAtomPhotoAbsCS::get_main_shell_number ( int  nshell) const
virtual

Implements Heed::AtomPhotoAbsCS.

Definition at line 1550 of file PhotoAbsCS.cpp.

1550 {
1551 mfunname("int SimpleAtomPhotoAbsCS::get_main_shell_number(int nshell) const");
1552 String shell_name = acs[nshell]->get_name();
1553#ifdef STRSTREAM_AVAILABLE
1554#ifdef USE_STLSTRING
1555 istrstream sfile(shell_name.c_str());
1556#else
1557 istrstream sfile(shell_name);
1558#endif
1559#else
1560 std::istringstream sfile(shell_name.c_str());
1561#endif
1562 int i = -100;
1563 sfile >> i;
1564 //Iprintn(mcout, i);
1565 //check_econd(i < 1 || i > 50 , "i="<<i<<" shell_name="<<shell_name<<'\n' ,
1566 // mcerr);
1567 if (i < 1 || i > 50) {
1568 i = -1;
1569 }
1570 return i;
1571}

◆ get_threshold()

double Heed::SimpleAtomPhotoAbsCS::get_threshold ( int  nshell) const
virtual

Implements Heed::AtomPhotoAbsCS.

Definition at line 1430 of file PhotoAbsCS.cpp.

1430 {
1431 mfunname("double SimpleAtomPhotoAbsCS::get_threshold(int nshell) const");
1432 check_econd21(nshell, < 0 ||, > qshell, mcerr);
1433 return acs[nshell]->get_threshold();
1434}

Referenced by SimpleAtomPhotoAbsCS().

◆ macro_copy_total()

Heed::SimpleAtomPhotoAbsCS::macro_copy_total ( SimpleAtomPhotoAbsCS  )

◆ print()

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

Reimplemented from Heed::AtomPhotoAbsCS.

Definition at line 1532 of file PhotoAbsCS.cpp.

1532 {
1533 if (l > 0) {
1534 Ifile << "SimpleAtomPhotoAbsCS(l=" << l << "): name=" << name
1535 << " Z = " << Z << " qshell = " << qshell
1536 << " file_name=" << file_name << std::endl;
1537 l--;
1538 if (l > 0) {
1539 indn.n += 2;
1540 for (int n = 0; n < qshell; ++n) {
1541 Ifile << "nshell=" << n << std::endl;
1542 acs[n].print(file, l);
1543 }
1544 AtomPhotoAbsCS::print(file, l);
1545 indn.n -= 2;
1546 }
1547 }
1548}
virtual void print(std::ostream &file, int l) const
indentation indn
Definition: prstream.cpp:13
#define Ifile
Definition: prstream.h:207

Referenced by get_integral_ACS().

Member Data Documentation

◆ acs

DynLinArr<ActivePtr<PhotoAbsCS> > Heed::SimpleAtomPhotoAbsCS::acs
protected

◆ file_name

String Heed::SimpleAtomPhotoAbsCS::file_name
protected

Definition at line 429 of file PhotoAbsCS.h.

Referenced by print(), and SimpleAtomPhotoAbsCS().


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