Jpp test-rotations-old-533-g2bdbdb559
the software that should make you happy
Loading...
Searching...
No Matches
JPHYSICS::JRadiationSource Class Reference

Implementation for calculation of inverse interaction length and shower energy. More...

#include <JRadiationSource.hh>

Inheritance diagram for JPHYSICS::JRadiationSource:
JPHYSICS::JRadiationInterface JPHYSICS::JRadiation::radiation_type JLANG::JObjectID JLANG::JComparable< JObjectID > JLANG::JComparable< JObjectID, int >

Public Member Functions

 JRadiationSource (const int id, const std::shared_ptr< JRadiation > &radiation, const double density, const JRadiation::radiation_type source)
 Constructor.
 
virtual double getInverseInteractionLength (const double E) const override
 Get inverse interaction length.
 
virtual double getEnergyOfShower (const double E) const override
 Get energy of shower.
 
virtual double getThetaRMS (const double E, const double Es) const override
 Get RMS of scattering angle.
 
int getID () const
 Get identifier.
 
int & getID ()
 Get identifier.
 
void setID (const int id)
 Set identifier.
 
bool less (const JObjectID &object) const
 Less than method.
 
bool less (const int id) const
 Less than method.
 
bool more (const int id) const
 More than method.
 

Public Attributes

double(JRadiation::* sigma )(const double) const
 total cross section method
 
double(JRadiation::* eloss )(const double) const
 energy loss method
 
double(JRadiation::* theta )(const double, const double) const
 scattering angle method
 

Protected Attributes

const double rho
 
int __id
 

Detailed Description

Implementation for calculation of inverse interaction length and shower energy.

This class implements the JRadiationInterface interface.

Definition at line 85 of file JRadiationSource.hh.

Constructor & Destructor Documentation

◆ JRadiationSource()

JPHYSICS::JRadiationSource::JRadiationSource ( const int id,
const std::shared_ptr< JRadiation > & radiation,
const double density,
const JRadiation::radiation_type source )
inline

Constructor.

Parameters
idradiation identifier
radiationradiation
densitymass density of radiation material [gr/cm³]
sourceradiation type

Definition at line 99 of file JRadiationSource.hh.

102 :
104 std::shared_ptr<JRadiation>(radiation),
105 radiation_type(source),
106 rho(density)
107 {}
JRadiationInterface(const int id)
Constructor.

Member Function Documentation

◆ getInverseInteractionLength()

virtual double JPHYSICS::JRadiationSource::getInverseInteractionLength ( const double E) const
inlineoverridevirtual

Get inverse interaction length.

Parameters
Emuon energy [GeV]
Returns
inverse interaction length [m^-1]

Implements JPHYSICS::JRadiationInterface.

Definition at line 116 of file JRadiationSource.hh.

117 {
118 return (get()->*sigma)(E) * rho * 1.0e6;
119 }
double(JRadiation::* sigma)(const double) const
total cross section method

◆ getEnergyOfShower()

virtual double JPHYSICS::JRadiationSource::getEnergyOfShower ( const double E) const
inlineoverridevirtual

Get energy of shower.

Parameters
Emuon energy [GeV]
Returns
shower energy [GeV]

Implements JPHYSICS::JRadiationInterface.

Definition at line 128 of file JRadiationSource.hh.

129 {
130 return (get()->*eloss)(E);
131 }
double(JRadiation::* eloss)(const double) const
energy loss method

◆ getThetaRMS()

virtual double JPHYSICS::JRadiationSource::getThetaRMS ( const double E,
const double Es ) const
inlineoverridevirtual

Get RMS of scattering angle.

Parameters
Emuon energy [GeV]
Esshower energy [GeV]
Returns
RMS scattering angle [rad]

Implements JPHYSICS::JRadiationInterface.

Definition at line 141 of file JRadiationSource.hh.

142 {
143 return (get()->*theta)(E, Es/E);
144 }
double(JRadiation::* theta)(const double, const double) const
scattering angle method

◆ getID() [1/2]

int JLANG::JObjectID::getID ( ) const
inlineinherited

Get identifier.

Returns
identifier

Definition at line 50 of file JObjectID.hh.

51 {
52 return __id;
53 }

◆ getID() [2/2]

int & JLANG::JObjectID::getID ( )
inlineinherited

Get identifier.

Returns
identifier

Definition at line 61 of file JObjectID.hh.

62 {
63 return __id;
64 }

◆ setID()

void JLANG::JObjectID::setID ( const int id)
inlineinherited

Set identifier.

Parameters
ididentifier

Definition at line 72 of file JObjectID.hh.

73 {
74 this->__id = id;
75 }

◆ less() [1/2]

bool JLANG::JObjectID::less ( const JObjectID & object) const
inlineinherited

Less than method.

Parameters
objectobject identifier
Returns
true if this identifier less than given identifier; else false

Definition at line 84 of file JObjectID.hh.

85 {
86 return this->getID() < object.getID();
87 }
int getID() const
Get identifier.
Definition JObjectID.hh:50

◆ less() [2/2]

bool JLANG::JObjectID::less ( const int id) const
inlineinherited

Less than method.

Parameters
ididentifier
Returns
true if this identifier less than given identifier; else false

Definition at line 96 of file JObjectID.hh.

97 {
98 return this->getID() < id;
99 }

◆ more()

bool JLANG::JObjectID::more ( const int id) const
inlineinherited

More than method.

Parameters
ididentifier
Returns
true if this identifier greater than given identifier; else false

Definition at line 108 of file JObjectID.hh.

109 {
110 return this->getID() > id;
111 }

Member Data Documentation

◆ rho

const double JPHYSICS::JRadiationSource::rho
protected

Definition at line 147 of file JRadiationSource.hh.

◆ __id

int JLANG::JObjectID::__id
protectedinherited

Definition at line 140 of file JObjectID.hh.

◆ sigma

double(JRadiation::* JPHYSICS::JRadiation::radiation_type::sigma) (const double) const
inherited

total cross section method

Definition at line 431 of file JRadiation.hh.

◆ eloss

double(JRadiation::* JPHYSICS::JRadiation::radiation_type::eloss) (const double) const
inherited

energy loss method

Definition at line 432 of file JRadiation.hh.

◆ theta

double(JRadiation::* JPHYSICS::JRadiation::radiation_type::theta) (const double, const double) const
inherited

scattering angle method

Definition at line 433 of file JRadiation.hh.


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