#include <G4AdjointPosOnPhysVolGenerator.hh>
Definition at line 62 of file G4AdjointPosOnPhysVolGenerator.hh.
G4double G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurface | ( | G4VSolid * | aSolid, | |
G4double | epsilon | |||
) |
Definition at line 151 of file G4AdjointPosOnPhysVolGenerator.cc.
References ComputeAreaOfExtSurface().
00152 { 00153 G4int Nstats = G4int(1./(eps*eps)); 00154 return ComputeAreaOfExtSurface(aSolid,Nstats); 00155 }
Definition at line 133 of file G4AdjointPosOnPhysVolGenerator.cc.
00134 { 00135 if (ModelOfSurfaceSource == "OnSolid" ){ 00136 if (UseSphere){ 00137 return ComputeAreaOfExtSurfaceStartingFromSphere(aSolid,NStats); 00138 } 00139 else { 00140 return ComputeAreaOfExtSurfaceStartingFromBox(aSolid,NStats); 00141 } 00142 } 00143 else { 00144 G4ThreeVector p,dir; 00145 if (ModelOfSurfaceSource == "ExternalSphere" ) return GenerateAPositionOnASphereBoundary(aSolid, p,dir); 00146 return GenerateAPositionOnABoxBoundary(aSolid, p,dir); 00147 } 00148 }
Definition at line 127 of file G4AdjointPosOnPhysVolGenerator.cc.
References ComputeAreaOfExtSurface().
00128 { 00129 return ComputeAreaOfExtSurface(aSolid,1.e-3); 00130 }
Definition at line 121 of file G4AdjointPosOnPhysVolGenerator.cc.
References ComputeAreaOfExtSurface().
00122 { 00123 return ComputeAreaOfExtSurface(theSolid,eps); 00124 }
Definition at line 115 of file G4AdjointPosOnPhysVolGenerator.cc.
References ComputeAreaOfExtSurface().
00116 { 00117 return ComputeAreaOfExtSurface(theSolid,NStats); 00118 }
G4double G4AdjointPosOnPhysVolGenerator::ComputeAreaOfExtSurface | ( | ) |
Definition at line 109 of file G4AdjointPosOnPhysVolGenerator.cc.
Referenced by ComputeAreaOfExtSurface().
00110 { 00111 return ComputeAreaOfExtSurface(theSolid); 00112 }
G4VPhysicalVolume * G4AdjointPosOnPhysVolGenerator::DefinePhysicalVolume | ( | const G4String & | aName | ) |
Definition at line 75 of file G4AdjointPosOnPhysVolGenerator.cc.
References G4cout, G4PhysicalVolumeStore::GetInstance(), G4VPhysicalVolume::GetLogicalVolume(), and G4LogicalVolume::GetSolid().
Referenced by DefinePhysicalVolume1().
00076 { 00077 thePhysicalVolume = 0; 00078 theSolid =0; 00079 G4PhysicalVolumeStore* thePhysVolStore =G4PhysicalVolumeStore::GetInstance(); 00080 for ( unsigned int i=0; i< thePhysVolStore->size();i++){ 00081 G4String vol_name =(*thePhysVolStore)[i]->GetName(); 00082 if (vol_name == ""){ 00083 vol_name = (*thePhysVolStore)[i]->GetLogicalVolume()->GetName(); 00084 } 00085 if (vol_name == aName){ 00086 thePhysicalVolume = (*thePhysVolStore)[i]; 00087 } 00088 } 00089 if (thePhysicalVolume){ 00090 theSolid = thePhysicalVolume->GetLogicalVolume()->GetSolid(); 00091 ComputeTransformationFromPhysVolToWorld(); 00092 /*AreaOfExtSurfaceOfThePhysicalVolume=ComputeAreaOfExtSurface(1.e-3); 00093 G4cout<<"Monte Carlo Estimate of the area of the external surface :"<<AreaOfExtSurfaceOfThePhysicalVolume/m/m<<" m2"<<std::endl;*/ 00094 } 00095 else { 00096 G4cout<<"The physical volume with name "<<aName<<" does not exist!!"<<std::endl; 00097 G4cout<<"Before generating a source on an external surface of a volume you should select another physical volume"<<std::endl; 00098 } 00099 return thePhysicalVolume; 00100 }
void G4AdjointPosOnPhysVolGenerator::DefinePhysicalVolume1 | ( | const G4String & | aName | ) |
Definition at line 103 of file G4AdjointPosOnPhysVolGenerator.cc.
References DefinePhysicalVolume().
Referenced by G4AdjointPrimaryGenerator::SetAdjointPrimarySourceOnAnExtSurfaceOfAVolume().
00104 { 00105 thePhysicalVolume = DefinePhysicalVolume(aName); 00106 }
void G4AdjointPosOnPhysVolGenerator::GenerateAPositionOnTheExtSurfaceOfASolid | ( | G4VSolid * | aSolid, | |
G4ThreeVector & | p, | |||
G4ThreeVector & | direction | |||
) |
Definition at line 157 of file G4AdjointPosOnPhysVolGenerator.cc.
Referenced by GenerateAPositionOnTheExtSurfaceOfTheSolid().
00158 { 00159 if (ModelOfSurfaceSource == "OnSolid" ){ 00160 GenerateAPositionOnASolidBoundary(aSolid, p,direction); 00161 return; 00162 } 00163 if (ModelOfSurfaceSource == "ExternalSphere" ) { 00164 GenerateAPositionOnASphereBoundary(aSolid, p, direction); 00165 return; 00166 } 00167 GenerateAPositionOnABoxBoundary(aSolid, p, direction); 00168 return; 00169 }
void G4AdjointPosOnPhysVolGenerator::GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume | ( | G4ThreeVector & | p, | |
G4ThreeVector & | direction, | |||
G4double & | costh_to_normal | |||
) |
Definition at line 384 of file G4AdjointPosOnPhysVolGenerator.cc.
References GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume().
00386 { 00387 GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume(p, direction); 00388 costh_to_normal = CosThDirComparedToNormal; 00389 }
void G4AdjointPosOnPhysVolGenerator::GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume | ( | G4ThreeVector & | p, | |
G4ThreeVector & | direction | |||
) |
Definition at line 372 of file G4AdjointPosOnPhysVolGenerator.cc.
References G4cout, GenerateAPositionOnTheExtSurfaceOfTheSolid(), G4AffineTransform::TransformAxis(), and G4AffineTransform::TransformPoint().
Referenced by G4AdjointPrimaryGenerator::GenerateAdjointPrimaryVertex(), and GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume().
00373 { 00374 if (!thePhysicalVolume) { 00375 G4cout<<"Before generating a source on an external surface of volume you should select a physical volume"<<std::endl; 00376 return; 00377 }; 00378 GenerateAPositionOnTheExtSurfaceOfTheSolid(p,direction); 00379 p = theTransformationFromPhysVolToWorld.TransformPoint(p); 00380 direction = theTransformationFromPhysVolToWorld.TransformAxis(direction); 00381 }
void G4AdjointPosOnPhysVolGenerator::GenerateAPositionOnTheExtSurfaceOfTheSolid | ( | G4ThreeVector & | p, | |
G4ThreeVector & | direction | |||
) |
Definition at line 171 of file G4AdjointPosOnPhysVolGenerator.cc.
References GenerateAPositionOnTheExtSurfaceOfASolid().
Referenced by GenerateAPositionOnTheExtSurfaceOfThePhysicalVolume().
00172 { 00173 GenerateAPositionOnTheExtSurfaceOfASolid(theSolid,p,direction); 00174 }
G4double G4AdjointPosOnPhysVolGenerator::GetAreaOfExtSurfaceOfThePhysicalVolume | ( | ) | [inline] |
G4double G4AdjointPosOnPhysVolGenerator::GetCosThDirComparedToNormal | ( | ) | [inline] |
G4AdjointPosOnPhysVolGenerator * G4AdjointPosOnPhysVolGenerator::GetInstance | ( | ) | [static] |
Definition at line 49 of file G4AdjointPosOnPhysVolGenerator.cc.
Referenced by G4AdjointPrimaryGenerator::G4AdjointPrimaryGenerator().
00050 { 00051 if(theInstance == 0) { 00052 static G4AdjointPosOnPhysVolGenerator manager; 00053 theInstance = &manager; 00054 } 00055 return theInstance; 00056 }
void G4AdjointPosOnPhysVolGenerator::SetSolid | ( | G4VSolid * | aSolid | ) | [inline] |