GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » How to abort secondaries
Re: How to abort secondaries [message #13443 is a reply to message #13439] Tue, 08 May 2012 10:50 Go to previous messageGo to previous message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *
Dear Maria and Stefano,
Probably you can use the same thing I use to kill secondaries.

Add the function PreTrack() to your detector class before ProcessHits

void PndDrc::PreTrack(){

// Begin of the event


//member function, it should be before declared in the detector header file.

// cout << " PndDrc::PreTrack() "<< endl;


In the beginning of ProcessHits,
then stop the track of being tracked by doing gMC->StopTrack();
if FTrackKillSecondary is true.

if(fTrackKillSecondary) {
return kTRUE;

Inside ProcessHits after you have stored your primaries,
do fTrackKillSecondary=KTRUE, if you have a secondary or CurrentParentTrack is not -1.

I hope it helps, Wink

Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: License ?
Next Topic: photos and custom event generator
Goto Forum:

Current Time: Tue Apr 16 08:09:13 CEST 2024

Total time taken to generate the page: 0.01165 seconds