Skip to content
Snippets Groups Projects
Commit 134fc666 authored by Andrei Gheata's avatar Andrei Gheata
Browse files

Important fix for composite shapes for a bug affecting ComputeNormal when a...

Important fix for composite shapes for a bug affecting ComputeNormal when a call to FindNode or Safety is issued after FindNextBoundary. Affected the transport of optical photons with the G4 interface


git-svn-id: http://root.cern.ch/svn/root/trunk@45983 27541ba8-7e3a-0410-8455-c3a389f83636
parent 3c163ae9
No related branches found
No related tags found
No related merge requests found
...@@ -443,7 +443,7 @@ void TGeoUnion::ComputeBBox(Double_t &dx, Double_t &dy, Double_t &dz, Double_t * ...@@ -443,7 +443,7 @@ void TGeoUnion::ComputeBBox(Double_t &dx, Double_t &dy, Double_t &dz, Double_t *
origin[1] = 0.5*(ymin+ymax); origin[1] = 0.5*(ymin+ymax);
dz = 0.5*(zmax-zmin); dz = 0.5*(zmax-zmin);
origin[2] = 0.5*(zmin+zmax); origin[2] = 0.5*(zmin+zmax);
} }
//______________________________________________________________________________ //______________________________________________________________________________
Bool_t TGeoUnion::Contains(Double_t *point) const Bool_t TGeoUnion::Contains(Double_t *point) const
...@@ -453,13 +453,9 @@ Bool_t TGeoUnion::Contains(Double_t *point) const ...@@ -453,13 +453,9 @@ Bool_t TGeoUnion::Contains(Double_t *point) const
TGeoBoolNode *node = (TGeoBoolNode*)this; TGeoBoolNode *node = (TGeoBoolNode*)this;
fLeftMat->MasterToLocal(point, &local[0]); fLeftMat->MasterToLocal(point, &local[0]);
Bool_t inside = fLeft->Contains(&local[0]); Bool_t inside = fLeft->Contains(&local[0]);
if (inside) { if (inside) return kTRUE;
node->SetSelected(1);
return kTRUE;
}
fRightMat->MasterToLocal(point, &local[0]); fRightMat->MasterToLocal(point, &local[0]);
inside = fRight->Contains(&local[0]); inside = fRight->Contains(&local[0]);
if (inside) node->SetSelected(2);
return inside; return inside;
} }
...@@ -877,11 +873,9 @@ Bool_t TGeoSubtraction::Contains(Double_t *point) const ...@@ -877,11 +873,9 @@ Bool_t TGeoSubtraction::Contains(Double_t *point) const
TGeoBoolNode *node = (TGeoBoolNode*)this; TGeoBoolNode *node = (TGeoBoolNode*)this;
fLeftMat->MasterToLocal(point, &local[0]); fLeftMat->MasterToLocal(point, &local[0]);
Bool_t inside = fLeft->Contains(&local[0]); Bool_t inside = fLeft->Contains(&local[0]);
if (inside) node->SetSelected(1); if (!inside) return kFALSE;
else return kFALSE;
fRightMat->MasterToLocal(point, &local[0]); fRightMat->MasterToLocal(point, &local[0]);
inside = !fRight->Contains(&local[0]); inside = !fRight->Contains(&local[0]);
if (!inside) node->SetSelected(2);
return inside; return inside;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment