Message: Re: Can Copies of Physical Volume (G4PVPlacement) Have Different Dimensions? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Can Copies of Physical Volume (G4PVPlacement) Have Different Dimensions? 

Forum: Geometry
Re: Question Can Copies of Physical Volume (G4PVPlacement) Have Different Dimensions? (Emil Frlez)
Date: 25 Jan, 2011
From: John Apostolakis <John Apostolakis>


To explain what Gabriele wrote in a different way:

What you have created is a set of 31 boxes, 31 logical volumes and 31  
placements. Since your wires have different lengths, this is what you  

Each time you call a "new G4Box" you create a new object.  Similarly  
each time you call the constructor of G4LogicalVolume using "new  
G4LogicalVolume( ... )", and for G4PVPlacement .

When using the simple G4Placement class you can share the same G4Box  
only if you have a solid with exactly the same dimensions.

To be clear:
    Using G4PVPlacement is the simplest (and clearest) way to  
construct such a geometry - and I suggest that you stick to this way.


On Jan 23, 2011, at 5:10 PM, Emil Frlez wrote:

> I want to define a set of thin parallel wires that make a grid on  
> the face of a disk-shaped detector.
> [ ... ]
> Below is the relevant snippet of the code:
> // Grid wires parallel to z axis, in y-z plane, UP detector
> for (int i=0; i<31; i++) {
>     int j=i-15;
>     G4double rlength=sqrt(si_up_tot_rad*si_up_tot_rad-(4*j)*(4*j))*mm;
>     solid_z_upplane = new G4Box("z_upplane",           //its name
>                                  width/2,height/2,rlength);   //its  
> size
>     logic_z_upplane = new G4LogicalVolume(solid_z_upplane,  //its  
> solid
>                                   AbsorberMaterial,          //its  
> material
>                                   "z_upplane");              //its  
> name
>     physi_z_upplane = new G4PVPlacement(0,   // 
> rotation                       G4ThreeVector(si_up_xoff-width/ 
> 2,pitch*j,0),  // translation
>                               logic_z_upplane,            //its  
> logical volume
>                               "z_upplane",               //its name
>                               logicWorld,                //its  
> mother  volume
>                               false,                 //no boolean  
> operation
>                               i);//copy number, Aluminum wire, y-z  
> plane, along z
>   }

> Or do I, in this case have to create 32 different G4Boxes, 32  
> different G4LogicalVolumes and have just one copy of the each placed  
> in my setup?

 Add Message Add Message
to: "Re: Can Copies of Physical Volume (G4PVPlacement) Have Different Dimensions?"

 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 ]