KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVGeoNavigator.cpp
Go to the documentation of this file.
1 //Created by KVClassFactory on Mon Apr 22 14:53:13 2013
2 //Author: John Frankland,,,
3 
4 #include "KVGeoNavigator.h"
5 #include "KVEvent.h"
6 #include "KV3DGeoTrack.h"
7 #include <TGeoManager.h>
8 #include <TGeoMatrix.h>
9 #include "KVGeoStrucElement.h"
10 #include <TVirtualPad.h>
11 
13 
14 
15 
25 void KVGeoNavigator::FormatStructureName(const Char_t* type, Int_t number, KVString& name)
26 {
27  // If a format for naming structures of given type has been defined by a call
28  // to SetStructureNameFormat(const Char_t *, const Char_t *), we use it to
29  // format the name in the TString.
30  //
31  // If no format was given, we use by default "[type]_[number]".
32  //
33  // If SetNameCorrespondanceList(const Char_t *) was used, we use it to translate
34  // any names resulting from this formatting to their final value.
35 
36  name = "";
37  if (fStrucNameFmt.HasParameter(type)) {
38  KVString fmt = fStrucNameFmt.GetStringValue(type);
39  fmt.Begin("$");
40  while (!fmt.End()) {
41  KVString bit = fmt.Next();
42  if (bit.BeginsWith("type")) {
43  Ssiz_t ind = bit.Index("%");
44  if (ind > -1) {
45  bit.Remove(0, ind);
46  name += Form(bit.Data(), type);
47  }
48  else
49  name += type;
50  }
51  else if (bit.BeginsWith("number")) {
52  Ssiz_t ind = bit.Index("%");
53  if (ind > -1) {
54  bit.Remove(0, ind);
55  name += Form(bit.Data(), number);
56  }
57  else
58  name += number;
59  }
60  else
61  name += bit;
62  }
63  }
64  else
65  name.Form("%s_%d", type, number);
66  TString tmp;
67  GetNameCorrespondance(name.Data(), tmp);
68  name = tmp;
69 }
70 
71 
72 
85 
87 {
88  // If a format for naming detectors has been defined by a call
89  // to SetDetectorNameFormat(const Char_t *), we use it to
90  // format the name in the TString.
91  //
92  // If no format was given we prefix the names of the parent structures
93  // to the basename in order to generate the full name of the detector:
94  //~~~~~~~~
95  // [struc1-name]_[struc2-name]_..._[detector-basename]
96  //~~~~~~~~
97  // If SetNameCorrespondanceList(const Char_t *) was used, we use it to translate
98  // any names resulting from this formatting to their final value.
99 
100  name = "";
101  if (!fCurStrucNumber) {
102  // no parent structures
103  name = basename;
104  }
105  else {
106  if (fDetNameFmt == "") {
107  for (int i = 0; i < fCurStrucNumber; i++) {
109  name += Form("%s_", el->GetName());
110  }
111  name += basename;
112  }
113  else {
114  // $det:name$ - will be replaced by the detector basename
115  // $struc:[type]:name$ - will be replaced by the name of the parent structure of given type
116  // $struc:[type]:type$ - will be replaced by the type of the parent structure of given type
117  // $struc:[type]:number$ - will be replaced by the number of the parent structure of given type
118  fDetNameFmt.Begin("$");
119  while (!fDetNameFmt.End()) {
120  KVString bit = fDetNameFmt.Next();
121  if (bit.Contains(":")) {
122  bit.Begin(":");
123  KVString itbit = bit.Next();
124  if (itbit == "det") {
125  itbit = bit.Next();
126  if (itbit.BeginsWith("name")) {
127  Ssiz_t ind = itbit.Index("%");
128  if (ind > -1) {
129  itbit.Remove(0, ind);
130  name += Form(itbit.Data(), basename);
131  }
132  else
133  name += basename;
134  }
135  }
136  else if (itbit == "struc") {
137  KVString struc_typ = bit.Next();
138  KVGeoStrucElement* el = 0;
139  for (int i = 0; i < fCurStrucNumber; i++) {
141  if (el->IsType(struc_typ)) break;
142  }
143  if (el) {
144  itbit = bit.Next();
145  if (itbit.BeginsWith("name")) {
146  Ssiz_t ind = itbit.Index("%");
147  if (ind > -1) {
148  itbit.Remove(0, ind);
149  name += Form(itbit.Data(), el->GetName());
150  }
151  else
152  name += el->GetName();
153  }
154  else if (itbit.BeginsWith("type")) {
155  Ssiz_t ind = itbit.Index("%");
156  if (ind > -1) {
157  itbit.Remove(0, ind);
158  name += Form(itbit.Data(), el->GetType());
159  }
160  else
161  name += el->GetType();
162  }
163  else if (itbit.BeginsWith("number")) {
164  Ssiz_t ind = itbit.Index("%");
165  if (ind > -1) {
166  itbit.Remove(0, ind);
167  name += Form(itbit.Data(), el->GetNumber());
168  }
169  else
170  name += el->GetNumber();
171  }
172  }
173  }
174  }
175  else
176  name += bit;
177  }
178  }
179  }
180  TString tmp;
181  GetNameCorrespondance(name.Data(), tmp);
182  name = tmp;
183 }
184 
185 
186 
189 
191  : fGeometry(g), fCurrentStructures("KVGeoStrucElement", 50), fDetStrucNameCorrespList(nullptr),
192  fDetectorPaths(kTRUE)
193 {
194  // Constructor. Call with pointer to geometry.
197 }
198 
199 
200 
203 
205 {
206  // Destructor
209 }
210 
211 
212 
232 
234 {
235  // The default names for structures are taken from the node name by stripping off
236  // the **STRUCT_** prefix. It is assumed that the remaining string is of the form
237  //~~~~~~~~
238  // "[structure type]_[structure number]"
239  //~~~~~~~~
241  //
242  // However, this format can be change by calling this method
243  //~~~~~~~~{.cpp}
244  // SetStructureNameFormat("[structure type]", "[format]")
245  //~~~~~~~~
246  // where format can contain any of the following tokens:
247  //~~~~~~~
248  // $type$ - will be replaced by the structure type name
249  // $type%[fmt]$ - will be replaced by the structure type name using given format
250  // $number$ - will be replaced by the structure number
251  // $number%[fmt]$ - will be replaced by the structure number using given format
252  //~~~~~~~
254 }
255 
256 
257 
283 
285 {
286  // Allows to provide a list of "translations" for naming structures/detectors
287  // "listfile" must be a file in TEnv format, e.g.
288  //
289  //~~~~~~~~
290  // SI_06_1_A1: SI_0601
291  // SI_06_1_A2: SI_0602
292  // SI_06_1_B1: SI_0701
293  // SI_06_1_B2: SI_0702
294  // SI_06_2_A1: SI_0603
295  // SI_06_2_A2: SI_0604
296  // SI_06_2_B1: SI_0703
297  //~~~~~~~~
298  //
299  // The name before ':' is the name of the detector or structure as deduced
300  // from the geometry, including any formatting due to SetStructureNameFormat()
301  // or SetDetectorNameFormat().
302  //
303  // The name after ':' is the name that will be used 'externally', e.g. by a
304  // KVMultiDetArray created from the geometry using KVGeoImport.
305  //
306  // Several lists can be combined by calling this method several times.
307  //
308  // "listfile" can be an absolute path name; if not, we look for it in
309  // `$KVROOT/KVFiles/data`, or in `$HOME`, or (finally) in `$PWD`.
310 
311  TString fullpath;
312  if (!SearchKVFile(listfile, fullpath, "data")) {
313  Warning("SetNameCorrespondanceList", "File %s not found", listfile);
314  return;
315  }
318 }
319 
320 
321 
324 
326 {
327  // copy TEnv of name correspondances
329  if (list) fDetStrucNameCorrespList = (TEnv*)list->Clone();
330 }
331 
332 
333 
339 
341 {
342  // IF name correspondance lists have been set with SetNameCorrespondanceList(const Char_t*),
343  // look up new name for 'name'.
344  //
345  // If found, returns kTRUE and 'tran' is the 'translated' name, otherwise returns kFALSE and tran=name.
346 
348  tran = fDetStrucNameCorrespList->GetValue(name, "");
349  if (tran == "") {
350  tran = name;
351  //Info("GetNameCorrespondance","...not found");
352  return kFALSE;
353  }
354  //Info("GetNameCorrespondance","...found %s", tran.Data());
355  return kTRUE;
356  }
357  //Info("GetNameCorrespondance","...not found");
358  tran = name;
359  return kFALSE;
360 }
361 
362 
363 
369 
371 {
372  // Propagate a set of particles through the geometry.
373  //
374  // By default, propagates particles from (0,0,0) (world coordinates),
375  // unless a different origin is given.
376 
377  ResetTrackID();
378  KVNucleus* part;
379  while ((part = TheEvent->GetNextParticle())) {
380  PropagateParticle(part, TheOrigin);
381  }
382 }
383 
384 
385 
404 
406 {
407  // User-overridable method, to be redefined in child classes.
408  //
409  // This method is called every time that a propagated particle enters a new volume
410  // in the geometry.
411  // The user then has access to the following informations:
412  //
413  // - the TGeoVolume the particle is now entering (GetCurrentVolume());
414  // - the node in the geometry this volume occupies (GetCurrentNode());
415  // - the distance the particle will have to travel in this volume before
416  // leaving it (GetStepSize());
417  // - the position of the particle on the boundary as it enters this volume
418  // (GetEntryPoint()).
419  // - the position of the particle on the boundary as it leaves this volume
420  // (GetExitPoint()).
421  //
422  // If required, propagation of the particle can be stopped at any time by calling
423  // SetStopPropagation()
424 
425  AbstractMethod("ParticleEntersNewVolume");
426 }
427 
428 
429 
432 
434 {
435  // Returns pointer to internal copy of current global transformation matrix
436  return &fCurrentMatrix;
437 }
438 
439 
440 
451 
453 {
454  // Returns the name of the current detector (if we are inside a detector)
455  // and whether it is a multilayer or simple detector.
456  //
457  // Returns nullptr if we are not inside a detector volume.
458  //
459  // **N.B.** the returned volume corresponds to the *whole* detector (even if it has several layers).
460  // For a multilayer detector, GetCurrentVolume() returns the volume for the current layer.
461  //
462  // See ExtractDetectorNameFromPath() for details on detector name formatting.
463 
464  multilayer = kFALSE;
466  TString volNom = GetCurrentVolume()->GetName();
467  TGeoVolume* detector_volume = 0;
468  if (volNom.BeginsWith("DET_")) {
469  // simple detector
471  detector_volume = GetCurrentVolume();
472  }
473  else {
474  // have we hit 1 layer of a multilayer detector?
475  TGeoVolume* mother_vol = GetCurrentNode()->GetMotherVolume();
476  if (mother_vol) {
477  TString mom = mother_vol->GetName();
478  if (mom.BeginsWith("DET_")) {
479  // it *is* a multilayer detector (youpi! :-)
480  if (fMotherNode) { // this is the node corresponding to the whole detector,
482  detector_volume = mother_vol;
483  multilayer = kTRUE;
484  }
485  }
486  }
487  }
488  if (detector_volume) ExtractDetectorNameFromPath(detector_name);
489  return detector_volume;
490 }
491 
492 
493 
498 
500 {
501  // Returns the node corresponding to the current detector volume
502  //
503  // **N.B.** the returned node corresponds to the *whole* detector (even if it has several layers).
504  return fCurrentDetectorNode;
505 }
506 
507 
508 
594 
596 {
597  // We analyse the current path in order to construct the full (unique) name
598  // of the detector, i.e. if the current path is
599  //
600  //~~~~~~~
601  // /TOP_1/STRUCT_BLOCK_2/CHIO_WALL_1/DET_CHIO_2/WINDOW_1
602  //~~~~~~~
603  //
604  // then the default name of the detector will be **BLOCK_2_CHIO_2**
605  // (see below to override this).
606  //
607  // This method also fills the fCurrentStructures array with elements
608  // deduced from the path, e.g. if the path is
609  //
610  //~~~~~~~
611  // /TOP_1/STRUCT_BLOCK_2/STRUCT_QUARTET_1/DET_SI1-T1
612  //~~~~~~~
613  //
614  // then by default
615  //~~~~~~~{.cpp}
616  // fCurrentStructures[0] = KVGeoStrucElement(name = "BLOCK_2", type = "BLOCK", number = 2)
617  // fCurrentStructures[1] = KVGeoStrucElement(name = "QUARTET_1", type = "QUARTET", number = 1)
618  //~~~~~~~
619  //
620  // and the default name of the detector will be **BLOCK_2_QUARTET_1_SI1-T1**
621  //
622  // ### STRUCTURE & DETECTOR NAME FORMATTING ###
623  // #### Structures ####
624  // The default names for structures are taken from the node name by stripping off
625  // the **STRUCT_** prefix. It is assumed that the remaining string is of the form
626  //~~~~~~~~~~
627  // "[structure type]_[structure number]"
628  //~~~~~~~~~~
629  // (the structure number is always taken after the last occurence of '_' in the
630  // node name). This is the name that will be used by default for the structure.
631  //
632  // However, this format can be change by calling method
633  //~~~~~{.cpp}
634  // SetStructureNameFormat("[structure type]", "[format]")
635  //~~~~~
636  // where format can contain any of the following tokens:
637  //~~~~~
638  // $type$ - will be replaced by the structure type name
639  // $type%[fmt]$ - will be replaced by the structure type name using given format
640  // $number$ - will be replaced by the structure number
641  // $number%[fmt]$ - will be replaced by the structure number using given format
642  //~~~~~
643  //
644  // Example: to change the name of the block in the previous example to "B-02":
645  //~~~~~~{.cpp}
646  // SetStructureNameFormat("BLOCK", "$type%.1s$-$number%02d$")
647  //~~~~~~
648  //
649  // #### Detectors ####
650  // The default base names for detectors are taken from the node name by stripping off
651  // the **DET_** prefix. In order to ensure that all detectors have unique names,
652  // by default we prefix the names of the parent structures to the basename in
653  // order to generate the full name of the detector:
654  //~~~~~~~
655  // [struc1-name]_[struc2-name]_..._[detector-basename]
656  //~~~~~~~
657  // However, this format can be changed by calling method
658  //~~~~~{.cpp}
659  // SetDetectorNameFormat("[format]")
660  //~~~~~
661  // where format can contain any of the following tokens:
662  //~~~~~~
663  // $det:name$ - will be replaced by the detector basename
664  // $struc:[type]:name$ - will be replaced by the name of the parent structure of given type
665  // $struc:[type]:type$ - will be replaced by the type of the parent structure of given type
666  // $struc:[type]:number$ - will be replaced by the number of the parent structure of given type
667  //~~~~~~
668  // plus additional formatting information as for SetStructureNameFormat() (see above).
669  //
670  // Example: to change the name of the **SI1-T1** detector in the previous example to
671  // **SI1-T1-Q1-B2**:
672  //~~~~~~{.cpp}
673  // SetDetectorNameFormat("$det:name$-Q$struc:QUARTET:number$-B$struc:BLOCK:number$");
674  //~~~~~~
675  // Or if you also change the format of the structure names:
676  //~~~~~~
677  // SetStructureNameFormat("BLOCK", "$type%.1s$$number$");
678  // SetStructureNameFormat("QUARTET", "$type%.1s$$number$");
679  // SetDetectorNameFormat("$det:name$-$struc:QUARTET:name$-$struc:BLOCK:name$");
680  //~~~~~~
681 
682 
683  KVString path = GetCurrentPath();
684  path.Begin("/");
685  detname = "";
687  fCurStrucNumber = 0;
688  while (!path.End()) {
689  KVString elem = path.Next();
690  if (elem.BeginsWith("STRUCT_")) {
691  // structure element. strip off "STRUCT_" and extract type and number of structure.
692  KVString struc_name(elem(7, elem.Length() - 7));
694  Ssiz_t last_ = struc_name.Last('_'); // find last '_' in structure name
695  TString type = struc_name(0, last_);
696  TString nums = struc_name(last_ + 1, struc_name.Length() - last_ - 1);
697  Int_t number = nums.Atoi();
698  KVString name;
699  FormatStructureName(type, number, name);
700  gel->SetNameTitle(name, type);
701  gel->SetNumber(number);
702  }
703  else if (elem.BeginsWith("DET_")) {
704  // detector name. strip off "DET_" and use rest as basename
705  KVString basename(elem(4, elem.Length() - 4));
706  FormatDetectorName(basename, detname);
707  }
708  }
709 }
710 
711 
712 
719 
721 {
722  // Propagate a particle through the geometry in the direction of its momentum,
723  // until we reach the boundary of the geometry, or until fStopPropagation is set to kFALSE.
724  //
725  // Propagation will also stop if we encounter a volume whose name begins with "DEADZONE"
726 
727  // Define point of origin of particles
728  if (TheOrigin) fGeometry->SetCurrentPoint(TheOrigin->X(), TheOrigin->Y(), TheOrigin->Z());
729  else fGeometry->SetCurrentPoint(0., 0., 0.);
730 
731  // unit vector in direction of particle's momentum
732  TVector3 v = part->GetMomentum().Unit();
733  // use particle's momentum direction
734  fGeometry->SetCurrentDirection(v.x(), v.y(), v.z());
735  fGeometry->FindNode();
736 
742  // move along trajectory until we hit a new volume
746  TGeoNode* newNod = fGeometry->GetCurrentNode();
747  TGeoNode* newMom = fGeometry->GetMother();
748  TGeoHMatrix* newMatx = fGeometry->GetCurrentMatrix();
749  TString newPath = fGeometry->GetPath();
750 
751  Double_t XX, YY, ZZ;
752  XX = YY = ZZ = 0.;
753 
754  // reset user flag for stopping propagation of particle
756 
757 // if(IsTracking()) Info("PropagateParticle","Beginning: i am in %s on node %s with path %s",
758 // fCurrentVolume->GetName(),fCurrentNode->GetName(),fCurrentPath.Data());
759 
760  if (IsTracking() && fGeometry->IsOutside()) {
761  const Double_t* posi = fGeometry->GetCurrentPoint();
762  AddPointToCurrentTrack(posi[0], posi[1], posi[2]);
763  return;
764  }
765 
766  // track particle until we leave the geometry or until fStopPropagation
767  // becomes kTRUE
768  while (!fGeometry->IsOutside()) {
769 
770  const Double_t* posi = fGeometry->GetCurrentPoint();
771  fEntryPoint.SetXYZ(XX, YY, ZZ);
772  XX = posi[0];
773  YY = posi[1];
774  ZZ = posi[2];
775  fExitPoint.SetXYZ(XX, YY, ZZ);
776 
777  TString vn = GetCurrentVolume()->GetName();
778  if (vn.BeginsWith("DEADZONE")) {
779  part->GetParameters()->SetValue("DEADZONE", Form("%s/%s", GetCurrentVolume()->GetName(), GetCurrentNode()->GetName()));
780  break;
781  }
782 
783 // if(IsTracking()) Info("PropagateParticle","just before ParticleEntersNewVolume\nnow i am in %s on node %s with path %s",
784 // fCurrentVolume->GetName(),fCurrentNode->GetName(),fCurrentPath.Data());
785 
787 
788  if (StopPropagation()) break;
789 
790  fCurrentVolume = newVol;
791  fCurrentNode = newNod;
792  fMotherNode = newMom;
793  fCurrentMatrix = *newMatx;
794  fCurrentPath = newPath;
795 
796 // if(IsTracking()) Info("PropagateParticle","after ParticleEntersNewVolume\nnow i am in %s on node %s with path %s",
797 // fCurrentVolume->GetName(),fCurrentNode->GetName(),fCurrentPath.Data());
798 
799  // move on to next volume crossed by trajectory
802  newVol = fGeometry->GetCurrentVolume();
803  newNod = fGeometry->GetCurrentNode();
804  newMom = fGeometry->GetMother();
805  newMatx = fGeometry->GetCurrentMatrix();
806  newPath = fGeometry->GetPath();
807  }
808  if (IsTracking() && fGeometry->IsOutside()) {
809  const Double_t* posi = fGeometry->GetCurrentPoint();
810  AddPointToCurrentTrack(posi[0], posi[1], posi[2]);
811  }
812 }
813 
814 
815 
822 
824 {
825  // When using ROOT geometry, after calling PropagateEvent() to simulate detection of some particles,
826  // you can call this method to overlay the tracks of the corresponding particles on the 3D
827  // geometry of the array
828  //
829  // If KVNumberList pointer is given, use it to limit Z of drawn tracks
830 
831  TIter next_track(fGeometry->GetListOfTracks());
832  TVirtualGeoTrack* track;
833  bool first = true;
834  while ((track = (TVirtualGeoTrack*)next_track())) {
835  KVNucleus nuc(track->GetName());
836  if (!zlist || zlist->Contains(nuc.GetZ())) {
837  KV3DGeoTrack* gtrack = new KV3DGeoTrack(track);
838  if (first) {
839  if (gPad) gtrack->Draw("same");
840  else gtrack->Draw("ogl");
841  first = false;
842  }
843  else gtrack->Draw("same");
844  }
845  }
846 }
847 
848 
int Int_t
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
#define SafeDelete(p)
int Ssiz_t
char Char_t
const Bool_t kFALSE
bool Bool_t
double Double_t
const Bool_t kTRUE
kEnvUser
int type
char * Form(const char *fmt,...)
#define gPad
Visualise particle trajectories through array geometry.
Definition: KV3DGeoTrack.h:14
void Draw(Option_t *option="")
Override Draw to add a TPolyMarker3D at the end of the track.
virtual Bool_t IsType(const Char_t *typ) const
Definition: KVBase.h:178
virtual void SetNumber(UInt_t num)
Definition: KVBase.h:209
const Char_t * GetType() const
Definition: KVBase.h:170
static Bool_t SearchKVFile(const Char_t *name, TString &fullpath, const Char_t *kvsubdir="")
Definition: KVBase.cpp:541
UInt_t GetNumber() const
Definition: KVBase.h:213
Base class container for multi-particle events.
Definition: KVEvent.h:176
KVNucleus * GetNextParticle(Option_t *opt="") const
Definition: KVEvent.cpp:564
Base class for propagation of particles through array geometry.
virtual void AddPointToCurrentTrack(Double_t, Double_t, Double_t)
void FormatStructureName(const Char_t *type, Int_t number, KVString &name)
Bool_t IsTracking() const
TGeoHMatrix fCurrentMatrix
current global transformation matrix
void PropagateEvent(KVEvent *, TVector3 *TheOrigin=0)
const TGeoHMatrix * GetCurrentMatrix() const
Returns pointer to internal copy of current global transformation matrix.
TClonesArray fCurrentStructures
list of current structures deduced from path
TString fCurrentPath
current full path to physical node
void FormatDetectorName(const Char_t *basename, KVString &name)
TGeoNode * fCurrentDetectorNode
node for current detector
void ExtractDetectorNameFromPath(KVString &)
KVUniqueNameList fDetectorPaths
correspondance between physical node and detector objects
TGeoNode * GetCurrentNode() const
TGeoNode * fMotherNode
mother node of current node
void SetTracking(Bool_t on=kTRUE)
KVGeoNavigator(TGeoManager *)
Constructor. Call with pointer to geometry.
KVNameValueList fStrucNameFmt
list of user-defined formats for structure names
void SetNameCorrespondanceList(const Char_t *)
TVector3 fExitPoint
position of particle on exiting volume
TEnv * fDetStrucNameCorrespList
list(s) of correspondance for renaming structures/detectors
void SetStopPropagation(Bool_t stop=kTRUE)
virtual void PropagateParticle(KVNucleus *, TVector3 *TheOrigin=0)
TGeoNode * GetCurrentDetectorNode() const
virtual void ParticleEntersNewVolume(KVNucleus *)
TString GetCurrentPath() const
TGeoVolume * GetCurrentVolume() const
Bool_t GetNameCorrespondance(const Char_t *, TString &)
Double_t fStepSize
distance to travel in volume
TGeoManager * fGeometry
geometry to navigate
Bool_t StopPropagation() const
TGeoNode * fCurrentNode
current node
virtual ~KVGeoNavigator()
Destructor.
TVector3 fEntryPoint
position of particle on entering volume
KVString fDetNameFmt
user-defined format for detector names
Int_t fCurStrucNumber
number of current parent structures
void ResetTrackID(Int_t id=0)
TGeoVolume * fCurrentVolume
current volume
void SetStructureNameFormat(const Char_t *type, const Char_t *fmt)
TGeoVolume * GetCurrentDetectorNameAndVolume(KVString &, Bool_t &)
void DrawTracks(KVNumberList *=nullptr)
Base class describing elements of array geometry.
void SetValue(const Char_t *name, value_type value)
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:125
Int_t GetZ() const
Return the number of proton / atomic number.
Definition: KVNucleus.cpp:770
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:83
Bool_t Contains(Int_t val) const
returns kTRUE if the value 'val' is contained in the ranges defined by the number list
TVector3 GetMomentum() const
Definition: KVParticle.h:565
KVNameValueList * GetParameters() const
Definition: KVParticle.h:735
virtual void SetOwner(Bool_t enable=kTRUE)
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:72
void Begin(TString delim) const
Definition: KVString.cpp:562
Bool_t End() const
Definition: KVString.cpp:625
KVString Next(Bool_t strip_whitespace=kFALSE) const
Definition: KVString.cpp:675
virtual void Delete(Option_t *option="")
virtual void Clear(Option_t *option="")
TObject * ConstructedAt(Int_t idx)
virtual const char * GetValue(const char *name, const char *dflt) const
virtual Int_t ReadFile(const char *fname, EEnvLevel level)
TGeoHMatrix * GetCurrentMatrix() const
TGeoNode * GetCurrentNode() const
const Double_t * GetCurrentPoint() const
void SetCurrentDirection(Double_t *dir)
TGeoNode * GetMother(Int_t up=1) const
TGeoNode * FindNextBoundaryAndStep(Double_t stepmax=TGeoShape::Big(), Bool_t compsafe=kFALSE)
void SetCurrentPoint(Double_t *point)
TGeoNode * FindNode(Bool_t safe_start=kTRUE)
Bool_t IsOutside() const
Double_t GetStep() const
const char * GetPath() const
TGeoVolume * GetCurrentVolume() const
TObjArray * GetListOfTracks() const
TGeoVolume * GetMotherVolume() const
virtual const char * GetName() const
virtual void SetNameTitle(const char *name, const char *title)
void AbstractMethod(const char *method) const
virtual TObject * Clone(const char *newname="") const
virtual void Warning(const char *method, const char *msgfmt,...) const
Ssiz_t Length() const
Int_t Atoi() const
Ssiz_t Last(char c) const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
const char * Data() const
void Form(const char *fmt,...)
TString & Remove(EStripType s, char c)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Double_t Z() const
void SetXYZ(Double_t x, Double_t y, Double_t z)
Double_t Y() const
Double_t X() const
TVector3 Unit() const
virtual const char * GetName() const
const long double g
masses
Definition: KVUnits.h:72
v