Message: 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

Question Can Copies of Physical Volume (G4PVPlacement) Have Different Dimensions? 

Forum: Geometry
Date: 23 Jan, 2011
From: Emil Frlez <Emil Frlez>

 Hi -

 I want to define a set of thin parallel wires that make a grid on the face
 of a disk-shaped detector.  

 I have created a single G4 Box (solid_z_upplane) and a single G4LogicalVolume 
 (logic_z_upplane) in a loop and then placed parallel copies of that wire 
 in my setup. But, is this legal? The length of the wires (rlenght) changes
 inside the loop, so all the placed copies of the wire don't have identical dimensions.
 I don't know enough of C++ to answer the question. The code compiles and runs OK.)

 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?

 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

                                             Thanks, Emil

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

1 Feedback: Re: Can Copies of Physical Volume (G4PVPlacement) Have Different Dimensions?   (Gabriele Cosmo - 24 Jan, 2011)
2 None: Re: Can Copies of Physical Volume (G4PVPlacement) Have Different Dimensions?   (John Apostolakis - 25 Jan, 2011)
 Add Message Add Message
to: "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 ]