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  KVNumberList GetRunList() const;
126  void Save(std::ostream&) const;
127  void Load(std::istream&,int = 1);
128 
129  Int_t Compare(const TObject*) const override;
130 
132 
133  void Print(Option_t* option = "") const override;
134 
137  {
138  fRuns = n;
139  }
144  {
145  return fRuns;
146  }
148  {
149  fEvents = e;
150  }
152  {
153  return fEvents;
154  }
155 
156  void SetRuns(KVNumberList&, int = 1);
157  void RemoveRun(KVDBRecord*);
158  void RemoveRun(Int_t);
159  void AddRun(KVDBRecord*);
160  void AddRun(Int_t);
161  void RemoveAllRuns();
166 
167  ClassDefOverride(KVDBSystem, 2) // System class
168 };
169 
172 {
173  return fZtarget;
174 }
175 
177 {
178  return fAtarget;
179 }
180 
182 {
183  return fZtarget + fZbeam;
184 }
185 
187 {
188  return fAtarget + fAbeam;
189 }
190 
192 {
193  return fZbeam;
194 }
195 
197 {
198  return fAbeam;
199 }
200 
202 {
203  return fZbeam;
204 }
205 
207 {
208  return fAbeam;
209 }
210 
212 {
213  return fEbeam;
214 }
215 
217 {
218  return fEbeam;
219 }
220 
222 {
223  return (GetTarget() ? GetTarget()->GetTotalThickness() : 0.);
224 }
225 
227 {
228  fZtarget = z;
229 }
230 
232 {
233  fAtarget = a;
234 }
235 
237 {
238  fZbeam = z;
239 }
240 
242 {
243  fAbeam = a;
244 }
245 
246 inline void KVDBSystem::SetEbeam(Float_t energy)
247 {
248  fEbeam = energy;
249 }
250 
251 inline void KVDBSystem::SetBeam(UInt_t z, UInt_t a, Float_t energy)
252 {
253  fZbeam = z;
254  fAbeam = a;
255  fEbeam = energy;
256 }
257 #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:171
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:176
void SetZtarget(UInt_t z)
Definition: KVDBSystem.h:226
KVUnownedList * _GetRuns()
Definition: KVDBSystem.cpp:230
void ls(Option_t *option="*") const override
Definition: KVDBSystem.cpp:594
void SetAtarget(UInt_t a)
Definition: KVDBSystem.h:231
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:532
void SetZbeam(UInt_t z)
Definition: KVDBSystem.h:236
Double_t GetPtot() const
Definition: KVDBSystem.cpp:152
TString GetBatchName()
Definition: KVDBSystem.cpp:630
KVTarget * GetTarget() const
Definition: KVDBSystem.h:80
Int_t GetNumberRuns()
Definition: KVDBSystem.h:143
void Save(std::ostream &) const
Definition: KVDBSystem.cpp:293
Double_t GetECM() const
Definition: KVDBSystem.cpp:184
Float_t GetTargetThickness() const
Definition: KVDBSystem.h:221
void AddRun(KVDBRecord *)
Definition: KVDBSystem.cpp:486
void SetRuns(KVNumberList &, int=1)
Definition: KVDBSystem.cpp:439
UInt_t GetAtot() const
Definition: KVDBSystem.h:186
TString GetBatchNameWithoutEnergy()
Definition: KVDBSystem.cpp:663
KV2Body * GetKinematics()
Definition: KVDBSystem.cpp:80
Float_t GetEbeam() const
Definition: KVDBSystem.h:211
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:251
void SetTarget(KVTarget *targ)
Definition: KVDBSystem.h:84
UInt_t GetZproj() const
Definition: KVDBSystem.h:201
void SetAbeam(UInt_t a)
Definition: KVDBSystem.h:241
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:151
UInt_t GetZbeam() const
Definition: KVDBSystem.h:191
UInt_t GetAbeam() const
Definition: KVDBSystem.h:196
TString GetReactionNameWithoutEnergy()
Definition: KVDBSystem.cpp:694
TString GetReactionEnergyWithoutName()
Definition: KVDBSystem.cpp:719
KVDBTable * GetRunsTable()
Definition: KVDBSystem.cpp:610
void SetEbeam(Float_t energy)
Definition: KVDBSystem.h:246
void SetEvents(ULong64_t e)
Definition: KVDBSystem.h:147
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:206
ULong64_t fEvents
Definition: KVDBSystem.h:62
Float_t GetEproj() const
Definition: KVDBSystem.h:216
void Load(std::istream &, int=1)
Definition: KVDBSystem.cpp:341
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:181
void SetNumberRuns(Int_t n)
set number of runs associated to this system
Definition: KVDBSystem.h:136
void RemoveAllRuns()
Definition: KVDBSystem.cpp:560
Double_t GetEtot() const
Definition: KVDBSystem.cpp:168
KVNumberList GetRunList() const
Fills a KVNumberList with the list of all run numbers associated with this system.
Definition: KVDBSystem.cpp:267
void Print(Option_t *option="") const override
Definition: KVDBSystem.cpp:571
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