KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
KVLifeTime.h
Go to the documentation of this file.
1 
4 #ifndef __KVLIFETIME_H
5 #define __KVLIFETIME_H
6 
7 #include "KVNuclData.h"
8 
15 class KVLifeTime : public KVNuclData {
16 
17 protected:
18  /*
19  TObject's bits can be used as flags, bits 0 - 13 and 24-31 are
20  reserved as global bits while bits 14 - 23 can be used in different
21  bit 14 used by KVNuclData class
22  */
23  enum EStatusBits {
24  kResonnance = BIT(15) //Is Resonnance MeV (1) / Is "Nucleus" s (0)
25  };
26 
27 
28  void init();
29 
30 public:
31  KVLifeTime();
32  KVLifeTime(const Char_t* name);
33  virtual ~KVLifeTime();
34 
35  void SetResonance(Bool_t resonnance)
36  {
40  SetBit(kResonnance, resonnance);
41  if (resonnance) fUnits = "MeV";
42  else fUnits = "s";
43  }
45  {
46  return TestBit(kResonnance);
47  }
48 
49  ClassDef(KVLifeTime, 1) //Simple class for storing life time information of nucleus
50 };
51 
52 #endif
char Char_t
bool Bool_t
#define ClassDef(name, id)
#define BIT(n)
Simple class to store lifetime information of nucleus.
Definition: KVLifeTime.h:15
void init()
Definition: KVLifeTime.cpp:47
KVLifeTime()
Default constructor.
Definition: KVLifeTime.cpp:26
Bool_t IsAResonance() const
Definition: KVLifeTime.h:44
void SetResonance(Bool_t resonnance)
Definition: KVLifeTime.h:35
virtual ~KVLifeTime()
Destructor.
Definition: KVLifeTime.cpp:38
Simple abstract class to store value related to nuclear data.
Definition: KVNuclData.h:17
TString fUnits
units (if any)
Definition: KVNuclData.h:21
void SetBit(UInt_t f)
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const