VGM Version 5.3
Loading...
Searching...
No Matches
Isotope.cxx
Go to the documentation of this file.
1// $Id$
2
3// -----------------------------------------------------------------------
4// The Geant4GM package of the Virtual Geometry Model
5// Copyright (C) 2007, Ivana Hrivnacova
6// All rights reserved.
7//
8// For the licensing terms see vgm/LICENSE.
9// Contact: ivana@ipno.in2p3.fr
10// -----------------------------------------------------------------------
11
12//
13// Class Isotope
14// ---------------
15// VGM implementation for Geant4 isotope.
16//
17// Author: Ivana Hrivnacova; IPN Orsay
18
19#include "ClhepVGM/Units.h"
20
23
24#include "G4Isotope.hh"
25
26//_____________________________________________________________________________
27Geant4GM::Isotope::Isotope(const std::string& name, int z, int n, double a)
28 : VGM::IIsotope(),
29 fIsotope(new G4Isotope(name, z, n, a / ClhepVGM::Units::AtomicWeight()))
30{
37
38 // Register Isotope in the map
39 IsotopeMap::Instance()->AddIsotope(this, fIsotope);
40}
41
42//_____________________________________________________________________________
43Geant4GM::Isotope::Isotope(G4Isotope* isotope)
44 : VGM::IIsotope(), fIsotope(isotope)
45{
47
48 // Register Isotope in the map
49 IsotopeMap::Instance()->AddIsotope(this, fIsotope);
50}
51
52//_____________________________________________________________________________
54{
56}
57
58//_____________________________________________________________________________
59Geant4GM::Isotope::Isotope(const Isotope& rhs) : VGM::IIsotope(rhs)
60{
62}
63
64//_____________________________________________________________________________
69
70//
71// public functions
72//
73
74//_____________________________________________________________________________
75std::string Geant4GM::Isotope::Name() const { return fIsotope->GetName(); }
76
77//_____________________________________________________________________________
78int Geant4GM::Isotope::Z() const { return fIsotope->GetZ(); }
79
80//_____________________________________________________________________________
81int Geant4GM::Isotope::N() const { return fIsotope->GetN(); }
82
83//_____________________________________________________________________________
85{
86 return fIsotope->GetA() * ClhepVGM::Units::AtomicWeight();
87}
static double AtomicWeight()
Return CLHEP default atomic weight unit in VGM units.
Definition Units.cxx:107
static IsotopeMap * Instance()
void AddIsotope(VGM::IIsotope *, G4Isotope *)
VGM implementation for Geant4 Isotope.
Definition Isotope.h:32
virtual int Z() const
Return the effective atomic number.
Definition Isotope.cxx:78
virtual std::string Name() const
Return the name of this element.
Definition Isotope.cxx:75
virtual ~Isotope()
Definition Isotope.cxx:65
virtual int N() const
Return the effective number of nucleons.
Definition Isotope.cxx:81
virtual double A() const
Return the effective effective mass of a mole in g/mole.
Definition Isotope.cxx:84
ClhepVGM utilities.
Definition transform.h:29
VGM interfaces.
Definition VMedium.h:28