Message: biasing muon cross section interaction Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question biasing muon cross section interaction 

Forum: Biasing and Scoring
Date: 30 Jan, 2012
From: Sean Turnbull <Sean Turnbull>

Hello,

I am simulating muons (cosmic rays) at various altitudes above ground and want to bias the cross section to increase efficiency and decrease simulation time.

I have this this snippet of code in my main.cc that I have tried to get working. Can anyone suggest a improved version of it? I get errors these errors:

au-muon.cc: In function ‘int main(int, char**)’:

au-muon.cc:70:19: warning: name lookup of ‘c’ changed for ISO ‘for’ scoping [-fpermissive]

au-muon.cc:66:14: warning: using obsolete binding at ‘c’ [-fpermissive]

au-muon.cc:71:20: error: request for member ‘length’ in ‘vect’, which is of non-class type ‘G4ProcessVector*’

au-muon.cc:73:15: error: ‘class G4ProcessVector’ has no member named ‘SetPILfactor’ ’

code:

G4double multiplicativeFactor = 10;
  G4String procName;
  G4ProcessVector* vect = G4MuonMinus::Definition()->GetProcessManager()->GetProcessList();
  size_t length = vect.size();
  G4cout << "size" << length << G4endl;
  G4int index = -1;

  for(size_t c = 0; c < length; c++)
    procName = (*vect)[c]->GetProcessName();
    if (procName == "muMinusCaptureAtRest")
    {
          index = c;
          c = vect.length();
    }

  vect[index].SetPILfactor(multiplicativeFactor);

Thanks for any help.

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

1 Question: Re: biasing muon cross section interaction   (Stefan E. Mueller - 14 Apr, 2014)
(_ Idea: Re: biasing muon cross section interaction   (C Mos - 15 Apr, 2014)
(_ Question: Re: biasing muon cross section interaction   (Stefan E. Mueller - 16 Apr, 2014)
(_ News: Re: biasing muon cross section interaction   (Stefan E. Mueller - 05 May, 2014)
(_ Idea: Re: biasing muon cross section interaction   (Stefan E. Mueller - 05 Jun, 2014)
 Add Message Add Message
to: "biasing muon cross section interaction"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews