Message: Kill photons in stacking action Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Kill photons in stacking action 

Forum: Event and Track Management
Date: 16 May, 2011
From: Mario <Mario>

Hello,

i would like to kill photons below a given threshold, so I'm doing this here in my stacking action

G4ClassificationOfNewTrack
scintillatorStackingAction::ClassifyNewTrack(const G4Track * aTrack)
{
  if(aTrack->GetDefinition() == G4OpticalPhoton::OpticalPhotonDefinition())
  { // particle is optical photon
    if(aTrack->GetParentID()>0)
    { // particle is secondary
      gammaCounter++;
    }
    if(aTrack->GetTotalEnergy()<2*eV){
    	G4cout << "I killed a photon with " << aTrack->GetTotalEnergy() / eV << G4endl;
    	aTrack->SetTrackStatus(fStopAndKill);

    }
  }
  return fUrgent;
}

When compiling I get this error message:

Compiling scintillatorStackingAction.cc ...

src/scintillatorStackingAction.cc: In member function ‘virtual G4ClassificationOfNewTrack scintillatorStackingAction::ClassifyNewTrack(const G4Track*)’: src/scintillatorStackingAction.cc:68: error: no matching function for call to ‘G4Track::SetTrackStatus(G4TrackStatus) const’

/localscratch/geant4.9.3.p02_test/include/G4Track.icc:206: note: candidates are: void G4Track::SetTrackStatus(G4TrackStatus) <near match>

I'm a little bit confused, should it not work that way?

Thanks for any advise

Mario

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

1 Feedback: Re: Kill photons in stacking action   (Pedro Arce - 16 May, 2011)
(_ Ok: Re: Kill photons in stacking action   (Mario Vormstein - 16 May, 2011)
 Add Message Add Message
to: "Kill photons in stacking action"

 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 ]