Message: Re: GetCopyNo(depth=1) fails Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: GetCopyNo(depth=1) fails 

Forum: Event and Track Management
Re: Question GetCopyNo(depth=1) fails (Ryan Braid)
Date: 09 Sep, 2013
From: michel maire <michel maire>

On Mon, 09 Sep 2013 16:52:19 GMT, Ryan Braid wrote:
> Hello everyone,
> 
> I am trying to get the copy number of the mother volume of one of my
> detectors. I can't understand why it is failing, since virtually all of
> my new code is copy/pasted from examples online. Why does this:
> 
>     G4StepPoint* preStepPoint = step->GetPreStepPoint();
>     G4TouchableHistory* theTouchable = (G4TouchableHistory*)(preStepPoint->GetTouchable());
> 
>     G4VPhysicalVolume* thePhysical = theTouchable->GetVolume();
>     G4int copyNo = thePhysical->GetCopyNo();
>     G4int momcopyNo = thePhysical->GetCopyNo(depth=1);
>     std::cout<<momcopyNo<<" "<<copyNo<<std::endl;
> 

    G4int depth=1;
    G4int momcopyNo = thePhysical->GetCopyNo(depth);

    or only:
    G4int momcopyNo = thePhysical->GetCopyNo(1);

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

1 Question: Re: GetCopyNo(depth=1) fails   (Ryan Braid - 09 Sep, 2013)
1 None: Re: GetCopyNo(depth=1) fails   (michel maire - 10 Sep, 2013)
2 None: Re: GetCopyNo(depth=1) fails   (Marc Verderi - 10 Sep, 2013)
1 Ok: Re: GetCopyNo(depth=1) fails   (Ryan Braid - 11 Sep, 2013)
 Add Message Add Message
to: "Re: GetCopyNo(depth=1) fails"

 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 ]