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 #include "KVUnownedList.h"
25 class KV2Body;
26 class KVNumberList;
27 
51 class KVDBSystem: public KVDBRecord {
52 
53 private:
54 
56 
58 
62 
63 protected:
69 
71 
72 public:
73  KVDBSystem();
74  KVDBSystem(const Char_t* name);
75  virtual ~ KVDBSystem();
76 
78  {
79  return fTarget;
80  };
81  void SetTarget(KVTarget* targ)
82  {
83  fTarget = targ;
84  };
85 
86  void ls(Option_t* option = "*") const override;
87  UInt_t GetZtarget() const;
88  UInt_t GetAtarget() const;
89  UInt_t GetZbeam() const;
90  UInt_t GetAbeam() const;
91  UInt_t GetZproj() const;
92  UInt_t GetAproj() const;
93  Float_t GetEbeam() const;
94  Float_t GetEproj() const;
96 
97  UInt_t GetZtot() const;
98  UInt_t GetAtot() const;
99  Double_t GetZVtot() const;
100  Double_t GetPtot() const;
101  Double_t GetEtot() const;
102  Double_t GetECM() const;
103 
104  Bool_t IsCollision() const;
105 
106  void SetZtarget(UInt_t z);
107  void SetAtarget(UInt_t a);
108  void SetZbeam(UInt_t z);
109  void SetAbeam(UInt_t a);
110  void SetEbeam(Float_t energy);
111 
112  void SetBeam(UInt_t z, UInt_t a, Float_t energy);
113 
115  KVUnownedList GetRuns() const;
116 
117  Int_t GetNGoodRunFiles() const;
118  void GetRunList(KVNumberList&) const;
119  KVNumberList GetRunList() const;
120  void Save(std::ostream&) const;
121  void Load(std::istream&,int = 1);
122 
123  Int_t Compare(const TObject*) const override;
124 
126 
127  void Print(Option_t* option = "") const override;
128 
131  {
132  fRuns = n;
133  }
138  {
139  return fRuns;
140  }
142  {
143  fEvents = e;
144  }
146  {
147  return fEvents;
148  }
149 
150  void SetRuns(KVNumberList&, int = 1);
151  void RemoveRun(KVDBRecord*);
152  void RemoveRun(Int_t);
153  void AddRun(KVDBRecord*);
154  void AddRun(Int_t);
155  void RemoveAllRuns();
160 
161  ClassDefOverride(KVDBSystem, 2) // System class
162 };
163 
166 {
167  return fZtarget;
168 }
169 
171 {
172  return fAtarget;
173 }
174 
176 {
177  return fZtarget + fZbeam;
178 }
179 
181 {
182  return fAtarget + fAbeam;
183 }
184 
186 {
187  return fZbeam;
188 }
189 
191 {
192  return fAbeam;
193 }
194 
196 {
197  return fZbeam;
198 }
199 
201 {
202  return fAbeam;
203 }
204 
206 {
207  return fEbeam;
208 }
209 
211 {
212  return fEbeam;
213 }
214 
216 {
217  return (GetTarget() ? GetTarget()->GetTotalThickness() : 0.);
218 }
219 
221 {
222  fZtarget = z;
223 }
224 
226 {
227  fAtarget = a;
228 }
229 
231 {
232  fZbeam = z;
233 }
234 
236 {
237  fAbeam = a;
238 }
239 
240 inline void KVDBSystem::SetEbeam(Float_t energy)
241 {
242  fEbeam = energy;
243 }
244 
245 inline void KVDBSystem::SetBeam(UInt_t z, UInt_t a, Float_t energy)
246 {
247  fZbeam = z;
248  fAbeam = a;
249  fEbeam = energy;
250 }
251 #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:51
Int_t Compare(const TObject *) const override
Definition: KVDBSystem.cpp:217
UInt_t GetZtarget() const
.............. inline functions ...............
Definition: KVDBSystem.h:165
Bool_t IsCollision() const
retourne kTRUE, si le systeme est une collision ie projectile+cible
Definition: KVDBSystem.cpp:101
UInt_t GetAtarget() const
Definition: KVDBSystem.h:170
void SetZtarget(UInt_t z)
Definition: KVDBSystem.h:220
void ls(Option_t *option="*") const override
Definition: KVDBSystem.cpp:586
void SetAtarget(UInt_t a)
Definition: KVDBSystem.h:225
Float_t fEbeam
Energy of the beam in MeV/nucleon.
Definition: KVDBSystem.h:68
Int_t GetNGoodRunFiles() const
Definition: KVDBSystem.cpp:131
void RemoveRun(KVDBRecord *)
Definition: KVDBSystem.cpp:524
void SetZbeam(UInt_t z)
Definition: KVDBSystem.h:230
Double_t GetPtot() const
Definition: KVDBSystem.cpp:167
TString GetBatchName()
Definition: KVDBSystem.cpp:622
KVTarget * GetTarget() const
Definition: KVDBSystem.h:77
Int_t GetNumberRuns()
Definition: KVDBSystem.h:137
void Save(std::ostream &) const
Definition: KVDBSystem.cpp:285
Double_t GetECM() const
Definition: KVDBSystem.cpp:199
Float_t GetTargetThickness() const
Definition: KVDBSystem.h:215
void AddRun(KVDBRecord *)
Definition: KVDBSystem.cpp:478
void SetRuns(KVNumberList &, int=1)
Definition: KVDBSystem.cpp:431
UInt_t GetAtot() const
Definition: KVDBSystem.h:180
TString GetBatchNameWithoutEnergy()
Definition: KVDBSystem.cpp:655
KV2Body * GetKinematics()
Definition: KVDBSystem.cpp:76
Float_t GetEbeam() const
Definition: KVDBSystem.h:205
void SetBeam(UInt_t z, UInt_t a, Float_t energy)
Definition: KVDBSystem.h:245
void SetTarget(KVTarget *targ)
Definition: KVDBSystem.h:81
UInt_t GetZproj() const
Definition: KVDBSystem.h:195
void SetAbeam(UInt_t a)
Definition: KVDBSystem.h:235
UInt_t fAbeam
Mass of the projectile nucleus.
Definition: KVDBSystem.h:65
Double_t GetZVtot() const
Definition: KVDBSystem.cpp:151
ULong64_t GetEvents() const
Definition: KVDBSystem.h:145
UInt_t GetZbeam() const
Definition: KVDBSystem.h:185
UInt_t GetAbeam() const
Definition: KVDBSystem.h:190
TString GetReactionNameWithoutEnergy()
Definition: KVDBSystem.cpp:686
TString GetReactionEnergyWithoutName()
Definition: KVDBSystem.cpp:711
KVDBTable * GetRunsTable()
Definition: KVDBSystem.cpp:602
void SetEbeam(Float_t energy)
Definition: KVDBSystem.h:240
void SetEvents(ULong64_t e)
Definition: KVDBSystem.h:141
virtual ~ KVDBSystem()
Int_t fRuns
temporary variable used to stock number of available 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:66
KVTarget * fTarget
physical target used for experiment run
Definition: KVDBSystem.h:57
UInt_t GetAproj() const
Definition: KVDBSystem.h:200
ULong64_t fEvents
temporary variable used to stock number of available events
Definition: KVDBSystem.h:61
Float_t GetEproj() const
Definition: KVDBSystem.h:210
void Load(std::istream &, int=1)
Definition: KVDBSystem.cpp:333
KVUnownedList fRunlist
temporary used to store sorted list of runs
Definition: KVDBSystem.h:59
UInt_t fZbeam
charge of the projectile nucleus
Definition: KVDBSystem.h:64
KVUnownedList GetRuns() const
Returns a sorted list of all the runs associated with this system.
Definition: KVDBSystem.cpp:112
UInt_t fAtarget
Mass of the target nucleus.
Definition: KVDBSystem.h:67
UInt_t GetZtot() const
Definition: KVDBSystem.h:175
void SetNumberRuns(Int_t n)
set number of runs associated to this system
Definition: KVDBSystem.h:130
void RemoveAllRuns()
Definition: KVDBSystem.cpp:552
Double_t GetEtot() const
Definition: KVDBSystem.cpp:183
KVNumberList GetRunList() const
Fills a KVNumberList with the list of all run numbers associated with this system.
Definition: KVDBSystem.cpp:260
void Print(Option_t *option="") const override
Definition: KVDBSystem.cpp:563
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:20
unsigned long long ULong64_t
const Int_t n
TArc a