Geant4-11
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
G4AdjointPosOnPhysVolGenerator Class Reference

#include <G4AdjointPosOnPhysVolGenerator.hh>

Public Member Functions

G4double ComputeAreaOfExtSurface ()
 
G4double ComputeAreaOfExtSurface (G4double epsilon)
 
G4double ComputeAreaOfExtSurface (G4int NStat)
 
G4double ComputeAreaOfExtSurface (G4VSolid *aSolid)
 
G4double ComputeAreaOfExtSurface (G4VSolid *aSolid, G4double epsilon)
 
G4double ComputeAreaOfExtSurface (G4VSolid *aSolid, G4int NStat)
 
G4VPhysicalVolumeDefinePhysicalVolume (const G4String &aName)
 
void DefinePhysicalVolume1 (const G4String &aName)
 
void GenerateAPositionOnTheExtSurfaceOfASolid (G4VSolid *aSolid, G4ThreeVector &p, G4ThreeVector &direction)
 
void GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume (G4ThreeVector &p, G4ThreeVector &direction)
 
void GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume (G4ThreeVector &p, G4ThreeVector &direction, G4double &costh_to_normal)
 
void GenerateAPositionOnTheExtSurfaceOfTheSolid (G4ThreeVector &p, G4ThreeVector &direction)
 
G4double GetAreaOfExtSurfaceOfThePhysicalVolume ()
 
G4double GetCosThDirComparedToNormal ()
 
void SetSolid (G4VSolid *aSolid)
 

Static Public Member Functions

static G4AdjointPosOnPhysVolGeneratorGetInstance ()
 

Private Member Functions

G4double ComputeAreaOfExtSurfaceStartingFromBox (G4VSolid *aSolid, G4int NStat)
 
G4double ComputeAreaOfExtSurfaceStartingFromSphere (G4VSolid *aSolid, G4int NStat)
 
void ComputeTransformationFromPhysVolToWorld ()
 
 G4AdjointPosOnPhysVolGenerator ()
 
G4double GenerateAPositionOnABoxBoundary (G4VSolid *aSolid, G4ThreeVector &p, G4ThreeVector &direction)
 
void GenerateAPositionOnASolidBoundary (G4VSolid *aSolid, G4ThreeVector &p, G4ThreeVector &direction)
 
G4double GenerateAPositionOnASphereBoundary (G4VSolid *aSolid, G4ThreeVector &p, G4ThreeVector &direction)
 
 ~G4AdjointPosOnPhysVolGenerator ()
 

Private Attributes

G4double AreaOfExtSurfaceOfThePhysicalVolume
 
G4double CosThDirComparedToNormal
 
G4String ModelOfSurfaceSource
 
G4VPhysicalVolumethePhysicalVolume = nullptr
 
G4VSolidtheSolid = nullptr
 
G4AffineTransform theTransformationFromPhysVolToWorld
 
G4bool UseSphere
 

Static Private Attributes

static G4ThreadLocal G4AdjointPosOnPhysVolGeneratortheInstance = nullptr
 

Detailed Description

Definition at line 58 of file G4AdjointPosOnPhysVolGenerator.hh.

Constructor & Destructor Documentation

◆ G4AdjointPosOnPhysVolGenerator()

G4AdjointPosOnPhysVolGenerator::G4AdjointPosOnPhysVolGenerator ( )
private

◆ ~G4AdjointPosOnPhysVolGenerator()

G4AdjointPosOnPhysVolGenerator::~G4AdjointPosOnPhysVolGenerator ( )
private

Definition at line 58 of file G4AdjointPosOnPhysVolGenerator.cc.

59{
60}

Member Function Documentation

◆ ComputeAreaOfExtSurface() [1/6]

G4double G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurface ( )

◆ ComputeAreaOfExtSurface() [2/6]

G4double G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurface ( G4double  epsilon)

Definition at line 130 of file G4AdjointPosOnPhysVolGenerator.cc.

131{
133}
static const G4double eps

References ComputeAreaOfExtSurface(), eps, and theSolid.

◆ ComputeAreaOfExtSurface() [3/6]

G4double G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurface ( G4int  NStat)

Definition at line 123 of file G4AdjointPosOnPhysVolGenerator.cc.

124{
125 return ComputeAreaOfExtSurface(theSolid,NStats);
126}

References ComputeAreaOfExtSurface(), and theSolid.

◆ ComputeAreaOfExtSurface() [4/6]

G4double G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurface ( G4VSolid aSolid)

Definition at line 138 of file G4AdjointPosOnPhysVolGenerator.cc.

139{
140 return ComputeAreaOfExtSurface(aSolid,1.e-3);
141}

References ComputeAreaOfExtSurface().

◆ ComputeAreaOfExtSurface() [5/6]

G4double G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurface ( G4VSolid aSolid,
G4double  epsilon 
)

Definition at line 174 of file G4AdjointPosOnPhysVolGenerator.cc.

176{
177 G4int Nstats = G4int(1./(eps*eps));
178 return ComputeAreaOfExtSurface(aSolid,Nstats);
179}
int G4int
Definition: G4Types.hh:85

References ComputeAreaOfExtSurface(), and eps.

◆ ComputeAreaOfExtSurface() [6/6]

G4double G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurface ( G4VSolid aSolid,
G4int  NStat 
)

Definition at line 146 of file G4AdjointPosOnPhysVolGenerator.cc.

148{
149 if (ModelOfSurfaceSource == "OnSolid")
150 {
151 if (UseSphere)
152 {
153 return ComputeAreaOfExtSurfaceStartingFromSphere(aSolid,NStats);
154 }
155 else
156 {
157 return ComputeAreaOfExtSurfaceStartingFromBox(aSolid,NStats);
158 }
159 }
160 else
161 {
162 G4ThreeVector p, dir;
163 if (ModelOfSurfaceSource == "ExternalSphere")
164 {
165 return GenerateAPositionOnASphereBoundary(aSolid, p,dir);
166 }
167 return GenerateAPositionOnABoxBoundary(aSolid, p,dir);
168 }
169}
G4double ComputeAreaOfExtSurfaceStartingFromSphere(G4VSolid *aSolid, G4int NStat)
G4double ComputeAreaOfExtSurfaceStartingFromBox(G4VSolid *aSolid, G4int NStat)
G4double GenerateAPositionOnASphereBoundary(G4VSolid *aSolid, G4ThreeVector &p, G4ThreeVector &direction)
G4double GenerateAPositionOnABoxBoundary(G4VSolid *aSolid, G4ThreeVector &p, G4ThreeVector &direction)

References ComputeAreaOfExtSurfaceStartingFromBox(), ComputeAreaOfExtSurfaceStartingFromSphere(), GenerateAPositionOnABoxBoundary(), GenerateAPositionOnASphereBoundary(), ModelOfSurfaceSource, and UseSphere.

◆ ComputeAreaOfExtSurfaceStartingFromBox()

G4double G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurfaceStartingFromBox ( G4VSolid aSolid,
G4int  NStat 
)
private

Definition at line 212 of file G4AdjointPosOnPhysVolGenerator.cc.

214{
215 if ( Nstat <= 0 ) { return 0.; }
216 G4double area=1.;
217 G4int i=0, j=0;
218 while (i<Nstat)
219 {
220 G4ThreeVector p, direction;
221 area = GenerateAPositionOnABoxBoundary( aSolid,p, direction);
222 G4double dist_to_in = aSolid->DistanceToIn(p,direction);
223 if (dist_to_in<kInfinity/2.) { ++i; }
224 ++j;
225 }
226 area=area*G4double(i)/G4double(j);
227 return area;
228}
double G4double
Definition: G4Types.hh:83
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
static const G4double kInfinity
Definition: geomdefs.hh:41

References G4VSolid::DistanceToIn(), GenerateAPositionOnABoxBoundary(), and kInfinity.

Referenced by ComputeAreaOfExtSurface().

◆ ComputeAreaOfExtSurfaceStartingFromSphere()

G4double G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurfaceStartingFromSphere ( G4VSolid aSolid,
G4int  NStat 
)
private

Definition at line 232 of file G4AdjointPosOnPhysVolGenerator.cc.

234{
235 if ( Nstat <= 0 ) { return 0.; }
236 G4double area=1.;
237 G4int i=0, j=0;
238 while (i<Nstat)
239 {
240 G4ThreeVector p, direction;
241 area = GenerateAPositionOnASphereBoundary( aSolid,p, direction);
242 G4double dist_to_in = aSolid->DistanceToIn(p,direction);
243 if (dist_to_in<kInfinity/2.) { ++i; }
244 ++j;
245 }
246 area=area*G4double(i)/G4double(j);
247 return area;
248}

References G4VSolid::DistanceToIn(), GenerateAPositionOnASphereBoundary(), and kInfinity.

Referenced by ComputeAreaOfExtSurface().

◆ ComputeTransformationFromPhysVolToWorld()

void G4AdjointPosOnPhysVolGenerator::ComputeTransformationFromPhysVolToWorld ( )
private

Definition at line 463 of file G4AdjointPosOnPhysVolGenerator.cc.

464{
469 while (mother != nullptr)
470 {
473 daughter->GetObjectTranslation());
474 for ( unsigned int i=0; i<thePhysVolStore->size(); ++i )
475 {
476 if ((*thePhysVolStore)[i]->GetLogicalVolume() == mother)
477 {
478 daughter = (*thePhysVolStore)[i];
479 mother = daughter->GetMotherLogical();
480 break;
481 }
482 }
483 }
484}
static G4PhysicalVolumeStore * GetInstance()
G4LogicalVolume * GetMotherLogical() const
const G4RotationMatrix * GetFrameRotation() const
G4ThreeVector GetObjectTranslation() const

References G4VPhysicalVolume::GetFrameRotation(), G4PhysicalVolumeStore::GetInstance(), G4VPhysicalVolume::GetMotherLogical(), G4VPhysicalVolume::GetObjectTranslation(), thePhysicalVolume, and theTransformationFromPhysVolToWorld.

Referenced by DefinePhysicalVolume().

◆ DefinePhysicalVolume()

G4VPhysicalVolume * G4AdjointPosOnPhysVolGenerator::DefinePhysicalVolume ( const G4String aName)

Definition at line 73 of file G4AdjointPosOnPhysVolGenerator.cc.

74{
75 thePhysicalVolume = nullptr;
76 theSolid = nullptr;
78 for ( unsigned int i=0; i< thePhysVolStore->size(); ++i )
79 {
80 G4String vol_name =(*thePhysVolStore)[i]->GetName();
81 if (vol_name == "")
82 {
83 vol_name = (*thePhysVolStore)[i]->GetLogicalVolume()->GetName();
84 }
85 if (vol_name == aName)
86 {
87 thePhysicalVolume = (*thePhysVolStore)[i];
88 }
89 }
90 if (thePhysicalVolume != nullptr)
91 {
94 }
95 else
96 {
97 G4cout << "The physical volume with name " << aName
98 << " does not exist!!" << G4endl;
99 G4cout << "Before generating a source on an external surface " << G4endl
100 << "of a volume you should select another physical volume."
101 << G4endl;
102 }
103 return thePhysicalVolume;
104}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
G4VSolid * GetSolid() const
G4LogicalVolume * GetLogicalVolume() const

References ComputeTransformationFromPhysVolToWorld(), G4cout, G4endl, G4PhysicalVolumeStore::GetInstance(), G4VPhysicalVolume::GetLogicalVolume(), G4LogicalVolume::GetSolid(), thePhysicalVolume, and theSolid.

Referenced by DefinePhysicalVolume1().

◆ DefinePhysicalVolume1()

void G4AdjointPosOnPhysVolGenerator::DefinePhysicalVolume1 ( const G4String aName)

◆ GenerateAPositionOnABoxBoundary()

G4double G4AdjointPosOnPhysVolGenerator::GenerateAPositionOnABoxBoundary ( G4VSolid aSolid,
G4ThreeVector p,
G4ThreeVector direction 
)
private

Definition at line 322 of file G4AdjointPosOnPhysVolGenerator.cc.

325{
326
327 G4double ran_var,px,py,pz,minX,maxX,minY,maxY,minZ,maxZ;
328
329 // values needed for CalculateExtent signature
330
331 G4VoxelLimits limit; // Unlimited
332 G4AffineTransform origin;
333
334 // min max extents of pSolid along X,Y,Z
335
336 aSolid->CalculateExtent(kXAxis,limit,origin,minX,maxX);
337 aSolid->CalculateExtent(kYAxis,limit,origin,minY,maxY);
338 aSolid->CalculateExtent(kZAxis,limit,origin,minZ,maxZ);
339
340 G4double scale=.1;
341 minX-=scale*std::abs(minX);
342 minY-=scale*std::abs(minY);
343 minZ-=scale*std::abs(minZ);
344 maxX+=scale*std::abs(maxX);
345 maxY+=scale*std::abs(maxY);
346 maxZ+=scale*std::abs(maxZ);
347
348 G4double dX=(maxX-minX);
349 G4double dY=(maxY-minY);
350 G4double dZ=(maxZ-minZ);
351
352 G4double XY_prob=2.*dX*dY;
353 G4double YZ_prob=2.*dY*dZ;
354 G4double ZX_prob=2.*dZ*dX;
355 G4double area=XY_prob+YZ_prob+ZX_prob;
356 XY_prob/=area;
357 YZ_prob/=area;
358 ZX_prob/=area;
359
360 ran_var=G4UniformRand();
361 G4double cos_th2 = G4UniformRand();
362 G4double sth = std::sqrt(1.-cos_th2);
363 G4double cth = std::sqrt(cos_th2);
365 G4double dirX = sth*std::cos(phi);
366 G4double dirY = sth*std::sin(phi);
367 G4double dirZ = cth;
368 if (ran_var <=XY_prob) // on the XY faces
369 {
370 G4double ran_var1=ran_var/XY_prob;
371 G4double ranX=ran_var1;
372 if (ran_var1<=0.5)
373 {
374 pz=minZ;
375 direction=G4ThreeVector(dirX,dirY,dirZ);
376 ranX=ran_var1*2.;
377 }
378 else
379 {
380 pz=maxZ;
381 direction=-G4ThreeVector(dirX,dirY,dirZ);
382 ranX=(ran_var1-0.5)*2.;
383 }
384 G4double ranY=G4UniformRand();
385 px=minX+(maxX-minX)*ranX;
386 py=minY+(maxY-minY)*ranY;
387 }
388 else if (ran_var <=(XY_prob+YZ_prob)) // on the YZ faces
389 {
390 G4double ran_var1=(ran_var-XY_prob)/YZ_prob;
391 G4double ranY=ran_var1;
392 if (ran_var1<=0.5)
393 {
394 px=minX;
395 direction=G4ThreeVector(dirZ,dirX,dirY);
396 ranY=ran_var1*2.;
397 }
398 else
399 {
400 px=maxX;
401 direction=-G4ThreeVector(dirZ,dirX,dirY);
402 ranY=(ran_var1-0.5)*2.;
403 }
404 G4double ranZ=G4UniformRand();
405 py=minY+(maxY-minY)*ranY;
406 pz=minZ+(maxZ-minZ)*ranZ;
407 }
408 else // on the ZX faces
409 {
410 G4double ran_var1=(ran_var-XY_prob-YZ_prob)/ZX_prob;
411 G4double ranZ=ran_var1;
412 if (ran_var1<=0.5)
413 {
414 py=minY;
415 direction=G4ThreeVector(dirY,dirZ,dirX);
416 ranZ=ran_var1*2.;
417 }
418 else
419 {
420 py=maxY;
421 direction=-G4ThreeVector(dirY,dirZ,dirX);
422 ranZ=(ran_var1-0.5)*2.;
423 }
424 G4double ranX=G4UniformRand();
425 px=minX+(maxX-minX)*ranX;
426 pz=minZ+(maxZ-minZ)*ranZ;
427 }
428
429 p=G4ThreeVector(px,py,pz);
430 return area;
431}
static const G4int maxZ
CLHEP::Hep3Vector G4ThreeVector
#define G4UniformRand()
Definition: Randomize.hh:52
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0
@ kYAxis
Definition: geomdefs.hh:56
@ kXAxis
Definition: geomdefs.hh:55
@ kZAxis
Definition: geomdefs.hh:57
static constexpr double twopi
Definition: SystemOfUnits.h:56

References G4VSolid::CalculateExtent(), G4UniformRand, kXAxis, kYAxis, kZAxis, maxZ, and CLHEP::twopi.

Referenced by ComputeAreaOfExtSurface(), ComputeAreaOfExtSurfaceStartingFromBox(), GenerateAPositionOnASolidBoundary(), and GenerateAPositionOnTheExtSurfaceOfASolid().

◆ GenerateAPositionOnASolidBoundary()

void G4AdjointPosOnPhysVolGenerator::GenerateAPositionOnASolidBoundary ( G4VSolid aSolid,
G4ThreeVector p,
G4ThreeVector direction 
)
private

Definition at line 252 of file G4AdjointPosOnPhysVolGenerator.cc.

255{
256 G4bool find_pos = false;
257 while (!find_pos)
258 {
259 if (UseSphere)
260 {
261 GenerateAPositionOnASphereBoundary( aSolid,p, direction );
262 }
263 else
264 {
265 GenerateAPositionOnABoxBoundary( aSolid,p, direction);
266 }
267 G4double dist_to_in = aSolid->DistanceToIn(p,direction);
268 if (dist_to_in<kInfinity/2.)
269 {
270 find_pos = true;
271 p += 0.999999*direction*dist_to_in;
272 }
273 }
274}
bool G4bool
Definition: G4Types.hh:86

References G4VSolid::DistanceToIn(), GenerateAPositionOnABoxBoundary(), GenerateAPositionOnASphereBoundary(), kInfinity, and UseSphere.

Referenced by GenerateAPositionOnTheExtSurfaceOfASolid().

◆ GenerateAPositionOnASphereBoundary()

G4double G4AdjointPosOnPhysVolGenerator::GenerateAPositionOnASphereBoundary ( G4VSolid aSolid,
G4ThreeVector p,
G4ThreeVector direction 
)
private

Definition at line 278 of file G4AdjointPosOnPhysVolGenerator.cc.

281{
282 G4double minX,maxX,minY,maxY,minZ,maxZ;
283
284 // values needed for CalculateExtent signature
285
286 G4VoxelLimits limit; // Unlimited
287 G4AffineTransform origin;
288
289 // min max extents of pSolid along X,Y,Z
290
291 aSolid->CalculateExtent(kXAxis,limit,origin,minX,maxX);
292 aSolid->CalculateExtent(kYAxis,limit,origin,minY,maxY);
293 aSolid->CalculateExtent(kZAxis,limit,origin,minZ,maxZ);
294
295 G4ThreeVector center = G4ThreeVector((minX+maxX)/2.,
296 (minY+maxY)/2.,
297 (minZ+maxZ)/2.);
298 G4double dX=(maxX-minX)/2.;
299 G4double dY=(maxY-minY)/2.;
300 G4double dZ=(maxZ-minZ)/2.;
301 G4double scale=1.01;
302 G4double r=scale*std::sqrt(dX*dX+dY*dY+dZ*dZ);
303
304 G4double cos_th2 = G4UniformRand();
305 G4double theta = std::acos(std::sqrt(cos_th2));
307 direction.setRThetaPhi(1.,theta,phi);
308 direction=-direction;
309 G4double cos_th = (1.-2.*G4UniformRand());
310 theta = std::acos(cos_th);
311 if (G4UniformRand() < 0.5) { theta=CLHEP::pi-theta; }
313 p.setRThetaPhi(r,theta,phi);
314 p+=center;
315 direction.rotateY(theta);
316 direction.rotateZ(phi);
317 return 4.*CLHEP::pi*r*r;;
318}
Hep3Vector & rotateY(double)
Definition: ThreeVector.cc:97
Hep3Vector & rotateZ(double)
Definition: ThreeVector.cc:107
void setRThetaPhi(double r, double theta, double phi)
static constexpr double pi
Definition: SystemOfUnits.h:55

References G4VSolid::CalculateExtent(), G4UniformRand, kXAxis, kYAxis, kZAxis, maxZ, CLHEP::pi, CLHEP::Hep3Vector::rotateY(), CLHEP::Hep3Vector::rotateZ(), CLHEP::Hep3Vector::setRThetaPhi(), and CLHEP::twopi.

Referenced by ComputeAreaOfExtSurface(), ComputeAreaOfExtSurfaceStartingFromSphere(), GenerateAPositionOnASolidBoundary(), and GenerateAPositionOnTheExtSurfaceOfASolid().

◆ GenerateAPositionOnTheExtSurfaceOfASolid()

void G4AdjointPosOnPhysVolGenerator::GenerateAPositionOnTheExtSurfaceOfASolid ( G4VSolid aSolid,
G4ThreeVector p,
G4ThreeVector direction 
)

Definition at line 183 of file G4AdjointPosOnPhysVolGenerator.cc.

186{
187 if (ModelOfSurfaceSource == "OnSolid")
188 {
189 GenerateAPositionOnASolidBoundary(aSolid, p,direction);
190 return;
191 }
192 if (ModelOfSurfaceSource == "ExternalSphere")
193 {
194 GenerateAPositionOnASphereBoundary(aSolid, p, direction);
195 return;
196 }
197 GenerateAPositionOnABoxBoundary(aSolid, p, direction);
198 return;
199}
void GenerateAPositionOnASolidBoundary(G4VSolid *aSolid, G4ThreeVector &p, G4ThreeVector &direction)

References GenerateAPositionOnABoxBoundary(), GenerateAPositionOnASolidBoundary(), GenerateAPositionOnASphereBoundary(), and ModelOfSurfaceSource.

Referenced by GenerateAPositionOnTheExtSurfaceOfTheSolid().

◆ GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume() [1/2]

void G4AdjointPosOnPhysVolGenerator::GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume ( G4ThreeVector p,
G4ThreeVector direction 
)

Definition at line 435 of file G4AdjointPosOnPhysVolGenerator.cc.

438{
439 if (thePhysicalVolume == nullptr)
440 {
441 G4cout << "Before generating a source on an external surface" << G4endl
442 << "of volume you should select a physical volume" << G4endl;
443 return;
444 }
448}
void GenerateAPositionOnTheExtSurfaceOfTheSolid(G4ThreeVector &p, G4ThreeVector &direction)
G4ThreeVector TransformPoint(const G4ThreeVector &vec) const
G4ThreeVector TransformAxis(const G4ThreeVector &axis) const

References G4cout, G4endl, GenerateAPositionOnTheExtSurfaceOfTheSolid(), thePhysicalVolume, theTransformationFromPhysVolToWorld, G4AffineTransform::TransformAxis(), and G4AffineTransform::TransformPoint().

Referenced by G4AdjointPrimaryGenerator::GenerateAdjointPrimaryVertex(), GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume(), and G4AdjointPrimaryGenerator::GenerateFwdPrimaryVertex().

◆ GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume() [2/2]

void G4AdjointPosOnPhysVolGenerator::GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume ( G4ThreeVector p,
G4ThreeVector direction,
G4double costh_to_normal 
)

Definition at line 452 of file G4AdjointPosOnPhysVolGenerator.cc.

456{
458 costh_to_normal = CosThDirComparedToNormal;
459}
void GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume(G4ThreeVector &p, G4ThreeVector &direction)

References CosThDirComparedToNormal, and GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume().

◆ GenerateAPositionOnTheExtSurfaceOfTheSolid()

void G4AdjointPosOnPhysVolGenerator::GenerateAPositionOnTheExtSurfaceOfTheSolid ( G4ThreeVector p,
G4ThreeVector direction 
)

Definition at line 203 of file G4AdjointPosOnPhysVolGenerator.cc.

206{
208}
void GenerateAPositionOnTheExtSurfaceOfASolid(G4VSolid *aSolid, G4ThreeVector &p, G4ThreeVector &direction)

References GenerateAPositionOnTheExtSurfaceOfASolid(), and theSolid.

Referenced by GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume().

◆ GetAreaOfExtSurfaceOfThePhysicalVolume()

G4double G4AdjointPosOnPhysVolGenerator::GetAreaOfExtSurfaceOfThePhysicalVolume ( )
inline

◆ GetCosThDirComparedToNormal()

G4double G4AdjointPosOnPhysVolGenerator::GetCosThDirComparedToNormal ( )
inline

Definition at line 90 of file G4AdjointPosOnPhysVolGenerator.hh.

91 { return CosThDirComparedToNormal; }

References CosThDirComparedToNormal.

◆ GetInstance()

G4AdjointPosOnPhysVolGenerator * G4AdjointPosOnPhysVolGenerator::GetInstance ( )
static

Definition at line 47 of file G4AdjointPosOnPhysVolGenerator.cc.

48{
49 if(theInstance == nullptr)
50 {
52 }
53 return theInstance;
54}
static G4ThreadLocal G4AdjointPosOnPhysVolGenerator * theInstance

References G4AdjointPosOnPhysVolGenerator(), and theInstance.

Referenced by G4AdjointPrimaryGenerator::G4AdjointPrimaryGenerator().

◆ SetSolid()

void G4AdjointPosOnPhysVolGenerator::SetSolid ( G4VSolid aSolid)
inline

Definition at line 86 of file G4AdjointPosOnPhysVolGenerator.hh.

87 { theSolid=aSolid; }

References theSolid.

Field Documentation

◆ AreaOfExtSurfaceOfThePhysicalVolume

G4double G4AdjointPosOnPhysVolGenerator::AreaOfExtSurfaceOfThePhysicalVolume
private

◆ CosThDirComparedToNormal

G4double G4AdjointPosOnPhysVolGenerator::CosThDirComparedToNormal
private

◆ ModelOfSurfaceSource

G4String G4AdjointPosOnPhysVolGenerator::ModelOfSurfaceSource
private

◆ theInstance

G4ThreadLocal G4AdjointPosOnPhysVolGenerator * G4AdjointPosOnPhysVolGenerator::theInstance = nullptr
staticprivate

Definition at line 118 of file G4AdjointPosOnPhysVolGenerator.hh.

Referenced by GetInstance().

◆ thePhysicalVolume

G4VPhysicalVolume* G4AdjointPosOnPhysVolGenerator::thePhysicalVolume = nullptr
private

◆ theSolid

G4VSolid* G4AdjointPosOnPhysVolGenerator::theSolid = nullptr
private

◆ theTransformationFromPhysVolToWorld

G4AffineTransform G4AdjointPosOnPhysVolGenerator::theTransformationFromPhysVolToWorld
private

◆ UseSphere

G4bool G4AdjointPosOnPhysVolGenerator::UseSphere
private

The documentation for this class was generated from the following files: