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 
264 
275 
276 void KVDBSystem::Save(ostream& f) const
277 {
278  //Write informations on system in the format used in Systems.dat files:
279  //
280  //+155Gd + 238U 36 MeV/A '+' followed by name of system
281  //155 64 238 92 36.0 Aproj Zproj Atarg Ztarg Ebeam
282  //Target: 3 0.0 target with 3 layers, angle 0 degrees
283  //C 0.02 1st layer : carbon, 20 g/cm2
284  //238U 0.1 2nd layer : uranium-238, 100 g/cm2
285  //C 0.023 3rd layer : carbon, 23 g/cm2
286  //Runs: 770-804 list of runs in KVNumberList format
287 
288  f << "+" << GetName() << endl;
289  if (fZbeam) f << fAbeam << " " << fZbeam << " " << fAtarget << " " << fZtarget << " " << fEbeam << endl;
290  if (fTarget) {
291  f << "Target: " << fTarget->NumberOfLayers() << " " << fTarget->GetAngleToBeam() << endl;
292  TIter next(fTarget->GetLayers());
293  KVMaterial* lay;
294  while ((lay = (KVMaterial*)next())) {
295  if (lay->IsIsotopic()) f << Form("%d%s", (Int_t)lay->GetMass(), lay->GetType());
296  else f << lay->GetType();
297  f << " " << lay->GetAreaDensity() / KVUnits::mg << endl;
298  }
299  }
300  KVNumberList runlist;
301  GetRunList(runlist);
302  f << "Runs: " << runlist.AsString() << endl;
303 }
304 
305 
306 
307 
323 
324 void KVDBSystem::Load(istream& f, int idx_mult)
325 {
326  //Read and set informations on system in the format used in Systems.dat files:
327  //
328  //~~~
329  //+155Gd + 238U 36 MeV/A '+' followed by name of system
330  //155 64 238 92 36.0 Aproj Zproj Atarg Ztarg Ebeam
331  //Target: 3 0.0 target with 3 layers, angle 0 degrees
332  //C 0.02 1st layer : carbon, 20 ug/cm2
333  //238U 0.1 2nd layer : uranium-238, 100 ug/cm2
334  //C 0.023 3rd layer : carbon, 23 ug/cm2
335  //Runs: 770-804 list of runs in KVNumberList format
336  //~~~
337  //
338  // idx_mult is a run multiplier: if needed, it is used to divide all run numbers
339  // which may have been artificially generated as (run*idx_mult + index)
340 
341  TString line;
342  Float_t target_thickness;
343  fAbeam = fZbeam = fAtarget = fZtarget = 0;
344  fEbeam = target_thickness = 0;
345  KVNumberList runlist;
346  //'peek' at first character of next line
347  char next_char = f.peek();
348  if (next_char == '+') {
349  line.ReadLine(f, kFALSE);
350  line.Remove(0, 1);
351  SetName(line.Data());
352  cout << "New System : " << line.Data() << endl;
353  }
354  else {
355  Error("Load", "Should read system name : %s\n", line.Data());
356  return;
357  }
358  next_char = f.peek();
359  while (next_char != '+' && f.good() && !f.eof()) {
360  if ((next_char >= '0') && (next_char <= '9')) {
361  line.ReadLine(f, kFALSE);
362  if (sscanf(line.Data(), "%u %u %u %u %f %f", &fAbeam, &fZbeam, &fAtarget, &fZtarget, &target_thickness, &fEbeam) == 6) {
363  cout << "Zproj = " << fZbeam << " Ztarg = " << fZtarget << " targ_thick = " << target_thickness << " Ebeam = " << fEbeam << endl;
364  }
365  else if (sscanf(line.Data(), "%u %u %u %u %f", &fAbeam, &fZbeam, &fAtarget, &fZtarget, &fEbeam) == 5) {
366  cout << "Zproj = " << fZbeam << " Ztarg = " << fZtarget << " Ebeam = " << fEbeam << endl;
367  }
368  }
369  else {
370  line.ReadLine(f, kFALSE);
371  if (line.BeginsWith("Target")) {
372  fTarget = new KVTarget;
373  line.Remove(0, line.Index(":") + 1);
374  Int_t nlay;
375  Float_t angle;
376  sscanf(line.Data(), "%d %f", &nlay, &angle);
377  Char_t mat[10];
378  Float_t thick;
379  for (int i = 0; i < nlay; i++) {
380  line.ReadLine(f);
381  sscanf(line.Data(), "%s %f", mat, &thick);
382  fTarget->AddLayer(mat, thick);
383  }
385  fTarget->Print();
386  }
387  else if (line.BeginsWith("Runs")) {
388  line.Remove(0, line.Index(":") + 1);
389  runlist.SetList(line.Data());
390  cout << "Runs : " << line.Data() << endl;
391  }
392  else if (line.BeginsWith("Run Range")) {
393  line.Remove(0, line.Index(":") + 1);
394  Int_t frun, lrun;
395  sscanf(line.Data(), "%i %i", &frun, &lrun);
396  runlist.Add(Form("%i-%i", frun, lrun));
397  cout << "Run range : " << line.Data() << endl;
398  }
399  }
400  next_char = f.peek();
401  }
402  if (runlist.GetNValues()) {
403  SetRuns(runlist,idx_mult);
404  }
405  //set target if not already done (old versions)
406  if (!fTarget && target_thickness > 0 && fZtarget > 0) {
408  fTarget = new KVTarget(n.GetSymbol(), target_thickness);
409  fTarget->Print();
410  }
411 }
412 
413 
414 
415 
421 
422 void KVDBSystem::SetRuns(KVNumberList& rl, int idx_mult)
423 {
424  //Associate this system with the runs in the list.
425  //Any previously associated runs are first removed (links in the runs will be removed too).
426  //
427  // idx_mult may be used to convert run numbers generated as (run*idx_mult + index)
428 
429  Info("SetRuns", "Setting runs for system %s : %s", GetName(), rl.AsString());
430  RemoveAllRuns();
431  rl.Begin();
432  KVDBTable* runtable = GetRunsTable();
433  Int_t run_number;
434  std::map<int,KVDBRun*> run_map;
435  while (!rl.End()) {
436  run_number = rl.Next();
437  if(run_number>=idx_mult) run_number/=idx_mult;
438  if(run_map[run_number]) continue;// treat each run only once
439  auto run = run_map[run_number] = (KVDBRun*)runtable->GetRecord(run_number);
440  if (run) {
441  if (run->GetSystem()) {
442 // Error("SetRuns", "Associating run %d with system \"%s\" : run already associated with system \"%s\"",
443 // run_number, GetName(), run->GetSystem()->GetName());
444  }
445  else {
446  if (AddLink("Runs", run)) {
447  //use name of system as title of run
448  run->SetTitle(GetName());
449  }
450  else {
451  Info("SetRuns", "Could not add link for run %d", run_number);
452  }
453  }
454  }
455  else {
456  //Info("SetRuns", "Run %d not found in database", run_number);
457  }
458  }
459 }
460 
461 
462 
463 
468 
470 {
471  //Associate the given run with this system.
472  //If the run was previously associated with another system, this association
473  //will be removed.
474  if (!rec) return;
475  if (!rec->InheritsFrom("KVDBRun")) {
476  Error("AddRun", "Called with pointer to an object of class %s; should inherit from KVDBRun!",
477  rec->ClassName());
478  return;
479  }
480  KVDBRun* run = (KVDBRun*)rec;
481  if (run->GetSystem()) run->GetSystem()->RemoveRun(run);
482  if (AddLink("Runs", run)) {
483  //Info("AddRun", "Added link for run %d", run->GetNumber());
484  //use name of system as title of run
485  run->SetTitle(GetName());
486  }
487  else {
488  Info("AddRun", "Could not add link for run %d", run->GetNumber());
489  }
490 }
491 
492 
493 
494 
499 
501 {
502  //Associate the given run with this system.
503  //If the run was previously associated with another system, this association
504  //will be removed.
505  AddRun(GetRunsTable()->GetRecord(run));
506 }
507 
508 
509 
510 
514 
516 {
517  //Unassociate the given run from this system. Cross-reference link to this system
518  //is removed from the run at the same time.
519  RemoveLink("Runs", run);
520 }
521 
522 
523 
524 
528 
530 {
531  //Unassociate the given run from this system. Cross-reference link to this system
532  //is removed from the run at the same time.
533  RemoveRun(GetRunsTable()->GetRecord(run));
534 }
535 
536 
537 
538 
542 
544 {
545  //Unassociate all runs from this system. Cross-reference links to this system
546  //are removed from the runs at the same time.
547  RemoveAllLinks("Runs");
548 }
549 
550 
551 
553 
555 {
556  cout << "________________________________________________________" <<
557  endl << "System : " << GetName() << endl;
558  KVNumberList r;
559  GetRunList(r);
560  cout << "Runs : " << r.AsString() << endl;
561  cout << " Zbeam : " << fZbeam
562  << endl << " Abeam : " << fAbeam << endl << " Ebeam : " << fEbeam
563  << " A.MeV" << endl << " Ztarget : " << fZtarget << endl <<
564  " Atarget : " << fAtarget << endl << " Target Thickness : " <<
565  const_cast <
566  KVDBSystem*
567  >(this)->
568  GetTargetThickness() << " mg/cm2" << endl <<
569  "________________________________________________________" << endl;
570 
571 }
572 
573 
574 
576 
578 {
579  KVNumberList r;
580  GetRunList(r);
581  cout << "KVDBSystem : " << GetName() << " Runs : " << r.AsString() << endl;
582 }
583 
584 
585 
592 
594 {
595  //Deduce path to runs table in database from full path to parent table of this record.
596  //The systems are stored in a table called "Systems"
597  //The runs are stored in a table called "Runs"
598  //Therefore if we take the full path to the Systems table and replace Systems with Runs,
599  //we can then use gROOT->FindObject to get the pointer to the Runs table.
600 
601  TString path = fFullPathTable.Data();
602  path.ReplaceAll("Systems", "Runs");
603  return (KVDBTable*)gROOT->FindObject(path.Data());
604 }
605 
606 
607 
608 
612 
614 {
615  // Gives name of system in compact form with all (unix-)illegal characters
616  // replaced by '_'. Can be used for naming batch jobs, files, etc.
617 
618  TString tmp;
619  tmp = "";
620  if (GetKinematics()) {
621  if (GetKinematics()->GetNucleus(1)) {
622  tmp = GetKinematics()->GetNucleus(1)->GetSymbol();
623  }
624  if (GetKinematics()->GetNucleus(2)) {
625  tmp += GetKinematics()->GetNucleus(2)->GetSymbol();
626  }
627  if (GetEbeam() > 0) {
628  tmp += TMath::Nint(GetEbeam());
629  }
630  }
631  if (tmp == "") {
632  tmp = GetName();
633  tmp.ReplaceAll(" ", "_");
634  tmp.ReplaceAll("/", "_");
635  }
636  return tmp;
637 }
638 
639 
640 
645 
647 {
648  // Gives name of system in compact form with all (unix-)illegal characters
649  // replaced by '_'. Can be used for naming batch jobs, files, etc.
650  // Only symbols of projectile and target are used, not the beam energy
651 
652  TString tmp;
653  tmp = "";
654  if (GetKinematics()) {
655  if (GetKinematics()->GetNucleus(1)) {
656  tmp = GetKinematics()->GetNucleus(1)->GetSymbol();
657  }
658  if (GetKinematics()->GetNucleus(2)) {
659  tmp += GetKinematics()->GetNucleus(2)->GetSymbol();
660  }
661  }
662  if (tmp == "") {
663  tmp = GetName();
664  tmp.ReplaceAll(" ", "_");
665  tmp.ReplaceAll("/", "_");
666  }
667  return tmp;
668 }
669 
670 
671 
676 
678 {
679  // Returns name of reaction without the beam energy i.e. just projectile + target.
680  //
681  // E.g. for system "129Xe + natSn 50 MeV/A" we return "129Xe + natSn"
682 
683  KVString name(GetName());
684  name.Begin(" ");
685  TString tmp;
686  int i = 0;
687  while (i < 3 && !name.End()) {
688  tmp += name.Next(kTRUE);
689  if (i < 2) tmp += " ";
690  ++i;
691  }
692  return tmp;
693 }
694 
695 
696 
701 
703 {
704  // Returns beam energy of reaction as it appears in the title,
705  //
706  // E.g. for system "129Xe + natSn 50 MeV/A" we return "50 MeV/A"
707 
708  TString name(GetName());
709  auto reac = GetReactionNameWithoutEnergy();
710  name.Remove(name.Index(reac), reac.Length() + 1);
711  return name;
712 }
713 
714 
715 
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:40
KVDBSystem * GetSystem() const
Definition: KVDBRun.cpp:237
Int_t GetNGoodRunFiles() const
Definition: KVDBRun.h:117
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:170
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:175
KVUnownedList * _GetRuns()
Definition: KVDBSystem.cpp:230
void ls(Option_t *option="*") const override
Definition: KVDBSystem.cpp:577
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:515
Double_t GetPtot() const
Definition: KVDBSystem.cpp:152
TString GetBatchName()
Definition: KVDBSystem.cpp:613
void Save(std::ostream &) const
Definition: KVDBSystem.cpp:276
Double_t GetECM() const
Definition: KVDBSystem.cpp:184
Float_t GetTargetThickness() const
Definition: KVDBSystem.h:220
void AddRun(KVDBRecord *)
Definition: KVDBSystem.cpp:469
void SetRuns(KVNumberList &, int=1)
Definition: KVDBSystem.cpp:422
TString GetBatchNameWithoutEnergy()
Definition: KVDBSystem.cpp:646
KV2Body * GetKinematics()
Definition: KVDBSystem.cpp:80
Float_t GetEbeam() const
Definition: KVDBSystem.h:210
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:190
UInt_t GetAbeam() const
Definition: KVDBSystem.h:195
TString GetReactionNameWithoutEnergy()
Definition: KVDBSystem.cpp:677
TString GetReactionEnergyWithoutName()
Definition: KVDBSystem.cpp:702
KVDBTable * GetRunsTable()
Definition: KVDBSystem.cpp:593
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 GetRunList(KVNumberList &) const
Fills the KVNumberList object with the list of all run numbers associated with this system.
Definition: KVDBSystem.cpp:251
void Load(std::istream &, int=1)
Definition: KVDBSystem.cpp:324
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:543
Double_t GetEtot() const
Definition: KVDBSystem.cpp:168
void Print(Option_t *option="") const override
Definition: KVDBSystem.cpp:554
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)