fKillTrackAndSecondaries not killing the particles

Dear all,
I was using fKillTrackAndSecondaries to kill the e+ generated. But when I run it with verbosity I still see e+ is stacked and see annihilation gamma. The snippet of the code I used in SteppingAction is:

if((volume==“DetectorPhys” ) && (aStep->GetTrack()->GetDefinition()->GetParticleName() == “e+”))

{

 if(eKin > .0 ){

G4String CPName;

if(aStep->GetTrack()->GetCreatorProcess()!=0){

CPName = aStep->GetTrack()->GetCreatorProcess()->GetProcessName();

       //if(CPName == "annihil"){

  std::ofstream WriteDataIn("DetectorPoistronall.txt", std::ios::app);

  WriteDataIn <<   eKin             << '\t' << "   "

<< PosX << ‘\t’ << " "

<< PosY << ‘\t’ << " "

<< PosZ << ‘\t’ << " "

<< MomX << ‘\t’ << " "

<< MomY << ‘\t’ << " "

<< MomZ << ‘\t’ << " "

<< globalTime << ‘\t’ << " "

           <<   eventNum         << '\t' << "   "

<< parentID << ‘\t’ << " "

<< trackID << ‘\t’ << " "

           <<   CPName         << '\t' << "   "

           <<   particle         << '\t' << "   "

<< G4endl;

theTrack->SetTrackStatus(fKillTrackAndSecondaries);}

theTrack->SetTrackStatus(fKillTrackAndSecondaries);}

theTrack->SetTrackStatus(fKillTrackAndSecondaries);}

And in the screen I can see that :


G4WT0 > * G4Track Information: Particle = e+, Track ID = 12, Parent ID = 1

G4WT0 > *********************************************************************************************************

G4WT0 >

G4WT0 > Step# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolume ProcName

G4WT0 > 0 -226 0.0513 0.00364 0.106 0 0 0 phantomPhys initStep

G4WT0 > 1 -226 0.0546 0.0467 0.0454 0.0603 0.13 0.13 DetectorPhys DetectorROGeometry

G4WT0 > 2 -226 0.0619 0.0627 0 0.0454 0.0335 0.164 DetectorPhys eIoni

G4WT0 > Track (trackID 12, parentID 1) is processed with stopping code 3

G4WT0 > ### pop requested out of 0 stacked tracks.

G4WT0 > ### 0 waiting tracks are re-classified to

G4WT0 > 0 urgent tracks and 0 waiting tracks.

G4WT0 > NULL returned from G4StackManager.

G4WT0 > Terminate current event processing.
n

If my understanding of this kill command is wrong, can you suggest me how do I implement it such that I don’t see e+ annihilating at all. Thank you for the help.

Best,
Ananta

Update: For some reason there were still some e+ in phantom phys even though I defined the phantom and detector phys to be same. So, including PhantomPhys in the if condition resolved it.

Best,
Ananta