Message: efficient test for isotope Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question efficient test for isotope 

Forum: Hadronic Processes
Date: 04 Mar, 2011
From: Sean Turnbull <Sean Turnbull>

Hi all,

I am about to run my simulations to gather data and am looking for any speedups I can find.

I have this in my SteppingAction.cc

void SteppingAction::UserSteppingAction(const G4Step* aStep) {

// ---------------------------------------------------------------------------------
  G4Track* fTrack = aStep->GetTrack();
..
    if ( fTrack->GetCurrentStepNumber() != 1) return;
      //- check for this is not a primary particle. e.g. ParentID > 0 .
    if ( fTrack->GetParentID() == 0 ) return;

    G4String particleName = fTrack->GetDefinition()->GetParticleName();

<------>if ( (particleName=="Au198[0.0]")  )
        {
            //count++;
<------>    G4cout << " Isotope: " << particleName << G4endl;
<------>}
..
    <-->// get the analysis manager
    <-->// exrdmAnalysisManager* analysis = exrdmAnalysisManager::getInstance();
    <-->//G4cout << particleName << " " << weight << " " << time/s << G4endl;
    <-->//analysis->AddIsotope(particleName, weight, time);
//    }
..
}

I am wondering if a string comparison is the best method to test for the Gold isotope production?

Thanks a lot.

Sean

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

1 None: Re: efficient test for isotope   (Dennis H. Wright - 09 Mar, 2011)
 Add Message Add Message
to: "efficient test for isotope"

 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 ]