GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NuclearLevel.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2004 by Olivier Stezowski *
3  * stezow(AT)ipnl.in2p3.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 
23 #ifndef Gw_NuclearLevel
24 #define Gw_NuclearLevel
25 #define GW_NUCLEARLEVEL_H Gw_NuclearLevel
26 
27 #ifndef GW_LEVEL_H
28 #include "Level.h"
29 #endif
30 
31 #ifndef GW_BASENUCLEUS_H
32 #include <BaseNucleus.h>
33 #endif
34 
35 #ifndef GW_PARITY_H
36 #include "Parity.h"
37 #endif
38 
39 #ifndef GW_SPIN_H
40 #include "Spin.h"
41 #endif
42 
43 #ifndef GW_MEASURE_H
44 #include <Measure.h>
45 #endif
46 
47 namespace Gw {
48 
66 class NuclearLevel : public Level {
67 
68 protected:
69  BaseNucleus fNucleus; // to which nucleus this level belongs
70 
71  Measure<Float_t> fEnergy; // energy and its error
72  Measure<Float_t> fT; // half-life of this level
73  Parity fParity; // parity of this level
74  Spin fSpin; // spin of this level
75 
76 public:
77  NuclearLevel();
78  virtual ~NuclearLevel();
79 
81  virtual void SetLabels(const char *l0, const char *l1, const char *l2, const char *l3) ; // *MENU* *ARGS={l0=>fLabel0,l1=>fLabel1,l2=>fLabel2,l3=>fLabel3}
82 
84  Spin& GetSpin() { return fSpin; }
85 
87  Parity& GetParity() { return fParity; }
88 
90  Measure<Float_t> & GetE() { return fEnergy; }
92 
93  // to get the half-life time and modify it if it is needed
94  Measure<Float_t> & GetT() { return fT; }
95 
96  virtual void ls(Option_t* option = "") const ;
97 
99  const char* GetLabel0();
100  const char* GetLabel1() { return fParity.IsParity(Parity::kPlus) ? "+" : "-"; }
101  const char* GetLabel2() { return Form("%7.1f %4.1f", fT.Get(), fT.GetError()); }
102  const char* GetLabel3() { return Form("%7.1f %4.1f", fEnergy.Get(), fEnergy.GetError()); }
103 
105  ClassDef(NuclearLevel,1); // a NuclearLevel level
106 };
107 // inline members
108 
109 }
110 
111 #endif
virtual Data_T GetError() const
return the error on the measured value
Definition: Measure.h:109
const char * GetLabel1()
Definition: NuclearLevel.h:100
A nuclear level.
Definition: NuclearLevel.h:66
A spin is defined by two integers: a numerator and a denominator.
Definition: Spin.h:46
virtual void ls(Option_t *option="") const
This class discribes a specific quantum number: the parity.
Definition: Parity.h:46
template that defines a general Measure
const char * GetLabel3()
Definition: NuclearLevel.h:102
virtual Data_T Get() const
get the value, can be overloaded
Definition: Data.h:70
Parity & GetParity()
get the parity and modify it if it is needed
Definition: NuclearLevel.h:87
Measure< Float_t > & GetEnergy()
Definition: NuclearLevel.h:91
Measure< Float_t > fEnergy
Definition: NuclearLevel.h:71
Measure< Float_t > & GetE()
to get the energy and modify it if it is needed
Definition: NuclearLevel.h:90
ClassDef(NuclearLevel, 1)
rootcint dictionary
header file for a general Level
Measure< Float_t > fT
Definition: NuclearLevel.h:72
BaseNucleus fNucleus
Definition: NuclearLevel.h:69
bool IsParity(Parity::EParity) const
Definition: Parity.h:78
Base class for a nucleus which means its composition.
Definition: BaseNucleus.h:46
header file for a BaseNucleus
header file for the Parity quantum number
Spin & GetSpin()
to get the spin and modify it if it is needed
Definition: NuclearLevel.h:84
Measure< Float_t > & GetT()
Definition: NuclearLevel.h:94
virtual ~NuclearLevel()
virtual void SetLabels(const char *l0, const char *l1, const char *l2, const char *l3)
set labels and modify the attributes of this nuclear level
const char * GetLabel2()
Definition: NuclearLevel.h:101
header file for a spin quantum number
const char * GetLabel0()
overload function for specified used in this class.
Base class describing a general level.
Definition: Level.h:53