Message: Re: Problems with GetCopyNo() and russian dolls volumes!!! Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Problems with GetCopyNo() and russian dolls volumes!!! 

Forum: Geometry
Re: Question Problems with GetCopyNo() and russian dolls volumes!!! (Florian ITARD)
Date: 26 Sep, 2008
From: michel maire <michel maire>

 From Geant4 FAQ, accessible from User Support
 (http://geant4.cern.ch/support/faq.shtml#a-geometry)

 How can I identify the exact copy-number of a specific physical volume in my mass geometry? I tried with GetCopyNo()  from my physical volume pointer, but it doesn't seem to work!

Solution: The correct way to identify -uniquely- a physical volume in your mass geometry is by using the touchables (see also section 4.1.5 of the User's Guide for Application Developers), as follows:

      G4Step* aStep = ..;
      G4StepPoint* preStepPoint = aStep->GetPreStepPoint();
      G4TouchableHandle theTouchable = preStepPoint->GetTouchableHandle();
      G4int copyNo = theTouchable->GetCopyNumber();
      G4int motherCopyNo = theTouchable->GetCopyNumber(1);

 Add Message Add Message
to: "Re: Problems with GetCopyNo() and russian dolls 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 ]