Message: Re: Mother Volume name??? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Mother Volume name??? 

Forum: Hits, Digitization and Pileup
Re: None Mother Volume name??? (Carlos Ayerbe Gayoso)
Date: 23 Oct, 2012
From: Tsukasa Aso <Tsukasa Aso>

Hi,

Basically, it should work in Geant4.

I suppose you used N03 example and did it at SteppingAction.
If so, you have to take care of the structure of physical volume.
Because  "World volume", does not have a mother volume,
the return value from touchable might be NULL.

  Please try, for example,

  G4VPhysicalVolume* volume1
  = aStep->GetPreStepPoint()->GetTouchableHandle()->GetVolume(1);

  G4String mname="No more";
  if ( volume1 ){
    mname = volume1->GetName();
  }
  G4cout << " v1 : " << mname <<G4endl;


Best regards,
Tsukasa

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

1 None: Re: Mother Volume name???   (Carlos Ayerbe Gayoso - 24 Oct, 2012)
 Add Message Add Message
to: "Re: Mother Volume name???"

 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 ]