Implementation for calculation of inverse interaction length and shower energy.
More...
#include <JRadiationSource.hh>
|
double(JRadiation::* | sigma )(const double) const |
| total cross section method More...
|
|
double(JRadiation::* | eloss )(const double) const |
| energy loss method More...
|
|
double(JRadiation::* | theta )(const double, const double) const |
| scattering angle method More...
|
|
Implementation for calculation of inverse interaction length and shower energy.
This class implements the JRadiationInterface interface.
N.B: This class owns the object pointed to using JLANG::JSharedPointer.
Definition at line 89 of file JRadiationSource.hh.
template<class JClass_t, template< class > class JMemory_t = JNew>
template<class JClass_t, template< class > class JMemory_t = JNew>
template<class JClass_t, template< class > class JMemory_t = JNew>
Constructor.
- Parameters
-
id | radiation identifier |
radiation | pointer to valid JRadition object |
density | mass density of radiation material [gr/cm³] |
source | pointers to member methods of JRadiation |
Definition at line 103 of file JRadiationSource.hh.
108 JSharedPointer<JRadiation>(radiation),
JRadiationInterface(const int id)
Constructor.
Auxiliary data structure for handling member methods of class JRadiation.
virtual double JPHYSICS::JRadiationSource::getInverseInteractionLength |
( |
const double |
E | ) |
const |
|
inlineoverridevirtual |
Get inverse interaction length.
- Parameters
-
- Returns
- inverse interaction length [m^-1]
Implements JPHYSICS::JRadiationInterface.
Definition at line 120 of file JRadiationSource.hh.
122 return ((*this)->*
sigma)(
E) *
rho * 1.0e6;
double(JRadiation::* sigma)(const double) const
total cross section method
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
virtual double JPHYSICS::JRadiationSource::getEnergyOfShower |
( |
const double |
E | ) |
const |
|
inlineoverridevirtual |
Get energy of shower.
- Parameters
-
- Returns
- shower energy [GeV]
Implements JPHYSICS::JRadiationInterface.
Definition at line 132 of file JRadiationSource.hh.
134 return ((*this)->*
eloss)(
E);
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
double(JRadiation::* eloss)(const double) const
energy loss method
virtual double JPHYSICS::JRadiationSource::getThetaRMS |
( |
const double |
E, |
|
|
const double |
Es |
|
) |
| const |
|
inlineoverridevirtual |
Get RMS of scattering angle.
- Parameters
-
E | muon energy [GeV] |
Es | shower energy [GeV] |
- Returns
- RMS scattering angle [rad]
Implements JPHYSICS::JRadiationInterface.
Definition at line 145 of file JRadiationSource.hh.
147 return ((*this)->*
theta)(
E, Es/
E);
then usage $script< input file >[option[primary[working directory]]] nWhere option can be E
double(JRadiation::* theta)(const double, const double) const
scattering angle method
int JPHYSICS::JRadiationInterface::getID |
( |
| ) |
const |
|
inlineinherited |
template<class JClass_t, template< class > class JMemory_t = JNew>
Get shared pointer.
- Returns
- this shared pointer
Definition at line 95 of file JSharedPointer.hh.
The template JSharedPointer class can be used to share a pointer to an object.
template<class JClass_t, template< class > class JMemory_t = JNew>
Get shared pointer.
- Returns
- this shared pointer
Definition at line 106 of file JSharedPointer.hh.
The template JSharedPointer class can be used to share a pointer to an object.
template<class JClass_t, template< class > class JMemory_t = JNew>
Set shared pointer.
- Parameters
-
Definition at line 117 of file JSharedPointer.hh.
119 if (this->
get() !=
object.
get()) {
void set(const JSharedPointer &object)
Set pointer.
bool is_valid() const
Check validity of pointer.
virtual void reset() override
Reset pointer.
template<class JClass_t, template< class > class JMemory_t = JNew>
|
inlineoverridevirtualinherited |
Reset pointer.
The reference counter is decremented by one and the object pointed to previously is deleted when its reference counter is zero.
Reimplemented from JLANG::JStorage< JClass_t, JMemory_t >.
Definition at line 171 of file JSharedPointer.hh.
virtual void reset() override
Reset pointer.
virtual void reset() override
Reset pointer.
template<class JClass_t>
template<class T >
Reset pointer.
- Parameters
-
Definition at line 108 of file JPointer.hh.
virtual JClass_t * get() const override
Get pointer.
virtual void reset() override
Reset pointer.
Reset pointer.
- Parameters
-
Definition at line 94 of file JAbstractPointer.hh.
96 if (this->
get() != p) {
virtual void reset()=0
Reset pointer.
virtual void set(JClass_t *p)=0
Set pointer.
template<class JClass_t, template< class > class JMemory_t = JNew>
Set pointer.
The reference counter of the shared object pointed to is incremented by one.
- Parameters
-
Definition at line 188 of file JSharedPointer.hh.
void attach(const JSharedCounter &object)
Attach this counter to given shared counter object.
virtual void set(JClass_t *p) override
Set pointer.
template<class JClass_t, template< class > class JMemory_t = JNew>
|
inlineoverrideprotectedvirtualinherited |
Set pointer.
The reference counter of the shared object pointed to is initialised to one.
- Parameters
-
p | pointer to derived class object |
Reimplemented from JLANG::JPointer< JClass_t >.
Definition at line 202 of file JSharedPointer.hh.
void initialise()
Initialise counter.
virtual void set(JClass_t *p) override
Set pointer.
template<class JClass_t>
template<class T >
Set pointer.
- Parameters
-
Definition at line 96 of file JPointer.hh.
virtual void set(JClass_t *p) override
Set pointer.
virtual JClass_t * get() const override
Get pointer.
void JLANG::JSharedCounter::initialise |
( |
| ) |
|
|
inlineinherited |
Attach this counter to given shared counter object.
- Parameters
-
Definition at line 46 of file JSharedCounter.hh.
bool JLANG::JSharedCounter::detach |
( |
| ) |
|
|
inlineinherited |
Detach.
- Returns
- true if counter at zero; else false
Definition at line 63 of file JSharedCounter.hh.
const int JLANG::JSharedCounter::getCount |
( |
| ) |
|
|
inlineinherited |
template<class JClass_t, template< class > class JMemory_t = JNew>
Recreate object in memory.
A new object is created if no memory is allocated yet, else the previously created object is maintained.
Definition at line 57 of file JStorage.hh.
60 this->
set(memory_type::create());
bool is_valid() const
Check validity of pointer.
virtual void set(JClass_t *p) override
Set pointer.
template<class JClass_t, template< class > class JMemory_t = JNew>
Create object in memory.
The memory allocated by a previously created object will be released.
Definition at line 69 of file JStorage.hh.
71 this->
reset(memory_type::create());
virtual void reset() override
Reset pointer.
template<class JClass_t, template< class > class JMemory_t = JNew>
void JLANG::JStorage< JClass_t, JMemory_t >::create |
( |
const unsigned int |
size | ) |
|
|
inlineinherited |
Create array of objects in memory.
The memory allocated by previously created objects will be released.
- Parameters
-
Definition at line 81 of file JStorage.hh.
83 this->
reset(memory_type::create(size));
virtual void reset() override
Reset pointer.
template<class JClass_t, template< class > class JMemory_t = JNew>
Release memory.
Definition at line 91 of file JStorage.hh.
93 memory_type::release(this->
get());
template<class JClass_t>
|
inlineoverridevirtualinherited |
Get rereference to internal pointer.
- Returns
- reference to internal pointer
Definition at line 119 of file JPointer.hh.
JClass_t * __p
pointer to object
Get rereference to internal pointer.
- Returns
- reference to internal pointer
Definition at line 130 of file JPointer.hh.
JClass_t * __p
pointer to object
Equals.
The equality is evaluated by comparison of the internal pointers.
- Parameters
-
- Returns
- true if equals; else false
Definition at line 50 of file JAbstractPointer.hh.
52 return this->
get() ==
object.
get();
Check validity of pointer.
- Returns
- true if pointer not null; else false
Definition at line 83 of file JAbstractPointer.hh.
85 return this->
get() != NULL;
Smart pointer operator.
- Returns
- pointer to object
Definition at line 112 of file JAbstractPointer.hh.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
bool is_valid() const
Check validity of pointer.
Exception for null pointer operation.
const double JPHYSICS::JRadiationSource::rho |
|
protected |
int* JLANG::JSharedCounter::counter |
|
protectedinherited |
double(JRadiation::* JPHYSICS::JRadiationSource_t::sigma)(const double) const |
|
inherited |
double(JRadiation::* JPHYSICS::JRadiationSource_t::eloss)(const double) const |
|
inherited |
double(JRadiation::* JPHYSICS::JRadiationSource_t::theta)(const double, const double) const |
|
inherited |
The documentation for this class was generated from the following file: