Message: Help with G4PVReplica Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Help with G4PVReplica 

Forum: Geometry
Date: 14 Sep, 2009
From: Karthik <Karthik>

--00148531a90f053aa7047389d6b6
Content-Type: text/plain; charset=ISO-8859-1

Hello All,

  I am a new GEANT4 user and am having some trouble with using G4PVReplica.
The error when I compile my code is:

*ERROR - G4SmartVoxelHeader::BuildReplicaVoxels()*
*        Replicated geometry, logical volume: MODULE*

**** G4Exception : FatalError*
*      issued by : G4SmartVoxelHeader::BuildReplicaVoxels*
*Sanity check: wrong solid extent.*
**** Fatal Exception *** core dump ****

**** G4Exception: Aborting execution ****
*Abort*

  I have checked and made sure that the mother is larger than the only
daughter. The relevant section of my code is :

   // ---- WORLD ---------------
   // XYZ dims are : World: 96.2  , 182.3 , 473.71 mm for world
   solidWorld    = new G4Box("world",97.2*mm,183.3*mm,474.71*mm);
   logicWorld    = new G4LogicalVolume(solidWorld,Air,"World",0,0,0);
   G4VPhysicalVolume*    physiWorld    = new G4PVPlacement(0,
//No rotation
            G4ThreeVector(0,0,0),     // at (0,0,0)
            logicWorld,        //its logic world
            "World",        // name
            0,            // Mother Volume
            false,            //no boolean operation
            0);            //copy number

   //--- MODULE ----------------
    G4Box*        solidModule    = new G4Box("Module", 96.2*mm, 182.3*mm,
24.*mm);
    G4LogicalVolume*    logicModule    = new G4LogicalVolume(solidModule,
            LYSO,
            "MODULE");
    G4VPhysicalVolume*     physicalModule    = new G4PVPlacement(0,
            G4ThreeVector(0,0,0),
            logicModule,
            "Module",
            logicWorld,
            false,
            0);

    // -- And finally I want to replicate the crystals in the module ---
    G4Box* solidXtal     = new G4Box("Xtal",4.0*mm,4.0*mm,22.0*mm);
    G4LogicalVolume* logicXtal    = new G4LogicalVolume(solidXtal,    //its
solid
            LYSO,                    //Material
            "Xtal");
    G4VPhysicalVolume* physicalXtal    = new G4PVReplica("Xtal",
            logicXtal,
            logicModule,
            kXAxis,
            23,           // Number of replicas
            4.1*mm);  // Width

   I check over and over to make sure that the replica is not extending the
mother (MODULE) volume and indeed it does not.
  23 replicas of 4 mm crystals separated by 4.1 mm gives a x-extend of
(22*4.1)+4 = 94.2 mm while the mother x extent is 95.2 mm. Can anyone point
out what I am doing wrong?

  Many thanks,

Karthik.

--00148531a90f053aa7047389d6b6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello All,<br><br>=A0 I am a new GEANT4 user and am having some trouble wit=
h using G4PVReplica. The error when I compile my code is:<br><br><div style=
=3D"margin-left: 80px;"><i>ERROR - G4SmartVoxelHeader::BuildReplicaVoxels()=
</i><br>
<i>=A0=A0=A0=A0=A0=A0=A0 Replicated geometry, logical volume: MODULE</i><br=
><br><i>*** G4Exception : FatalError</i><br><i>=A0=A0=A0=A0=A0 issued by : =
G4SmartVoxelHeader::BuildReplicaVoxels</i><br><i>Sanity check: wrong solid =
extent.</i><br><i>*** Fatal Exception *** core dump ***</i><br>
<br><i>*** G4Exception: Aborting execution ***</i><br><i>Abort</i><br><br><=
/div>=A0 I have checked and made sure that the mother is larger than the on=
ly daughter. The relevant section of my code is :<br><br><div style=3D"marg=
in-left: 120px;">
<span style=3D"font-family: arial narrow,sans-serif;">=A0=A0 // ---- WORLD =
--------------- </span><br style=3D"font-family: arial narrow,sans-serif;">=
<span style=3D"font-family: arial narrow,sans-serif;">=A0=A0 // XYZ dims ar=
e : World: 96.2=A0 , 182.3 , 473.71 mm for world</span><br style=3D"font-fa=
mily: arial narrow,sans-serif;">
<span style=3D"font-family: arial narrow,sans-serif;">=A0=A0 solidWorld=A0=
=A0=A0 =3D new G4Box(&quot;world&quot;,97.2*mm,183.3*mm,474.71*mm</span><sp=
an style=3D"font-family: arial narrow,sans-serif;"></span><span style=3D"fo=
nt-family: arial narrow,sans-serif;">);</span><br style=3D"font-family: ari=
al narrow,sans-serif;">
<span style=3D"font-family: arial narrow,sans-serif;">=A0=A0 logicWorld=A0=
=A0=A0 =3D new G4LogicalVolume(solidWorld,Air,&quot;World&quot;,0,0,0);</sp=
an><br style=3D"font-family: arial narrow,sans-serif;"><span style=3D"font-=
family: arial narrow,sans-serif;">=A0=A0 G4VPhysicalVolume*=A0=A0=A0 physiW=
orld=A0=A0=A0 =3D new G4PVPlacement(0,=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 //No ro=
tation</span><br style=3D"font-family: arial narrow,sans-serif;">
<span style=3D"font-family: arial narrow,sans-serif;">=A0=A0=A0 =A0=A0=A0 =
=A0=A0=A0 G4ThreeVector(0,0,0), =A0=A0=A0 // at (0,0,0)</span><br style=3D"=
font-family: arial narrow,sans-serif;"><span style=3D"font-family: arial na=
rrow,sans-serif;">=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 logicWorld,=A0=A0=A0 =A0=A0=
=A0 //its logic world</span><br style=3D"font-family: arial narrow,sans-ser=
if;">
<span style=3D"font-family: arial narrow,sans-serif;">=A0=A0=A0 =A0=A0=A0 =
=A0=A0=A0 &quot;World&quot;,=A0=A0=A0 =A0=A0=A0 // name</span><br style=3D"=
font-family: arial narrow,sans-serif;"><span style=3D"font-family: arial na=
rrow,sans-serif;">=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 0,=A0=A0=A0 =A0=A0=A0 =A0=
=A0=A0 // Mother Volume</span><br style=3D"font-family: arial narrow,sans-s=
erif;">
<span style=3D"font-family: arial narrow,sans-serif;">=A0=A0=A0 =A0=A0=A0 =
=A0=A0=A0 false,=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 //no boolean operation</span>=
<br style=3D"font-family: arial narrow,sans-serif;"><span style=3D"font-fam=
ily: arial narrow,sans-serif;">=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 0);=A0=A0=A0 =
=A0=A0=A0 =A0=A0=A0 //copy number</span><br style=3D"font-family: arial nar=
row,sans-serif;">
<br style=3D"font-family: arial narrow,sans-serif;"><span style=3D"font-fam=
ily: arial narrow,sans-serif;">=A0=A0 //--- MODULE ----------------</span><=
span style=3D"font-family: arial narrow,sans-serif;"></span><br style=3D"fo=
nt-family: arial narrow,sans-serif;">
<span style=3D"font-family: arial narrow,sans-serif;">=A0=A0=A0 G4Box*=A0=
=A0=A0 =A0=A0=A0 solidModule=A0=A0=A0 =3D new G4Box(&quot;Module&quot;, 96.=
2*mm, 182.3*mm, 24.*mm);</span><br style=3D"font-family: arial narrow,sans-=
serif;"><span style=3D"font-family: arial narrow,sans-serif;">=A0=A0=A0 G4L=
ogicalVolume*=A0=A0=A0 logicModule=A0=A0=A0 =3D new G4LogicalVolume(solidMo=
dule,</span><br style=3D"font-family: arial narrow,sans-serif;">
<span style=3D"font-family: arial narrow,sans-serif;">=A0=A0=A0 =A0=A0=A0 =
=A0=A0=A0 LYSO,</span><br style=3D"font-family: arial narrow,sans-serif;"><=
span style=3D"font-family: arial narrow,sans-serif;">=A0=A0=A0 =A0=A0=A0 =
=A0=A0=A0 &quot;MODULE&quot;);</span><br style=3D"font-family: arial narrow=
,sans-serif;">
<span style=3D"font-family: arial narrow,sans-serif;">=A0=A0=A0 G4VPhysical=
Volume* =A0=A0=A0 physicalModule=A0=A0=A0 =3D new G4PVPlacement(0,</span><b=
r style=3D"font-family: arial narrow,sans-serif;"><span style=3D"font-famil=
y: arial narrow,sans-serif;">=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 G4ThreeVector(0,=
0,0),</span><br style=3D"font-family: arial narrow,sans-serif;">
<span style=3D"font-family: arial narrow,sans-serif;">=A0=A0=A0 =A0=A0=A0 =
=A0=A0=A0 logicModule,</span><br style=3D"font-family: arial narrow,sans-se=
rif;"><span style=3D"font-family: arial narrow,sans-serif;">=A0=A0=A0 =A0=
=A0=A0 =A0=A0=A0 &quot;Module&quot;,</span><br style=3D"font-family: arial =
narrow,sans-serif;">
<span style=3D"font-family: arial narrow,sans-serif;">=A0=A0=A0 =A0=A0=A0 =
=A0=A0=A0 logicWorld,</span><br style=3D"font-family: arial narrow,sans-ser=
if;"><span style=3D"font-family: arial narrow,sans-serif;">=A0=A0=A0 =A0=A0=
=A0 =A0=A0=A0 false,</span><br style=3D"font-family: arial narrow,sans-seri=
f;">
<span style=3D"font-family: arial narrow,sans-serif;">=A0=A0=A0 =A0=A0=A0 =
=A0=A0=A0 0);</span><br style=3D"font-family: arial narrow,sans-serif;"><br=
 style=3D"font-family: arial narrow,sans-serif;"><span style=3D"font-family=
: arial narrow,sans-serif;">=A0=A0=A0 // -- And finally I want to replicate=
 the crystals in the module ---</span><br style=3D"font-family: arial narro=
w,sans-serif;">
<span style=3D"font-family: arial narrow,sans-serif;">=A0=A0=A0 G4Box* soli=
dXtal =A0=A0=A0 =3D new G4Box(&quot;Xtal&quot;,4.0*mm,4.0*mm,22.0*mm);</spa=
n><br style=3D"font-family: arial narrow,sans-serif;"><span style=3D"font-f=
amily: arial narrow,sans-serif;">=A0=A0=A0 G4LogicalVolume* logicXtal=A0=A0=
=A0 =3D new G4LogicalVolume(solidXtal,=A0=A0=A0 //its solid</span><br style=
=3D"font-family: arial narrow,sans-serif;">
<span style=3D"font-family: arial narrow,sans-serif;">=A0=A0=A0 =A0=A0=A0 =
=A0=A0=A0 LYSO,=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 //Material=
</span><br style=3D"font-family: arial narrow,sans-serif;"><span style=3D"f=
ont-family: arial narrow,sans-serif;">=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 &quot;X=
tal&quot;);=A0=A0=A0 </span><br style=3D"font-family: arial narrow,sans-ser=
if;">
<span style=3D"font-family: arial narrow,sans-serif;">=A0=A0=A0 G4VPhysical=
Volume* physicalXtal=A0=A0=A0 =3D new G4PVReplica(&quot;Xtal&quot;,</span><=
br style=3D"font-family: arial narrow,sans-serif;"><span style=3D"font-fami=
ly: arial narrow,sans-serif;">=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 logicXtal,</spa=
n><br style=3D"font-family: arial narrow,sans-serif;">
<span style=3D"font-family: arial narrow,sans-serif;">=A0=A0=A0 =A0=A0=A0 =
=A0=A0=A0 logicModule,</span><br style=3D"font-family: arial narrow,sans-se=
rif;"><span style=3D"font-family: arial narrow,sans-serif;">=A0=A0=A0 =A0=
=A0=A0 =A0=A0=A0 kXAxis,</span><br style=3D"font-family: arial narrow,sans-=
serif;">
<span style=3D"font-family: arial narrow,sans-serif;">=A0=A0=A0 =A0=A0=A0 =
=A0=A0=A0 23,=A0=A0 =A0=A0=A0 =A0=A0=A0 // Number of replicas</span><br sty=
le=3D"font-family: arial narrow,sans-serif;"><span style=3D"font-family: ar=
ial narrow,sans-serif;">=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 4.1*mm);=A0 // Width<=
/span><br>
</div><br>=A0=A0 I check over and over to make sure that the replica is not=
 extending the mother (MODULE) volume and indeed it does not.<br>=A0 23 rep=
licas of 4 mm crystals separated by 4.1 mm gives a x-extend of (22*4.1)+4 =
=3D 94.2 mm while the mother x extent is 95.2 mm. Can anyone point out what=
 I am doing wrong? <br>
<br>=A0 Many thanks,<br><br>Karthik.<br><br>=A0=A0 <br><br><br>

--00148531a90f053aa7047389d6b6--

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

1 More: Re: Help with G4PVReplica   (Gabriele Cosmo - 16 Sep, 2009)
 Add Message Add Message
to: "Help with G4PVReplica"

 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 ]