GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GammaLink.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_GammaLink
24 #define Gw_GammaLink
25 #define GW_GAMMALINK_H Gw_GammaLink
26 
27 #ifndef Gw_link
28 #include "Link.h"
29 #endif
30 #ifndef GW_DATA_H
31 #include "Data.h"
32 #endif
33 #ifndef GW_MEASURE_H
34 #include "Measure.h"
35 #endif
36 
37 namespace Gw {
38 
39 
49 class GammaLink : public Link
50 {
51 
52 private:
53  static Int_t fgMaxAttributes; // maximum number of attributes for a gamma link
54 
55 private:
56  TString fAttr0; // attribute for energy
57  TString fAttr1; // attribute for multipolarity
58  TString fAttr2; // attribute for mixing
59  TString fAttr3; // attribute for conversion
60  TString fAttr4; // attribute for strength
61  TString fAttr5; // attribute for tau
62  TString fAttrLabel; // To know the attribute for each label
63 
64 protected:
65  Data<Char_t> fEM; // Electric/Magnetic transition
66  Data<UShort_t> fLambda; // numeric part of the multipolarity
67 
68  Measure<Float_t> fEnergy; // gamma ray energy
69  Measure<Float_t> fMixing; // mixing ratio
70  Measure<Float_t> fConv; // conversion
71 
72 public:
73  GammaLink();
74  GammaLink(const GammaLink &);
75  GammaLink& operator=(const GammaLink &);
76  virtual ~GammaLink();
77 
79  virtual Measure<Float_t> & GetMixing() { return fMixing; }
80 
82  virtual Measure<Float_t> & GetEnergy() { return fEnergy; }
83 
85  virtual Measure<Float_t> & GetConversion() { return fConv; }
86 
88 
94  virtual void SetEM(const char *em= "E2");
95 
97  virtual bool IsE() const { return fEM.Get() == 'E'; }
99  virtual bool IsM() const { return fEM.Get() == 'M'; }
101  virtual UShort_t GetLambda() const { return fLambda.Get() ; }
102 
104  //virtual void DoCascade(Cascade &cas, Option_t *opt = "") ;
105  virtual Int_t DoCascade(TSeqCollection &col, Option_t *opt = "");
106 
107  virtual void ls(Option_t* option = "") const ;
108 
109  void SetGamma(const char* energy, const char* multipolarity,
110  const char* mixing, const char* conversion,
111  const char* strength, const char* tau); //*MENU* *ARGS={energy=>fAttr0,multipolarity=>fAttr1,mixing=>fAttr2,conversion=>fAttr3,strength=>fAttr4,tau=>fAttr5}
112 
113  const char* GetAttr(Int_t idx);
114  const char* GetAttr0() { return Form("%7.1f %4.1f", fEnergy.Get(), fEnergy.GetError()); }
115  const char* GetAttr1() { return Form("%c%d", fEM.Get(), fLambda.Get()); }
116  const char* GetAttr2() { return Form("%7.1f %4.1f", fMixing.Get(), fMixing.GetError()); }
117  const char* GetAttr3() { return Form("%7.1f %4.1f", fConv.Get(), fConv.GetError()); }
118  const char* GetAttr4() { return Form("%7.1f %4.1f", GetStrength().Get(), GetStrength().GetError()); }
119  const char* GetAttr5() { return Form("%7.1f %4.1f", GetTau().Get(), GetTau().GetError()); }
120 
122 
128  virtual void SetAttrLabel(const char *);
129 
131  virtual const char * GetAttrLabel() { return fAttrLabel.Data(); }
132 
134  virtual const char* GetLabel0();
135  virtual const char* GetLabel1();
136  virtual const char* GetLabel2();
137 
139  ClassDef(GammaLink,1); // A GammaLink binds two nuclear levels
140 };
141 // inline members
142 
143 }
144 #endif
virtual Data_T GetError() const
return the error on the measured value
Definition: Measure.h:109
template that defines a general Data
template that defines a general Measure
virtual Data_T Get() const
get the value, can be overloaded
Definition: Data.h:70