#include <G4AdjointCrossSurfChecker.hh>
|
G4bool | CrossingASphere (const G4Step *aStep, G4double sphere_radius, G4ThreeVector sphere_center, G4ThreeVector &crossing_pos, G4double &cos_to_surface, G4bool &GoingIn) |
|
G4bool | GoingInOrOutOfaVolume (const G4Step *aStep, const G4String &volume_name, G4double &cos_to_surface, G4bool &GoingIn) |
|
G4bool | GoingInOrOutOfaVolumeByExtSurface (const G4Step *aStep, const G4String &volume_name, const G4String &mother_log_vol_name, G4double &cos_to_surface, G4bool &GoingIn) |
|
G4bool | CrossingAGivenRegisteredSurface (const G4Step *aStep, const G4String &surface_name, G4ThreeVector &crossing_pos, G4double &cos_to_surface, G4bool &GoingIn) |
|
G4bool | CrossingAGivenRegisteredSurface (const G4Step *aStep, int ind, G4ThreeVector &crossing_pos, G4double &cos_to_surface, G4bool &GoingIn) |
|
G4bool | CrossingOneOfTheRegisteredSurface (const G4Step *aStep, G4String &surface_name, G4ThreeVector &crossing_pos, G4double &cos_to_surface, G4bool &GoingIn) |
|
G4bool | CrossingAnInterfaceBetweenTwoVolumes (const G4Step *aStep, const G4String &vol1_name, const G4String &vol2_name, G4ThreeVector &crossing_pos, G4double &cos_to_surface, G4bool &GoingIn) |
|
G4bool | AddaSphericalSurface (const G4String &SurfaceName, G4double radius, G4ThreeVector pos, G4double &area) |
|
G4bool | AddaSphericalSurfaceWithCenterAtTheCenterOfAVolume (const G4String &SurfaceName, G4double radius, const G4String &volume_name, G4ThreeVector ¢er, G4double &area) |
|
G4bool | AddanExtSurfaceOfAvolume (const G4String &SurfaceName, const G4String &volume_name, G4double &area) |
|
G4bool | AddanInterfaceBetweenTwoVolumes (const G4String &SurfaceName, const G4String &volume_name1, const G4String &volume_name2, G4double &area) |
|
void | ClearListOfSelectedSurface () |
|
◆ G4AdjointCrossSurfChecker()
G4AdjointCrossSurfChecker::G4AdjointCrossSurfChecker |
( |
| ) |
|
|
private |
◆ ~G4AdjointCrossSurfChecker()
G4AdjointCrossSurfChecker::~G4AdjointCrossSurfChecker |
( |
| ) |
|
|
private |
◆ AddanExtSurfaceOfAvolume()
Definition at line 316 of file G4AdjointCrossSurfChecker.cc.
322 for (
unsigned int i=0; i< thePhysVolStore->size();i++){
323 if ((*thePhysVolStore)[i]->GetName() == volume_name){
324 thePhysicalVolume = (*thePhysVolStore)[i];
328 if (!thePhysicalVolume){
329 G4cout<<
"The physical volume with name "<<volume_name<<
" does not exist!!"<<std::endl;
336 if (theMother) mother_vol_name= theMother->
GetName();
std::vector< G4String > ListOfSurfaceName
CLHEP::Hep3Vector G4ThreeVector
std::vector< G4double > ListOfSphereRadius
std::vector< G4String > ListOfSurfaceType
std::vector< G4String > ListOfVol2Name
static G4PhysicalVolumeStore * GetInstance()
std::vector< G4ThreeVector > ListOfSphereCenter
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
std::vector< G4String > ListOfVol1Name
G4int FindRegisteredSurface(const G4String &name)
G4LogicalVolume * GetMotherLogical() const
G4LogicalVolume * GetLogicalVolume() const
std::vector< G4double > AreaOfSurface
virtual G4double GetSurfaceArea()
G4VSolid * GetSolid() const
◆ AddanInterfaceBetweenTwoVolumes()
Definition at line 358 of file G4AdjointCrossSurfChecker.cc.
std::vector< G4String > ListOfSurfaceName
CLHEP::Hep3Vector G4ThreeVector
std::vector< G4double > ListOfSphereRadius
std::vector< G4String > ListOfSurfaceType
std::vector< G4String > ListOfVol2Name
std::vector< G4ThreeVector > ListOfSphereCenter
std::vector< G4String > ListOfVol1Name
G4int FindRegisteredSurface(const G4String &name)
std::vector< G4double > AreaOfSurface
◆ AddaSphericalSurface()
Definition at line 247 of file G4AdjointCrossSurfChecker.cc.
std::vector< G4String > ListOfSurfaceName
std::vector< G4double > ListOfSphereRadius
std::vector< G4String > ListOfSurfaceType
std::vector< G4String > ListOfVol2Name
std::vector< G4ThreeVector > ListOfSphereCenter
std::vector< G4String > ListOfVol1Name
G4int FindRegisteredSurface(const G4String &name)
std::vector< G4double > AreaOfSurface
static const G4double pos
◆ AddaSphericalSurfaceWithCenterAtTheCenterOfAVolume()
Definition at line 272 of file G4AdjointCrossSurfChecker.cc.
277 for (
unsigned int i=0; i< thePhysVolStore->size();i++){
278 if ((*thePhysVolStore)[i]->GetName() == volume_name){
279 thePhysicalVolume = (*thePhysVolStore)[i];
283 if (thePhysicalVolume){
288 theTransformationFromPhysVolToWorld *=
294 for (
unsigned int i=0; i< thePhysVolStore->size();i++){
295 if ((*thePhysVolStore)[i]->GetLogicalVolume() == mother){
296 daughter = (*thePhysVolStore)[i];
304 G4cout<<
"Center of the spherical surface is at the position: "<<center/
cm<<
" cm"<<std::endl;
308 G4cout<<
"The physical volume with name "<<volume_name<<
" does not exist!!"<<std::endl;
const G4RotationMatrix * GetFrameRotation() const
G4bool AddaSphericalSurface(const G4String &SurfaceName, G4double radius, G4ThreeVector pos, G4double &area)
static G4PhysicalVolumeStore * GetInstance()
G4GLOB_DLL std::ostream G4cout
G4ThreeVector GetObjectTranslation() const
G4LogicalVolume * GetMotherLogical() const
◆ ClearListOfSelectedSurface()
void G4AdjointCrossSurfChecker::ClearListOfSelectedSurface |
( |
| ) |
|
Definition at line 384 of file G4AdjointCrossSurfChecker.cc.
std::vector< G4String > ListOfSurfaceName
std::vector< G4double > ListOfSphereRadius
std::vector< G4String > ListOfSurfaceType
std::vector< G4String > ListOfVol2Name
std::vector< G4ThreeVector > ListOfSphereCenter
std::vector< G4String > ListOfVol1Name
◆ CrossingAGivenRegisteredSurface() [1/2]
Definition at line 164 of file G4AdjointCrossSurfChecker.cc.
G4int FindRegisteredSurface(const G4String &name)
G4bool CrossingAGivenRegisteredSurface(const G4Step *aStep, const G4String &surface_name, G4ThreeVector &crossing_pos, G4double &cos_to_surface, G4bool &GoingIn)
◆ CrossingAGivenRegisteredSurface() [2/2]
G4bool G4AdjointCrossSurfChecker::CrossingAGivenRegisteredSurface |
( |
const G4Step * |
aStep, |
|
|
int |
ind, |
|
|
G4ThreeVector & |
crossing_pos, |
|
|
G4double & |
cos_to_surface, |
|
|
G4bool & |
GoingIn |
|
) |
| |
Definition at line 175 of file G4AdjointCrossSurfChecker.cc.
184 if (surf_type ==
"Sphere"){
185 did_cross =
CrossingASphere(aStep, radius, center,crossing_pos, cos_to_surface, GoingIn);
187 else if (surf_type ==
"ExternalSurfaceOfAVolume"){
190 crossing_pos= aStep->GetPostStepPoint()->GetPosition();
193 else if (surf_type ==
"BoundaryBetweenTwoVolumes"){
G4bool GoingInOrOutOfaVolumeByExtSurface(const G4Step *aStep, const G4String &volume_name, const G4String &mother_log_vol_name, G4double &cos_to_surface, G4bool &GoingIn)
std::vector< G4double > ListOfSphereRadius
std::vector< G4String > ListOfSurfaceType
std::vector< G4String > ListOfVol2Name
std::vector< G4ThreeVector > ListOfSphereCenter
G4bool CrossingASphere(const G4Step *aStep, G4double sphere_radius, G4ThreeVector sphere_center, G4ThreeVector &crossing_pos, G4double &cos_to_surface, G4bool &GoingIn)
std::vector< G4String > ListOfVol1Name
G4bool CrossingAnInterfaceBetweenTwoVolumes(const G4Step *aStep, const G4String &vol1_name, const G4String &vol2_name, G4ThreeVector &crossing_pos, G4double &cos_to_surface, G4bool &GoingIn)
◆ CrossingAnInterfaceBetweenTwoVolumes()
Definition at line 215 of file G4AdjointCrossSurfChecker.cc.
217 G4bool step_at_boundary = (aStep->GetPostStepPoint()->GetStepStatus() == fGeomBoundary);
219 if (step_at_boundary){
220 const G4VTouchable* postStepTouchable = aStep->GetPostStepPoint()->GetTouchable();
221 const G4VTouchable* preStepTouchable = aStep->GetPreStepPoint()->GetTouchable();
222 if (preStepTouchable && postStepTouchable){
230 if ( pre_vol_name == vol1_name && post_vol_name == vol2_name){
234 else if (pre_vol_name == vol2_name && post_vol_name == vol1_name){
const G4String & GetName() const
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
const G4String & GetName() const
G4LogicalVolume * GetLogicalVolume() const
◆ CrossingASphere()
Definition at line 69 of file G4AdjointCrossSurfChecker.cc.
71 G4ThreeVector pos1= aStep->GetPreStepPoint()->GetPosition() - sphere_center;
72 G4ThreeVector pos2= aStep->GetPostStepPoint()->GetPosition() - sphere_center;
77 if (r1<=sphere_radius && r2>sphere_radius){
81 else if (r2<=sphere_radius && r1>sphere_radius){
94 c = r12-sphere_radius*sphere_radius;
95 d=std::sqrt(b*b-4.*a*c);
97 if (l > 1.) l=(-b-
d)/2./a;
98 crossing_pos=pos1+l*dr;
99 cos_th = std::abs(dr.cosTheta(crossing_pos));
◆ CrossingOneOfTheRegisteredSurface()
Definition at line 203 of file G4AdjointCrossSurfChecker.cc.
std::vector< G4String > ListOfSurfaceName
G4bool CrossingAGivenRegisteredSurface(const G4Step *aStep, const G4String &surface_name, G4ThreeVector &crossing_pos, G4double &cos_to_surface, G4bool &GoingIn)
◆ FindRegisteredSurface()
G4int G4AdjointCrossSurfChecker::FindRegisteredSurface |
( |
const G4String & |
name | ) |
|
|
private |
◆ GetInstance()
◆ GoingInOrOutOfaVolume()
G4bool G4AdjointCrossSurfChecker::GoingInOrOutOfaVolume |
( |
const G4Step * |
aStep, |
|
|
const G4String & |
volume_name, |
|
|
G4double & |
cos_to_surface, |
|
|
G4bool & |
GoingIn |
|
) |
| |
Definition at line 107 of file G4AdjointCrossSurfChecker.cc.
109 G4bool step_at_boundary = (aStep->GetPostStepPoint()->GetStepStatus() == fGeomBoundary);
111 if (step_at_boundary){
112 const G4VTouchable* postStepTouchable = aStep->GetPostStepPoint()->GetTouchable();
113 const G4VTouchable* preStepTouchable = aStep->GetPreStepPoint()->GetTouchable();
114 if (preStepTouchable && postStepTouchable && postStepTouchable->
GetVolume() && preStepTouchable->
GetVolume()){
118 if (post_vol_name == volume_name ){
122 else if (pre_vol_name == volume_name){
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
const G4String & GetName() const
◆ GoingInOrOutOfaVolumeByExtSurface()
G4bool G4AdjointCrossSurfChecker::GoingInOrOutOfaVolumeByExtSurface |
( |
const G4Step * |
aStep, |
|
|
const G4String & |
volume_name, |
|
|
const G4String & |
mother_log_vol_name, |
|
|
G4double & |
cos_to_surface, |
|
|
G4bool & |
GoingIn |
|
) |
| |
Definition at line 135 of file G4AdjointCrossSurfChecker.cc.
137 G4bool step_at_boundary = (aStep->GetPostStepPoint()->GetStepStatus() == fGeomBoundary);
139 if (step_at_boundary){
140 const G4VTouchable* postStepTouchable = aStep->GetPostStepPoint()->GetTouchable();
141 const G4VTouchable* preStepTouchable = aStep->GetPreStepPoint()->GetTouchable();
142 if (preStepTouchable && postStepTouchable && postStepTouchable->
GetVolume() && preStepTouchable->
GetVolume()){
147 if (post_vol_name == volume_name && pre_log_vol_name == mother_logical_vol_name){
151 else if (pre_vol_name == volume_name && post_log_vol_name == mother_logical_vol_name ){
const G4String & GetName() const
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
const G4String & GetName() const
G4LogicalVolume * GetLogicalVolume() const
◆ AreaOfSurface
std::vector<G4double> G4AdjointCrossSurfChecker::AreaOfSurface |
|
private |
◆ instance
◆ ListOfSphereCenter
std::vector<G4ThreeVector> G4AdjointCrossSurfChecker::ListOfSphereCenter |
|
private |
◆ ListOfSphereRadius
std::vector<G4double> G4AdjointCrossSurfChecker::ListOfSphereRadius |
|
private |
◆ ListOfSurfaceName
std::vector<G4String> G4AdjointCrossSurfChecker::ListOfSurfaceName |
|
private |
◆ ListOfSurfaceType
std::vector<G4String> G4AdjointCrossSurfChecker::ListOfSurfaceType |
|
private |
◆ ListOfVol1Name
std::vector<G4String> G4AdjointCrossSurfChecker::ListOfVol1Name |
|
private |
◆ ListOfVol2Name
std::vector<G4String> G4AdjointCrossSurfChecker::ListOfVol2Name |
|
private |
The documentation for this class was generated from the following files: