Message: Re: GDML in simulation Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: GDML in simulation 

Forum: Geometry
Re: Question GDML in simulation (Eric)
Date: 28 Oct, 2009
From: Juan <Juan>

I have tried to mix GDML volumes generated with FASTRAD with with CSG volumes generated by my own. What I did is to add in my DetectorConstruction:

  G4GDMLParser parser;
  // read the GDML
  // Get the desired volume in the GDML geometry
  G4LogicalVolume* pLogVol = parser.GetVolume("Baseplate");
  // Set the material
  pLogVol->SetMaterial(G4Material *pMaterial);
  // Place it but without rotation
  new G4PVPlacement (0,position,pLogVol,pName,pMotherLogical,pMany,pCopyNo)

Where baseplate_r.gdml is the file generated with FASTRAD. Baseplate is the volume to place which is in the GDML file. I find some limitations with this method. I could not rotate the volume with G4PVPlacement so I rotate it modifying the position of the vertex in the GDML file. After generating the geometry I could visualize it with DAWNFILE or HepRepFile.

Unfortunately running

  /geometry/test/grid_test true
I have this :-(
*** G4Exception : UnknownInsideOutside
      issued by : G4TessellatedSolid::Inside()
Cannot determine whether point is inside or outside volume!
*** Fatal Exception *** core dump ***

*** G4Exception: Aborting execution *** Aborted

So I hat to give up and make the geometry by my own. Perhaps you have more chance.


 Add Message Add Message
to: "Re: GDML in simulation"

 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 ]