Message: G4Polyhedra: Warnings from geometry test. Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None G4Polyhedra: Warnings from geometry test. 

Forum: Geometry
Date: 19 Oct, 2006
From: Jeremy McCormick <Jeremy McCormick>


I would like to use the G4Polyhedra in my simulation of ILC detectors.
When I put simple daughter volumes in a G4Polyhedra, I receive a lot
of warning messages from running the geometry test.


These error messages are all similar to this.

GeomTest Error: SolidProblem
    Solid has odd number of intersection points
    Solid name = EMBarrel_polyhedra
    Local position =             -0      -156.171          -182 cm

To reproduce these warnings, the novice example N04 can be modified 
as follows.


#ifndef ExN04DetectorConstruction_h
#define ExN04DetectorConstruction_h 1

#include "G4VUserDetectorConstruction.hh"

class G4VPhysicalVolume;
class G4Material;

class ExN04DetectorConstruction : public G4VUserDetectorConstruction


  G4VPhysicalVolume* Construct();


#include "ExN04DetectorConstruction.hh"

#include "G4Material.hh"
#include "G4Element.hh"
#include "G4Box.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4Polyhedra.hh"

#include <cmath>




G4VPhysicalVolume* ExN04DetectorConstruction::Construct()
  G4Element* H = new G4Element("Hydrogen", "H", 1., 1.01*g/mole);
  G4Element* C = new G4Element("Carbon",   "C", 6., 12.01*g/mole);
  G4Element* N = new G4Element("Nitrogen", "N", 7., 14.01*g/mole);
  G4Element* O = new G4Element("Oxygen",   "O", 8., 16.00*g/mole);

  G4Material* Air = new G4Material("Air", 1.29*mg/cm3, 2);
  Air->AddElement(N, 70.*perCent);
  Air->AddElement(O, 30.*perCent);

  // Test Polyhedra.
  int nz=2;

  double* z = new double[nz];
  double* rin = new double[nz];
  double* rout = new double[nz];

  z[0] = -1000.0;
  rin[0] = 500.0;
  rout[0] = 700.0;

  z[1] = 1000.0;
  rin[1] = 500.0;
  rout[1] = 700.0;

  int nsides=8;

  G4Polyhedra* polyhedra = new G4Polyhedra("TestPolyhedra",
  G4LogicalVolume* polyhedra_volume = new G4LogicalVolume(polyhedra,Air,"TestPolyhedra_LV",0,0,0);
  G4RotationMatrix* polyhedra_rot = new G4RotationMatrix();
  G4VPhysicalVolume* polyhedra_physvol = new G4PVPlacement(polyhedra_rot,G4ThreeVector(),polyhedra_volume,"TestPolyhedra_PV",0,false,0);

  G4Box* box = new G4Box("TestBox",25.0,25.0,25.0);
  G4LogicalVolume* box_volume = new G4LogicalVolume(box,Air,"TestBox_LV",0,0,0);
  G4VPhysicalVolume* box_physvol = new G4PVPlacement(0,G4ThreeVector(0.,600.0,0.),box_volume,"TestPolyhedra_PV",0,false,0);

  // World
  double expHallDim=600.*cm;
  G4Box * experimentalHall_box
    = new G4Box("expHall_b",expHallDim,expHallDim,expHallDim);
  G4LogicalVolume * experimentalHall_log
    = new G4LogicalVolume(experimentalHall_box,Air,"expHall_L",0,0,0);
  G4VPhysicalVolume * experimentalHall_phys
    = new G4PVPlacement(0,G4ThreeVector(),experimentalHall_log,"expHall_P",


  return experimentalHall_phys;


It is entirely possible that the geometry itself is bugged, though
the above structure is quite simple and has no overlaps, as far as
I can tell.  It is just a box placed into a polyhedra mother volume. 
Does anyone know the cause behind these warning messages?  

Can these warnings be ignored?  

Basically, I'm wondering if I can safely use the polyhedra solid in
my simulation or if it has some known, unfixed bugs that may cause
me problems.


Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: G4Polyhedra: Warnings from geometry test.   ( - 20 Oct, 2006)
(_ Feedback: Re: G4Polyhedra: Warnings from geometry test.   (Gabriele Cosmo - 20 Oct, 2006)
(_ None: Re: G4Polyhedra: Warnings from geometry test.   ( - 22 Oct, 2006)
 Add Message Add Message
to: "G4Polyhedra: Warnings from geometry test."

 Subscribe Subscribe

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 ]