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

Question Re: GetCopyNo(depth=1) fails 

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

On Mon, 09 Sep 2013 17:44:52 GMT, michel maire wrote:
> G4int depth=1;
> G4int momcopyNo = thePhysical->GetCopyNo(depth);
> or only:
> G4int momcopyNo = thePhysical->GetCopyNo(1);

Thank you for your reply. I had already tried the second option and it fails as well:

Compiling ...
src/ In member function ‘virtual G4bool SiliconSD::ProcessHits(G4Step*, G4TouchableHistory*)’:
src/ error: no matching function for call to ‘G4VPhysicalVolume::GetCopyNo(int)’
src/ note: candidate is:
/geant4.9.4.p02/source/geometry/management/include/G4VPhysicalVolume.hh:142:19: note: virtual G4int G4VPhysicalVolume::GetCopyNo() const
/geant4.9.4.p02/source/geometry/management/include/G4VPhysicalVolume.hh:142:19: note: candidate expects 0 arguments, 1 provided

This is what made me suspect that my Geant4 version is out of date. However, I have downloaded the source for the latest beta, and the header file seems to indicate that even the latest version will not take any arguments. From source/geometry/management/include/G4VPhysicalVolume.hh:

virtual G4int GetCopyNo() const = 0;

Is the tutorial wrong, or am I still missing something critically important? I know a virtual function can be overwritten by a definition later, but I can't find one. Doing geant4.10.00.b01/source$ grep -r "GetCopyNo" . shows no header or function call with any arguments passed.

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

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 ]