KaliVeda  1.13/01
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 
25 class KV2Body;
26 class KVNumberList;
27 class KVUnownedList;
28 
51 class KVDBSystem: public KVDBRecord {
52 
53 private:
54 
56 
58 
61 
62 protected:
68 
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 
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();
153 
154  ClassDef(KVDBSystem, 2) // System class
155 };
156 
159 {
160  return fZtarget;
161 }
162 
164 {
165  return fAtarget;
166 }
167 
169 {
170  return fZtarget + fZbeam;
171 }
172 
174 {
175  return fAtarget + fAbeam;
176 }
177 
179 {
180  return fZbeam;
181 }
182 
184 {
185  return fAbeam;
186 }
187 
189 {
190  return fZbeam;
191 }
192 
194 {
195  return fAbeam;
196 }
197 
199 {
200  return fEbeam;
201 }
202 
204 {
205  return fEbeam;
206 }
207 
209 {
210  return (GetTarget() ? GetTarget()->GetTotalThickness() : 0.);
211 }
212 
214 {
215  fZtarget = z;
216 }
217 
219 {
220  fAtarget = a;
221 }
222 
224 {
225  fZbeam = z;
226 }
227 
229 {
230  fAbeam = a;
231 }
232 
234 {
235  fEbeam = energy;
236 }
237 
239 {
240  fZbeam = z;
241  fAbeam = a;
242  fEbeam = energy;
243 }
244 #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:158
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:163
void SetRuns(KVNumberList &)
Definition: KVDBSystem.cpp:393
void SetZtarget(UInt_t z)
Definition: KVDBSystem.h:213
KVUnownedList * _GetRuns()
Definition: KVDBSystem.cpp:213
void SetAtarget(UInt_t a)
Definition: KVDBSystem.h:218
Float_t fEbeam
Energy of the beam in MeV/nucleon.
Definition: KVDBSystem.h:67
KVUnownedList * GetRuns() const
Returns a sorted list of all the runs associated with this system.
Definition: KVDBSystem.h:116
void RemoveRun(KVDBRecord *)
Definition: KVDBSystem.cpp:480
void SetZbeam(UInt_t z)
Definition: KVDBSystem.h:223
Double_t GetPtot() const
Definition: KVDBSystem.cpp:135
TString GetBatchName()
Definition: KVDBSystem.cpp:578
KVTarget * GetTarget() const
Definition: KVDBSystem.h:78
Int_t GetNumberRuns()
Definition: KVDBSystem.h:139
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:208
void AddRun(KVDBRecord *)
Definition: KVDBSystem.cpp:434
UInt_t GetAtot() const
Definition: KVDBSystem.h:173
TString GetBatchNameWithoutEnergy()
Definition: KVDBSystem.cpp:611
KV2Body * GetKinematics()
Definition: KVDBSystem.cpp:80
Float_t GetEbeam() const
Definition: KVDBSystem.h:198
KVUnownedList * fRunlist
used to store pointer to sorted list of runs
Definition: KVDBSystem.h:59
void SetBeam(UInt_t z, UInt_t a, Float_t energy)
Definition: KVDBSystem.h:238
void SetTarget(KVTarget *targ)
Definition: KVDBSystem.h:82
UInt_t GetZproj() const
Definition: KVDBSystem.h:188
void SetAbeam(UInt_t a)
Definition: KVDBSystem.h:228
UInt_t fAbeam
Mass of the projectile nucleus.
Definition: KVDBSystem.h:64
Double_t GetZVtot() const
Definition: KVDBSystem.cpp:119
UInt_t GetZbeam() const
Definition: KVDBSystem.h:178
UInt_t GetAbeam() const
Definition: KVDBSystem.h:183
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:233
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:193
Float_t GetEproj() const
Definition: KVDBSystem.h:203
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:63
UInt_t fAtarget
Mass of the target nucleus.
Definition: KVDBSystem.h:66
UInt_t GetZtot() const
Definition: KVDBSystem.h:168
void SetNumberRuns(Int_t n)
set number of runs associated to this system
Definition: KVDBSystem.h:132
void RemoveAllRuns()
Definition: KVDBSystem.cpp:508
Double_t GetEtot() const
Definition: KVDBSystem.cpp:151
Table in a database.
Definition: KVDBTable.h:33
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
Extended TList class which does not own its objects by default.
Definition: KVUnownedList.h:16
const Int_t n
auto * a