Message: Re: units Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: units 

Forum: Documentation and Examples
Re: None units (Steven Avery)
Date: 24 Sep, 2003
From: Vladimir Ivanchenko <Vladimir Ivanchenko>

On Wed, 24 Sep 2003, Steven Avery wrote:

> *** Discussion title: Documentation and Examples
> Email replies to must include:
>   In-Reply-To: <"/docsexamples/65">
>   Subject: ...change this to be about your reply.
> this may seem trivial, but as a novice it's a struggle. in
> examples/extended/electromagnetic/Testem7 the 1-D histogram produced is
> MeV/mm. How do you change this to keV/micron? i assume you change
> mm->microns by increasing the number of bins. But I don't see how to
> change Mev -> keV? Is this simply done by change the initial beam energy
> from MeV -> keV.
> thanks

Any physical unit inside Geant4 has a dimension, there is also units 
table. For example, let us assume that E is the energy of the particle:

G4cout << E/MeV << " MeV" << G4endl;
G4cout << E/keV << " keV" << G4endl;

The same value will be printed in MeV or in keV.


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

 Add Message Add Message
to: "Re: units"

 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 ]