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  fRuns = 0;
33 }
34 
35 
36 
38 
40  "Physical System")
41 {
42  fZtarget = fAtarget = fZbeam = fAbeam = 0;
43  fEbeam = 0.;
44  fCinema = 0;
45  fTarget = 0;
46  KVDBKey* dbk = AddKey("Runs", "List of Runs");
47  dbk->SetUniqueStatus(kTRUE);
48  fRuns = 0;
49 }
50 
51 
52 
55 
56 KVDBSystem::~KVDBSystem()
57 {
58  //Delete kinematics, target and associated runlist if they exist
59  if (fCinema) {
60  delete fCinema;
61  fCinema = 0;
62  }
63  delete fTarget;
64 }
65 
66 
67 
68 
75 
77 {
78  // Create (if it doesn't already exist) and return pointer to a KV2Body object initialised
79  // with the entrance channel corresponding to this system. Use this to obtain information
80  // such as the recoil velocity of the CM, available energy, etc. (see KV2Body).
81  //
82  // If no projectile and/or target are defined for the system, we return 0x0.
83 
84  if (GetZbeam()*GetZtarget() == 0) return nullptr;
85 
86  if (!fCinema) {
87  fCinema = new KV2Body();
92  }
93  return fCinema;
94 }
95 
96 
97 
100 
102 {
103  //retourne kTRUE, si le systeme est une collision ie projectile+cible
104  return (GetZbeam() * GetZtarget() != 0);
105 
106 }
107 
108 
109 
111 
113 {
114  if(fRunlist.IsEmpty())
115  {
116  auto _rlist = GetLinks("Runs");
117  TIter nxt(_rlist);
118  KVDBRun* db;
119  while ((db = (KVDBRun*) nxt()))
120  fRunlist.Add(db);
121  fRunlist.Sort();
122  }
123  return fRunlist;
124 }
125 
126 
127 
130 
132 {
133  // \return total number of runfiles for system which are not considered 'bad'
134 
135  Int_t not_bad(0);
136  for(auto it : GetRuns())
137  {
138  auto run = dynamic_cast<KVDBRun*>(it);
139  not_bad += run->GetNGoodRunFiles();
140  }
141  return not_bad;
142 }
143 
144 
145 
146 
150 
152 {
153  //Returns product of atomic number and velocity component parallel to beam axis of projectile nucleus in laboratory frame
154  //Units are cm/ns (velocity units)
155  KV2Body* kin = const_cast < KVDBSystem* >(this)->GetKinematics();
156  if (!kin) return 0.;
157  return (fZbeam * kin->GetNucleus(1)->GetVpar());
158 }
159 
160 
161 
162 
166 
168 {
169  //Returns momentum component parallel to beam axis of projectile nucleus in laboratory frame
170  //Units are MeV/c
171  KV2Body* kin = const_cast < KVDBSystem* >(this)->GetKinematics();
172  if (!kin) return 0.;
173  return (kin->GetNucleus(1)->GetMomentum().Z());
174 }
175 
176 
177 
178 
182 
184 {
185  //Returns total (mass + kinetic) energy of entrance channel corresponding to system
186  //Units are MeV
187  KV2Body* kin = const_cast < KVDBSystem* >(this)->GetKinematics();
188  if (!kin) return 0.;
189  return (kin->GetNucleus(1)->E() + kin->GetNucleus(2)->E());
190 }
191 
192 
193 
194 
198 
200 {
201  //Returns total available (CM) kinetic energy of entrance channel corresponding to system
202  //Units are MeV
203  KV2Body* kin = const_cast < KVDBSystem* >(this)->GetKinematics();
204  if (!kin) return 0.;
205  return (kin->GetCMEnergy());
206 }
207 
208 
209 
210 
216 
218 {
219  //Function used to sort lists of systems.
220  //Systems are sorted according to the number of the first run in the
221  //(sorted) list of runs associated to the system.
222  //Systems with lower first run numbers appear earlier in the list.
223 
224  if (!GetRuns())
225  return 0;
226  KVDBSystem* other_sys =
227  dynamic_cast < KVDBSystem* >(const_cast < TObject* >(obj));
228  if (!other_sys)
229  return 0;
230  auto other_runs = other_sys->GetRuns();
231  if (!other_runs)
232  return 0;
233  Int_t first = ((KVDBRecord*) fRunlist.At(0))->GetNumber();
234  Int_t other_first = ((KVDBRecord*) other_runs.At(0))->GetNumber();
235  return (first == other_first ? 0 : (other_first > first ? -1 : 1));
236 }
237 
238 
239 
240 
241 
244 
246 {
247  //Fills the KVNumberList object with the list of all run numbers associated with this system
248  list.Clear();
249  for(auto run : GetRuns())
250  {
251  list.Add(dynamic_cast<KVDBRun*>(run)->GetNumber());
252  }
253 }
254 
255 
256 
259 
261 {
262  //Fills a KVNumberList with the list of all run numbers associated with this system
263  KVNumberList list;
264  for(auto run : GetRuns())
265  {
266  list.Add(dynamic_cast<KVDBRun*>(run)->GetNumber());
267  }
268  return list;
269 }
270 
271 
272 
273 
284 
285 void KVDBSystem::Save(ostream& f) const
286 {
287  //Write informations on system in the format used in Systems.dat files:
288  //
289  //+155Gd + 238U 36 MeV/A '+' followed by name of system
290  //155 64 238 92 36.0 Aproj Zproj Atarg Ztarg Ebeam
291  //Target: 3 0.0 target with 3 layers, angle 0 degrees
292  //C 0.02 1st layer : carbon, 20 g/cm2
293  //238U 0.1 2nd layer : uranium-238, 100 g/cm2
294  //C 0.023 3rd layer : carbon, 23 g/cm2
295  //Runs: 770-804 list of runs in KVNumberList format
296 
297  f << "+" << GetName() << endl;
298  if (fZbeam) f << fAbeam << " " << fZbeam << " " << fAtarget << " " << fZtarget << " " << fEbeam << endl;
299  if (fTarget) {
300  f << "Target: " << fTarget->NumberOfLayers() << " " << fTarget->GetAngleToBeam() << endl;
301  TIter next(fTarget->GetLayers());
302  KVMaterial* lay;
303  while ((lay = (KVMaterial*)next())) {
304  if (lay->IsIsotopic()) f << Form("%d%s", (Int_t)lay->GetMass(), lay->GetType());
305  else f << lay->GetType();
306  f << " " << lay->GetAreaDensity() / KVUnits::mg << endl;
307  }
308  }
309  KVNumberList runlist;
310  GetRunList(runlist);
311  f << "Runs: " << runlist.AsString() << endl;
312 }
313 
314 
315 
316 
332 
333 void KVDBSystem::Load(istream& f, int idx_mult)
334 {
335  //Read and set informations on system in the format used in Systems.dat files:
336  //
337  //~~~
338  //+155Gd + 238U 36 MeV/A '+' followed by name of system
339  //155 64 238 92 36.0 Aproj Zproj Atarg Ztarg Ebeam
340  //Target: 3 0.0 target with 3 layers, angle 0 degrees
341  //C 0.02 1st layer : carbon, 20 ug/cm2
342  //238U 0.1 2nd layer : uranium-238, 100 ug/cm2
343  //C 0.023 3rd layer : carbon, 23 ug/cm2
344  //Runs: 770-804 list of runs in KVNumberList format
345  //~~~
346  //
347  // idx_mult is a run multiplier: if needed, it is used to divide all run numbers
348  // which may have been artificially generated as (run*idx_mult + index)
349 
350  TString line;
351  Float_t target_thickness;
352  fAbeam = fZbeam = fAtarget = fZtarget = 0;
353  fEbeam = target_thickness = 0;
354  KVNumberList runlist;
355  //'peek' at first character of next line
356  char next_char = f.peek();
357  if (next_char == '+') {
358  line.ReadLine(f, kFALSE);
359  line.Remove(0, 1);
360  SetName(line.Data());
361  cout << "New System : " << line.Data() << endl;
362  }
363  else {
364  Error("Load", "Should read system name : %s\n", line.Data());
365  return;
366  }
367  next_char = f.peek();
368  while (next_char != '+' && f.good() && !f.eof()) {
369  if ((next_char >= '0') && (next_char <= '9')) {
370  line.ReadLine(f, kFALSE);
371  if (sscanf(line.Data(), "%u %u %u %u %f %f", &fAbeam, &fZbeam, &fAtarget, &fZtarget, &target_thickness, &fEbeam) == 6) {
372  cout << "Zproj = " << fZbeam << " Ztarg = " << fZtarget << " targ_thick = " << target_thickness << " Ebeam = " << fEbeam << endl;
373  }
374  else if (sscanf(line.Data(), "%u %u %u %u %f", &fAbeam, &fZbeam, &fAtarget, &fZtarget, &fEbeam) == 5) {
375  cout << "Zproj = " << fZbeam << " Ztarg = " << fZtarget << " Ebeam = " << fEbeam << endl;
376  }
377  }
378  else {
379  line.ReadLine(f, kFALSE);
380  if (line.BeginsWith("Target")) {
381  fTarget = new KVTarget;
382  line.Remove(0, line.Index(":") + 1);
383  Int_t nlay;
384  Float_t angle;
385  sscanf(line.Data(), "%d %f", &nlay, &angle);
386  Char_t mat[255];
387  Float_t thick;
388  for (int i = 0; i < nlay; i++) {
389  line.ReadLine(f);
390  sscanf(line.Data(), "%s %f", mat, &thick);
391  fTarget->AddLayer(mat, thick);
392  }
394  fTarget->Print();
395  }
396  else if (line.BeginsWith("Runs")) {
397  line.Remove(0, line.Index(":") + 1);
398  runlist.SetList(line.Data());
399  cout << "Runs : " << line.Data() << endl;
400  }
401  else if (line.BeginsWith("Run Range")) {
402  line.Remove(0, line.Index(":") + 1);
403  Int_t frun, lrun;
404  sscanf(line.Data(), "%i %i", &frun, &lrun);
405  runlist.Add(Form("%i-%i", frun, lrun));
406  cout << "Run range : " << line.Data() << endl;
407  }
408  }
409  next_char = f.peek();
410  }
411  if (runlist.GetNValues()) {
412  SetRuns(runlist,idx_mult);
413  }
414  //set target if not already done (old versions)
415  if (!fTarget && target_thickness > 0 && fZtarget > 0) {
417  fTarget = new KVTarget(n.GetSymbol(), target_thickness);
418  fTarget->Print();
419  }
420 }
421 
422 
423 
424 
430 
431 void KVDBSystem::SetRuns(KVNumberList& rl, int idx_mult)
432 {
433  //Associate this system with the runs in the list.
434  //Any previously associated runs are first removed (links in the runs will be removed too).
435  //
436  // idx_mult may be used to convert run numbers generated as (run*idx_mult + index)
437 
438  Info("SetRuns", "Setting runs for system %s : %s", GetName(), rl.AsString());
439  RemoveAllRuns();
440  rl.Begin();
441  KVDBTable* runtable = GetRunsTable();
442  Int_t run_number;
443  std::map<int,KVDBRun*> run_map;
444  while (!rl.End()) {
445  run_number = rl.Next();
446  if(run_number>=idx_mult) run_number/=idx_mult;
447  if(run_map[run_number]) continue;// treat each run only once
448  auto run = run_map[run_number] = (KVDBRun*)runtable->GetRecord(run_number);
449  if (run) {
450  if (run->GetSystem()) {
451 // Error("SetRuns", "Associating run %d with system \"%s\" : run already associated with system \"%s\"",
452 // run_number, GetName(), run->GetSystem()->GetName());
453  }
454  else {
455  if (AddLink("Runs", run)) {
456  //use name of system as title of run
457  run->SetTitle(GetName());
458  }
459  else {
460  Info("SetRuns", "Could not add link for run %d", run_number);
461  }
462  }
463  }
464  else {
465  //Info("SetRuns", "Run %d not found in database", run_number);
466  }
467  }
468 }
469 
470 
471 
472 
477 
479 {
480  //Associate the given run with this system.
481  //If the run was previously associated with another system, this association
482  //will be removed.
483  if (!rec) return;
484  if (!rec->InheritsFrom("KVDBRun")) {
485  Error("AddRun", "Called with pointer to an object of class %s; should inherit from KVDBRun!",
486  rec->ClassName());
487  return;
488  }
489  KVDBRun* run = (KVDBRun*)rec;
490  if (run->GetSystem()) run->GetSystem()->RemoveRun(run);
491  if (AddLink("Runs", run)) {
492  //Info("AddRun", "Added link for run %d", run->GetNumber());
493  //use name of system as title of run
494  run->SetTitle(GetName());
495  }
496  else {
497  Info("AddRun", "Could not add link for run %d", run->GetNumber());
498  }
499 }
500 
501 
502 
503 
508 
510 {
511  //Associate the given run with this system.
512  //If the run was previously associated with another system, this association
513  //will be removed.
514  AddRun(GetRunsTable()->GetRecord(run));
515 }
516 
517 
518 
519 
523 
525 {
526  //Unassociate the given run from this system. Cross-reference link to this system
527  //is removed from the run at the same time.
528  RemoveLink("Runs", run);
529 }
530 
531 
532 
533 
537 
539 {
540  //Unassociate the given run from this system. Cross-reference link to this system
541  //is removed from the run at the same time.
542  RemoveRun(GetRunsTable()->GetRecord(run));
543 }
544 
545 
546 
547 
551 
553 {
554  //Unassociate all runs from this system. Cross-reference links to this system
555  //are removed from the runs at the same time.
556  RemoveAllLinks("Runs");
557 }
558 
559 
560 
562 
564 {
565  cout << "________________________________________________________" <<
566  endl << "System : " << GetName() << endl;
567  KVNumberList r;
568  GetRunList(r);
569  cout << "Runs : " << r.AsString() << endl;
570  cout << " Zbeam : " << fZbeam
571  << endl << " Abeam : " << fAbeam << endl << " Ebeam : " << fEbeam
572  << " A.MeV" << endl << " Ztarget : " << fZtarget << endl <<
573  " Atarget : " << fAtarget << endl << " Target Thickness : " <<
574  const_cast <
575  KVDBSystem*
576  >(this)->
577  GetTargetThickness() << " mg/cm2" << endl <<
578  "________________________________________________________" << endl;
579 
580 }
581 
582 
583 
585 
587 {
588  KVNumberList r;
589  GetRunList(r);
590  cout << "KVDBSystem : " << GetName() << " Runs : " << r.AsString() << endl;
591 }
592 
593 
594 
601 
603 {
604  //Deduce path to runs table in database from full path to parent table of this record.
605  //The systems are stored in a table called "Systems"
606  //The runs are stored in a table called "Runs"
607  //Therefore if we take the full path to the Systems table and replace Systems with Runs,
608  //we can then use gROOT->FindObject to get the pointer to the Runs table.
609 
610  TString path = fFullPathTable.Data();
611  path.ReplaceAll("Systems", "Runs");
612  return (KVDBTable*)gROOT->FindObject(path.Data());
613 }
614 
615 
616 
617 
621 
623 {
624  // Gives name of system in compact form with all (unix-)illegal characters
625  // replaced by '_'. Can be used for naming batch jobs, files, etc.
626 
627  TString tmp;
628  tmp = "";
629  if (GetKinematics()) {
630  if (GetKinematics()->GetNucleus(1)) {
631  tmp = GetKinematics()->GetNucleus(1)->GetSymbol();
632  }
633  if (GetKinematics()->GetNucleus(2)) {
634  tmp += GetKinematics()->GetNucleus(2)->GetSymbol();
635  }
636  if (GetEbeam() > 0) {
637  tmp += TMath::Nint(GetEbeam());
638  }
639  }
640  if (tmp == "") {
641  tmp = GetName();
642  tmp.ReplaceAll(" ", "_");
643  tmp.ReplaceAll("/", "_");
644  }
645  return tmp;
646 }
647 
648 
649 
654 
656 {
657  // Gives name of system in compact form with all (unix-)illegal characters
658  // replaced by '_'. Can be used for naming batch jobs, files, etc.
659  // Only symbols of projectile and target are used, not the beam energy
660 
661  TString tmp;
662  tmp = "";
663  if (GetKinematics()) {
664  if (GetKinematics()->GetNucleus(1)) {
665  tmp = GetKinematics()->GetNucleus(1)->GetSymbol();
666  }
667  if (GetKinematics()->GetNucleus(2)) {
668  tmp += GetKinematics()->GetNucleus(2)->GetSymbol();
669  }
670  }
671  if (tmp == "") {
672  tmp = GetName();
673  tmp.ReplaceAll(" ", "_");
674  tmp.ReplaceAll("/", "_");
675  }
676  return tmp;
677 }
678 
679 
680 
685 
687 {
688  // Returns name of reaction without the beam energy i.e. just projectile + target.
689  //
690  // E.g. for system "129Xe + natSn 50 MeV/A" we return "129Xe + natSn"
691 
692  KVString name(GetName());
693  name.Begin(" ");
694  TString tmp;
695  int i = 0;
696  while (i < 3 && !name.End()) {
697  tmp += name.Next(kTRUE);
698  if (i < 2) tmp += " ";
699  ++i;
700  }
701  return tmp;
702 }
703 
704 
705 
710 
712 {
713  // Returns beam energy of reaction as it appears in the title,
714  //
715  // E.g. for system "129Xe + natSn 50 MeV/A" we return "50 MeV/A"
716 
717  TString name(GetName());
718  auto reac = GetReactionNameWithoutEnergy();
719  name.Remove(name.Index(reac), reac.Length() + 1);
720  return name;
721 }
722 
723 
724 
int Int_t
ROOT::R::TRInterface & r
#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:159
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:217
UInt_t GetZtarget() const
.............. inline functions ...............
Definition: KVDBSystem.h:165
Bool_t IsCollision() const
retourne kTRUE, si le systeme est une collision ie projectile+cible
Definition: KVDBSystem.cpp:101
UInt_t GetAtarget() const
Definition: KVDBSystem.h:170
void ls(Option_t *option="*") const override
Definition: KVDBSystem.cpp:586
Float_t fEbeam
Energy of the beam in MeV/nucleon.
Definition: KVDBSystem.h:68
Int_t GetNGoodRunFiles() const
Definition: KVDBSystem.cpp:131
void RemoveRun(KVDBRecord *)
Definition: KVDBSystem.cpp:524
Double_t GetPtot() const
Definition: KVDBSystem.cpp:167
TString GetBatchName()
Definition: KVDBSystem.cpp:622
void Save(std::ostream &) const
Definition: KVDBSystem.cpp:285
Double_t GetECM() const
Definition: KVDBSystem.cpp:199
Float_t GetTargetThickness() const
Definition: KVDBSystem.h:215
void AddRun(KVDBRecord *)
Definition: KVDBSystem.cpp:478
void SetRuns(KVNumberList &, int=1)
Definition: KVDBSystem.cpp:431
TString GetBatchNameWithoutEnergy()
Definition: KVDBSystem.cpp:655
KV2Body * GetKinematics()
Definition: KVDBSystem.cpp:76
Float_t GetEbeam() const
Definition: KVDBSystem.h:205
UInt_t fAbeam
Mass of the projectile nucleus.
Definition: KVDBSystem.h:65
Double_t GetZVtot() const
Definition: KVDBSystem.cpp:151
UInt_t GetZbeam() const
Definition: KVDBSystem.h:185
UInt_t GetAbeam() const
Definition: KVDBSystem.h:190
TString GetReactionNameWithoutEnergy()
Definition: KVDBSystem.cpp:686
TString GetReactionEnergyWithoutName()
Definition: KVDBSystem.cpp:711
KVDBTable * GetRunsTable()
Definition: KVDBSystem.cpp:602
Int_t fRuns
temporary variable used to stock number of available runs
Definition: KVDBSystem.h:60
KV2Body * fCinema
used to calculate kinematics of entrance channel
Definition: KVDBSystem.h:55
UInt_t fZtarget
charge of the target nucleus
Definition: KVDBSystem.h:66
KVTarget * fTarget
physical target used for experiment run
Definition: KVDBSystem.h:57
void Load(std::istream &, int=1)
Definition: KVDBSystem.cpp:333
KVUnownedList fRunlist
temporary used to store sorted list of runs
Definition: KVDBSystem.h:59
UInt_t fZbeam
charge of the projectile nucleus
Definition: KVDBSystem.h:64
KVUnownedList GetRuns() const
Returns a sorted list of all the runs associated with this system.
Definition: KVDBSystem.cpp:112
UInt_t fAtarget
Mass of the target nucleus.
Definition: KVDBSystem.h:67
void RemoveAllRuns()
Definition: KVDBSystem.cpp:552
Double_t GetEtot() const
Definition: KVDBSystem.cpp:183
KVNumberList GetRunList() const
Fills a KVNumberList with the list of all run numbers associated with this system.
Definition: KVDBSystem.cpp:260
void Print(Option_t *option="") const override
Definition: KVDBSystem.cpp:563
Table in a database.
Definition: KVDBTable.h:34
virtual KVDBRecord * GetRecord(const Char_t *rec_name) const
Definition: KVDBTable.h:58
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
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:20
void Sort(Bool_t order=kSortAscending)
Definition: KVUnownedList.h:37
virtual Bool_t IsEmpty() const
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
rec
Int_t Nint(T x)
ClassImp(TPyArg)