KaliVeda
Toolkit for HIC analysis
KVGeoImport.cpp
1 //Created by KVClassFactory on Tue Apr 23 13:04:21 2013
2 //Author: John Frankland,,,
3 
4 #include "KVGeoImport.h"
5 #include <KVMultiDetArray.h>
6 #include <KVIonRangeTableMaterial.h>
7 #include <TGeoBBox.h>
8 #include <TPluginManager.h>
9 
10 #include <KVNucleusEvent.h>
11 #include <KVGroup.h>
12 #include <TGeoPhysicalNode.h>
13 #include <KVRangeTableGeoNavigator.h>
14 #include <KVNamedParameter.h>
15 #include <KVDataAnalyser.h>
16 
18 
19 
20 
21 
29 KVGeoImport::KVGeoImport(TGeoManager* g, KVIonRangeTable* r, KVMultiDetArray* m, Bool_t create) : KVGeoNavigator(g), fCreateArray(create), fOrigin(nullptr)
30 {
31  // Import geometry described by TGeoManager into KVMultiDetArray object
32  //
33  // if create=kFALSE, we do not create any detectors etc., but just set up
34  // the required links between the geometry and the existing array detectors
35  //
36  // We change the colours of volumes depending on their material
37 
38  fArray = m;
39  fRangeTable = r;
40  fCurrentTrajectory.SetAddToNodes(kFALSE);
41  fCurrentTrajectory.SetPathInTitle(kFALSE);
42  fCheckDetVolNames = kFALSE;
43 
44  std::map<std::string, EColor> colors;
45  colors["Silicon"] = EColor(kGray + 1);
46  colors["CesiumIodide"] = EColor(kBlue - 8);
47  colors["Aluminium"] = EColor(kGray);
48  colors["Copper"] = EColor(kOrange + 2);
49  TGeoVolume* vol;
50  TIter next(g->GetListOfVolumes());
51  while ((vol = (TGeoVolume*)next())) {
52  TGeoMedium* med = vol->GetMedium();
53  if (!med) continue;
54  TGeoMaterial* mat = med->GetMaterial();
55  if (colors.find(mat->GetName()) != colors.end()) vol->SetLineColor(colors[mat->GetName()]);
56  if (mat->GetDensity() < 0.1) vol->SetTransparency(60);
57  }
58 }
59 
60 
61 
64 
66 {
67  // All detectors crossed by the particle's trajectory are added to the multidetector
68 
69  KVDetector* detector = GetCurrentDetector();
70  if (!detector) return;
71  detector->GetNode()->SetName(detector->GetName());
72  if (fLastDetector && detector != fLastDetector) {
73  fLastDetector->GetNode()->AddBehind(detector);
74  detector->GetNode()->AddInFront(fLastDetector);
76  }
77  fLastDetector = detector;
78 }
79 
80 
81 
83 
84 void KVGeoImport::ImportGeometry_test_trajectory(double theta, double phi)
85 {
86  nuc->SetTheta(theta);
87  nuc->SetPhi(phi);
88  fLastDetector = nullptr;
89  PropagateEvent(evt, fOrigin.get());
90  count++;
92  std::cout << "\xd" << "Info in <KVGeoImport::ImportGeometry>: tested " << count << " directions" << std::flush;
93 }
94 
95 
96 
98 
100 {
101  Info("ImportGeometry",
102  "Imported %d detectors into array", fArray->GetDetectors()->GetEntries() - ndets0);
103 
104  // make sure detector nodes are correct
105  TIter next(fArray->GetDetectors());
106  KVDetector* d;
107  while ((d = (KVDetector*)next())) {
108  d->GetNode()->RehashLists();
109  d->SetNameOfArray(fArray->GetName());
110  }
111  // set up all detector node trajectories
113  // create all groups
115 
116  if (fCreateArray) {
118  // Set up internal navigator of array with all informations on detector/
119  // structure name formatting, correspondance lists, etc.
122  for (int i = 0; i < fStrucNameFmt.GetEntries(); i++) {
124  nav->SetStructureNameFormat(fmt->GetName(), fmt->GetString());
125  }
127  nav->AbsorbDetectorPaths(this);
130  }
131  // rehash list of parents of each group
132  // I have no idea why this rehash appears to be necessary, but without it, grp->GetParents()->Contains(this)
133  // (used in KVDetectorEvent to add groups to the list of hit groups prior to event reconstruction) does not work
134  {
135  std::unique_ptr<KVSeqCollection> groups(fArray->GetStructureTypeList("GROUP"));
136  TIter next_group(groups.get());
137  KVGroup* gr;
138  while ((gr = (KVGroup*)next_group())) gr->RehashParentList();
139  }
140 }
141 
142 
143 
145 
147 {
148  Info("ImportGeometry", "Will import geometry from current gGeoManager=%s (%p)", gGeoManager->GetName(), gGeoManager);
150  count = 0;
151  evt = &EVT;
152  nuc = evt->AddNucleus();
153  nuc->SetZAandE(1, 1, 1);
154  if (fOrigin)
155  Info("ImportGeometry",
156  "Origin for geometry = (%f,%f,%f)", fOrigin->x(), fOrigin->y(), fOrigin->z());
157 }
158 
159 
160 
167 
169  Double_t ThetaMin, Double_t PhiMin, Double_t ThetaMax, Double_t PhiMax)
170 {
171  // Scan the geometry in order to find all detectors and detector alignments.
172  //
173  // This is done by sending out "particles" from \f$(0,0,0)\f$ or \f$(x,y,z)\f$ (if SetOrigin() was called beforehand)
174  // in all directions between (ThetaMin,ThetaMax) - with respect to Z-axis - and (PhiMin,PhiMax) - cylindrical
175  // angle in the (X,Y)-plane, over a grid of step dTheta in Theta and dPhi in Phi.
176 
178 
179  Info("ImportGeometry",
180  "Importing geometry in angular ranges : Theta=[%f,%f:%f] Phi=[%f,%f:%f]", ThetaMin, ThetaMax, dTheta, PhiMin, PhiMax, dPhi);
182  std::cout << "\xd" << "Info in <KVGeoImport::ImportGeometry>: tested " << count << " directions" << std::flush;
183  for (Double_t theta = ThetaMin; theta <= ThetaMax; theta += dTheta) {
184  for (Double_t phi = PhiMin; phi <= PhiMax; phi += dPhi) {
185 
186  ImportGeometry_test_trajectory(theta, phi);
187 
188  }
189  }
191  std::cout << "Info in <KVGeoImport::ImportGeometry>: tested " << count << " directions" << std::endl;
192  else
193  std::cout << std::endl;
194 
196 }
197 
198 
199 
203 
205 {
206  // Override KVGeoNavigator method
207  // We build the list of all trajectories through the array
208 
210 
212 
213  if (fLastDetector && fLastDetector->GetNode()) {
214  if (fCurrentTrajectory.GetN()) {
215  if (!fCurrentTrajectory.Contains(fLastDetector->GetNode())) {
217  }
219  }
220  else {
222  }
225  fArray->AddTrajectory(tr);
226  }
227  }
228 }
229 
230 
231 
236 
238 {
239  // Add to list of acceptable detector names when scanning geometry
240  // Each detector volume name will be tested; if it doesn't contain
241  // any of the (partial) detector names in the list, it will be ignored
242 
245 }
246 
247 
248 
257 
259 {
260  // Returns pointer to KVDetector corresponding to current location
261  // in geometry. Detector is created and added to array if needed.
262  //
263  // We also set up any geometry structure elements (from nodes beginning with "STRUCT_")
264  //
265  // Any detector volume with a name not recognised by comparison with the list
266  // fAcceptedDetectorNames (if defined) will be ignored.
267 
268  KVString detector_name;
269  Bool_t multilay, segdet;
270  TGeoVolume* detector_volume = GetCurrentDetectorNameAndVolume(detector_name, multilay, segdet);
271 
272  // failed to identify current volume as part of a detector
273  if (!detector_volume) return 0;
274 
275  // check volume belongs to us
276  if (fCheckDetVolNames) {
277  int nn = fAcceptedDetectorNames.GetNpar();
278  bool reject_volume = true;
279  for (int i = 0; i < nn; ++i) {
280  if (detector_name.Contains(fAcceptedDetectorNames.GetNameAt(i))) {
281  reject_volume = false;
282  break;
283  }
284  }
285  if (reject_volume) return 0;
286  }
287 
288  // has detector already been built ? if not, do it now
289  KVDetector* det = fArray->GetDetector(detector_name);
290  if (!fCreateArray) {
291  if (det) {
292  // set matrix & shape for entrance window if not done yet
293  if (!det->GetEntranceWindow().ROOTGeo()) {
294  det->SetEntranceWindowMatrix(GetCurrentMatrix());
295  det->SetEntranceWindowShape((TGeoBBox*)GetCurrentVolume()->GetShape());
296  }
297  TString vol_name(GetCurrentVolume()->GetName());
298  if (!multilay || vol_name.BeginsWith("ACTIVE_")) {
299  // set matrix & shape for active layer
300  det->SetActiveLayerMatrix(GetCurrentMatrix());
301  det->SetActiveLayerShape((TGeoBBox*)GetCurrentVolume()->GetShape());
302  // set full path to physical node as title of detector's node (KVGeoDetectorNode)
303  det->GetNode()->SetTitle(GetCurrentPath());
304  }
305  // add entry to correspondance list between physical nodes and detectors (all layers)
307  }
308  }
309  else {
310  if (!det) {
311  det = BuildDetector(detector_name, detector_volume, segdet);
312  if (det) {
313  // Setting the entrance window shape and matrix
314  // ============================================
315  // for consistency, the matrix and shape MUST correspond
316  // i.e. we cannot have the matrix corresponding to the entrance window
317  // of a multilayer detector and the shape corresponding to the
318  // whole detector (all layers) - otherwise, calculation of points
319  // on detector entrance window will be false!
320 // Info("GetCurrentDetector","Setting EW matrix to current matrix:");
321 // GetCurrentMatrix()->Print();
322  det->SetEntranceWindowMatrix(GetCurrentMatrix());
323  det->SetEntranceWindowShape((TGeoBBox*)GetCurrentVolume()->GetShape());
324  TString vol_name(GetCurrentVolume()->GetName());
325  if (!multilay || vol_name.BeginsWith("ACTIVE_")) {
326  // first layer of detector (or only layer) is also active layer
327 // Info("GetCurrentDetector","and also setting active layer matrix to current matrix:");
328 // GetCurrentMatrix()->Print();
329  det->SetActiveLayerMatrix(GetCurrentMatrix());
330  det->SetActiveLayerShape((TGeoBBox*)GetCurrentVolume()->GetShape());
331  // set full path to physical node as title of detector's node (KVGeoDetectorNode)
332  det->GetNode()->SetTitle(GetCurrentPath());
333  }
334  // add entry to correspondance list between physical nodes and detectors (all layers)
336  fArray->Add(det);
337  Int_t nstruc = CurrentStructures().GetEntries();
338  if (nstruc) {
339  // Build and add geometry structure elements
340  KVGeoStrucElement* ELEM = fArray;
341  for (int i = 0; i < nstruc; i++) {
343  KVGeoStrucElement* nextELEM = ELEM->GetStructure(elem->GetName());
344  if (!nextELEM) {
345  // make new structure
346  nextELEM = new KVGeoStrucElement(elem->GetName(), elem->GetType());
347  nextELEM->SetNumber(elem->GetNumber());
348  ELEM->Add(nextELEM);
349  }
350  ELEM = nextELEM;
351  }
352  // add detector to last structure
353  ELEM->Add(det);
354  }
355  }
356  }
357  else {
358  // Detector already built, are we now in its active layer ?
359  TString vol_name(GetCurrentVolume()->GetName());
360  if (!multilay || vol_name.BeginsWith("ACTIVE_")) {
361 // Info("GetCurrentDetector","Setting active layer matrix to current matrix:");
362 // GetCurrentMatrix()->Print();
363  det->SetActiveLayerMatrix(GetCurrentMatrix());
364  det->SetActiveLayerShape((TGeoBBox*)GetCurrentVolume()->GetShape());
365  // set full path to physical node as title of detector's node (KVGeoDetectorNode)
366  det->GetNode()->SetTitle(GetCurrentPath());
367  }
368  // add entry to correspondance list between physical nodes and detectors (all layers)
370  }
371  }
372  return det;
373 }
374 
375 
376 
403 
404 KVDetector* KVGeoImport::BuildDetector(TString det_name, TGeoVolume* det_vol, bool segment)
405 {
406  // Create a KVDetector with given name for the given volume
407  //
408  // #### Detector definition in geometry ####
409  // 1. All detector volumes & nodes must have names which begin with **DET_**
410  //
411  // 2. They must be made of materials which are known by the range table fRangeTable.
412  //
413  // 3. For multi-layer detectors, the "active" layer volume/node must have a name beginning with **ACTIVE_**
414  //
415  // 4. The "thickness" of the detector or any layer inside a multilayer detector will be taken as the size of the volume's
416  // shape along its Z-axis (so make sure that you define your detector volumes in this way).
417  //
418  // 5. It is assumed that the natural length units of the geometry are centimetres.
419  //
420  // 6. The name of the KVDetector object created and added to the array will be taken
421  // from the unique full path of the node corresponding to the geometrical positioning
422  // of the detector, see KVGeoNavigator::ExtractDetectorNameFromPath()
423  //
424  // 7. The 'type' of the detector will be set to the type of the material
425  // in the detector's active layer i.e. if active layer material type is "Si",
426  // detector type will be 'Si'
427  //
428  // 8. Default class for all detectors is KVDetector. If you want to use another class
429  // you need to define it using SetDetectorPlugin() method and put the
430  // associated line in your .kvrootrc configuration file.
431 
432  auto d = instantiate_new_detector(det_name, segment);
433 
434  if (segment) {
435  Int_t nseg = det_vol->GetNdaughters();
436  auto segd = dynamic_cast<KVSegmentedDetector*>(d);
437  KVString curpath = GetCurrentPath();
438  // find path to segmented detector top node
439  KVString det_path = "/";
440  curpath.Begin("/");
441  while (!curpath.End()) {
442  auto bpaf = curpath.Next();
443  det_path += bpaf;
444  if (bpaf.BeginsWith("DET")) break;
445  det_path += "/";
446  }
447  for (int i = 0; i < nseg; i++) {
448  // add all daughter nodes with name 'SUBDET_xx'
449  KVString node_name = det_vol->GetNode(i)->GetName();
450  if (node_name.BeginsWith("SUBDET_")) {
451  // extract node number
452  node_name.Begin("_");
453  node_name.Next();
454  auto node_number = node_name.Next().Atoi();
455  auto d = AddSubDetector(segd, det_vol->GetNode(i)->GetVolume(), node_number);
456  GetGeometry()->cd(det_path + Form("/SUBDET_%d", node_number));
457  d->SetEntranceWindowMatrix(GetGeometry()->GetCurrentMatrix());
458  d->SetEntranceWindowShape((TGeoBBox*)det_vol->GetNode(i)->GetVolume()->GetShape());
459  // make sure all subdetector paths are listed as being part of the detector
460  fDetectorPaths.Add(new KVGeoDetectorPath(det_path + Form("/SUBDET_%d", node_number), segd));
461  }
462  }
463  return d;
464  }
465 
466  Int_t nlayer = det_vol->GetNdaughters();
467  if (nlayer) {
468  for (int i = 0; i < nlayer; i++) {
469  AddLayer(d, det_vol->GetNode(i)->GetVolume());
470  }
471  }
472  else
473  AddLayer(d, det_vol);
474  TString type = d->GetActiveLayer()->GetType();
475 
476  d->SetType(type);
477  return d;
478 }
479 
480 
481 
483 
484 KVDetector* KVGeoImport::instantiate_new_detector(const TString& det_name, bool segmented)
485 {
486  KVDetector* d = nullptr;
487  TPluginHandler* ph = LoadPlugin(segmented ? "KVSegmentedDetector" : "KVDetector", fDetectorPlugin);
488  if (ph) d = (KVDetector*)ph->ExecPlugin(0);
489  else d = segmented ? new KVSegmentedDetector : new KVDetector;
490  d->SetName(det_name);
491  return d;
492 }
493 
494 
495 
501 
502 void KVGeoImport::AddLayer(KVDetector* det, TGeoVolume* vol)
503 {
504  // Add an absorber layer to the detector.
505  //
506  // Volumes representing 'active' layers in detectors must have names
507  // which begin with **ACTIVE_**.
508 
509  TString vnom = vol->GetName();
510  // exclude dead zone layers
511  if (vnom.BeginsWith("DEADZONE")) return;
512  TGeoMaterial* material = vol->GetMaterial();
513  KVIonRangeTableMaterial* irmat = fRangeTable->GetMaterial(material);
514  if (!irmat) {
515  Warning("AddLayer", "Unknown material %s/%s used in layer %s of detector %s",
516  material->GetName(), material->GetTitle(), vol->GetName(), det->GetName());
517  return;
518  }
519  TGeoBBox* sh = dynamic_cast<TGeoBBox*>(vol->GetShape());
520  if (!sh) {
521  Warning("AddLayer", "Unknown shape class %s used in layer %s of detector %s",
522  vol->GetShape()->ClassName(), vol->GetName(), det->GetName());
523  return; // just in case - for now, all shapes derive from TGeoBBox...
524  }
525  Double_t width = 2.*sh->GetDZ(); // thickness in centimetres
526  KVMaterial* absorber;
527  if (irmat->IsGas()) {
528  Double_t p = material->GetPressure();
529  Double_t T = material->GetTemperature();
530  absorber = new KVMaterial(irmat->GetType(), width, p, T);
531  }
532  else
533  absorber = new KVMaterial(irmat->GetType(), width);
534  det->AddAbsorber(absorber);
535  if (vnom.BeginsWith("ACTIVE_")) det->SetActiveLayer(absorber);
536 }
537 
538 
539 
545 
547 {
548  // Add a subdetector to a segmented detector.
549  //
550  // \param det pointer to existing detector
551  // \param vol pointer to volume corresponding to the subdetector to be added
552 
553  TGeoMaterial* material = vol->GetMaterial();
554  KVIonRangeTableMaterial* irmat = fRangeTable->GetMaterial(material);
555  if (!irmat) {
556  Warning("AddSubDetector", "Unknown material %s/%s used in subdetector %d of detector %s",
557  material->GetName(), material->GetTitle(), node_number, det->GetName());
558  return nullptr;
559  }
560  TGeoBBox* sh = dynamic_cast<TGeoBBox*>(vol->GetShape());
561  if (!sh) {
562  Warning("AddSubDetector", "Unknown shape class %s used in subdetector %d of detector %s",
563  vol->GetShape()->ClassName(), node_number, det->GetName());
564  return nullptr; // just in case - for now, all shapes derive from TGeoBBox...
565  }
566  Double_t width = 2.*sh->GetDZ(); // thickness in centimetres
567  KVDetector* absorber;
568  if (irmat->IsGas()) {
569  Double_t p = material->GetPressure();
570  Double_t T = material->GetTemperature();
571  absorber = new KVDetector(irmat->GetType(), width, p, T);
572  }
573  else
574  absorber = new KVDetector(irmat->GetType(), width);
575 
576  det->AddSubDetector(node_number, absorber);
577  return absorber;
578 }
579 
580 
581 
int Int_t
ROOT::R::TRInterface & r
#define d(i)
bool Bool_t
constexpr Bool_t kFALSE
double Double_t
constexpr Bool_t kTRUE
EColor
kGray
kOrange
kBlue
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t g
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
char name[80]
R__EXTERN TGeoManager * gGeoManager
char * Form(const char *fmt,...)
Color * colors
virtual const Char_t * GetType() const
Definition: KVBase.h:176
virtual void SetNumber(UInt_t num)
Definition: KVBase.h:215
static TPluginHandler * LoadPlugin(const Char_t *base, const Char_t *uri="0")
Definition: KVBase.cpp:772
UInt_t GetNumber() const
Definition: KVBase.h:219
static Bool_t IsRunningBatchAnalysis()
KVNucleus * AddNucleus()
Definition: KVEvent.cpp:110
Path taken by particles through multidetector geometry.
Bool_t Contains(const Char_t *name) const
void Clear(Option_t *="") override
Clear list of nodes in trajectory.
void ReverseOrder()
Reverse the order of the nodes in the trajectory.
void AddLast(KVGeoDetectorNode *n)
Import detector array described by ROOT geometry and set up corresponding KVMultiDetArray object.
Definition: KVGeoImport.h:69
void ParticleEntersNewVolume(KVNucleus *) override
All detectors crossed by the particle's trajectory are added to the multidetector.
Definition: KVGeoImport.cpp:65
KVDetector * AddSubDetector(KVSegmentedDetector *, TGeoVolume *, Int_t node_number)
KVNameValueList fAcceptedDetectorNames
Definition: KVGeoImport.h:83
KVDetector * GetCurrentDetector()
KVDetector * BuildDetector(TString det_name, TGeoVolume *det_vol, bool segment=false)
virtual KVDetector * instantiate_new_detector(const TString &det_name, bool segmented=false)
KVGeoDNTrajectory fCurrentTrajectory
Definition: KVGeoImport.h:76
Bool_t fCheckDetVolNames
Definition: KVGeoImport.h:84
void ImportGeometry_test_trajectory(double theta, double phi)
Definition: KVGeoImport.cpp:84
KVNucleus * nuc
Definition: KVGeoImport.h:91
KVEvent * evt
Definition: KVGeoImport.h:90
void AddAcceptedDetectorName(const char *name)
TString fDetectorPlugin
Definition: KVGeoImport.h:75
KVDetector * fLastDetector
Definition: KVGeoImport.h:73
KVIonRangeTable * fRangeTable
Definition: KVGeoImport.h:72
KVNucleusEvent EVT
Definition: KVGeoImport.h:89
std::unique_ptr< TVector3 > fOrigin
Definition: KVGeoImport.h:77
void AddLayer(KVDetector *, TGeoVolume *)
void ImportGeometry_setup_geo()
Definition: KVGeoImport.cpp:99
KVMultiDetArray * fArray
Definition: KVGeoImport.h:71
void ImportGeometry_init_import()
Bool_t fCreateArray
Definition: KVGeoImport.h:74
void PropagateParticle(KVNucleus *, TVector3 *TheOrigin=nullptr) override
void ImportGeometry(Double_t dTheta=0.1, Double_t dPhi=1.0, Double_t ThetaMin=0.0, Double_t PhiMin=0.0, Double_t ThetaMax=180.0, Double_t PhiMax=360.0)
Link physical path to node in geometry with detector.
Base class for propagation of particles through array geometry.
void SetDetectorNameFormat(const Char_t *fmt)
void PropagateEvent(KVEvent *, TVector3 *TheOrigin=0)
const TGeoHMatrix * GetCurrentMatrix() const
Returns pointer to internal copy of current global transformation matrix.
void AbsorbDetectorPaths(KVGeoNavigator *GN)
KVUniqueNameList fDetectorPaths
correspondance between physical node and detector objects
KVNameValueList fStrucNameFmt
list of user-defined formats for structure names
const TClonesArray & CurrentStructures() const
void SetNameCorrespondanceList(const Char_t *)
TEnv * fDetStrucNameCorrespList
list(s) of correspondance for renaming structures/detectors
virtual void PropagateParticle(KVNucleus *, TVector3 *TheOrigin=0)
TGeoVolume * GetCurrentDetectorNameAndVolume(KVString &, Bool_t &, Bool_t &segmented)
TString GetCurrentPath() const
TGeoVolume * GetCurrentVolume() const
KVString fDetNameFmt
user-defined format for detector names
void SetStructureNameFormat(const Char_t *type, const Char_t *fmt)
TGeoManager * GetGeometry() const
Base class describing elements of array geometry.
virtual KVDetector * GetDetector(const Char_t *name) const
Return detector in this structure with given name.
const KVSeqCollection * GetDetectors() const
virtual void Add(KVBase *)
KVSeqCollection * GetStructureTypeList(const Char_t *type) const
KVGeoStrucElement * GetStructure(const Char_t *name) const
Group of detectors which can be treated independently of all others in array.
Definition: KVGroup.h:19
Material for use in energy loss & range calculations.
Abstract base class for calculation of range & energy loss of charged particles in matter.
KVIonRangeTableMaterial * GetMaterial(const Char_t *material) const
Returns pointer to material of given name or type.
Description of physical materials used to construct detectors & targets; interface to range tables.
Definition: KVMaterial.h:89
Base class for describing the geometry of a detector array.
virtual void DeduceIdentificationTelescopesFromGeometry()
void AddTrajectory(KVGeoDNTrajectory *d)
KVGeoNavigator * GetNavigator() const
void SetGeometry(TGeoManager *)
const TSeqCollection * GetTrajectories() const
void CalculateReconstructionTrajectories()
void AssociateTrajectoriesAndNodes()
void DeduceGroupsFromTrajectories()
KVNamedParameter * GetParameter(Int_t idx) const
return the parameter object with index idx
void SetValue(const Char_t *name, value_type value)
const Char_t * GetNameAt(Int_t idx) const
Int_t GetNpar() const
return the number of stored parameters
Int_t GetEntries() const
A generic named parameter storing values of different types.
const Char_t * GetString() const
Description of properties and kinematics of atomic nuclei.
Definition: KVNucleus.h:123
void SetZAandE(Int_t z, Int_t a, Double_t ekin)
Set atomic number, mass number, and kinetic energy in MeV.
Definition: KVNucleus.cpp:725
void SetTheta(Double_t theta)
Definition: KVParticle.h:696
void SetPhi(Double_t phi)
Definition: KVParticle.h:700
A position-sensitive detector made up of several or many numbered sub-detector segments.
void AddSubDetector(int i, KVDetector *D)
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
void Begin(TString delim) const
Definition: KVString.cpp:565
Bool_t End() const
Definition: KVString.cpp:634
KVString Next(Bool_t strip_whitespace=kFALSE) const
Definition: KVString.cpp:695
void Add(TObject *obj) override
virtual Int_t GetEntries() const
TObject * FindObject(const char *name) const override
virtual Double_t GetDZ() const
virtual Bool_t cd(const char *path="")
Double_t GetTemperature() const
Double_t GetPressure() const
virtual Double_t GetDensity() const
TGeoMaterial * GetMaterial() const
TGeoVolume * GetVolume() const
TGeoMedium * GetMedium() const
TGeoMaterial * GetMaterial() const
Int_t GetNdaughters() const
void SetTransparency(Char_t transparency=0)
TGeoNode * GetNode(const char *name) const
void SetLineColor(Color_t lcolor) override
TGeoShape * GetShape() const
const char * GetName() const override
const char * GetTitle() const override
Int_t GetEntries() const override
virtual const char * ClassName() const
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const
Longptr_t ExecPlugin(int nargs)
Int_t Atoi() const
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
TGraphErrors * gr
double T(double x)
TMarker m
ClassImp(TPyArg)