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& target_name = "", const KVString& beam_energy_units = "MeV/A");
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  }
152 
153  void SetRuns(const KVNumberList&, int = 1);
154  void RemoveRun(KVDBRecord*);
155  void RemoveRun(Int_t);
156  void AddRun(KVDBRecord*);
157  void AddRun(Int_t);
158  void RemoveAllRuns();
163 
164  ClassDefOverride(KVDBSystem, 2) // System class
165 };
166 
169 {
170  return fZtarget;
171 }
172 
174 {
175  return fAtarget;
176 }
177 
179 {
180  return fZtarget + fZbeam;
181 }
182 
184 {
185  return fAtarget + fAbeam;
186 }
187 
189 {
190  return fZbeam;
191 }
192 
194 {
195  return fAbeam;
196 }
197 
199 {
200  return fZbeam;
201 }
202 
204 {
205  return fAbeam;
206 }
207 
209 {
210  return fEbeam;
211 }
212 
214 {
215  return fEbeam;
216 }
217 
219 {
220  return (GetTarget() ? GetTarget()->GetTotalThickness() : 0.);
221 }
222 
224 {
225  fZtarget = z;
226 }
227 
229 {
230  fAtarget = a;
231 }
232 
234 {
235  fZbeam = z;
236 }
237 
239 {
240  fAbeam = a;
241 }
242 
243 inline void KVDBSystem::SetEbeam(Float_t energy)
244 {
245  fEbeam = energy;
246 }
247 
248 inline void KVDBSystem::SetBeam(UInt_t z, UInt_t a, Float_t energy)
249 {
250  fZbeam = z;
251  fAbeam = a;
252  fEbeam = energy;
253 }
254 #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:178
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:168
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:173
void SetZtarget(UInt_t z)
Definition: KVDBSystem.h:223
void ls(Option_t *option="*") const override
Definition: KVDBSystem.cpp:627
void SetAtarget(UInt_t a)
Definition: KVDBSystem.h:228
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:233
Double_t GetPtot() const
Definition: KVDBSystem.cpp:194
TString GetBatchName()
Definition: KVDBSystem.cpp:669
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:218
void AddRun(KVDBRecord *)
Definition: KVDBSystem.cpp:507
UInt_t GetAtot() const
Definition: KVDBSystem.h:183
TString GetBatchNameWithoutEnergy()
Definition: KVDBSystem.cpp:702
KV2Body * GetKinematics()
Definition: KVDBSystem.cpp:103
Float_t GetEbeam() const
Definition: KVDBSystem.h:208
void SetBeam(UInt_t z, UInt_t a, Float_t energy)
Definition: KVDBSystem.h:248
void SetTarget(KVTarget *targ)
Definition: KVDBSystem.h:83
UInt_t GetZproj() const
Definition: KVDBSystem.h:198
void SetAbeam(UInt_t a)
Definition: KVDBSystem.h:238
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:188
UInt_t GetAbeam() const
Definition: KVDBSystem.h:193
TString GetReactionNameWithoutEnergy()
Definition: KVDBSystem.cpp:733
TString GetReactionEnergyWithoutName()
Definition: KVDBSystem.cpp:758
KVDBTable * GetRunsTable()
Definition: KVDBSystem.cpp:646
void SetEbeam(Float_t energy)
Definition: KVDBSystem.h:243
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:203
ULong64_t fEvents
temporary variable used to stock number of available runs
Definition: KVDBSystem.h:61
Float_t GetEproj() const
Definition: KVDBSystem.h:213
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
ULong64_t GetSumEventsAllRuns() const
Definition: KVDBSystem.cpp:616
UInt_t fAtarget
Definition: KVDBSystem.h:67
UInt_t GetZtot() const
Definition: KVDBSystem.h:178
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