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 
55  KV2Body* fCinema = nullptr;
56 
57  KVTarget* fTarget = nullptr; //-> physical target used for experiment run
58 
60  Int_t fRuns = 0;
62 
63 protected:
64  UInt_t fZbeam=0; // charge of the projectile nucleus
65  UInt_t fAbeam=0; // Mass of the projectile nucleus
66  UInt_t fZtarget=0; // charge of the target nucleus
67  UInt_t fAtarget=0; // Mass of the target nucleus
68  Float_t fEbeam=0.; // Energy of the beam in MeV/nucleon
69 
71 
72 public:
74  KVDBSystem(const Char_t* name);
75  KVDBSystem(int, int, int, int, Float_t);
76  KVDBSystem(const KVNucleus& X, const KVNucleus& Y, const KVString& = "");
77  virtual ~ KVDBSystem();
78 
80  {
81  return fTarget;
82  }
83  void SetTarget(KVTarget* targ)
84  {
85  fTarget = targ;
86  }
87 
88  void ls(Option_t* option = "*") const override;
89  UInt_t GetZtarget() const;
90  UInt_t GetAtarget() const;
91  UInt_t GetZbeam() const;
92  UInt_t GetAbeam() const;
93  UInt_t GetZproj() const;
94  UInt_t GetAproj() const;
95  Float_t GetEbeam() const;
96  Float_t GetEproj() const;
98 
99  UInt_t GetZtot() const;
100  UInt_t GetAtot() const;
101  Double_t GetZVtot() const;
102  Double_t GetPtot() const;
103  Double_t GetEtot() const;
104  Double_t GetECM() const;
105 
106  Bool_t IsCollision() const;
107 
108  void SetZtarget(UInt_t z);
109  void SetAtarget(UInt_t a);
110  void SetZbeam(UInt_t z);
111  void SetAbeam(UInt_t a);
112  void SetEbeam(Float_t energy);
113 
114  void SetBeam(UInt_t z, UInt_t a, Float_t energy);
115 
117  KVUnownedList GetRuns() const;
118 
119  Int_t GetNGoodRunFiles() const;
120  void GetRunList(KVNumberList&) const;
121  KVNumberList GetRunList() const;
122  void Save(std::ostream&) const;
123  void Load(std::istream&,int = 1);
124 
125  Int_t Compare(const TObject*) const override;
126 
128 
129  void Print(Option_t* option = "") const override;
130 
133  {
134  fRuns = n;
135  }
140  {
141  return fRuns;
142  }
144  {
145  fEvents = e;
146  }
148  {
149  return fEvents;
150  }
151 
152  void SetRuns(const KVNumberList&, int = 1);
153  void RemoveRun(KVDBRecord*);
154  void RemoveRun(Int_t);
155  void AddRun(KVDBRecord*);
156  void AddRun(Int_t);
157  void RemoveAllRuns();
162 
163  ClassDefOverride(KVDBSystem, 2) // System class
164 };
165 
168 {
169  return fZtarget;
170 }
171 
173 {
174  return fAtarget;
175 }
176 
178 {
179  return fZtarget + fZbeam;
180 }
181 
183 {
184  return fAtarget + fAbeam;
185 }
186 
188 {
189  return fZbeam;
190 }
191 
193 {
194  return fAbeam;
195 }
196 
198 {
199  return fZbeam;
200 }
201 
203 {
204  return fAbeam;
205 }
206 
208 {
209  return fEbeam;
210 }
211 
213 {
214  return fEbeam;
215 }
216 
218 {
219  return (GetTarget() ? GetTarget()->GetTotalThickness() : 0.);
220 }
221 
223 {
224  fZtarget = z;
225 }
226 
228 {
229  fAtarget = a;
230 }
231 
233 {
234  fZbeam = z;
235 }
236 
238 {
239  fAbeam = a;
240 }
241 
242 inline void KVDBSystem::SetEbeam(Float_t energy)
243 {
244  fEbeam = energy;
245 }
246 
247 inline void KVDBSystem::SetBeam(UInt_t z, UInt_t a, Float_t energy)
248 {
249  fZbeam = z;
250  fAbeam = a;
251  fEbeam = energy;
252 }
253 #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:168
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:244
UInt_t GetZtarget() const
.............. inline functions ...............
Definition: KVDBSystem.h:167
Bool_t IsCollision() const
retourne kTRUE, si le systeme est une collision ie projectile+cible
Definition: KVDBSystem.cpp:128
UInt_t GetAtarget() const
Definition: KVDBSystem.h:172
void SetZtarget(UInt_t z)
Definition: KVDBSystem.h:222
void ls(Option_t *option="*") const override
Definition: KVDBSystem.cpp:615
void SetAtarget(UInt_t a)
Definition: KVDBSystem.h:227
Float_t fEbeam
Definition: KVDBSystem.h:68
Int_t GetNGoodRunFiles() const
Definition: KVDBSystem.cpp:158
void RemoveRun(KVDBRecord *)
Definition: KVDBSystem.cpp:553
void SetZbeam(UInt_t z)
Definition: KVDBSystem.h:232
Double_t GetPtot() const
Definition: KVDBSystem.cpp:194
TString GetBatchName()
Definition: KVDBSystem.cpp:657
KVTarget * GetTarget() const
Definition: KVDBSystem.h:79
Int_t GetNumberRuns()
Definition: KVDBSystem.h:139
void Save(std::ostream &) const
Definition: KVDBSystem.cpp:312
Double_t GetECM() const
Definition: KVDBSystem.cpp:226
void SetRuns(const KVNumberList &, int=1)
Definition: KVDBSystem.cpp:458
Float_t GetTargetThickness() const
Definition: KVDBSystem.h:217
void AddRun(KVDBRecord *)
Definition: KVDBSystem.cpp:507
UInt_t GetAtot() const
Definition: KVDBSystem.h:182
TString GetBatchNameWithoutEnergy()
Definition: KVDBSystem.cpp:690
KV2Body * GetKinematics()
Definition: KVDBSystem.cpp:103
Float_t GetEbeam() const
Definition: KVDBSystem.h:207
void SetBeam(UInt_t z, UInt_t a, Float_t energy)
Definition: KVDBSystem.h:247
void SetTarget(KVTarget *targ)
Definition: KVDBSystem.h:83
UInt_t GetZproj() const
Definition: KVDBSystem.h:197
void SetAbeam(UInt_t a)
Definition: KVDBSystem.h:237
UInt_t fAbeam
Definition: KVDBSystem.h:65
Double_t GetZVtot() const
Definition: KVDBSystem.cpp:178
ULong64_t GetEvents() const
Definition: KVDBSystem.h:147
UInt_t GetZbeam() const
Definition: KVDBSystem.h:187
UInt_t GetAbeam() const
Definition: KVDBSystem.h:192
TString GetReactionNameWithoutEnergy()
Definition: KVDBSystem.cpp:721
TString GetReactionEnergyWithoutName()
Definition: KVDBSystem.cpp:746
KVDBTable * GetRunsTable()
Definition: KVDBSystem.cpp:634
void SetEbeam(Float_t energy)
Definition: KVDBSystem.h:242
void SetEvents(ULong64_t e)
Definition: KVDBSystem.h:143
virtual ~ KVDBSystem()
Int_t fRuns
Definition: KVDBSystem.h:60
KV2Body * fCinema
Definition: KVDBSystem.h:55
UInt_t fZtarget
Definition: KVDBSystem.h:66
KVTarget * fTarget
used to calculate kinematics of entrance channel
Definition: KVDBSystem.h:57
UInt_t GetAproj() const
Definition: KVDBSystem.h:202
ULong64_t fEvents
temporary variable used to stock number of available runs
Definition: KVDBSystem.h:61
Float_t GetEproj() const
Definition: KVDBSystem.h:212
void Load(std::istream &, int=1)
Definition: KVDBSystem.cpp:360
KVUnownedList fRunlist
temporary used to store sorted list of runs
Definition: KVDBSystem.h:59
UInt_t fZbeam
temporary variable used to stock number of available events
Definition: KVDBSystem.h:64
KVUnownedList GetRuns() const
Returns a sorted list of all the runs associated with this system.
Definition: KVDBSystem.cpp:139
UInt_t fAtarget
Definition: KVDBSystem.h:67
UInt_t GetZtot() const
Definition: KVDBSystem.h:177
void SetNumberRuns(Int_t n)
set number of runs associated to this system
Definition: KVDBSystem.h:132
void RemoveAllRuns()
Definition: KVDBSystem.cpp:581
Double_t GetEtot() const
Definition: KVDBSystem.cpp:210
KVNumberList GetRunList() const
Fills a KVNumberList with the list of all run numbers associated with this system.
Definition: KVDBSystem.cpp:287
void Print(Option_t *option="") const override
Definition: KVDBSystem.cpp:592
Table in a database.
Definition: KVDBTable.h:34
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:123
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:85
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
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