Message: ClassifyNewTrack(const G4Track * aTrack) in SteppingAction Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None ClassifyNewTrack(const G4Track * aTrack) in SteppingAction 

Forum: Event and Track Management
Date: 28 Jun, 2017
From: Kathrin Schier <Kathrin Schier>

Hi!

I am simulating the detector response of a cerenkov detector and would like to count the generated cerenkov photons much like in the optical photons example. In the example they use:

G4ClassificationOfNewTrack
DetectorP2SteppingAction::ClassifyNewTrack(const G4Track * aTrack)
{
  if(aTrack->GetDefinition() == G4OpticalPhoton::OpticalPhotonDefinition())
  { // particle is optical photon
    if(aTrack->GetParentID()>0)
    { // particle is secondary
      if(aTrack->GetCreatorProcess()->GetProcessName() == "Scintillation")
        eventaction->IncreaseScintillationCounter();
      if(aTrack->GetCreatorProcess()->GetProcessName() == "Cerenkov")
        eventaction->IncreaseCerenkovCounter();
    }
  }
  return fUrgent;
}

in StackingAction.cc

and : virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack);

in .hh

My version does not have a stackingAction. When I try to do the same in my SteppingAction,

I always get error: SteppingAction.cc:110:43: error: qualified-id in declaration before ( token
 SteppingAction::ClassifyNewTrack(const G4Track * aTrack)

Do you know what the problem might be?

 Add Message Add Message
to: "ClassifyNewTrack(const G4Track * aTrack) in SteppingAction"

 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 ]