48 cout <<
"JMarkovPathIntegrator" <<
endl
49 <<
"Written by Martijn Jongen" <<
endl
74 catch(
const exception &error) {
76 cout <<
"Type '" <<
argv[0] <<
" -h!' to display the command-line options." <<
endl ;
92 cout <<
"Loading scattering model" <<
endl ;
102 cerr <<
"Could not read JScatteringModel from file!" <<
endl ;
105 cout <<
"JScatteringModel loaded" <<
endl
106 <<
" absorption length = " <<
sm->getAbsorptionLength() <<
" m" <<
endl
107 <<
" scattering length = " <<
sm->getScatteringLength() <<
" m" <<
endl
114 if( !reader.is_open() ) {
122 while( reader.hasNext() ) {
124 if( p->size() == (
unsigned int)
nvert )
125 paths.push_back(*p) ;
137 cout <<
"Done reading file. Selected " <<
npaths <<
" / " <<
nread <<
" JPhotonPaths." <<
endl ;
143 double INF = 1.0/0.0 ;
144 double MININF = -1.0/0.0 ;
146 for(
int i=0 ; i<
nvert ; ++i ) {
154 for(
int i=0; i<
nvert; ++i ) {
156 min(
minvals[i].getY(),p->at(i).getY()),
157 min(
minvals[i].getZ(),p->at(i).getZ()) ) ;
159 max(
maxvals[i].getY(),p->at(i).getY()),
160 max(
maxvals[i].getZ(),p->at(i).getZ()) ) ;
165 cout <<
"Allocating histograms." <<
endl ;
193 cout <<
"Filling histograms" <<
endl ;
197 hX[
n]->Fill( p->at(
n).getX() ) ;
198 hY[
n]->Fill( p->at(
n).getY() ) ;
199 hZ[
n]->Fill( p->at(
n).getZ() ) ;
205 cout <<
"Normalizing histograms." <<
endl ;
216 writer.
open(
"high_contribution_paths.paths") ;
220 cout <<
"Computing scattering probability" <<
endl ;
247 double x =
hX[
n]->GetRandom() ;
248 double y =
hY[
n]->GetRandom() ;
249 double z =
hZ[
n]->GetRandom() ;
265 if( rho/w > 0.001 ) {
328 cout <<
"sigma = " << sigma <<
" (standard deviation of integral contributions)" <<
endl ;
332 cout <<
"Error estimate 1: sigma/sqrt(N) = "
333 << sigma <<
" / sqrt(" <<
nsamples <<
") = "