Message: Re: Sharing a logic volume Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

More Re: Sharing a logic volume 

Forum: Geometry
Re: Question Sharing a logic volume (Manuel Castro Avila)
Date: 06 Jul, 2012
From: Gabriele Cosmo <Gabriele Cosmo>

> [snip...]
>
> G4LogicalVolume* logicPyr= new G4LogicalVolume(SolPyr,VacMater,
> "logicPyr", 0, 0, 0);
> 
> Now, I define two new logical volumes:
> 
> G4LogicalVolume* logicPyr1; and
> 
> G4LogicalVolume* logicPyr2;
> 
> with
> 
> logicPyr1=logicPyr; logicPyr2=logicPyr;

 Here you're -not- defining new logical volumes, but just pointers to the
 same volume you defined above.

> The test box should appear only in the logicPyr1, but when I run the
> simulation is appearing in both logicPyr1 and logicPyr2. I don't know
> what is wrong..?

You're using the -same- logical volume ... You may want to define logicPyr1
and logicPyr2 as two different objects:

  G4LogicalVolume* logicPyr1= new G4LogicalVolume(SolPyr,VacMater,
  "logicPyr1", 0, 0, 0);
  G4LogicalVolume* logicPyr2= new G4LogicalVolume(SolPyr,VacMater,
  "logicPyr2", 0, 0, 0);

Cheers, Gabriele

 Add Message Add Message
to: "Re: Sharing a logic volume"

 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 ]