Message: Re: Recording (n, gamma) reactions, and misc. newbie questions Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Recording (n, gamma) reactions, and misc. newbie questions 

Forum: Particles
Re: Question Recording (n, gamma) reactions, and misc. newbie questions (Karen Pease)
Re: Feedback Re: Recording (n, gamma) reactions, and misc. newbie questions (Michael H. Kelsey)
Re: Question Re: Recording (n, gamma) reactions, and misc. newbie questions (Karen Pease)
Date: 20 May, 2015
From: Michael H. Kelsey <Michael H. Kelsey>

Karen Pease writes:
> Just to make sure I'm not confusing concepts, though and thinking I'm
> measuring things that I'm not, could you let me know if this looks
> right?

It looks right in general. There are a few minor suggestions I have, but nothing which changes the algorithm.

> void SteppingAction::UserSteppingAction(const G4Step* step)
> {
>   if (step->GetTrack()->GetGlobalTime() / microsecond > 1.0)
>     return;

Consider writing "...GetGlobalTime() > 1.*microsecond" instead; units go with numbers :-)

>   const auto volume =
> step->GetPreStepPoint()->GetTouchableHandle()->GetVolume()->GetLogicalVolume()
->GetName(); ;
>   fEventAction->data[volume].energy += step->GetTotalEnergyDeposit();
> 
>   if (step->GetTrack()->GetDefinition()->GetParticleName() == "neutron")

Here and below, it's better to test on pointers rather than on strings:

        if (step->GetTrack()->GetDefinition() == G4Neutron::Definition())

The latter is a singleton, and is guaranteed to return the same pointer in all threads during a given job.

>   {
>     ++fEventAction->data[volume].interactions;
>     for (auto iter : *step->GetSecondary())
>     {
>       const auto def = iter->GetDefinition();
>       const auto name = def->GetParticleName();
>       if (name == "neutron")
>         ++fEventAction->data[volume].multiplications;
>       else
>       {
>         if (def->GetAtomicNumber() >= 1)
>           ++fEventAction->data[volume].captures[name];
>       }
>     }
>   }
> }

I guess that "auto" is a C++11 feature, which essentally destroys strong typing? I don't like it, but then I'm an old curmudgeon.

[...]

> But what got me was that the yield looked rather low, I'd expect more
> (n, 2n) reactions. LIFE for example has a useful multiplication factor
> of 1.8, with only 17MeV neutrons.

What physics list are you using? Below 20 MeV, you should use a physics list which includes NeutronHP, such as FTFP_BERT_HP, Shielding or QBBC.

[...]

> One thing I forgot to ask last time: I figured out that I can set a
> solid's temperature by initializing it like one initializes a gas, but
> with kStateSolid:
> 
> auto beryllium = new G4Material("Beryllium", 4., 9.012182*g/mole,
> 1.8480*g/cm3, kStateSolid, 1300*kelvin, 1*atmosphere);
> 
> But is it possible to do anything more complex than that - for example,
> temperature gradients? And does Geant4 take into account heat flow at
> all? There's not much in the examples I see dealing with heat, which
> surprises me. ?

No, G4 doesn't treat thermal stuff, like heat flow, at all. If you want a "gradient," you would need to create daughter volumes with materials set to different temperatures.

So far as I know, the only place where temperature is used for physics is in NeutronHP, if you specify materials with names that include the magic string "TS_" (or is it "_TS"?) for thermal scattering. There's a discussion of this in the relevant section of the Application Users' Guide.

Good luck!
                                                -- Michael Kelsey

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

1 None: Re: Recording (n, gamma) reactions, and misc. newbie questions   (Michael H. Kelsey - 21 May, 2015)
(_ Feedback: Re: Recording (n, gamma) reactions, and misc. newbie questions   (Michael H. Kelsey - 21 May, 2015)
(_ None: Re: Recording (n, gamma) reactions, and misc. newbie questions   (Karen Pease - 21 May, 2015)
 Add Message Add Message
to: "Re: Recording (n, gamma) reactions, and misc. newbie questions"

 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 ]