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

Idea Re: biasing muon cross section interaction 

Forum: Biasing and Scoring
Re: Question biasing muon cross section interaction (Sean Turnbull)
Re: Question Re: biasing muon cross section interaction (Stefan E. Mueller)
Date: 15 Apr, 2014
From: C Mos <C Mos>

I would guess maybe because the vector is empty empty as it has not being instantiated. To check if the vector exist:

  if(!vect)  // OR     if(vect!=0)  OR   if(vect!=NULL){
    //Get size here
  }else{
    G4cout << Vector is NULL. It has not being instantiated. Maybe you have to let the RunManager build the physics list first?" << G4cout;
  }

Are you retrieving your data from the main function? If I would change any aspect of my physics list I will do it but creating my own physics list and then redefining the process of interest. There might be some other tricks. Maybe using proper accessors and mutators if available? I will leave other options to the experts.

C Mos

Inline Depth:
 0 0
 1 1
Add message: (add)

Question Re: biasing muon cross section interaction  by Stefan E. Mueller <Stefan E. Mueller>,   16 Apr, 2014
Re: Idea Re: biasing muon cross section interaction (C Mos)
OK,

I try to retrieve the process list for photons now in my G4VPhysicsConstructor-class which I use to add G4GammaConversionToMuons to the list of processes for photons.

Right after I add the process with

     pManager->AddDiscreteProcess(new G4GammaConversionToMuons());

I do

     G4ProcessVector* procVect = new G4ProcessVector();
     procVect = pManager->GetProcessList();
     if(!procVect) {
       G4int length = pManager->GetProcessListLength();
       G4int length2 = procVect->size();
       G4cout << "size " << length << " " << length2 << G4endl;
     } else {
       G4cout << "Vector is NULL. It has not being instantiated. Maybe you have to let the RunManager build the physics list first?" << G4endl;
     }

Code compiles and builds, and also runs, but indeed I get the message that "Vector is NULL...". Trying to do the same in my main.cc (after the runmanager has registered the physics and initialized the physics lists) results in a crash.

Anyway, before coming too off-topic on where, when and how ProcessVectors are filled, my main question is:

How can I set the PIL-factor for the process "G4GammaConversionToMuons" ?

Many thanks for suggestions on how to do that,

Stefan

News Re: biasing muon cross section interaction  by Stefan E. Mueller <Stefan E. Mueller>,   05 May, 2014
Re: Question Re: biasing muon cross section interaction (Stefan E. Mueller)
OK,

I think I managed to set the PIL-factor. I do it at the end of the Extra-Physics class I created to register the processes "GammaToMuPair" to gamma-process list, and "muonNuclear" to the mu+/mu- process lists, e.g.

   G4double fac = 20000.;
   G4ProcessTable* theProcessTable = G4ProcessTable::GetProcessTable();
   G4MuonNuclearProcess* muPlusNucScaleProcess = (G4MuonNuclearProcess*)
            theProcessTable->FindProcess("muonNuclear","mu+");
   if(muPlusNucScaleProcess) muPlusNucScaleProcess->SetPILfactor(1./fac);

However, I noted that e.g. for the process "GammaToMuPair", I can also call "SetCrossSecFactor(factor)".

What is the difference between "SetPILfactor(factor)" and "SetCrossSecFactor(factor)"? Which of the two will set the weight of the produced tracks accordingly? Both? None?

Stefan

Idea Re: biasing muon cross section interaction  by Stefan E. Mueller <Stefan E. Mueller>,   05 Jun, 2014
Re: News Re: biasing muon cross section interaction (Stefan E. Mueller)
OK,

it has been confirmed to me that the weights are unchanged using the way I described. However, I was pointed to the new generic biasing introduced in v10.0, e.g. examples/extended/biasing/GB01.

I am currently trying to implement this in my code.

Stefan

On Mon, 05 May 2014 17:59:57 GMT, Stefan E. Mueller wrote:

> OK,
> 
> I think I managed to set the PIL-factor. I do it at the end of the
> Extra-Physics class I created to register the processes "GammaToMuPair"
> to gamma-process list, and "muonNuclear" to the mu+/mu- process lists,
> e.g.
> 
>    G4double fac = 20000.;
>    G4ProcessTable* theProcessTable = G4ProcessTable::GetProcessTable();
>    G4MuonNuclearProcess* muPlusNucScaleProcess = (G4MuonNuclearProcess*)
>             theProcessTable->FindProcess("muonNuclear","mu+");
>    if(muPlusNucScaleProcess) muPlusNucScaleProcess->SetPILfactor(1./fac);
> 
> However, I noted that e.g. for the process "GammaToMuPair", I can also
> call "SetCrossSecFactor(factor)".
> 
> What is the difference between "SetPILfactor(factor)" and
> "SetCrossSecFactor(factor)"? Which of the two will set the weight of the
> produced tracks accordingly? Both? None?
> 
> Stefan
> 

 Add Message Add Message
to: "Re: biasing muon cross section interaction"

 Subscribe Subscribe

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