Message: What is a rigth way to construct regular geometry structures? Not Logged In (login)

## What is a rigth way to construct regular geometry structures?

Forum: Geometry
Date: 22 Sep, 2006
From: Anton <Anton>

 ```Hello, dear geanters! I need to construct geometry which consist of regular hexagonal cells (like honeycombs in a bee beehive). I try to implement such geometry by two ways: 1) I construct one logical honeycomb, and when place it in loop to produce regular structure: if (gi.GeomType == "hexa") { G4double a = gi.l/sqrt(3); // length of side of hexa G4double b = a/2; G4double AB = a + b; const G4double zP[] = {-ahL, ahL}; const G4double rI[] = {(gi.l - gi.d)/2, (gi.l - gi.d)/2}; const G4double rO[] = {gi.l/2, gi.l/2}; G4Polyhedra* hexa_polyhedra = new G4Polyhedra("hexa_polyhedra", 30.*deg, 360.*deg, 6, 2, zP, rI, rO); G4LogicalVolume* hexa_log = new G4LogicalVolume(hexa_polyhedra, Material, "hexa_log"); G4int k = 0; G4int n = gi.N/2; for (G4int j=-n; j<=n; j++) for (G4int i=-n; i<=n; i++) new G4PVPlacement(0, G4ThreeVector((i - (j%2)*.5)*gi.l, j*AB, aZ), hexa_log, "hexa", world_log, false, k++); } 2) I construct logical beehive by solid union, and when make one placement: if (gi.GeomType == "lhexa") { G4double a = gi.l/sqrt(3); G4double b = a/2; G4double AB = a + b; const G4double zP[] = {-ahL, ahL}; const G4double rI[] = {(gi.l - gi.d)/2, (gi.l - gi.d)/2}; const G4double rO[] = {gi.l/2, gi.l/2}; G4VSolid *us = 0; G4int n = gi.N/2; for (G4int j=-n; j<=n; j++) for (G4int i=-n; i<=n; i++) { G4Polyhedra* lhexa_polyhedra = new G4Polyhedra("lhexa_polyhedra", 30.*deg, 360.*deg, 6, 2, zP, rI, rO); if (!us) us = lhexa_polyhedra; else if ((i!=0)&&(j!=0)) us = new G4UnionSolid("lhexaunion", us, lhexa_polyhedra, 0, G4ThreeVector((i - (j%2)*.5)*gi.l, j*AB, 0)); } G4LogicalVolume* lhexas_log = new G4LogicalVolume(us, Material, "lhexas_log"); new G4PVPlacement(0, G4ThreeVector(0, 0, aZ), lhexas_log, "lhexas", world_log, false, 0); } And now several questions: 1. In simulation I use such geometry structure as absorber, and problem is that for different ways of geometry defining I take different results of simulation. So the question is: are geometries built in each of these methods equivalent for the particles which passing through them? 2. What method of construction of geometry is more faithful :) (may be from ideological positions)? 3. There are problems with visualization of geometry built by second way, while in first way visualization is correct - is it expected behaviour? Thank you in advance. Anton```

1 Re: What is a rigth way to construct regular geometry structures?   (John Allison - 22 Sep, 2006)  Re: What is a rigth way to construct regular geometry structures?   (Anton Korneev - 22 Sep, 2006)
 to: "What is a rigth way to construct regular geometry structures?"
This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]