Message: Re: Determining target nucleus in interactions Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Ok Re: Determining target nucleus in interactions 

Forum: Hadronic Processes
Re: Question Determining target nucleus in interactions (Matthew)
Date: 16 Jan, 2018
From: Matthew Blackston <Matthew Blackston>

After all these years, I finally revisited this and have determined how to get the A and Z of the target nucleus in an interaction and I thought I would include the example code I used.

In the ProcessHits method of my SensitiveDetector class, I do the following:

    const G4StepPoint *thePostStepPoint = theStep->GetPostStepPoint();
    const G4VProcess *theProcessDefinedStep = (G4VProcess*)thePostStepPoint->GetProcessDefinedStep();
    if(theProcessDefinedStep->GetProcessType() == fHadronic){

        const G4HadronicProcess *theHadProcess = dynamic_cast<const G4HadronicProcess*>(thePostStepPoint->GetProcessDefinedStep());
        if(theHadProcess){
            scatA = theHadProcess->GetTargetNucleus()->GetA_asInt();
            scatZ = theHadProcess->GetTargetNucleus()->GetZ_asInt();
        }
    }

This gives me the A & Z of the target isotope of the hadronic interaction.

 Add Message Add Message
to: "Re: Determining target nucleus in interactions"

 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 ]