Message: Boolean volumes? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Boolean volumes? 

Forum: Geometry
Date: 22 May, 2013
From: Ali <Ali>

Dear all
I'm using geant4 9.4. I'm currently running a simulation with macro commands(batch mode). in my geometry I need to define boolean volumes. (union, subtraction and intersection). for example i define one volume by this commands:
 // // // // // // // // // // // // // // // // // // // // // // // //
 G4Box *target1Box= new G4Box("Target1_solid",5.*mm, 5.*mm, 5.*mm);
 G4VSolid* cylinder = new G4Tubs("Cylinder", // Name
					  0.*cm,                      
					  1.5*mm,                   
					  1.5*mm,                 
					  0.*deg,                     
					  360.*deg);                    
 G4UnionSolid* union = new G4UnionSolid("Target1_solid&&Cylinder ",target1Box,cylinder);
  G4LogicalVolume *unionLogical= new G4LogicalVolume(union,tungsten, "Target1_solid&&Cylinder", 0, 0, 0);
 new G4PVPlacement(0,                                 
                   G4ThreeVector(0.,0.,0.*cm),    
                  unionLogical,                  
                 "Target1_solid&&Cylinder",                  
                  fpWorldLogical,                 
                    false,                            
                    0);
  G4VisAttributes* unionAttributes = new G4VisAttributes(G4Colour::Cyan());
  unionAttributes->SetForceSolid(true);
  unionLogical->SetVisAttributes(unionAttributes);
 // // // // // // // // // // // // // // // // // // // // // // // // //
but when  I run the example i don,t have any error, but in visual output i don,t see boolean volume!!? ( i open HepRep outputs file)
in some cases, when i try to open the HepRep file,  i see this error:
"G4 Data1.heprep does not appear to be a well formed HepRep or HepRep2 Xml file"
It is noteworthy when i define a normal volumes and run a example, i see my volumes in output and don,t have any error! and this problem just is for case that i,m using a boolean volumes.
Thanks.
Yours sincerely.
Ali

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

1 None: Re: Boolean volumes?   (Vladimir Grichine - 22 May, 2013)
 Add Message Add Message
to: "Boolean volumes?"

 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 ]