KaliVeda
Toolkit for HIC analysis
KVDBSystem.h
1 /***************************************************************************
2 $Id: KVDBSystem.h,v 1.12 2008/03/07 15:01:34 ebonnet Exp $
3  KVDBSystem.h - description
4  -------------------
5  begin : jeu f� 13 2003
6  copyright : (C) 2003 by Alexis Mignon
7  email : mignon@ganil.fr
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  ***************************************************************************/
18 #ifndef KV_DB_SYSTEM_H
19 #define KV_DB_SYSTEM_H
20 
21 #include "KVDBRecord.h"
22 #include "Riostream.h"
23 #include "KVTarget.h"
24 
25 class KV2Body;
26 class KVNumberList;
27 class KVUnownedList;
28 
52 class KVDBSystem: public KVDBRecord {
53 
54 private:
55 
57 
59 
62 
63 protected:
69 
71 
73 
74 public:
75  KVDBSystem();
76  KVDBSystem(const Char_t* name);
77  virtual ~ KVDBSystem();
78 
80  {
81  return fTarget;
82  };
83  void SetTarget(KVTarget* targ)
84  {
85  fTarget = targ;
86  };
87 
88  virtual void ls(Option_t* option = "*") const;
89  UInt_t GetZtarget() const;
90  UInt_t GetAtarget() const;
91  UInt_t GetZbeam() const;
92  UInt_t GetAbeam() const;
93  UInt_t GetZproj() const;
94  UInt_t GetAproj() const;
95  Float_t GetEbeam() const;
96  Float_t GetEproj() const;
98 
99  UInt_t GetZtot() const;
100  UInt_t GetAtot() const;
101  Double_t GetZVtot() const;
102  Double_t GetPtot() const;
103  Double_t GetEtot() const;
104  Double_t GetECM() const;
105 
106  Bool_t IsCollision() const;
107 
108  void SetZtarget(UInt_t z);
109  void SetAtarget(UInt_t a);
110  void SetZbeam(UInt_t z);
111  void SetAbeam(UInt_t a);
112  void SetEbeam(Float_t energy);
113 
114  void SetBeam(UInt_t z, UInt_t a, Float_t energy);
115 
118  {
119  return const_cast <KVDBSystem* >(this)->_GetRuns();
120  }
121 
122  virtual void GetRunList(KVNumberList&) const;
123  virtual void Save(std::ostream&) const;
124  virtual void Load(std::istream&);
125 
126  Int_t Compare(const TObject*) const;
127 
129 
130  virtual void Print(Option_t* option = "") const;
131 
134  {
135  fRuns = n;
136  }
141  {
142  return fRuns;
143  }
144 
145  void SetRuns(KVNumberList&);
146  void RemoveRun(KVDBRecord*);
147  void RemoveRun(Int_t);
148  void AddRun(KVDBRecord*);
149  void AddRun(Int_t);
150  void RemoveAllRuns();
154 
155  ClassDef(KVDBSystem, 2) // System class
156 };
157 
160 {
161  return fZtarget;
162 }
163 
165 {
166  return fAtarget;
167 }
168 
170 {
171  return fZtarget + fZbeam;
172 }
173 
175 {
176  return fAtarget + fAbeam;
177 }
178 
180 {
181  return fZbeam;
182 }
183 
185 {
186  return fAbeam;
187 }
188 
190 {
191  return fZbeam;
192 }
193 
195 {
196  return fAbeam;
197 }
198 
200 {
201  return fEbeam;
202 }
203 
205 {
206  return fEbeam;
207 }
208 
210 {
211  return (GetTarget() ? GetTarget()->GetTotalThickness() : 0.);
212 }
213 
215 {
216  fZtarget = z;
217 }
218 
220 {
221  fAtarget = a;
222 }
223 
225 {
226  fZbeam = z;
227 }
228 
230 {
231  fAbeam = a;
232 }
233 
234 inline void KVDBSystem::SetEbeam(Float_t energy)
235 {
236  fEbeam = energy;
237 }
238 
239 inline void KVDBSystem::SetBeam(UInt_t z, UInt_t a, Float_t energy)
240 {
241  fZbeam = z;
242  fAbeam = a;
243  fEbeam = energy;
244 }
245 #endif
int Int_t
unsigned int UInt_t
bool Bool_t
char Char_t
float Float_t
double Double_t
const char Option_t
#define ClassDef(name, id)
Relativistic binary kinematics calculator.
Definition: KV2Body.h:166
Record folder for the database.
Definition: KVDBRecord.h:43
Database class used to store information on different colliding systems studied during an experiment....
Definition: KVDBSystem.h:52
UInt_t GetZtarget() const
.............. inline functions ...............
Definition: KVDBSystem.h:159
virtual void Print(Option_t *option="") const
Definition: KVDBSystem.cpp:519
Bool_t IsCollision() const
retourne kTRUE, si le systeme est une collision ie projectile+cible
Definition: KVDBSystem.cpp:105
Int_t Compare(const TObject *) const
Definition: KVDBSystem.cpp:185
UInt_t GetAtarget() const
Definition: KVDBSystem.h:164
void SetRuns(KVNumberList &)
Definition: KVDBSystem.cpp:393
void SetZtarget(UInt_t z)
Definition: KVDBSystem.h:214
KVUnownedList * _GetRuns()
Definition: KVDBSystem.cpp:213
void SetAtarget(UInt_t a)
Definition: KVDBSystem.h:219
Float_t fEbeam
Energy of the beam in MeV/nucleon.
Definition: KVDBSystem.h:68
KVUnownedList * GetRuns() const
Returns a sorted list of all the runs associated with this system.
Definition: KVDBSystem.h:117
void RemoveRun(KVDBRecord *)
Definition: KVDBSystem.cpp:480
void SetZbeam(UInt_t z)
Definition: KVDBSystem.h:224
Double_t GetPtot() const
Definition: KVDBSystem.cpp:135
TString GetBatchName()
Definition: KVDBSystem.cpp:578
KVTarget * GetTarget() const
Definition: KVDBSystem.h:79
Int_t GetNumberRuns()
Definition: KVDBSystem.h:140
virtual void Save(std::ostream &) const
Definition: KVDBSystem.cpp:259
Double_t GetECM() const
Definition: KVDBSystem.cpp:167
Float_t GetTargetThickness() const
Definition: KVDBSystem.h:209
void AddRun(KVDBRecord *)
Definition: KVDBSystem.cpp:434
UInt_t GetAtot() const
Definition: KVDBSystem.h:174
TString GetBatchNameWithoutEnergy()
Definition: KVDBSystem.cpp:611
KV2Body * GetKinematics()
Definition: KVDBSystem.cpp:80
Float_t GetEbeam() const
Definition: KVDBSystem.h:199
KVUnownedList * fRunlist
used to store pointer to sorted list of runs
Definition: KVDBSystem.h:60
void SetBeam(UInt_t z, UInt_t a, Float_t energy)
Definition: KVDBSystem.h:239
void SetTarget(KVTarget *targ)
Definition: KVDBSystem.h:83
UInt_t GetZproj() const
Definition: KVDBSystem.h:189
void SetAbeam(UInt_t a)
Definition: KVDBSystem.h:229
UInt_t fAbeam
Mass of the projectile nucleus.
Definition: KVDBSystem.h:65
Double_t GetZVtot() const
Definition: KVDBSystem.cpp:119
UInt_t GetZbeam() const
Definition: KVDBSystem.h:179
UInt_t GetAbeam() const
Definition: KVDBSystem.h:184
virtual void ls(Option_t *option="*") const
Definition: KVDBSystem.cpp:542
virtual void Load(std::istream &)
Definition: KVDBSystem.cpp:302
TString GetReactionNameWithoutEnergy()
Definition: KVDBSystem.cpp:642
KVDBTable * GetRunsTable()
Definition: KVDBSystem.cpp:558
void SetEbeam(Float_t energy)
Definition: KVDBSystem.h:234
virtual ~ KVDBSystem()
Int_t fRuns
temporary variable used to stock number of associated runs
Definition: KVDBSystem.h:61
KV2Body * fCinema
used to calculate kinematics of entrance channel
Definition: KVDBSystem.h:56
UInt_t fZtarget
charge of the target nucleus
Definition: KVDBSystem.h:66
KVTarget * fTarget
physical target used for experiment run
Definition: KVDBSystem.h:58
UInt_t GetAproj() const
Definition: KVDBSystem.h:194
Float_t GetEproj() const
Definition: KVDBSystem.h:204
virtual void GetRunList(KVNumberList &) const
Fills the KVNumberList object with the list of all run numbers associated with this system.
Definition: KVDBSystem.cpp:234
UInt_t fZbeam
charge of the projectile nucleus
Definition: KVDBSystem.h:64
UInt_t fAtarget
Mass of the target nucleus.
Definition: KVDBSystem.h:67
UInt_t GetZtot() const
Definition: KVDBSystem.h:169
void SetNumberRuns(Int_t n)
set number of runs associated to this system
Definition: KVDBSystem.h:133
void RemoveAllRuns()
Definition: KVDBSystem.cpp:508
Double_t GetEtot() const
Definition: KVDBSystem.cpp:151
Table in a database.
Definition: KVDBTable.h:34
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:85
Calculation/correction of energy losses of particles through an experimental target.
Definition: KVTarget.h:127
Extended TList class which does not own its objects by default.
Definition: KVUnownedList.h:17
const Int_t n
TArc a