Message: Re: Definition of a Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Idea Re: Definition of a  

Forum: Geometry
Re: Question Definition of a "perfect absorber" ? (Peter T.)
Date: 29 Jan, 2010
From: Juan <Juan>

Dear Peter,

When I need to do a perfect absorber volume, The material is not a problem. I put Vacuum. Then In My Stepping Action I just can put something like:

// test if Post step volume exist and get it
 if(aStep->GetPostStepPoint()->GetPhysicalVolume())
 { G4VPhysicalVolume* PostPhysVol = aStep->GetPostStepPoint()->GetPhysicalVolume();
   // Check if particle is entering in your absorber volume
    if(PostPhysVol->GetName() == "yourVolumeName")
    { // Kill the track
      aStep->GetTrack()->SetTrackStatus(fStopAndKill);
    }
  }

So each time a particle is entering in the volume it is not tracked any more, is like it was absorbed.

Juan

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

1 Agree: Re: Definition of a   (Peter T. - 29 Jan, 2010)
 Add Message Add Message
to: "Re: Definition of a "

 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 ]