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 
63 
64 protected:
70 
72 
74 
75 public:
76  KVDBSystem();
77  KVDBSystem(const Char_t* name);
78  virtual ~ KVDBSystem();
79 
81  {
82  return fTarget;
83  };
84  void SetTarget(KVTarget* targ)
85  {
86  fTarget = targ;
87  };
88 
89  void ls(Option_t* option = "*") const override;
90  UInt_t GetZtarget() const;
91  UInt_t GetAtarget() const;
92  UInt_t GetZbeam() const;
93  UInt_t GetAbeam() const;
94  UInt_t GetZproj() const;
95  UInt_t GetAproj() const;
96  Float_t GetEbeam() const;
97  Float_t GetEproj() const;
99 
100  UInt_t GetZtot() const;
101  UInt_t GetAtot() const;
102  Double_t GetZVtot() const;
103  Double_t GetPtot() const;
104  Double_t GetEtot() const;
105  Double_t GetECM() const;
106 
107  Bool_t IsCollision() const;
108 
109  void SetZtarget(UInt_t z);
110  void SetAtarget(UInt_t a);
111  void SetZbeam(UInt_t z);
112  void SetAbeam(UInt_t a);
113  void SetEbeam(Float_t energy);
114 
115  void SetBeam(UInt_t z, UInt_t a, Float_t energy);
116 
119  {
120  return const_cast <KVDBSystem* >(this)->_GetRuns();
121  }
122 
123  Int_t GetNGoodRunFiles() const;
124  void GetRunList(KVNumberList&) const;
125  void Save(std::ostream&) const;
126  void Load(std::istream&,int = 1);
127 
128  Int_t Compare(const TObject*) const override;
129 
131 
132  void Print(Option_t* option = "") const override;
133 
136  {
137  fRuns = n;
138  }
143  {
144  return fRuns;
145  }
147  {
148  fEvents = e;
149  }
151  {
152  return fEvents;
153  }
154 
155  void SetRuns(KVNumberList&, int = 1);
156  void RemoveRun(KVDBRecord*);
157  void RemoveRun(Int_t);
158  void AddRun(KVDBRecord*);
159  void AddRun(Int_t);
160  void RemoveAllRuns();
165 
166  ClassDefOverride(KVDBSystem, 2) // System class
167 };
168 
171 {
172  return fZtarget;
173 }
174 
176 {
177  return fAtarget;
178 }
179 
181 {
182  return fZtarget + fZbeam;
183 }
184 
186 {
187  return fAtarget + fAbeam;
188 }
189 
191 {
192  return fZbeam;
193 }
194 
196 {
197  return fAbeam;
198 }
199 
201 {
202  return fZbeam;
203 }
204 
206 {
207  return fAbeam;
208 }
209 
211 {
212  return fEbeam;
213 }
214 
216 {
217  return fEbeam;
218 }
219 
221 {
222  return (GetTarget() ? GetTarget()->GetTotalThickness() : 0.);
223 }
224 
226 {
227  fZtarget = z;
228 }
229 
231 {
232  fAtarget = a;
233 }
234 
236 {
237  fZbeam = z;
238 }
239 
241 {
242  fAbeam = a;
243 }
244 
245 inline void KVDBSystem::SetEbeam(Float_t energy)
246 {
247  fEbeam = energy;
248 }
249 
250 inline void KVDBSystem::SetBeam(UInt_t z, UInt_t a, Float_t energy)
251 {
252  fZbeam = z;
253  fAbeam = a;
254  fEbeam = energy;
255 }
256 #endif
int Int_t
unsigned int UInt_t
#define e(i)
bool Bool_t
char Char_t
float Float_t
double Double_t
const char Option_t
#define ClassDefOverride(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
Int_t Compare(const TObject *) const override
Definition: KVDBSystem.cpp:202
UInt_t GetZtarget() const
.............. inline functions ...............
Definition: KVDBSystem.h:170
Bool_t IsCollision() const
retourne kTRUE, si le systeme est une collision ie projectile+cible
Definition: KVDBSystem.cpp:105
UInt_t GetAtarget() const
Definition: KVDBSystem.h:175
void SetZtarget(UInt_t z)
Definition: KVDBSystem.h:225
KVUnownedList * _GetRuns()
Definition: KVDBSystem.cpp:230
void ls(Option_t *option="*") const override
Definition: KVDBSystem.cpp:577
void SetAtarget(UInt_t a)
Definition: KVDBSystem.h:230
Float_t fEbeam
Energy of the beam in MeV/nucleon.
Definition: KVDBSystem.h:69
Int_t GetNGoodRunFiles() const
Definition: KVDBSystem.cpp:117
KVUnownedList * GetRuns() const
Returns a sorted list of all the runs associated with this system.
Definition: KVDBSystem.h:118
void RemoveRun(KVDBRecord *)
Definition: KVDBSystem.cpp:515
void SetZbeam(UInt_t z)
Definition: KVDBSystem.h:235
Double_t GetPtot() const
Definition: KVDBSystem.cpp:152
TString GetBatchName()
Definition: KVDBSystem.cpp:613
KVTarget * GetTarget() const
Definition: KVDBSystem.h:80
Int_t GetNumberRuns()
Definition: KVDBSystem.h:142
void Save(std::ostream &) const
Definition: KVDBSystem.cpp:276
Double_t GetECM() const
Definition: KVDBSystem.cpp:184
Float_t GetTargetThickness() const
Definition: KVDBSystem.h:220
void AddRun(KVDBRecord *)
Definition: KVDBSystem.cpp:469
void SetRuns(KVNumberList &, int=1)
Definition: KVDBSystem.cpp:422
UInt_t GetAtot() const
Definition: KVDBSystem.h:185
TString GetBatchNameWithoutEnergy()
Definition: KVDBSystem.cpp:646
KV2Body * GetKinematics()
Definition: KVDBSystem.cpp:80
Float_t GetEbeam() const
Definition: KVDBSystem.h:210
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:250
void SetTarget(KVTarget *targ)
Definition: KVDBSystem.h:84
UInt_t GetZproj() const
Definition: KVDBSystem.h:200
void SetAbeam(UInt_t a)
Definition: KVDBSystem.h:240
UInt_t fAbeam
Mass of the projectile nucleus.
Definition: KVDBSystem.h:66
Double_t GetZVtot() const
Definition: KVDBSystem.cpp:136
ULong64_t GetEvents() const
Definition: KVDBSystem.h:150
UInt_t GetZbeam() const
Definition: KVDBSystem.h:190
UInt_t GetAbeam() const
Definition: KVDBSystem.h:195
TString GetReactionNameWithoutEnergy()
Definition: KVDBSystem.cpp:677
TString GetReactionEnergyWithoutName()
Definition: KVDBSystem.cpp:702
KVDBTable * GetRunsTable()
Definition: KVDBSystem.cpp:593
void SetEbeam(Float_t energy)
Definition: KVDBSystem.h:245
void SetEvents(ULong64_t e)
Definition: KVDBSystem.h:146
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:67
KVTarget * fTarget
physical target used for experiment run
Definition: KVDBSystem.h:58
UInt_t GetAproj() const
Definition: KVDBSystem.h:205
ULong64_t fEvents
Definition: KVDBSystem.h:62
Float_t GetEproj() const
Definition: KVDBSystem.h:215
void GetRunList(KVNumberList &) const
Fills the KVNumberList object with the list of all run numbers associated with this system.
Definition: KVDBSystem.cpp:251
void Load(std::istream &, int=1)
Definition: KVDBSystem.cpp:324
UInt_t fZbeam
temporary variable used to stock number of available events
Definition: KVDBSystem.h:65
UInt_t fAtarget
Mass of the target nucleus.
Definition: KVDBSystem.h:68
UInt_t GetZtot() const
Definition: KVDBSystem.h:180
void SetNumberRuns(Int_t n)
set number of runs associated to this system
Definition: KVDBSystem.h:135
void RemoveAllRuns()
Definition: KVDBSystem.cpp:543
Double_t GetEtot() const
Definition: KVDBSystem.cpp:168
void Print(Option_t *option="") const override
Definition: KVDBSystem.cpp:554
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:128
Extended TList class which does not own its objects by default.
Definition: KVUnownedList.h:17
unsigned long long ULong64_t
const Int_t n
TArc a