KaliVeda
Toolkit for HIC analysis
KVDBSystem.cpp
1 /***************************************************************************
2  * *
3  * This program is free software; you can redistribute it and/or modify *
4  * it under the terms of the GNU General Public License as published by *
5  * the Free Software Foundation; either version 2 of the License, or *
6  * (at your option) any later version. *
7  * *
8  ***************************************************************************/
9 #include "KVDBSystem.h"
10 #include "KVDBRun.h"
11 #include "KV2Body.h"
12 #include "KVNumberList.h"
13 #include "KVUnits.h"
14 #include "TROOT.h"
15 #include "KVDBKey.h"
16 #include "KVDBTable.h"
17 #include <KVUnownedList.h>
18 
19 using namespace std;
20 
22 //___________________________________________________________________________
23 
25 
27 {
28  fZtarget = fAtarget = fZbeam = fAbeam = 0;
29  fEbeam = 0.;
30  fCinema = 0;
31  fTarget = 0;
32  fRunlist = 0;
33  fRuns = 0;
34 }
35 
36 
37 
39 
41  "Physical System")
42 {
43  fZtarget = fAtarget = fZbeam = fAbeam = 0;
44  fEbeam = 0.;
45  fCinema = 0;
46  fTarget = 0;
47  KVDBKey* dbk = AddKey("Runs", "List of Runs");
48  dbk->SetUniqueStatus(kTRUE);
49  fRunlist = 0;
50  fRuns = 0;
51 }
52 
53 
54 
57 
58 KVDBSystem::~KVDBSystem()
59 {
60  //Delete kinematics, target and associated runlist if they exist
61  if (fCinema) {
62  delete fCinema;
63  fCinema = 0;
64  }
65  delete fTarget;
66  if (fRunlist)
67  delete fRunlist;
68 }
69 
70 
71 
72 
79 
81 {
82  // Create (if it doesn't already exist) and return pointer to a KV2Body object initialised
83  // with the entrance channel corresponding to this system. Use this to obtain information
84  // such as the recoil velocity of the CM, available energy, etc. (see KV2Body).
85  //
86  // If no projectile and/or target are defined for the system, we return 0x0.
87 
88  if (GetZbeam()*GetZtarget() == 0) return nullptr;
89 
90  if (!fCinema) {
91  fCinema = new KV2Body();
96  }
97  return fCinema;
98 }
99 
100 
101 
104 
106 {
107  //retourne kTRUE, si le systeme est une collision ie projectile+cible
108  return (GetZbeam() * GetZtarget() != 0);
109 
110 }
111 
112 
113 
116 
118 {
119  // \return total number of runfiles for system which are not considered 'bad'
120 
121  Int_t not_bad(0);
122  TIter next(GetRuns());
123  KVDBRun* run;
124  while ((run = (KVDBRun*)next()))
125  not_bad += run->GetNGoodRunFiles();
126  return not_bad;
127 }
128 
129 
130 
131 
135 
137 {
138  //Returns product of atomic number and velocity component parallel to beam axis of projectile nucleus in laboratory frame
139  //Units are cm/ns (velocity units)
140  KV2Body* kin = const_cast < KVDBSystem* >(this)->GetKinematics();
141  if (!kin) return 0.;
142  return (fZbeam * kin->GetNucleus(1)->GetVpar());
143 }
144 
145 
146 
147 
151 
153 {
154  //Returns momentum component parallel to beam axis of projectile nucleus in laboratory frame
155  //Units are MeV/c
156  KV2Body* kin = const_cast < KVDBSystem* >(this)->GetKinematics();
157  if (!kin) return 0.;
158  return (kin->GetNucleus(1)->GetMomentum().Z());
159 }
160 
161 
162 
163 
167 
169 {
170  //Returns total (mass + kinetic) energy of entrance channel corresponding to system
171  //Units are MeV
172  KV2Body* kin = const_cast < KVDBSystem* >(this)->GetKinematics();
173  if (!kin) return 0.;
174  return (kin->GetNucleus(1)->E() + kin->GetNucleus(2)->E());
175 }
176 
177 
178 
179 
183 
185 {
186  //Returns total available (CM) kinetic energy of entrance channel corresponding to system
187  //Units are MeV
188  KV2Body* kin = const_cast < KVDBSystem* >(this)->GetKinematics();
189  if (!kin) return 0.;
190  return (kin->GetCMEnergy());
191 }
192 
193 
194 
195 
201 
203 {
204  //Function used to sort lists of systems.
205  //Systems are sorted according to the number of the first run in the
206  //(sorted) list of runs associated to the system.
207  //Systems with lower first run numbers appear earlier in the list.
208 
209  if (!GetRuns())
210  return 0;
211  KVDBSystem* other_sys =
212  dynamic_cast < KVDBSystem* >(const_cast < TObject* >(obj));
213  if (!other_sys)
214  return 0;
215  KVList* other_runs;
216  if (!(other_runs = other_sys->GetRuns()))
217  return 0;
218  Int_t first = ((KVDBRecord*) fRunlist->At(0))->GetNumber();
219  Int_t other_first = ((KVDBRecord*) other_runs->At(0))->GetNumber();
220  return (first == other_first ? 0 : (other_first > first ? -1 : 1));
221 }
222 
223 
224 
225 
229 
231 {
232  //"translate" the KVRList returned by GetLinks into a standard
233  //TList which can then be sorted (Sort() is not implemented for TRefArray).
234  KVRList* _rlist = GetLinks("Runs");
235  TIter nxt(_rlist);
236  KVDBRun* db;
238  fRunlist = new KVUnownedList; //will be deleted with object
239  while ((db = (KVDBRun*) nxt()))
240  fRunlist->Add(db);
241  fRunlist->Sort();
242  return fRunlist;
243 }
244 
245 
246 
247 
250 
252 {
253  //Fills the KVNumberList object with the list of all run numbers associated with this system
254  list.Clear();
255  TIter next(GetRuns());
256  KVDBRun* run;
257  while ((run = (KVDBRun*)next())) {
258  list.Add(run->GetNumber());
259  }
260 }
261 
262 
263 
266 
268 {
269  //Fills a KVNumberList with the list of all run numbers associated with this system
270  KVNumberList list;
271  TIter next(GetRuns());
272  KVDBRun* run;
273  while ((run = (KVDBRun*)next())) {
274  list.Add(run->GetNumber());
275  }
276  return list;
277 }
278 
279 
280 
281 
292 
293 void KVDBSystem::Save(ostream& f) const
294 {
295  //Write informations on system in the format used in Systems.dat files:
296  //
297  //+155Gd + 238U 36 MeV/A '+' followed by name of system
298  //155 64 238 92 36.0 Aproj Zproj Atarg Ztarg Ebeam
299  //Target: 3 0.0 target with 3 layers, angle 0 degrees
300  //C 0.02 1st layer : carbon, 20 g/cm2
301  //238U 0.1 2nd layer : uranium-238, 100 g/cm2
302  //C 0.023 3rd layer : carbon, 23 g/cm2
303  //Runs: 770-804 list of runs in KVNumberList format
304 
305  f << "+" << GetName() << endl;
306  if (fZbeam) f << fAbeam << " " << fZbeam << " " << fAtarget << " " << fZtarget << " " << fEbeam << endl;
307  if (fTarget) {
308  f << "Target: " << fTarget->NumberOfLayers() << " " << fTarget->GetAngleToBeam() << endl;
309  TIter next(fTarget->GetLayers());
310  KVMaterial* lay;
311  while ((lay = (KVMaterial*)next())) {
312  if (lay->IsIsotopic()) f << Form("%d%s", (Int_t)lay->GetMass(), lay->GetType());
313  else f << lay->GetType();
314  f << " " << lay->GetAreaDensity() / KVUnits::mg << endl;
315  }
316  }
317  KVNumberList runlist;
318  GetRunList(runlist);
319  f << "Runs: " << runlist.AsString() << endl;
320 }
321 
322 
323 
324 
340 
341 void KVDBSystem::Load(istream& f, int idx_mult)
342 {
343  //Read and set informations on system in the format used in Systems.dat files:
344  //
345  //~~~
346  //+155Gd + 238U 36 MeV/A '+' followed by name of system
347  //155 64 238 92 36.0 Aproj Zproj Atarg Ztarg Ebeam
348  //Target: 3 0.0 target with 3 layers, angle 0 degrees
349  //C 0.02 1st layer : carbon, 20 ug/cm2
350  //238U 0.1 2nd layer : uranium-238, 100 ug/cm2
351  //C 0.023 3rd layer : carbon, 23 ug/cm2
352  //Runs: 770-804 list of runs in KVNumberList format
353  //~~~
354  //
355  // idx_mult is a run multiplier: if needed, it is used to divide all run numbers
356  // which may have been artificially generated as (run*idx_mult + index)
357 
358  TString line;
359  Float_t target_thickness;
360  fAbeam = fZbeam = fAtarget = fZtarget = 0;
361  fEbeam = target_thickness = 0;
362  KVNumberList runlist;
363  //'peek' at first character of next line
364  char next_char = f.peek();
365  if (next_char == '+') {
366  line.ReadLine(f, kFALSE);
367  line.Remove(0, 1);
368  SetName(line.Data());
369  cout << "New System : " << line.Data() << endl;
370  }
371  else {
372  Error("Load", "Should read system name : %s\n", line.Data());
373  return;
374  }
375  next_char = f.peek();
376  while (next_char != '+' && f.good() && !f.eof()) {
377  if ((next_char >= '0') && (next_char <= '9')) {
378  line.ReadLine(f, kFALSE);
379  if (sscanf(line.Data(), "%u %u %u %u %f %f", &fAbeam, &fZbeam, &fAtarget, &fZtarget, &target_thickness, &fEbeam) == 6) {
380  cout << "Zproj = " << fZbeam << " Ztarg = " << fZtarget << " targ_thick = " << target_thickness << " Ebeam = " << fEbeam << endl;
381  }
382  else if (sscanf(line.Data(), "%u %u %u %u %f", &fAbeam, &fZbeam, &fAtarget, &fZtarget, &fEbeam) == 5) {
383  cout << "Zproj = " << fZbeam << " Ztarg = " << fZtarget << " Ebeam = " << fEbeam << endl;
384  }
385  }
386  else {
387  line.ReadLine(f, kFALSE);
388  if (line.BeginsWith("Target")) {
389  fTarget = new KVTarget;
390  line.Remove(0, line.Index(":") + 1);
391  Int_t nlay;
392  Float_t angle;
393  sscanf(line.Data(), "%d %f", &nlay, &angle);
394  Char_t mat[10];
395  Float_t thick;
396  for (int i = 0; i < nlay; i++) {
397  line.ReadLine(f);
398  sscanf(line.Data(), "%s %f", mat, &thick);
399  fTarget->AddLayer(mat, thick);
400  }
402  fTarget->Print();
403  }
404  else if (line.BeginsWith("Runs")) {
405  line.Remove(0, line.Index(":") + 1);
406  runlist.SetList(line.Data());
407  cout << "Runs : " << line.Data() << endl;
408  }
409  else if (line.BeginsWith("Run Range")) {
410  line.Remove(0, line.Index(":") + 1);
411  Int_t frun, lrun;
412  sscanf(line.Data(), "%i %i", &frun, &lrun);
413  runlist.Add(Form("%i-%i", frun, lrun));
414  cout << "Run range : " << line.Data() << endl;
415  }
416  }
417  next_char = f.peek();
418  }
419  if (runlist.GetNValues()) {
420  SetRuns(runlist,idx_mult);
421  }
422  //set target if not already done (old versions)
423  if (!fTarget && target_thickness > 0 && fZtarget > 0) {
425  fTarget = new KVTarget(n.GetSymbol(), target_thickness);
426  fTarget->Print();
427  }
428 }
429 
430 
431 
432 
438 
439 void KVDBSystem::SetRuns(KVNumberList& rl, int idx_mult)
440 {
441  //Associate this system with the runs in the list.
442  //Any previously associated runs are first removed (links in the runs will be removed too).
443  //
444  // idx_mult may be used to convert run numbers generated as (run*idx_mult + index)
445 
446  Info("SetRuns", "Setting runs for system %s : %s", GetName(), rl.AsString());
447  RemoveAllRuns();
448  rl.Begin();
449  KVDBTable* runtable = GetRunsTable();
450  Int_t run_number;
451  std::map<int,KVDBRun*> run_map;
452  while (!rl.End()) {
453  run_number = rl.Next();
454  if(run_number>=idx_mult) run_number/=idx_mult;
455  if(run_map[run_number]) continue;// treat each run only once
456  auto run = run_map[run_number] = (KVDBRun*)runtable->GetRecord(run_number);
457  if (run) {
458  if (run->GetSystem()) {
459 // Error("SetRuns", "Associating run %d with system \"%s\" : run already associated with system \"%s\"",
460 // run_number, GetName(), run->GetSystem()->GetName());
461  }
462  else {
463  if (AddLink("Runs", run)) {
464  //use name of system as title of run
465  run->SetTitle(GetName());
466  }
467  else {
468  Info("SetRuns", "Could not add link for run %d", run_number);
469  }
470  }
471  }
472  else {
473  //Info("SetRuns", "Run %d not found in database", run_number);
474  }
475  }
476 }
477 
478 
479 
480 
485 
487 {
488  //Associate the given run with this system.
489  //If the run was previously associated with another system, this association
490  //will be removed.
491  if (!rec) return;
492  if (!rec->InheritsFrom("KVDBRun")) {
493  Error("AddRun", "Called with pointer to an object of class %s; should inherit from KVDBRun!",
494  rec->ClassName());
495  return;
496  }
497  KVDBRun* run = (KVDBRun*)rec;
498  if (run->GetSystem()) run->GetSystem()->RemoveRun(run);
499  if (AddLink("Runs", run)) {
500  //Info("AddRun", "Added link for run %d", run->GetNumber());
501  //use name of system as title of run
502  run->SetTitle(GetName());
503  }
504  else {
505  Info("AddRun", "Could not add link for run %d", run->GetNumber());
506  }
507 }
508 
509 
510 
511 
516 
518 {
519  //Associate the given run with this system.
520  //If the run was previously associated with another system, this association
521  //will be removed.
522  AddRun(GetRunsTable()->GetRecord(run));
523 }
524 
525 
526 
527 
531 
533 {
534  //Unassociate the given run from this system. Cross-reference link to this system
535  //is removed from the run at the same time.
536  RemoveLink("Runs", run);
537 }
538 
539 
540 
541 
545 
547 {
548  //Unassociate the given run from this system. Cross-reference link to this system
549  //is removed from the run at the same time.
550  RemoveRun(GetRunsTable()->GetRecord(run));
551 }
552 
553 
554 
555 
559 
561 {
562  //Unassociate all runs from this system. Cross-reference links to this system
563  //are removed from the runs at the same time.
564  RemoveAllLinks("Runs");
565 }
566 
567 
568 
570 
572 {
573  cout << "________________________________________________________" <<
574  endl << "System : " << GetName() << endl;
575  KVNumberList r;
576  GetRunList(r);
577  cout << "Runs : " << r.AsString() << endl;
578  cout << " Zbeam : " << fZbeam
579  << endl << " Abeam : " << fAbeam << endl << " Ebeam : " << fEbeam
580  << " A.MeV" << endl << " Ztarget : " << fZtarget << endl <<
581  " Atarget : " << fAtarget << endl << " Target Thickness : " <<
582  const_cast <
583  KVDBSystem*
584  >(this)->
585  GetTargetThickness() << " mg/cm2" << endl <<
586  "________________________________________________________" << endl;
587 
588 }
589 
590 
591 
593 
595 {
596  KVNumberList r;
597  GetRunList(r);
598  cout << "KVDBSystem : " << GetName() << " Runs : " << r.AsString() << endl;
599 }
600 
601 
602 
609 
611 {
612  //Deduce path to runs table in database from full path to parent table of this record.
613  //The systems are stored in a table called "Systems"
614  //The runs are stored in a table called "Runs"
615  //Therefore if we take the full path to the Systems table and replace Systems with Runs,
616  //we can then use gROOT->FindObject to get the pointer to the Runs table.
617 
618  TString path = fFullPathTable.Data();
619  path.ReplaceAll("Systems", "Runs");
620  return (KVDBTable*)gROOT->FindObject(path.Data());
621 }
622 
623 
624 
625 
629 
631 {
632  // Gives name of system in compact form with all (unix-)illegal characters
633  // replaced by '_'. Can be used for naming batch jobs, files, etc.
634 
635  TString tmp;
636  tmp = "";
637  if (GetKinematics()) {
638  if (GetKinematics()->GetNucleus(1)) {
639  tmp = GetKinematics()->GetNucleus(1)->GetSymbol();
640  }
641  if (GetKinematics()->GetNucleus(2)) {
642  tmp += GetKinematics()->GetNucleus(2)->GetSymbol();
643  }
644  if (GetEbeam() > 0) {
645  tmp += TMath::Nint(GetEbeam());
646  }
647  }
648  if (tmp == "") {
649  tmp = GetName();
650  tmp.ReplaceAll(" ", "_");
651  tmp.ReplaceAll("/", "_");
652  }
653  return tmp;
654 }
655 
656 
657 
662 
664 {
665  // Gives name of system in compact form with all (unix-)illegal characters
666  // replaced by '_'. Can be used for naming batch jobs, files, etc.
667  // Only symbols of projectile and target are used, not the beam energy
668 
669  TString tmp;
670  tmp = "";
671  if (GetKinematics()) {
672  if (GetKinematics()->GetNucleus(1)) {
673  tmp = GetKinematics()->GetNucleus(1)->GetSymbol();
674  }
675  if (GetKinematics()->GetNucleus(2)) {
676  tmp += GetKinematics()->GetNucleus(2)->GetSymbol();
677  }
678  }
679  if (tmp == "") {
680  tmp = GetName();
681  tmp.ReplaceAll(" ", "_");
682  tmp.ReplaceAll("/", "_");
683  }
684  return tmp;
685 }
686 
687 
688 
693 
695 {
696  // Returns name of reaction without the beam energy i.e. just projectile + target.
697  //
698  // E.g. for system "129Xe + natSn 50 MeV/A" we return "129Xe + natSn"
699 
700  KVString name(GetName());
701  name.Begin(" ");
702  TString tmp;
703  int i = 0;
704  while (i < 3 && !name.End()) {
705  tmp += name.Next(kTRUE);
706  if (i < 2) tmp += " ";
707  ++i;
708  }
709  return tmp;
710 }
711 
712 
713 
718 
720 {
721  // Returns beam energy of reaction as it appears in the title,
722  //
723  // E.g. for system "129Xe + natSn 50 MeV/A" we return "50 MeV/A"
724 
725  TString name(GetName());
726  auto reac = GetReactionNameWithoutEnergy();
727  name.Remove(name.Index(reac), reac.Length() + 1);
728  return name;
729 }
730 
731 
732 
int Int_t
ROOT::R::TRInterface & r
#define SafeDelete(p)
#define f(i)
bool Bool_t
char Char_t
float Float_t
constexpr Bool_t kFALSE
double Double_t
constexpr Bool_t kTRUE
const char Option_t
Option_t Option_t TPoint TPoint angle
char name[80]
#define gROOT
char * Form(const char *fmt,...)
Relativistic binary kinematics calculator.
Definition: KV2Body.h:166
void SetTarget(const KVNucleus &)
Set target for reaction.
Definition: KV2Body.cpp:314
void SetProjectile(const KVNucleus &)
Set projectile for reaction.
Definition: KV2Body.cpp:339
void CalculateKinematics()
Definition: KV2Body.cpp:677
KVNucleus * GetNucleus(Int_t i) const
Definition: KV2Body.cpp:456
Double_t GetCMEnergy() const
Return available kinetic energy in centre of mass.
Definition: KV2Body.cpp:522
virtual const Char_t * GetType() const
Definition: KVBase.h:176
Cross-reference in a KVDataBase.
Definition: KVDBKey.h:38
virtual void SetUniqueStatus(Bool_t unique)
Definition: KVDBKey.h:73
Record folder for the database.
Definition: KVDBRecord.h:43
virtual Bool_t AddKey(KVDBKey *key, Bool_t check=kTRUE)
Definition: KVDBRecord.cpp:65
TString fFullPathTable
full path to parent table in folder structure
Definition: KVDBRecord.h:47
virtual Bool_t AddLink(const Char_t *key_name, KVDBRecord *rec, Bool_t linkback=kTRUE)
Definition: KVDBRecord.cpp:122
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".
Definition: KVDBRecord.cpp:145
virtual KVRList * GetLinks(const Char_t *key) const
Returns the list of records linked to this record in table "key".
Definition: KVDBRecord.cpp:206
virtual void RemoveAllLinks(const Char_t *key)
Remove all links between this record and the records in the DB table"key_name".
Definition: KVDBRecord.cpp:166
virtual Int_t GetNumber() const
Definition: KVDBRecord.h:73
Description of an experimental run in database ,,.
Definition: KVDBRun.h:41
KVDBSystem * GetSystem() const
Definition: KVDBRun.cpp:239
Int_t GetNGoodRunFiles() const
Definition: KVDBRun.h:160
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
KVUnownedList * _GetRuns()
Definition: KVDBSystem.cpp:230
void ls(Option_t *option="*") const override
Definition: KVDBSystem.cpp:594
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
Double_t GetPtot() const
Definition: KVDBSystem.cpp:152
TString GetBatchName()
Definition: KVDBSystem.cpp:630
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
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
UInt_t fAbeam
Mass of the projectile nucleus.
Definition: KVDBSystem.h:66
Double_t GetZVtot() const
Definition: KVDBSystem.cpp:136
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
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
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
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
virtual KVDBRecord * GetRecord(const Char_t *rec_name) const
Definition: KVDBTable.h:58
Extended TList class which owns its objects by default.
Definition: KVList.h:28
void Sort(Bool_t order=kSortAscending)
Definition: KVList.h:35
Description of physical materials used to construct detectors & targets; interface to range tables.
Definition: KVMaterial.h:89
Double_t GetAreaDensity() const
Definition: KVMaterial.cpp:553
Bool_t IsIsotopic() const
Definition: KVMaterial.cpp:324
Double_t GetMass() const
Definition: KVMaterial.cpp:302
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:123
const Char_t * GetSymbol(Option_t *opt="") const
Definition: KVNucleus.cpp:71
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:85
void Clear(Option_t *="") override
Empty number list, reset it to initial state.
const Char_t * AsString(Int_t maxchars=0) const
Bool_t End(void) const
Definition: KVNumberList.h:199
Int_t GetNValues() const
void Begin(void) const
void SetList(const TString &)
void Add(Int_t)
Add value 'n' to the list.
Int_t Next(void) const
TVector3 GetMomentum() const
Definition: KVParticle.h:607
Double_t GetVpar() const
Definition: KVParticle.h:678
void SetEnergy(Double_t e)
Definition: KVParticle.h:602
Wrapper for TRefArray adding some functionality.
Definition: KVRList.h:37
void Add(TObject *obj) override
TObject * At(Int_t idx) const override
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
void Print(Option_t *opt="") const override
Definition: KVTarget.cpp:737
void SetAngleToBeam(Double_t a)
Definition: KVTarget.cpp:179
Int_t NumberOfLayers() const
Definition: KVTarget.h:167
void AddLayer(const Char_t *material, Double_t thick)
Definition: KVTarget.cpp:112
KVList * GetLayers() const
Definition: KVTarget.h:171
Double_t GetAngleToBeam()
Gives angle of target to incident beam direction in degrees.
Definition: KVTarget.cpp:194
Extended TList class which does not own its objects by default.
Definition: KVUnownedList.h:17
Double_t E() const
virtual void SetTitle(const char *title="")
const char * GetName() const override
virtual void SetName(const char *name)
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)
Double_t Z() const
TLine * line
const Int_t n
const long double mg
Definition: KVUnits.h:74
rec
Int_t Nint(T x)
ClassImp(TPyArg)