Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4AdjointPosOnPhysVolGenerator Class Reference

#include <G4AdjointPosOnPhysVolGenerator.hh>

Public Member Functions

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

Static Public Member Functions

static
G4AdjointPosOnPhysVolGenerator
GetInstance ()
 

Detailed Description

Definition at line 62 of file G4AdjointPosOnPhysVolGenerator.hh.

Member Function Documentation

G4double G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurface ( )

Definition at line 109 of file G4AdjointPosOnPhysVolGenerator.cc.

110 {
111  return ComputeAreaOfExtSurface(theSolid);
112 }

Here is the caller graph for this function:

G4double G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurface ( G4int  NStat)

Definition at line 115 of file G4AdjointPosOnPhysVolGenerator.cc.

116 {
117  return ComputeAreaOfExtSurface(theSolid,NStats);
118 }

Here is the call graph for this function:

G4double G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurface ( G4double  epsilon)

Definition at line 121 of file G4AdjointPosOnPhysVolGenerator.cc.

122 {
123  return ComputeAreaOfExtSurface(theSolid,eps);
124 }
static const G4double eps

Here is the call graph for this function:

G4double G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurface ( G4VSolid aSolid)

Definition at line 127 of file G4AdjointPosOnPhysVolGenerator.cc.

128 {
129  return ComputeAreaOfExtSurface(aSolid,1.e-3);
130 }

Here is the call graph for this function:

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

Definition at line 133 of file G4AdjointPosOnPhysVolGenerator.cc.

134 {
135  if (ModelOfSurfaceSource == "OnSolid" ){
136  if (UseSphere){
137  return ComputeAreaOfExtSurfaceStartingFromSphere(aSolid,NStats);
138  }
139  else {
140  return ComputeAreaOfExtSurfaceStartingFromBox(aSolid,NStats);
141  }
142  }
143  else {
144  G4ThreeVector p,dir;
145  if (ModelOfSurfaceSource == "ExternalSphere" ) return GenerateAPositionOnASphereBoundary(aSolid, p,dir);
146  return GenerateAPositionOnABoxBoundary(aSolid, p,dir);
147  }
148 }
const char * p
Definition: xmltok.h:285
G4double G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurface ( G4VSolid aSolid,
G4double  epsilon 
)

Definition at line 151 of file G4AdjointPosOnPhysVolGenerator.cc.

152 {
153  G4int Nstats = G4int(1./(eps*eps));
154  return ComputeAreaOfExtSurface(aSolid,Nstats);
155 }
static const G4double eps
int G4int
Definition: G4Types.hh:78

Here is the call graph for this function:

G4VPhysicalVolume * G4AdjointPosOnPhysVolGenerator::DefinePhysicalVolume ( const G4String aName)

Definition at line 75 of file G4AdjointPosOnPhysVolGenerator.cc.

76 {
77  thePhysicalVolume = 0;
78  theSolid =0;
80  for ( unsigned int i=0; i< thePhysVolStore->size();i++){
81  G4String vol_name =(*thePhysVolStore)[i]->GetName();
82  if (vol_name == ""){
83  vol_name = (*thePhysVolStore)[i]->GetLogicalVolume()->GetName();
84  }
85  if (vol_name == aName){
86  thePhysicalVolume = (*thePhysVolStore)[i];
87  }
88  }
89  if (thePhysicalVolume){
90  theSolid = thePhysicalVolume->GetLogicalVolume()->GetSolid();
91  ComputeTransformationFromPhysVolToWorld();
92  /*AreaOfExtSurfaceOfThePhysicalVolume=ComputeAreaOfExtSurface(1.e-3);
93  G4cout<<"Monte Carlo Estimate of the area of the external surface :"<<AreaOfExtSurfaceOfThePhysicalVolume/m/m<<" m2"<<std::endl;*/
94  }
95  else {
96  G4cout<<"The physical volume with name "<<aName<<" does not exist!!"<<std::endl;
97  G4cout<<"Before generating a source on an external surface of a volume you should select another physical volume"<<std::endl;
98  }
99  return thePhysicalVolume;
100 }
G4VSolid * GetSolid() const
static G4PhysicalVolumeStore * GetInstance()
G4GLOB_DLL std::ostream G4cout
G4LogicalVolume * GetLogicalVolume() const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4AdjointPosOnPhysVolGenerator::DefinePhysicalVolume1 ( const G4String aName)

Definition at line 103 of file G4AdjointPosOnPhysVolGenerator.cc.

104 {
105  thePhysicalVolume = DefinePhysicalVolume(aName);
106 }
G4VPhysicalVolume * DefinePhysicalVolume(const G4String &aName)

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 157 of file G4AdjointPosOnPhysVolGenerator.cc.

158 {
159  if (ModelOfSurfaceSource == "OnSolid" ){
160  GenerateAPositionOnASolidBoundary(aSolid, p,direction);
161  return;
162  }
163  if (ModelOfSurfaceSource == "ExternalSphere" ) {
164  GenerateAPositionOnASphereBoundary(aSolid, p, direction);
165  return;
166  }
167  GenerateAPositionOnABoxBoundary(aSolid, p, direction);
168  return;
169 }

Here is the caller graph for this function:

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

Definition at line 370 of file G4AdjointPosOnPhysVolGenerator.cc.

371 {
372  if (!thePhysicalVolume) {
373  G4cout<<"Before generating a source on an external surface of volume you should select a physical volume"<<std::endl;
374  return;
375  };
377  p = theTransformationFromPhysVolToWorld.TransformPoint(p);
378  direction = theTransformationFromPhysVolToWorld.TransformAxis(direction);
379 }
void GenerateAPositionOnTheExtSurfaceOfTheSolid(G4ThreeVector &p, G4ThreeVector &direction)
G4GLOB_DLL std::ostream G4cout
G4ThreeVector TransformPoint(const G4ThreeVector &vec) const
G4ThreeVector TransformAxis(const G4ThreeVector &axis) const

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 382 of file G4AdjointPosOnPhysVolGenerator.cc.

384 {
386  costh_to_normal = CosThDirComparedToNormal;
387 }
void GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume(G4ThreeVector &p, G4ThreeVector &direction)

Here is the call graph for this function:

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

Definition at line 171 of file G4AdjointPosOnPhysVolGenerator.cc.

172 {
173  GenerateAPositionOnTheExtSurfaceOfASolid(theSolid,p,direction);
174 }
void GenerateAPositionOnTheExtSurfaceOfASolid(G4VSolid *aSolid, G4ThreeVector &p, G4ThreeVector &direction)

Here is the call graph for this function:

Here is the caller graph for this function:

G4double G4AdjointPosOnPhysVolGenerator::GetAreaOfExtSurfaceOfThePhysicalVolume ( )
inline

Definition at line 93 of file G4AdjointPosOnPhysVolGenerator.hh.

93 {return AreaOfExtSurfaceOfThePhysicalVolume;}
G4double G4AdjointPosOnPhysVolGenerator::GetCosThDirComparedToNormal ( )
inline

Definition at line 94 of file G4AdjointPosOnPhysVolGenerator.hh.

94 {return CosThDirComparedToNormal;}
G4AdjointPosOnPhysVolGenerator * G4AdjointPosOnPhysVolGenerator::GetInstance ( void  )
static

Definition at line 49 of file G4AdjointPosOnPhysVolGenerator.cc.

50 {
51  if(!theInstance)
52  {
53  theInstance = new G4AdjointPosOnPhysVolGenerator;
54  }
55  return theInstance;
56 }

Here is the caller graph for this function:

void G4AdjointPosOnPhysVolGenerator::SetSolid ( G4VSolid aSolid)
inline

Definition at line 92 of file G4AdjointPosOnPhysVolGenerator.hh.

92 {theSolid=aSolid;}

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