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

#include <PhotoAbsCS.h>

+ Inheritance diagram for Heed::PhenoPhotoAbsCS:

Public Member Functions

 PhenoPhotoAbsCS (void)
 
 PhenoPhotoAbsCS (const String &fname, int fZ, double fthreshold, double fpower=2.75)
 
virtual ~PhenoPhotoAbsCS ()
 
virtual double get_CS (double energy) const
 
virtual double get_integral_CS (double energy1, double energy2) const
 
virtual void scale (double fact)
 
virtual void print (std::ostream &file, int l) const
 
 macro_copy_total (PhenoPhotoAbsCS)
 

Detailed Description

Definition at line 225 of file PhotoAbsCS.h.

Constructor & Destructor Documentation

◆ PhenoPhotoAbsCS() [1/2]

Heed::PhenoPhotoAbsCS::PhenoPhotoAbsCS ( void  )

Definition at line 740 of file PhotoAbsCS.cpp.

740: PhotoAbsCS("none", 0, 0.0), power(0.0) {}

◆ PhenoPhotoAbsCS() [2/2]

Heed::PhenoPhotoAbsCS::PhenoPhotoAbsCS ( const String fname,
int  fZ,
double  fthreshold,
double  fpower = 2.75 
)

Definition at line 742 of file PhotoAbsCS.cpp.

744 : PhotoAbsCS(fname, fZ, fthreshold), power(fpower) {
745 mfunname("PhenoPhotoAbsCS::PhenoPhotoAbsCS");
746 check_econd11a(power, <= 2,
747 " cannot be so, otherwise the integral is infinite", mcerr);
748 factor =
749 pow(threshold, power - 1.) * Thomas_sum_rule_const_Mb * Z * (power - 1.);
750}
DoubleAc pow(const DoubleAc &f, double p)
Definition: DoubleAc.cpp:336
#define check_econd11a(a, signb, add, stream)
Definition: FunNameStack.h:395
#define mfunname(string)
Definition: FunNameStack.h:67
const double Thomas_sum_rule_const_Mb
Definition: PhotoAbsCS.h:45
#define mcerr
Definition: prstream.h:135

◆ ~PhenoPhotoAbsCS()

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

Definition at line 230 of file PhotoAbsCS.h.

230{}

Member Function Documentation

◆ get_CS()

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

Definition at line 752 of file PhotoAbsCS.cpp.

752 {
753 if (energy < threshold || energy == DBL_MAX) return 0.0;
754 return factor * (pow(energy, -power));
755}

◆ get_integral_CS()

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

Definition at line 757 of file PhotoAbsCS.cpp.

757 {
758 //Imcout<<"energy1="<<energy1<<" energy2="<<energy2<<'\n';
759 if (energy2 < threshold) return 0.0;
760 if (energy1 < threshold) energy1 = threshold;
761 double s;
762 if (energy2 == DBL_MAX) {
763 s = factor / (power - 1.) * (1. / pow(energy1, power - 1.));
764 } else {
765 s = factor / (power - 1.) *
766 (1. / pow(energy1, power - 1.) - 1. / pow(energy2, power - 1.));
767 }
768 return s;
769}

◆ macro_copy_total()

Heed::PhenoPhotoAbsCS::macro_copy_total ( PhenoPhotoAbsCS  )

◆ print()

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

Definition at line 776 of file PhotoAbsCS.cpp.

776 {
777 if (l > 0) {
778 Ifile << "PhenoPhotoAbsCS: name=" << name << " Z = " << Z << std::endl;
779 Ifile << " threshold = " << threshold << " power=" << power
780 << " factor=" << factor << std::endl;
781 }
782}
#define Ifile
Definition: prstream.h:207

◆ scale()

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

Definition at line 771 of file PhotoAbsCS.cpp.

771 {
772 mfunnamep("void PhenoPhotoAbsCS::scale(double fact)");
773 factor *= fact;
774}
#define mfunnamep(string)
Definition: FunNameStack.h:77

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