VGM Version 5.3
Loading...
Searching...
No Matches
ElementNonGeo.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 - 2010 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 Element
14// ---------------
15// VGM implementations for Root element which is not represented via TGeoElement
17//
18// Author: Ivana Hrivnacova; IPN Orsay
19
21#include "RootGM/common/Units.h"
23
24#include "TGeoElement.h"
25#include "TGeoManager.h"
26
27#include <cstdlib>
28#include <math.h>
29
30//_____________________________________________________________________________
32 const std::string& name, const std::string& symbol, double z, double a)
33 : VGM::IElement(), fName(name), fSymbol(symbol), fZ(z), fN(a), fA(a)
34{
41}
42
43//_____________________________________________________________________________
48
49//
50// public functions
51//
52
53//_____________________________________________________________________________
54std::string RootGM::ElementNonGeo::Name() const { return fName; }
55
56//_____________________________________________________________________________
57std::string RootGM::ElementNonGeo::Symbol() const { return fSymbol; }
58
59//_____________________________________________________________________________
60double RootGM::ElementNonGeo::Z() const { return fZ; }
61
62//_____________________________________________________________________________
63double RootGM::ElementNonGeo::N() const { return fN; }
64
65//_____________________________________________________________________________
67{
68 return fA * RootGM::Units::AtomicWeight();
69}
70
71//_____________________________________________________________________________
72int RootGM::ElementNonGeo::NofIsotopes() const { return 0; }
73
74//_____________________________________________________________________________
75VGM::IIsotope* RootGM::ElementNonGeo::Isotope(int /*i*/) const { return 0; }
76
77//_____________________________________________________________________________
78double RootGM::ElementNonGeo::RelAbundance(int /*i*/) const { return 0; }
virtual double Z() const
Return the effective atomic number.
virtual VGM::IIsotope * Isotope(int i) const
Return the i-th isotope constituing this element.
ElementNonGeo(const std::string &name, const std::string &symbol, double z, double a)
object in Root geometry.
virtual std::string Symbol() const
Return the symbol of this element.
virtual std::string Name() const
Return the name of this element.
virtual double N() const
Return the effective number of nucleons.
virtual int NofIsotopes() const
Return the number of isotopes constituing this element.
virtual double A() const
Return the effective effective mass of a mole in g/mole.
virtual double RelAbundance(int i) const
Return the relative abundance (the fraction of nb of atomes per volume) of the i-th isotope constitui...
static double AtomicWeight()
Return Root atomic weight unit in VGM units.
Definition Units.h:87
The VGM interface to elements.
Definition IIsotope.h:28
VGM interfaces.
Definition VMedium.h:28