#include <TargetVolume.h>
Public Member Functions | |
TargetVolume (double worldX1, double worldX2, double worldY1, double worldY2, double worldZ1, double worldZ2, double totalmass) | |
void | SetRandomNumberGenerator (TRandom *rand) |
void | SetGeometry (const geo::Geometry *geo) |
void | RandomVertex (double *xyz) |
Public Attributes | |
TRandom * | fRndm |
const geo::Geometry * | fGeo |
double | fMass |
double | fX [2] |
double | fY [2] |
double | fZ [2] |
|
Definition at line 8 of file TargetVolume.cxx. References fMass, fX, fY, and fZ. 00012 { 00013 fX[0] = worldX1; 00014 fX[1] = worldX2; 00015 fY[0] = worldY1; 00016 fY[1] = worldY2; 00017 fZ[0] = worldZ1; 00018 fZ[1] = worldZ2; 00019 fMass = totalmass; 00020 }
|
|
Definition at line 38 of file TargetVolume.cxx. References fGeo, fRndm, fX, fY, fZ, and geo::Geometry::Material(). Referenced by main(). 00039 { 00040 const double rhomax = 3.0; // g/cc 00041 00042 while (1) { 00043 // Choose a random location inside the volume 00044 fRndm->RndmArray(3,xyz); 00045 xyz[0] = fX[0]+xyz[0]*(fX[1]-fX[0]); 00046 xyz[1] = fY[0]+xyz[1]*(fY[1]-fY[0]); 00047 xyz[2] = fZ[0]+xyz[2]*(fZ[1]-fZ[0]); 00048 00049 // Based on its density, accept or reject the point 00050 double rho = fGeo->Material(xyz[0],xyz[1],xyz[2])->GetDensity(); 00051 if (rho/rhomax < fRndm->Rndm()) return; 00052 } 00053 }
|
|
Definition at line 31 of file TargetVolume.cxx. References fGeo. Referenced by main(). 00032 { 00033 fGeo = geo; 00034 }
|
|
Definition at line 24 of file TargetVolume.cxx. References fRndm. Referenced by main(). 00025 { 00026 fRndm = rand; 00027 }
|
|
Definition at line 19 of file TargetVolume.h. Referenced by RandomVertex(), and SetGeometry(). |
|
Definition at line 20 of file TargetVolume.h. Referenced by TargetVolume(). |
|
Definition at line 18 of file TargetVolume.h. Referenced by RandomVertex(), and SetRandomNumberGenerator(). |
|
Definition at line 21 of file TargetVolume.h. Referenced by RandomVertex(), and TargetVolume(). |
|
Definition at line 22 of file TargetVolume.h. Referenced by RandomVertex(), and TargetVolume(). |
|
Definition at line 23 of file TargetVolume.h. Referenced by RandomVertex(), and TargetVolume(). |