Go to the documentation of this file. 1 #ifndef H_MARKOV_PHOTON_TRACKER
2 #define H_MARKOV_PHOTON_TRACKER
54 for(
unsigned long int i=0 ; i<
n ; ++i ) {
56 double Lmax = gRandom->Exp(lambda_abs) ;
72 double stepsize = gRandom->Exp( lambda_scat ) ;
74 bool isAbsorbed = false ;
75 if( stepsize > Lmax-L ) {
81 p[1+nscat] = p[nscat] + stepsize *
JPosition3D(dir) ;
85 lastvertex[0] = p[p.size()-2] ;
86 lastvertex[1] = p[p.size()-1] ;
91 p[p.size()-1] = hit_position ;
95 ensemble.push_back(p) ;
99 if( isAbsorbed ) break ;
107 dir = dir.rotate_back(rot) ;
virtual JVersor3D generateDirection()=0
Return a randomly generated direction according to the scattering probability distribution.
virtual JVersor3D generateDirection()=0
Return a randomly generated direction according to the emission distribution.
JMarkovPhotonTracker()
standard constructor
JPosition3D getSphereHitPosition(const JPosition3D &pos, double r)
Returns the position where the photon hits a sphere of radius r at position pos. If the photon does n...
Data structure for normalised vector in three dimensions.
double getLength()
get the total path length
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
The JMarkovPhotonTracker generates ensembles of photon paths by tracking photons from a source to a t...
Data structure for position in three dimensions.
const JPosition3D & getPosition() const
Virtual base class for a light source.
Virtual base class for a scattering model.
virtual double getEfficiency(JVersor3D dir) const =0
Return the efficiency, which is defined as the probability that a photon with the given direction hit...
Virtual base class for a light detector ("photon target").
virtual double getScatteringLength()
const JPosition3D & getPosition() const
std::vector< JPhotonPath > trackPhotons(unsigned long int n, JSourceModel *src, JScatteringModel *sm, JTargetModel *trg, double lambda_abs)
Track n photons.
bool hitsSphere(const JPosition3D &pos, double r)
Returns whether the photon path intersects a sphere of radius r at position pos.