838 G4cout <<
"G4GMocrenFileSceneHandler::AddSolid(const G4Box&) : " 858 for(
G4int i = 0; i < 12; i++) {
861 G4cout <<
" (" << v1.
x() <<
", " 866 << v2.
z() <<
") [" << next <<
"]" 881 if(pScBox != NULL) bMesh =
true;
884 << volName <<
" - " << bMesh <<
G4endl;
889 if (!pv_model) { return ; }
892 if (!pPVModel) { return ; }
904 G4cout <<
" density : " << dens <<
" [g/cm3]" <<
G4endl;
923 G4cout <<
"kVolumeTrans3D: " << trans1 << G4endl << rot1 <<
G4endl;
934 G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
937 G4int dirAxis[3] = {-1,-1,-1};
938 G4int nDaughters[3] = {0,0,0};
942 nDaughters[0] = nReplicas;
944 case kXAxis: dirAxis[0] = 0;
break;
945 case kYAxis: dirAxis[0] = 1;
break;
946 case kZAxis: dirAxis[0] = 2;
break;
948 G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
954 <<
" # : " << nDaughters[0] <<
G4endl;
958 if(pv[0]->GetLogicalVolume()->GetNoDaughters()) {
959 G4cout <<
"# of daughters : " 970 if(pv[0]->GetLogicalVolume()->GetNoDaughters() == 0) {
981 nDaughters[1] = nReplicas;
983 case kXAxis: dirAxis[1] = 0;
break;
984 case kYAxis: dirAxis[1] = 1;
break;
985 case kZAxis: dirAxis[1] = 2;
break;
987 G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
993 <<
" # : " << nDaughters[1]<<
G4endl;
1002 <<
" # : " << nDaughters[2] <<
G4endl;
1004 if(nDaughters[2] > 1) {
1007 if(nestPara == NULL)
1008 G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
1017 G4cout << trans0 <<
" - " << trans1 <<
" - " << diff <<
G4endl;
1019 if(diff.x() != 0.) dirAxis[2] = 0;
1020 else if(diff.y() != 0.) dirAxis[2] = 1;
1021 else if(diff.z() != 0.) dirAxis[2] = 2;
1023 G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
1024 "gMocren0009",
FatalException,
"Unexpected nested parameterisation");
1029 for(
G4int i = 0; i < 3; i++) {
1040 if(nestPara != NULL) {
1041 G4double prexyz[3] = {0.,0.,0.}, xyz[3] = {0.,0.,0.};
1042 for(
G4int n0 = 0; n0 < nDaughters[0]; n0++) {
1043 for(
G4int n1 = 0; n1 < nDaughters[1]; n1++) {
1044 for(
G4int n2 = 0; n2 < nDaughters[2]; n2++) {
1048 G4cout <<
" retrieve volume : copy # : " << n0
1049 <<
", " << n1 <<
", " << n2 <<
G4endl;
1055 G4cout <<
" density :" << dens <<
" [g/cm3]" <<
G4endl;
1059 xyz[0] = tbox.GetXHalfLength()/
mm;
1060 xyz[1] = tbox.GetYHalfLength()/
mm;
1061 xyz[2] = tbox.GetZHalfLength()/
mm;
1062 if(n0 != 0 || n1 != 0 || n2 != 0) {
1063 for(
G4int i = 0; i < 3; i++) {
1064 if(xyz[i] != prexyz[i])
1065 G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
1070 G4cout <<
" size : " << tbox.GetXHalfLength()/
mm <<
" x " 1071 << tbox.GetYHalfLength()/
mm <<
" x " 1072 << tbox.GetZHalfLength()/
mm <<
" [mm3]" <<
G4endl;
1075 idx[dirAxis[0]] = n0;
1076 idx[dirAxis[1]] = n1;
1077 idx[dirAxis[2]] = n2;
1078 Index3D i3d(idx[0],idx[1],idx[2]);
1081 G4cout <<
" index: " << idx[0] <<
", " << idx[1] <<
", " << idx[2]
1082 <<
" density: " << dens <<
G4endl;
1084 for(
G4int i = 0; i < 3; i++) prexyz[i] = xyz[i];
1095 static_cast<G4float>(2*xyz[1]),
1096 static_cast<G4float>(2*xyz[2])};
1105 G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
1119 G4cout <<
" physical volume node id : " 1120 <<
"size: " << npvp <<
", PV name: ";
1121 for(
G4int i = 0; i < npvp; i++) {
1124 << pPVModel->
GetDrawnPVPath()[i].GetPhysicalVolume()->IsParameterised()
1126 << pPVModel->
GetDrawnPVPath()[i].GetPhysicalVolume()->IsReplicated();
1127 if(pPVModel->
GetDrawnPVPath()[i].GetPhysicalVolume()->GetParameterisation()) {
1129 << pPVModel->
GetDrawnPVPath()[i].GetPhysicalVolume()->GetParameterisation()->IsNested();
1132 << pPVModel->
GetDrawnPVPath()[i].GetPhysicalVolume()->GetCopyNo();
1141 G4Box * pbox =
dynamic_cast<G4Box *
>(pPVModel->
GetDrawnPVPath()[npvp-2].GetPhysicalVolume()->GetLogicalVolume()->GetSolid());
1146 G4cout <<
" mother size [" 1147 << pPVModel->
GetDrawnPVPath()[npvp-2].GetPhysicalVolume()->GetName()
1149 << pareDims[0] <<
" x " 1150 << pareDims[1] <<
" x " 1151 << pareDims[2] <<
" [mm3]" 1155 G4Box * boxP =
dynamic_cast<G4Box *
>(pPVModel->
GetDrawnPVPath()[npvp-1].GetPhysicalVolume()->GetLogicalVolume()->GetSolid());
1160 G4cout <<
" parameterised volume? [" 1161 << pPVModel->
GetDrawnPVPath()[npvp-1].GetPhysicalVolume()->GetName()
1163 << paraDims[0] <<
" x " 1164 << paraDims[1] <<
" x " 1165 << paraDims[2] <<
" [mm3] : " 1166 <<
G4int(pareDims[0]/paraDims[0]) <<
" x " 1167 <<
G4int(pareDims[1]/paraDims[1]) <<
" x " 1171 <<
" isn't a G4Box." <<
G4endl;
1182 if(phantomPara == NULL) {
1183 G4Exception(
"G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )",
1200 for(
G4int n0 = 0; n0 < kNestedVolumeDimension[0]; n0++) {
1201 for(
G4int n1 = 0; n1 < kNestedVolumeDimension[1]; n1++) {
1202 for(
G4int n2 = 0; n2 < kNestedVolumeDimension[2]; n2++) {
1204 G4int repNo = n0 + n1*nX + n2*nXY;
1211 idx[kNestedVolumeDirAxis[1]] = n1;
1212 idx[kNestedVolumeDirAxis[2]] = n2;
1213 Index3D i3d(idx[0],idx[1],idx[2]);
1217 G4cout <<
" index: " << idx[0] <<
", " << idx[1] <<
", " << idx[2]
1218 <<
" density: " << dens <<
G4endl;
1248 if(!pScrMan)
return;
1251 if(scoringBox == NULL)
return;
1257 kNestedVolumeDimension[0] = nVoxels[2];
1258 kNestedVolumeDimension[1] = nVoxels[1];
1259 kNestedVolumeDimension[2] = nVoxels[0];
1265 for(
G4int n0 = 0; n0 < kNestedVolumeDimension[0]; n0++) {
1266 for(
G4int n1 = 0; n1 < kNestedVolumeDimension[1]; n1++) {
1267 for(
G4int n2 = 0; n2 < kNestedVolumeDimension[2]; n2++) {
1273 idx[kNestedVolumeDirAxis[1]] = n1;
1274 idx[kNestedVolumeDirAxis[2]] = n2;
1275 Index3D i3d(idx[0],idx[1],idx[2]);
1284 G4cout <<
"Interactive Scorer : size - " 1285 << boxSize.
x()/
cm <<
" x " 1286 << boxSize.
y()/
cm <<
" x " 1287 << boxSize.
z()/
cm <<
" [cm3]" <<
G4endl;
1288 G4cout <<
"Interactive Scorer : # voxels - " 1289 << nVoxels[0] <<
" x " 1290 << nVoxels[1] <<
" x " 1300 static_cast<G4float>(boxSize.
y()*2/nVoxels[1]),
1301 static_cast<G4float>(boxSize.
z()*2/nVoxels[2])};
1350 if(volName == box.
GetName()) {
1363 if(volName != box.
GetName()) {
void set(double x, double y, double z)
const std::vector< G4PhysicalVolumeNodeID > & GetDrawnPVPath() const
virtual G4Material * ComputeMaterial(G4VPhysicalVolume *currentVol, const G4int repNo, const G4VTouchable *parentTouch=0)=0
G4ThreeVector GetSize() const
void GetNumberOfSegments(G4int nSegment[3])
G4int kFlagParameterization
G4VPhysicalVolume * GetTopPhysicalVolume() const
G4int GetNoDaughters() const
virtual G4int GetMultiplicity() const
void AddDetector(const G4VSolid &solid)
virtual G4bool IsReplicated() const =0
G4double GetVoxelHalfY() const
G4Transform3D kVolumeTrans3D
virtual void ComputeDimensions(G4Box &, const G4int, const G4VPhysicalVolume *) const
const G4String & GetName() const
G4Polyhedron * CreatePolyhedron() const
virtual G4String getVolumeName()
size_t GetNoVoxelX() const
G4ThreeVector GetTranslation() const
G4double GetDensity() const
G4Transform3D fObjectTransformation
G4VScoringMesh * FindMesh(G4VHitsCollection *map)
G4RotationMatrix GetRotationMatrix() const
G4double GetVoxelHalfZ() const
HepPolyhedron & Transform(const G4Transform3D &t)
virtual G4Material * ComputeMaterial(const G4int repNo, G4VPhysicalVolume *currentVol, const G4VTouchable *parentTouch=0)
size_t GetNoVoxelZ() const
G4double GetXHalfLength() const
virtual G4bool getDrawVolumeGrid()
G4VModel * GetModel() const
G4GLOB_DLL std::ostream G4cout
G4bool GetNextEdge(G4Point3D &p1, G4Point3D &p2, G4int &edgeFlag) const
G4double GetZHalfLength() const
virtual G4VPVParameterisation * GetParameterisation() const =0
virtual void ComputeTransformation(const G4int no, G4VPhysicalVolume *currentPV) const =0
G4int GetCurrentDepth() const
G4bool kFlagProcessedInteractiveScorer
virtual G4bool IsNested() const
size_t GetNoVoxelY() const
void setVoxelSpacing(float _spacing[3])
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4ThreeVector GetObjectTranslation() const
virtual G4bool IsParameterised() const =0
G4double GetVoxelHalfX() const
G4double GetYHalfLength() const
const G4String & GetName() const
G4GMocrenMessenger & kMessenger
G4int kNestedVolumeDirAxis[3]
G4ThreeVector kVolumeSize
virtual G4int GetCopyNo() const =0
G4ThreeVector kVoxelDimension
G4int kNestedVolumeDimension[3]
static Verbosity GetVerbosity()
G4VPhysicalVolume * GetCurrentPV() const
G4Material * GetCurrentMaterial() const
virtual void GetReplicationData(EAxis &axis, G4int &nReplicas, G4double &width, G4double &offset, G4bool &consuming) const =0
G4bool kbSetModalityVoxelSize
G4VPhysicalVolume * GetDaughter(const G4int i) const
static G4ScoringManager * GetScoringManager()
HepRotation inverse() const
G4LogicalVolume * GetLogicalVolume() const
const G4String & GetName() const
std::vector< G4String > kNestedVolumeNames
std::map< Index3D, float > kNestedModality