27 fZtarget = fAtarget = fZbeam = fAbeam = 0;
57 KVDBSystem::~KVDBSystem()
198 if (!(other_runs = other_sys->
GetRuns()))
202 return (
first == other_first ? 0 : (other_first >
first ? -1 : 1));
221 while ((db = (
KVDBRun*) nxt()))
239 while ((run = (
KVDBRun*)next())) {
284 f <<
"Runs: " << runlist.
AsString() << endl;
316 fEbeam = target_thickness = 0;
319 char next_char =
f.peek();
320 if (next_char ==
'+') {
324 cout <<
"New System : " <<
line.Data() << endl;
327 Error(
"Load",
"Should read system name : %s\n",
line.Data());
330 next_char =
f.peek();
331 while (next_char !=
'+' &&
f.good() && !
f.eof()) {
332 if ((next_char >=
'0') && (next_char <=
'9')) {
335 cout <<
"Zproj = " <<
fZbeam <<
" Ztarg = " <<
fZtarget <<
" targ_thick = " << target_thickness <<
" Ebeam = " <<
fEbeam << endl;
343 if (
line.BeginsWith(
"Target")) {
345 line.Remove(0,
line.Index(
":") + 1);
348 sscanf(
line.Data(),
"%d %f", &nlay, &angle);
351 for (
int i = 0; i < nlay; i++) {
353 sscanf(
line.Data(),
"%s %f", mat, &thick);
359 else if (
line.BeginsWith(
"Runs")) {
360 line.Remove(0,
line.Index(
":") + 1);
362 cout <<
"Runs : " <<
line.Data() << endl;
364 else if (
line.BeginsWith(
"Run Range")) {
365 line.Remove(0,
line.Index(
":") + 1);
367 sscanf(
line.Data(),
"%i %i", &frun, &lrun);
368 runlist.
Add(
Form(
"%i-%i", frun, lrun));
369 cout <<
"Run range : " <<
line.Data() << endl;
372 next_char =
f.peek();
402 run_number = rl.
Next();
415 Info(
"SetRuns",
"Could not add link for run %d", run_number);
440 Error(
"AddRun",
"Called with pointer to an object of class %s; should inherit from KVDBRun!",
452 Info(
"AddRun",
"Could not add link for run %d", run->
GetNumber());
520 cout <<
"________________________________________________________" <<
521 endl <<
"System : " <<
GetName() << endl;
524 cout <<
"Runs : " <<
r.AsString() << endl;
525 cout <<
" Zbeam : " <<
fZbeam
526 << endl <<
" Abeam : " <<
fAbeam << endl <<
" Ebeam : " <<
fEbeam
527 <<
" A.MeV" << endl <<
" Ztarget : " <<
fZtarget << endl <<
528 " Atarget : " <<
fAtarget << endl <<
" Target Thickness : " <<
533 "________________________________________________________" << endl;
545 cout <<
"KVDBSystem : " <<
GetName() <<
" Runs : " <<
r.AsString() << endl;
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
char * Form(const char *fmt,...)
Relativistic binary kinematics calculator.
void SetTarget(const KVNucleus &)
Set target for reaction.
void SetProjectile(const KVNucleus &)
Set projectile for reaction.
void CalculateKinematics()
KVNucleus * GetNucleus(Int_t i) const
Double_t GetCMEnergy() const
Return available kinetic energy in centre of mass.
const Char_t * GetType() const
Cross-reference in a KVDataBase.
virtual void SetUniqueStatus(Bool_t unique)
Record folder for the database.
virtual Bool_t AddKey(KVDBKey *key, Bool_t check=kTRUE)
TString fFullPathTable
full path to parent table in folder structure
virtual Bool_t AddLink(const Char_t *key_name, KVDBRecord *rec, Bool_t linkback=kTRUE)
virtual void RemoveLink(const Char_t *key_name, KVDBRecord *rec, Bool_t linkback=kTRUE)
Remove the link between this record and the record "rec" in the DB table"key_name".
virtual KVRList * GetLinks(const Char_t *key) const
Returns the list of records linked to this record in table "key".
virtual void RemoveAllLinks(const Char_t *key)
Remove all links between this record and the records in the DB table"key_name".
virtual Int_t GetNumber() const
Description of an experimental run in database ,.
KVDBSystem * GetSystem() const
Database class used to store information on different colliding systems studied during an experiment.
UInt_t GetZtarget() const
.............. inline functions ...............
virtual void Print(Option_t *option="") const
Bool_t IsCollision() const
retourne kTRUE, si le systeme est une collision ie projectile+cible
Int_t Compare(const TObject *) const
UInt_t GetAtarget() const
void SetRuns(KVNumberList &)
Float_t fEbeam
Energy of the beam in MeV/nucleon.
void RemoveRun(KVDBRecord *)
virtual void Save(std::ostream &) const
KVList * fRunlist
used to store pointer to sorted list of runs
Float_t GetTargetThickness() const
void AddRun(KVDBRecord *)
KV2Body * GetKinematics()
KVList * GetRuns() const
Returns a sorted list of all the runs associated with this system.
UInt_t fAbeam
Mass of the projectile nucleus.
Double_t GetZVtot() const
virtual void ls(Option_t *option="*") const
virtual void Load(std::istream &)
KVDBTable * GetRunsTable()
virtual const Char_t * GetBatchName()
Int_t fRuns
temporary variable used to stock number of associated runs
KV2Body * fCinema
used to calculate kinematics of entrance channel
UInt_t fZtarget
charge of the target nucleus
KVTarget * fTarget
physical target used for experiment run
virtual void GetRunList(KVNumberList &) const
Fills the KVNumberList object with the list of all run numbers associated with this system.
UInt_t fZbeam
charge of the projectile nucleus
UInt_t fAtarget
Mass of the target nucleus.
virtual KVDBRecord * GetRecord(const Char_t *rec_name) const
Extended TList class which owns its objects by default.
void Sort(Bool_t order=kSortAscending)
Description of physical materials used to construct detectors; interface to range tables.
Double_t GetAreaDensity() const
Return area density of material in g/cm**2.
Bool_t IsIsotopic() const
Double_t GetMass() const
Returns atomic mass of material. Will be isotopic mass if set.
Description of properties and kinematics of atomic nuclei.
const Char_t * GetSymbol(Option_t *opt="") const
Strings used to represent a set of ranges of values.
const Char_t * AsString(Int_t maxchars=0) const
void SetList(const TString &)
void Add(Int_t)
Add value 'n' to the list.
void Clear(Option_t *="")
Empty number list, reset it to initial state.
TVector3 GetMomentum() const
void SetEnergy(Double_t e)
Wrapper for TRefArray adding some functionality.
virtual TObject * At(Int_t idx) const
virtual void Add(TObject *obj)
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Calculation/correction of energy losses of particles through an experimental target.
void Print(Option_t *opt="") const
Show information on this material.
void SetAngleToBeam(Double_t a)
Int_t NumberOfLayers() const
void AddLayer(const Char_t *material, Double_t thick)
KVList * GetLayers() const
Double_t GetAngleToBeam()
Gives angle of target to incident beam direction in degrees.
virtual const char * GetName() const
virtual void SetTitle(const char *title="")
virtual void SetName(const char *name)
virtual const char * ClassName() const
virtual Bool_t InheritsFrom(const char *classname) const
virtual void Error(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const
const char * Data() const
TString & ReplaceAll(const char *s1, const char *s2)