VGM
Version 5.5
Toggle main menu visibility
Loading...
Searching...
No Matches
packages
RootGM
source
materials
Isotope.cxx
Go to the documentation of this file.
1
// $Id$
2
3
// -----------------------------------------------------------------------
4
// The RootGM 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 implementations for Root Isotope.
16
//
17
// Author: Ivana Hrivnacova; IPN Orsay
18
19
#include "
RootGM/materials/Isotope.h
"
20
#include "
RootGM/common/Units.h
"
21
#include "
RootGM/materials/IsotopeMap.h
"
22
23
#include "TGeoElement.h"
24
25
#include <math.h>
26
27
//_____________________________________________________________________________
28
RootGM::Isotope::Isotope
(
const
std::string& name,
int
z,
int
n,
double
a)
29
:
VGM
::IIsotope(),
30
fIsotope(
31
new TGeoIsotope(name.data(), z, n, a /
RootGM
::
Units
::AtomicWeight()))
32
{
39
40
// Register Isotope in the map
41
IsotopeMap::Instance
()->
AddIsotope
(
this
, fIsotope);
42
}
43
44
//_____________________________________________________________________________
45
RootGM::Isotope::Isotope
(TGeoIsotope* tgeoIsotope)
46
:
VGM
::IIsotope(), fIsotope(tgeoIsotope)
47
{
49
50
// Register Isotope in the map
51
IsotopeMap::Instance
()->
AddIsotope
(
this
, fIsotope);
52
}
53
54
//_____________________________________________________________________________
55
RootGM::Isotope::~Isotope
()
56
{
57
//
58
}
59
60
//
61
// public functions
62
//
63
64
//_____________________________________________________________________________
65
std::string
RootGM::Isotope::Name
()
const
{
return
fIsotope->GetName(); }
66
67
//_____________________________________________________________________________
68
int
RootGM::Isotope::Z
()
const
{
return
fIsotope->GetZ(); }
69
70
//_____________________________________________________________________________
71
int
RootGM::Isotope::N
()
const
{
return
fIsotope->GetN(); }
72
73
//_____________________________________________________________________________
74
double
RootGM::Isotope::A
()
const
75
{
76
return
fIsotope->GetA() *
RootGM::Units::AtomicWeight
();
77
}
Units.h
IsotopeMap.h
Isotope.h
RootGM::IsotopeMap::Instance
static IsotopeMap * Instance()
Definition
IsotopeMap.cxx:28
RootGM::IsotopeMap::AddIsotope
void AddIsotope(VGM::IIsotope *, TGeoIsotope *)
Definition
IsotopeMap.cxx:63
RootGM::Isotope::N
virtual int N() const
Return the effective number of nucleons.
Definition
Isotope.cxx:71
RootGM::Isotope::Name
virtual std::string Name() const
Return the name of this element.
Definition
Isotope.cxx:65
RootGM::Isotope::A
virtual double A() const
Return the effective effective mass of a mole in g/mole.
Definition
Isotope.cxx:74
RootGM::Isotope::Z
virtual int Z() const
Return the effective atomic number.
Definition
Isotope.cxx:68
RootGM::Isotope::Isotope
Isotope(const std::string &name, int z, int n, double a)
Definition
Isotope.cxx:28
RootGM::Isotope::~Isotope
virtual ~Isotope()
Definition
Isotope.cxx:55
RootGM::Units
Conversion from Root physical units to VGM units.
Definition
Units.h:28
RootGM::Units::AtomicWeight
static double AtomicWeight()
Return Root atomic weight unit in VGM units.
Definition
Units.h:87
RootGM
VGM implementation for Root.
Definition
axis.h:28
VGM
VGM interfaces.
Definition
VMedium.h:28
Generated on
for VGM by
1.17.0