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 ;
Data structure for direction in three dimensions.
JDirection3D & rotate_back(const JRotation3D &R)
Rotate back.
Data structure for position in three dimensions.
The JMarkovPhotonTracker generates ensembles of photon paths by tracking photons from a source to a t...
JMarkovPhotonTracker()
standard constructor
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.
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...
double getLength()
get the total path length
Virtual base class for a scattering model.
virtual double getScatteringLength()
virtual JVersor3D generateDirection()=0
Return a randomly generated direction according to the scattering probability distribution.
Virtual base class for a light source.
virtual JVersor3D generateDirection()=0
Return a randomly generated direction according to the emission distribution.
const JPosition3D & getPosition() const
Virtual base class for a light detector ("photon target").
const JPosition3D & getPosition() const
virtual double getEfficiency(JVersor3D dir) const =0
Return the efficiency, which is defined as the probability that a photon with the given direction hit...
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).