KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVDBSystem.h
Go to the documentation of this file.
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 #include "KVList.h"
25 
26 class KV2Body;
27 class KVNumberList;
28 
51 class KVDBSystem: public KVDBRecord {
52 
53 private:
54 
56 
58 
61 
62 protected:
68 
69  KVList* _GetRuns();
70 
72 
73 public:
74  KVDBSystem();
75  KVDBSystem(const Char_t* name);
76  virtual ~ KVDBSystem();
77 
79  {
80  return fTarget;
81  };
82  void SetTarget(KVTarget* targ)
83  {
84  fTarget = targ;
85  };
86 
87  virtual void ls(Option_t* option = "*") const;
88  UInt_t GetZtarget() const;
89  UInt_t GetAtarget() const;
90  UInt_t GetZbeam() const;
91  UInt_t GetAbeam() const;
92  UInt_t GetZproj() const;
93  UInt_t GetAproj() const;
94  Float_t GetEbeam() const;
95  Float_t GetEproj() const;
97 
98  UInt_t GetZtot() const;
99  UInt_t GetAtot() const;
100  Double_t GetZVtot() const;
101  Double_t GetPtot() const;
102  Double_t GetEtot() const;
103  Double_t GetECM() const;
104 
105  Bool_t IsCollision() const;
106 
107  void SetZtarget(UInt_t z);
108  void SetAtarget(UInt_t a);
109  void SetZbeam(UInt_t z);
110  void SetAbeam(UInt_t a);
111  void SetEbeam(Float_t energy);
112 
113  void SetBeam(UInt_t z, UInt_t a, Float_t energy);
114 
116  KVList* GetRuns() const
117  {
118  return const_cast <KVDBSystem* >(this)->_GetRuns();
119  }
120 
121  virtual void GetRunList(KVNumberList&) const;
122  virtual void Save(std::ostream&) const;
123  virtual void Load(std::istream&);
124 
125  Int_t Compare(const TObject*) const;
126 
128 
129  virtual void Print(Option_t* option = "") const;
130 
133  {
134  fRuns = n;
135  }
140  {
141  return fRuns;
142  }
143 
144  void SetRuns(KVNumberList&);
145  void RemoveRun(KVDBRecord*);
146  void RemoveRun(Int_t);
147  void AddRun(KVDBRecord*);
148  void AddRun(Int_t);
149  void RemoveAllRuns();
150  virtual const Char_t* GetBatchName();
151 
152  ClassDef(KVDBSystem, 2) // System class
153 };
154 
157 {
158  return fZtarget;
159 }
160 
162 {
163  return fAtarget;
164 }
165 
167 {
168  return fZtarget + fZbeam;
169 }
170 
172 {
173  return fAtarget + fAbeam;
174 }
175 
177 {
178  return fZbeam;
179 }
180 
182 {
183  return fAbeam;
184 }
185 
187 {
188  return fZbeam;
189 }
190 
192 {
193  return fAbeam;
194 }
195 
197 {
198  return fEbeam;
199 }
200 
202 {
203  return fEbeam;
204 }
205 
207 {
208  return (GetTarget() ? GetTarget()->GetTotalThickness() : 0.);
209 }
210 
212 {
213  fZtarget = z;
214 }
215 
217 {
218  fAtarget = a;
219 }
220 
222 {
223  fZbeam = z;
224 }
225 
227 {
228  fAbeam = a;
229 }
230 
232 {
233  fEbeam = energy;
234 }
235 
237 {
238  fZbeam = z;
239  fAbeam = a;
240  fEbeam = energy;
241 }
242 #endif
int Int_t
unsigned int UInt_t
static Double_t energy[]
char Char_t
bool Bool_t
double Double_t
float Float_t
const char Option_t
#define ClassDef(name, id)
Relativistic binary kinematics calculator.
Definition: KV2Body.h:165
Record folder for the database.
Definition: KVDBRecord.h:42
Database class used to store information on different colliding systems studied during an experiment.
Definition: KVDBSystem.h:51
UInt_t GetZtarget() const
.............. inline functions ...............
Definition: KVDBSystem.h:156
virtual void Print(Option_t *option="") const
Definition: KVDBSystem.cpp:518
Bool_t IsCollision() const
retourne kTRUE, si le systeme est une collision ie projectile+cible
Definition: KVDBSystem.cpp:104
Int_t Compare(const TObject *) const
Definition: KVDBSystem.cpp:184
UInt_t GetAtarget() const
Definition: KVDBSystem.h:161
void SetRuns(KVNumberList &)
Definition: KVDBSystem.cpp:392
void SetZtarget(UInt_t z)
Definition: KVDBSystem.h:211
void SetAtarget(UInt_t a)
Definition: KVDBSystem.h:216
Float_t fEbeam
Energy of the beam in MeV/nucleon.
Definition: KVDBSystem.h:67
void RemoveRun(KVDBRecord *)
Definition: KVDBSystem.cpp:479
void SetZbeam(UInt_t z)
Definition: KVDBSystem.h:221
Double_t GetPtot() const
Definition: KVDBSystem.cpp:134
KVTarget * GetTarget() const
Definition: KVDBSystem.h:78
Int_t GetNumberRuns()
Definition: KVDBSystem.h:139
virtual void Save(std::ostream &) const
Definition: KVDBSystem.cpp:258
Double_t GetECM() const
Definition: KVDBSystem.cpp:166
KVList * fRunlist
used to store pointer to sorted list of runs
Definition: KVDBSystem.h:59
Float_t GetTargetThickness() const
Definition: KVDBSystem.h:206
void AddRun(KVDBRecord *)
Definition: KVDBSystem.cpp:433
UInt_t GetAtot() const
Definition: KVDBSystem.h:171
KV2Body * GetKinematics()
Definition: KVDBSystem.cpp:79
Float_t GetEbeam() const
Definition: KVDBSystem.h:196
void SetBeam(UInt_t z, UInt_t a, Float_t energy)
Definition: KVDBSystem.h:236
void SetTarget(KVTarget *targ)
Definition: KVDBSystem.h:82
KVList * GetRuns() const
Returns a sorted list of all the runs associated with this system.
Definition: KVDBSystem.h:116
UInt_t GetZproj() const
Definition: KVDBSystem.h:186
void SetAbeam(UInt_t a)
Definition: KVDBSystem.h:226
UInt_t fAbeam
Mass of the projectile nucleus.
Definition: KVDBSystem.h:64
Double_t GetZVtot() const
Definition: KVDBSystem.cpp:118
UInt_t GetZbeam() const
Definition: KVDBSystem.h:176
UInt_t GetAbeam() const
Definition: KVDBSystem.h:181
virtual void ls(Option_t *option="*") const
Definition: KVDBSystem.cpp:541
virtual void Load(std::istream &)
Definition: KVDBSystem.cpp:301
KVDBTable * GetRunsTable()
Definition: KVDBSystem.cpp:557
void SetEbeam(Float_t energy)
Definition: KVDBSystem.h:231
virtual const Char_t * GetBatchName()
Definition: KVDBSystem.cpp:577
virtual ~ KVDBSystem()
Int_t fRuns
temporary variable used to stock number of associated runs
Definition: KVDBSystem.h:60
KV2Body * fCinema
used to calculate kinematics of entrance channel
Definition: KVDBSystem.h:55
UInt_t fZtarget
charge of the target nucleus
Definition: KVDBSystem.h:65
KVTarget * fTarget
physical target used for experiment run
Definition: KVDBSystem.h:57
UInt_t GetAproj() const
Definition: KVDBSystem.h:191
Float_t GetEproj() const
Definition: KVDBSystem.h:201
virtual void GetRunList(KVNumberList &) const
Fills the KVNumberList object with the list of all run numbers associated with this system.
Definition: KVDBSystem.cpp:233
UInt_t fZbeam
charge of the projectile nucleus
Definition: KVDBSystem.h:63
UInt_t fAtarget
Mass of the target nucleus.
Definition: KVDBSystem.h:66
UInt_t GetZtot() const
Definition: KVDBSystem.h:166
void SetNumberRuns(Int_t n)
set number of runs associated to this system
Definition: KVDBSystem.h:132
KVList * _GetRuns()
Definition: KVDBSystem.cpp:212
void RemoveAllRuns()
Definition: KVDBSystem.cpp:507
Double_t GetEtot() const
Definition: KVDBSystem.cpp:150
Table in a database.
Definition: KVDBTable.h:33
Extended TList class which owns its objects by default.
Definition: KVList.h:27
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:83
Calculation/correction of energy losses of particles through an experimental target.
Definition: KVTarget.h:126
const Int_t n
auto * a