Message: Re: Absolute replica number Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Absolute replica number 

Forum: Geometry
Re: Question Absolute replica number (Nicola Mori)
Date: 01 Aug, 2013
From: John Allison <John Allison>

I might have misunderstood you, but you can get the mother (and grandmother, etc.) simply by providing an argument to GetVolume(), e.g., GetVolume(1):

 G4StepPoint* preSP = step->GetPreStepPoint();
 const G4TouchableHandle& preTH = preSP->GetTouchableHandle();
 G4VPhysicalVolume* prePV = preTH->GetVolume();
 G4String& prePVName = prePV->GetName();
 G4int prePVCopyNo = prePV->GetCopyNumber();
 G4VPhysicalVolume* motherPV = preTH->GetVolume(1);
 G4String& motherPVName = motherPV->GetName();
 G4int motherPVCopyNo = motherPV->GetCopyNumber();
 // …and grandmother, etc.

so that gives you a unique path to the current touchable.

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

1 Feedback: Re: Absolute replica number   (Nicola Mori - 01 Aug, 2013)
(_ None: Re: Absolute replica number   (John Allison - 01 Aug, 2013)
(_ Feedback: Re: Absolute replica number   (Nicola Mori - 02 Aug, 2013)
(_ None: Re: Absolute replica number   (John Allison - 02 Aug, 2013)
(_ Feedback: Re: Absolute replica number   (Nicola Mori - 02 Aug, 2013)
(_ None: Re: Absolute replica number   (John Allison - 02 Aug, 2013)
(_ Agree: Re: Absolute replica number   (Nicola Mori - 02 Aug, 2013)
 Add Message Add Message
to: "Re: Absolute replica number"

 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 ]