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

Simple phenomenological CS for any shell (analytic formula). More...

#include <PhotoAbsCS.h>

+ Inheritance diagram for Heed::PhenoPhotoAbsCS:

Public Member Functions

 PhenoPhotoAbsCS ()
 Default constructor.
 
 PhenoPhotoAbsCS (const std::string &fname, int fZ, double fthreshold, double fpower=2.75)
 
virtual ~PhenoPhotoAbsCS ()
 Destructor.
 
double get_CS (double energy) const override
 Retrieve cross-section [Mb] at a given energy [MeV].
 
double get_integral_CS (double energy1, double energy2) const override
 Retrieve integral cross-section [Mb * MeV] in a given interval [MeV].
 
void scale (double fact) override
 Multiply by some factor. Can be useful for debugging and other purposes.
 
void print (std::ostream &file, int l) const override
 
PhenoPhotoAbsCScopy () const override
 
- Public Member Functions inherited from Heed::PhotoAbsCS
 PhotoAbsCS ()
 Default constructor.
 
 PhotoAbsCS (const std::string &fname, int fZ, double fthreshold)
 Constructor.
 
virtual ~PhotoAbsCS ()
 Destructor.
 
const std::string & get_name () const
 Name of this shell or atom.
 
int get_number () const
 Number of this shell.
 
int get_Z () const
 
double get_threshold () const
 Return the threshold energy.
 
virtual double get_CS (double energy) const =0
 Retrieve cross-section [Mb] at a given energy [MeV].
 
virtual double get_integral_CS (double energy1, double energy2) const =0
 Retrieve integral cross-section [Mb * MeV] in a given interval [MeV].
 
virtual void scale (double fact)=0
 Multiply by some factor. Can be useful for debugging and other purposes.
 
virtual void print (std::ostream &file, int l) const
 
virtual PhotoAbsCScopy () const =0
 

Additional Inherited Members

- Protected Attributes inherited from Heed::PhotoAbsCS
std::string name
 
int number = 0
 
int Z
 
double threshold
 

Detailed Description

Simple phenomenological CS for any shell (analytic formula).

Definition at line 211 of file PhotoAbsCS.h.

Constructor & Destructor Documentation

◆ PhenoPhotoAbsCS() [1/2]

Heed::PhenoPhotoAbsCS::PhenoPhotoAbsCS ( )

Default constructor.

Definition at line 425 of file PhotoAbsCS.cpp.

425: PhotoAbsCS("none", 0, 0.0), power(0.0) {}
PhotoAbsCS()
Default constructor.
Definition: PhotoAbsCS.cpp:79

Referenced by copy().

◆ PhenoPhotoAbsCS() [2/2]

Heed::PhenoPhotoAbsCS::PhenoPhotoAbsCS ( const std::string &  fname,
int  fZ,
double  fthreshold,
double  fpower = 2.75 
)

Constructor

Parameters
fnamename of the shell or atom
fZnumber of electrons
fthresholdthreshold level
fpowerpositive number $x$ in $1/E^{-x}$

Definition at line 427 of file PhotoAbsCS.cpp.

429 : PhotoAbsCS(fname, fZ, fthreshold), power(fpower) {
430 mfunname("PhenoPhotoAbsCS::PhenoPhotoAbsCS(...)");
431 check_econd11a(power, <= 2, " value not allowed, integral would be infinite",
432 mcerr);
433 const double a = power - 1.;
434 factor = pow(threshold, a) * Thomas_sum_rule_const_Mb * Z * a;
435}
#define check_econd11a(a, signb, add, stream)
Definition: FunNameStack.h:172
#define mfunname(string)
Definition: FunNameStack.h:45
double threshold
Definition: PhotoAbsCS.h:79
constexpr double Thomas_sum_rule_const_Mb
TRK sum rule [Mb * MeV].
Definition: PhotoAbsCS.h:19
DoubleAc pow(const DoubleAc &f, double p)
Definition: DoubleAc.cpp:337
#define mcerr
Definition: prstream.h:128

◆ ~PhenoPhotoAbsCS()

virtual Heed::PhenoPhotoAbsCS::~PhenoPhotoAbsCS ( )
inlinevirtual

Destructor.

Definition at line 224 of file PhotoAbsCS.h.

224{}

Member Function Documentation

◆ copy()

PhenoPhotoAbsCS * Heed::PhenoPhotoAbsCS::copy ( ) const
inlineoverridevirtual

Implements Heed::PhotoAbsCS.

Definition at line 230 of file PhotoAbsCS.h.

230{ return new PhenoPhotoAbsCS(*this); }
PhenoPhotoAbsCS()
Default constructor.
Definition: PhotoAbsCS.cpp:425

◆ get_CS()

double Heed::PhenoPhotoAbsCS::get_CS ( double  energy) const
overridevirtual

Retrieve cross-section [Mb] at a given energy [MeV].

Implements Heed::PhotoAbsCS.

Definition at line 437 of file PhotoAbsCS.cpp.

437 {
438 if (energy < threshold || energy == DBL_MAX) return 0.0;
439 return factor * pow(energy, -power);
440}

◆ get_integral_CS()

double Heed::PhenoPhotoAbsCS::get_integral_CS ( double  energy1,
double  energy2 
) const
overridevirtual

Retrieve integral cross-section [Mb * MeV] in a given interval [MeV].

Implements Heed::PhotoAbsCS.

Definition at line 442 of file PhotoAbsCS.cpp.

442 {
443 if (energy2 < threshold) return 0.0;
444 if (energy1 < threshold) energy1 = threshold;
445 const double a = power - 1.;
446 double s;
447 if (energy2 == DBL_MAX) {
448 s = factor / a * (1. / pow(energy1, a));
449 } else {
450 s = factor / a * (1. / pow(energy1, a) - 1. / pow(energy2, a));
451 }
452 return s;
453}

◆ print()

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

Reimplemented from Heed::PhotoAbsCS.

Definition at line 460 of file PhotoAbsCS.cpp.

460 {
461 if (l <= 0) return;
462 Ifile << "PhenoPhotoAbsCS: name=" << name << " Z = " << Z << std::endl;
463 Ifile << " threshold = " << threshold << " power=" << power
464 << " factor=" << factor << std::endl;
465}
std::string name
Definition: PhotoAbsCS.h:76
#define Ifile
Definition: prstream.h:195

◆ scale()

void Heed::PhenoPhotoAbsCS::scale ( double  fact)
overridevirtual

Multiply by some factor. Can be useful for debugging and other purposes.

Implements Heed::PhotoAbsCS.

Definition at line 455 of file PhotoAbsCS.cpp.

455 {
456 mfunnamep("void PhenoPhotoAbsCS::scale(double fact)");
457 factor *= fact;
458}
#define mfunnamep(string)
Definition: FunNameStack.h:49

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