Logo ROOT   6.12/07
Reference Guide
TVolumePosition.cxx
Go to the documentation of this file.
1 // @(#)root/table:$Id$
2 // Author: Valery Fine(fine@bnl.gov) 25/12/98
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 
13 #include "Riostream.h"
14 
15 #include "TCernLib.h"
16 #include "TVolumePosition.h"
17 #include "TVolume.h"
18 
19 #include "TROOT.h"
20 #include "TClass.h"
21 #include "TVirtualPad.h"
22 #include "TGeometry.h"
23 #include "TRotMatrix.h"
24 #include "TBrowser.h"
25 #include "X3DBuffer.h"
26 
27 #include "TTablePadView3D.h"
28 
29 //R__EXTERN Size3D gSize3D;
30 
32 
33 //______________________________________________________________________________
34 //*-*-*-*-*-*-*-*-* S T N O D E P O S I T I O N description *-*-*-*-*-*-*-*-*-
35 //*-* ===========================
36 //*-*
37 //*-* A TVolumePosition object is used to build the geometry hierarchy (see TGeometry).
38 //*-* A node may contain other nodes.
39 //*-*
40 //*-* A geometry node has attributes:
41 //*-* - name and title
42 //*-* - pointer to the referenced shape (see TShape).
43 //*-* - x,y,z offset with respect to the mother node.
44 //*-* - pointer to the rotation matrix (see TRotMatrix).
45 //*-*
46 //*-* A node can be drawn.
47 //*-*
48 //*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
49 
50 
51 ////////////////////////////////////////////////////////////////////////////////
52 /// Node normal constructor.
53 ///
54 /// - name is the name of the node
55 /// - title is title
56 /// - x,y,z are the offsets of the volume with respect to his mother
57 /// - matrixname is the name of the rotation matrix
58 ///
59 /// This new node is added into the list of sons of the current node
60 
62 : fMatrix(0),fNode(node),fId(0)
63 {
65  fX[0] = x; fX[1] =y; fX[2] = z;
66  if (!node) return;
67  static Int_t counter = 0;
68  counter++;
69  if(!(counter%1000))std::cout<<"TVolumePosition count="<<counter<<" name="<<node->GetName()<<std::endl;
70 
71  if (!gGeometry) new TGeometry;
72  if (matrixname && strlen(matrixname)) fMatrix = gGeometry->GetRotMatrix(matrixname);
74 }
75 
76 
77 ////////////////////////////////////////////////////////////////////////////////
78 /// Node normal constructor.
79 ///
80 /// - name is the name of the node
81 /// - title is title
82 /// - x,y,z are the offsets of the volume with respect to his mother
83 /// - matrix is the pointer to the rotation matrix
84 ///
85 /// This new node is added into the list of sons of the current node
86 
88  : fMatrix(matrix),fNode(node),fId(0)
89 {
91  if (!gGeometry) new TGeometry;
92  fX[0] = x; fX[1] = y; fX[2] = z;
94 }
95 ////////////////////////////////////////////////////////////////////////////////
96 /// Pick the "old" position by pieces
97 
98 TVolumePosition::TVolumePosition(const TVolumePosition* oldPosition, const TVolumePosition* curPosition){
99  fMatrix = 0;
101  TVolume *curNode = 0;
102  UInt_t curPositionId = 0;
103  TRotMatrix *curMatrix = 0;
104  if (curPosition) {
105  curNode = curPosition->GetNode();
106  curPositionId = curPosition->GetId();
107  curMatrix = (TRotMatrix *) curPosition->GetMatrix();
108  }
109  TRotMatrix *oldMatrix = 0;
110  fX[0] = 0; fX[1] = 0; fX[2] = 0;
111  Double_t oldTranslation[] = { 0, 0, 0 };
112  if (oldPosition) {
113  oldMatrix = (TRotMatrix *) oldPosition->GetMatrix();
114  oldTranslation[0] = oldPosition->GetX();
115  oldTranslation[1] = oldPosition->GetY();
116  oldTranslation[2] = oldPosition->GetZ();
117  }
118 
119  // Pick the "current" position by pieces
120 
121  // Create a new position
122  Double_t newMatrix[9];
123 
124  if(oldMatrix && curMatrix && curPosition) {
125  TGeometry::UpdateTempMatrix(oldTranslation,oldMatrix->GetMatrix(),
126  curPosition->GetX(),curPosition->GetY(),curPosition->GetZ(),
127  curMatrix->GetMatrix(),
128  fX,newMatrix);
130  Char_t anum[100];
131  snprintf(anum,100,"%d",num+1);
132  fMatrix = new TRotMatrix(anum,"NodeView",newMatrix);
134  } else {
135  if (curPosition) {
136  fX[0] = oldTranslation[0] + curPosition->GetX();
137  fX[1] = oldTranslation[1] + curPosition->GetY();
138  fX[2] = oldTranslation[2] + curPosition->GetZ();
139  fMatrix = curMatrix;
140  }
141  }
142  fId = curPositionId;
143  fNode = curNode;
144 }
145 //______________________________________________________________________________
146 //______________________________________________________________________________
148  , fMatrix(((TVolumePosition &)pos).GetMatrix()),fNode(pos.GetNode()),fId(pos.GetId())
149 {
150  //to be documented
151  for (int i=0;i<3;i++) fX[i] = pos.GetX(i);
152  // Transferring the ownership.
153  // The last created object owns the matrix if any.
154  // The source object gives up its ownership in favour of the destination object
155 
157  // !!! We have to break the "const'ness" at this point to take the ownerships
158  ((TVolumePosition &)pos).SetMatrixOwner(kFALSE);
159 }
160 
161 ////////////////////////////////////////////////////////////////////////////////
162 ///to be documented
163 
165 {
166  DeleteOwnMatrix();
167 }
168 ////////////////////////////////////////////////////////////////////////////////
169 ///to be documented
170 
172 {
173  if (GetNode()) {
174  TShape *shape = GetNode()->GetShape();
175  b->Add(GetNode(),shape?shape->GetName():GetNode()->GetName());
176  } else {
177  Draw();
178  gPad->Update();
179  }
180 }
181 
182 ////////////////////////////////////////////////////////////////////////////////
183 /// Compute distance from point px,py to a Node.
184 /// Compute the closest distance of approach from point px,py to this node.
185 /// The distance is computed in pixels units.
186 
188 {
189  return 99999;
190 }
191 
192 ////////////////////////////////////////////////////////////////////////////////
193 /// Draw Referenced node with current parameters.
194 
196 {
197  TVolume *node = GetNode();
198  if (node) node->Draw(option);
199 }
200 
201 
202 ////////////////////////////////////////////////////////////////////////////////
203 /// Execute action corresponding to one event.
204 /// This member function must be implemented to realize the action
205 /// corresponding to the mouse click on the object in the window.
206 
208 {
209 // if (gPad->GetView())
210 // gPad->GetView()->ExecuteRotateView(event, px, py);
211 
212 // if (!gPad->GetListOfPrimitives()->FindObject(this)) gPad->SetCursor(kCross);
213  gPad->SetCursor(kHand);
214 }
215 
216 ////////////////////////////////////////////////////////////////////////////////
217 ///return VolumePosition name
218 
220 {
221  return GetNode()?GetNode()->GetName():IsA()->GetName();
222 }
223 
224 ////////////////////////////////////////////////////////////////////////////////
225 ///to be documented
226 
228 {
229  if (!gPad) return 0;
230  if (!GetNode()) return 0;
231  static char info[64];
232  snprintf(info,64,"%s/%s, shape=%s/%s",GetNode()->GetName(),GetNode()->GetTitle(),GetNode()->GetShape()->GetName(),GetNode()->GetShape()->ClassName());
233  return info;
234 }
235 
236 ////////////////////////////////////////////////////////////////////////////////
237 ///to be documented
238 
239 Double_t *TVolumePosition::Errmx2Master(const Double_t *localError, Double_t *masterError) const
240 {
241  Double_t error[6];
242  TCL::vzero(&error[1],4);
243  error[0] = localError[0]; error[2] = localError[1]; error[5] = localError[2];
244  return Cormx2Master(error, masterError);
245 }
246 
247 ////////////////////////////////////////////////////////////////////////////////
248 ///to be documented
249 
250 Float_t *TVolumePosition::Errmx2Master(const Float_t *localError, Float_t *masterError) const
251 {
252  Float_t error[6];
253  TCL::vzero(&error[1],4);
254  error[0] = localError[0]; error[2] = localError[1]; error[5] = localError[2];
255  return Cormx2Master(error, masterError);
256 }
257 
258 ////////////////////////////////////////////////////////////////////////////////
259 ///to be documented
260 
261 Double_t *TVolumePosition::Cormx2Master(const Double_t *localCorr, Double_t *masterCorr)const
262 {
263  Double_t *res = 0;
264  const TRotMatrix *rm = GetMatrix();
265  double *m = 0;
266  if (rm && ( m = ((TRotMatrix *)rm)->GetMatrix()) )
267  res = TCL::trasat(m,(Double_t *)localCorr,masterCorr,3,3);
268  else
269  res = TCL::ucopy(localCorr,masterCorr,6);
270  return res;
271 }
272 
273 ////////////////////////////////////////////////////////////////////////////////
274 ///to be documented
275 
276 Float_t *TVolumePosition::Cormx2Master(const Float_t *localCorr, Float_t *masterCorr) const
277 {
278  Float_t *res = 0;
279  const TRotMatrix *rm = GetMatrix();
280  Double_t *m = 0;
281  if (rm && (m = ((TRotMatrix *)rm)->GetMatrix()) ) {
282  double corLocal[6], corGlobal[6];
283  TCL::ucopy(localCorr,corLocal,6);
284  TCL::trasat(m,corLocal,corGlobal,3,3);
285  res = TCL::ucopy(corGlobal,masterCorr,6);
286  } else
287  res = TCL::ucopy(localCorr,masterCorr,6);
288  return res;
289 }
290 ////////////////////////////////////////////////////////////////////////////////
291 ///to be documented
292 
293 Double_t *TVolumePosition::Errmx2Local(const Double_t *masterError, Double_t *localError) const
294 {
295  Double_t error[6];
296  TCL::vzero(&error[1],4);
297  error[0] = masterError[0]; error[2] = masterError[1]; error[5] = masterError[2];
298  return Cormx2Local(error, localError);
299 }
300 ////////////////////////////////////////////////////////////////////////////////
301 ///to be documented
302 
303 Float_t *TVolumePosition::Errmx2Local(const Float_t *masterError, Float_t *localError) const
304 {
305  Float_t error[6];
306  TCL::vzero(&error[1],4);
307  error[0] = masterError[0]; error[2] = masterError[1]; error[5] = masterError[2];
308  return Cormx2Local(error, localError);
309 }
310 ////////////////////////////////////////////////////////////////////////////////
311 ///to be documented
312 
313 Double_t *TVolumePosition::Cormx2Local(const Double_t *localCorr, Double_t *masterCorr) const
314 {
315  Double_t *res = 0;
316  TRotMatrix *rm = (TRotMatrix *) GetMatrix();
317  double *m = 0;
318  if (rm && ( m = rm->GetMatrix()) )
319  res = TCL::tratsa(m,(Double_t *)localCorr,masterCorr,3,3);
320  else
321  res = TCL::ucopy(localCorr,masterCorr,6);
322  return res;
323 }
324 
325 ////////////////////////////////////////////////////////////////////////////////
326 ///to be documented
327 
328 Float_t *TVolumePosition::Cormx2Local(const Float_t *localCorr, Float_t *masterCorr) const
329 {
330  Float_t *res = 0;
331  TRotMatrix *rm = (TRotMatrix *) GetMatrix();
332  Double_t *m = 0;
333  if (rm && (m = rm->GetMatrix()) ) {
334  double corLocal[6], corGlobal[6];
335  TCL::ucopy(localCorr,corLocal,6);
336  TCL::tratsa(m,corLocal,corGlobal,3,3);
337  res = TCL::ucopy(corGlobal,masterCorr,6);
338  }
339  else
340  res = TCL::ucopy(localCorr,masterCorr,6);
341  return res;
342 }
343 
344 ////////////////////////////////////////////////////////////////////////////////
345 /// Convert one point from local system to master reference system.
346 ///
347 /// Note that before invoking this function, the global rotation matrix
348 /// and translation vector for this node must have been computed.
349 /// This is automatically done by the Paint functions.
350 /// Otherwise TVolumePosition::UpdateMatrix should be called before.
351 
352 Double_t *TVolumePosition::Local2Master(const Double_t *local, Double_t *master, Int_t nPoints) const
353 {
354  Double_t *matrix = 0;
355  Double_t *trans = 0;
356  if (!fMatrix || fMatrix == TVolume::GetIdentity() || !(matrix = ((TRotMatrix *)fMatrix)->GetMatrix()) ) {
357  trans = master;
358  for (int i =0; i < nPoints; i++,local += 3, master += 3) TCL::vadd(local,fX,master,3);
359  } else {
360  trans = master;
361  for (int i =0; i < nPoints; i++, local += 3, master += 3) {
362  TCL::mxmpy2(matrix,local,master,3,3,1);
363  TCL::vadd(master,fX,master,3);
364  }
365  }
366  return trans;
367 }
368 
369 ////////////////////////////////////////////////////////////////////////////////
370 /// Convert nPoints points from local system to master reference system.
371 ///
372 /// Note that before invoking this function, the global rotation matrix
373 /// and translation vector for this node must have been computed.
374 /// This is automatically done by the Paint functions.
375 /// Otherwise TVolumePosition::UpdateMatrix should be called before.
376 
377 Float_t *TVolumePosition::Local2Master(const Float_t *local, Float_t *master, Int_t nPoints) const
378 {
379  Double_t *matrix = 0;
380  Float_t *trans = 0;
381  if (!fMatrix || fMatrix == TVolume::GetIdentity() || !(matrix = ((TRotMatrix *)fMatrix)->GetMatrix()) )
382  {
383  trans = master;
384  for (int i =0; i < nPoints; i++,local += 3, master += 3) TCL::vadd(local,fX,master,3);
385  } else {
386  trans = master;
387  for (int i =0; i < nPoints; i++, local += 3, master += 3) {
388  Double_t dlocal[3]; Double_t dmaster[3];
389  TCL::ucopy(local,dlocal,3);
390  TCL::mxmpy2(matrix,dlocal,dmaster,3,3,1);
391  TCL::vadd(dmaster,fX,dmaster,3);
392  TCL::ucopy(dmaster,master,3);
393  }
394  }
395  return trans;
396 }
397 ////////////////////////////////////////////////////////////////////////////////
398 /// Convert one point from master system to local reference system.
399 ///
400 /// Note that before invoking this function, the global rotation matrix
401 /// and translation vector for this node must have been computed.
402 /// This is automatically done by the Paint functions.
403 /// Otherwise TVolumePosition::UpdateMatrix should be called before.
404 
405 Double_t *TVolumePosition::Master2Local(const Double_t *master, Double_t *local, Int_t nPoints) const
406 {
407  Double_t *matrix = 0;
408  Double_t *trans = 0;
409  if (!fMatrix || fMatrix == TVolume::GetIdentity() || !(matrix = ((TRotMatrix *)fMatrix)->GetMatrix()) ){
410  trans = local;
411  for (int i =0; i < nPoints; i++,master += 3, local += 3) TCL::vsub(master,fX,local,3);
412  } else {
413  trans = local;
414  for (int i =0; i < nPoints; i++, master += 3, local += 3) {
415  Double_t dlocal[3];
416  TCL::vsub(master,fX,dlocal,3);
417  TCL::mxmpy(matrix,dlocal,local,3,3,1);
418  }
419  }
420  return trans;
421 }
422 
423 ////////////////////////////////////////////////////////////////////////////////
424 /// Convert nPoints points from master system to local reference system.
425 ///
426 /// Note that before invoking this function, the global rotation matrix
427 /// and translation vector for this node must have been computed.
428 /// This is automatically done by the Paint functions.
429 /// Otherwise TVolumePosition::UpdateMatrix should be called before.
430 
431 Float_t *TVolumePosition::Master2Local(const Float_t *master, Float_t *local, Int_t nPoints) const
432 {
433  Double_t *matrix = 0;
434  Float_t *trans = 0;
435  if (!fMatrix || fMatrix == TVolume::GetIdentity() || !(matrix = ((TRotMatrix *)fMatrix)->GetMatrix()) ){
436  trans = local;
437  for (int i =0; i < nPoints; i++,master += 3, local += 3) TCL::vsub(master,fX,local,3);
438  } else {
439  trans = local;
440  for (int i =0; i < nPoints; i++, master += 3, local += 3) {
441  Double_t dmaster[3]; Double_t dlocal[3];
442  TCL::ucopy(master,dmaster,3);
443  TCL::vsub(dmaster,fX,dmaster,3);
444  TCL::mxmpy(matrix,dmaster,dlocal,3,3,1);
445  TCL::ucopy(dlocal,local,3);
446  }
447  }
448  return trans;
449 }
450 ////////////////////////////////////////////////////////////////////////////////
451 /// Paint Referenced node with current parameters.
452 
454 {
455  Error("Paint","Position can not be painted");
456 }
457 
458 ////////////////////////////////////////////////////////////////////////////////
459 ///to be documented
460 
462 {
463  std::cout << *this << std::endl;
464 }
465 
466 ////////////////////////////////////////////////////////////////////////////////
467 /// Reset this position.
468 ///
469 /// - x,y,z the offsets of the volume with respect to his mother
470 /// - matrix the pointer to the rotation matrix
471 ///
472 /// This method is to re-use the memory this object without delete/create steps
473 
475 {
476 // This method has to be protected since it doesn't set properly kIsOwn bit.
477 
478  fNode = node;
479  SetPosition(x,y,z);
480  SetMatrix(matrix);
482  return this;
483 }
484 
485 ////////////////////////////////////////////////////////////////////////////////
486 ///to be documented
487 
488 void TVolumePosition::SavePrimitive(std::ostream &, Option_t * /*= ""*/)
489 {
490 #if 0
491  out << "TVolumePosition *CreatePosition() { " << std::endl;
492  out << " TVolumePosition *myPosition = 0; " << std::endl;
493  Double_t x = GetX();
494  Double_t y = GetY();
495  Double_t z = GetZ();
496  TRotMatrix *matrix =
497  myPosition = new TVolumePosition(TVolume *node,Double_t x, Double_t y, Double_t z, const char *matrixname)
498  : fNode(node),fX(x),fY(y),fZ(z),fMatrix(0)
499 {
500 /
501  out << " return myPosition; " << std::endl;
502  out << "} " << std::endl;
503 #endif
504 
505 }
506 ////////////////////////////////////////////////////////////////////////////////
507 ///to be documented
508 
510 {
511  TVolume *thisNode = GetNode();
512  if (thisNode) thisNode->SetLineAttributes();
513 }
514 ////////////////////////////////////////////////////////////////////////////////
515 ///to be documented
516 
518 {
519  if (matrix != fMatrix) {
520  DeleteOwnMatrix();
521  fMatrix = matrix;
522  }
523 }
524 ////////////////////////////////////////////////////////////////////////////////
525 ///to be documented
526 
528 {
529  TTablePadView3D *view3D=(TTablePadView3D *)gPad->GetView3D();
530 //*-*- Update translation vector and rotation matrix for new level
531  if (gGeometry->GeomLevel() && fMatrix) {
532  gGeometry->UpdateTempMatrix(fX[0],fX[1],fX[2]
533  ,((TRotMatrix *)fMatrix)->GetMatrix()
534  ,fMatrix->IsReflection());
535  if (view3D)
536  view3D->UpdatePosition(fX[0],fX[1],fX[2],((TRotMatrix *)fMatrix));
537  }
538 }
539 
540 ////////////////////////////////////////////////////////////////////////////////
541 ///to be documented
542 
544 {
545  TVolume *node = GetNode();
546  if (node) node->SetVisibility(TVolume::ENodeSEEN(vis));
547 }
548 ////////////////////////////////////////////////////////////////////////////////
549 
551  // This method mupltiply the position of this object to the position of the
552  // curPosition object.
553  // It doesn't change Id of either object involved.
554 
555 
556  // Pick the "old" position by pieces
557  TVolume *curNode = 0;
558  // UInt_t curPositionId = 0;
559  curNode = curPosition.GetNode();
560  // curPositionId = curPosition.GetId();
561  const TRotMatrix *oldMatrix = 0;
562  Double_t oldTranslation[] = { 0, 0, 0 };
563  oldMatrix = GetMatrix();
564  oldTranslation[0] = GetX();
565  oldTranslation[1] = GetY();
566  oldTranslation[2] = GetZ();
567 
568  // Pick the "current" position by pieces
569  const TRotMatrix *curMatrix = curPosition.GetMatrix();
570 
571  // Create a new position
572  Double_t newTranslation[3];
573  Double_t newMatrix[9];
574  if(oldMatrix){
575  TGeometry::UpdateTempMatrix(oldTranslation,((TRotMatrix *)oldMatrix)->GetMatrix()
576  ,curPosition.GetX(),curPosition.GetY(),curPosition.GetZ(),
577  ((TRotMatrix *)curMatrix)->GetMatrix()
578  ,newTranslation,newMatrix);
580  Char_t anum[100];
581  snprintf(anum,100,"%d",num+1);
582  SetMatrixOwner();
583  Reset(curNode
584  ,newTranslation[0],newTranslation[1],newTranslation[2]
585  ,new TRotMatrix(anum,"NodeView",newMatrix));
587  } else {
588  newTranslation[0] = oldTranslation[0] + curPosition.GetX();
589  newTranslation[1] = oldTranslation[1] + curPosition.GetY();
590  newTranslation[2] = oldTranslation[2] + curPosition.GetZ();
591  Reset(curNode,newTranslation[0],newTranslation[1],newTranslation[2]);
592  }
593 // SetId(curPositionId);
594  return *this;
595 }
596 
597 ////////////////////////////////////////////////////////////////////////////////
598 ///to be documented
599 
601 {
602  if (xyz) memcpy(fX,xyz,sizeof(fX));
603  else memset(fX,0,sizeof(fX));
604 }
605 
606 ////////////////////////////////////////////////////////////////////////////////
607 /// Stream an object of class TVolumePosition.
608 
609 void TVolumePosition::Streamer(TBuffer &R__b)
610 {
611  TRotMatrix *save = fMatrix;
612  if (R__b.IsReading()) {
613  fMatrix = 0;
615  if (!fMatrix) fMatrix = save;
616  } else {
617  if (save == TVolume::GetIdentity() ) fMatrix = 0;
619  fMatrix = save;
620  }
621 }
622 ////////////////////////////////////////////////////////////////////////////////
623 ///to be documented
624 
625 std::ostream& operator<<(std::ostream& s,const TVolumePosition &target)
626 {
627  s << " Node: ";
628  if (target.GetNode()) s << target.GetNode()->GetName() << std::endl;
629  else s << "NILL" << std::endl;
630  s << Form(" Position: x=%10.5f : y=%10.5f : z=%10.5f\n", target.GetX(), target.GetY(), target.GetZ());
631  TRotMatrix *rot = (TRotMatrix *) target.GetMatrix();
632  if (rot){
633  s << rot->IsA()->GetName() << "\t" << rot->GetName() << "\t" << rot->GetTitle() << std::endl;
634  Double_t *matrix = rot->GetMatrix();
635  Int_t i = 0;
636  for (i=0;i<3;i++) {
637  for (Int_t j=0;j<3;j++) s << Form("%10.5f:", *matrix++);
638  s << std::endl;
639  }
640  }
641  return s;
642 }
void Add(TObject *obj, const char *name=0, Int_t check=-1)
Add object with name to browser.
Definition: TBrowser.cxx:261
TRotMatrix * fMatrix
virtual Double_t GetY() const
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
virtual UInt_t GetId() const
virtual void SetPosition(Double_t x=0, Double_t y=0, Double_t z=0)
virtual Double_t * GetMatrix()
Definition: TRotMatrix.h:54
Bool_t IsReading() const
Definition: TBuffer.h:83
virtual Float_t * Errmx2Master(const Float_t *localError, Float_t *masterError) const
to be documented
virtual void Browse(TBrowser *b)
to be documented
Bool_t SetMatrixOwner(Bool_t ownerShips=kTRUE)
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual void SetLineAttributes()
Invoke the DialogCanvas Line attributes.
Definition: TAttLine.cxx:280
TRotMatrix * GetRotMatrix(const char *name) const
Return pointer to RotMatrix with name.
Definition: TGeometry.cxx:356
auto * m
Definition: textangle.C:8
float Float_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:62
virtual void Draw(Option_t *depth="3")
Draw Referenced node with current parameters.
virtual void UpdatePosition(Double_t x, Double_t y, Double_t z, TRotMatrix *matrix, Option_t *opt="")
ENodeSEEN
Definition: TVolume.h:38
virtual Double_t * Cormx2Local(const Double_t *masterCorr, Double_t *localCorr) const
to be documented
Buffer base class used for serializing objects.
Definition: TBuffer.h:40
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a Node.
int Int_t
Definition: RtypesCore.h:41
virtual void Print(Option_t *option="") const
to be documented
virtual void Draw(Option_t *depth="3")
Default Draw method for all objects.
Definition: TVolume.cxx:427
virtual Double_t GetZ() const
Double_t fX[3]
virtual Bool_t IsReflection() const
Definition: TRotMatrix.h:61
const TRotMatrix * GetMatrix() const
virtual TVolumePosition & Mult(const TVolumePosition &position)
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Definition: TObject.cxx:128
Double_t x[n]
Definition: legend1.C:17
void Class()
Definition: Class.C:29
Int_t GeomLevel() const
Definition: TGeometry.h:74
virtual void SetVisibility(ENodeSEEN vis=TVolume::kBothVisible)
Set visibility for this volume and its sons.
Definition: TVolume.cxx:747
virtual void SetXYZ(Double_t *xyz=0)
to be documented
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
to be documented
virtual ~TVolumePosition()
to be documented
static TRotMatrix * GetIdentity()
Return a pointer the "identity" matrix.
Definition: TVolume.cxx:501
virtual void SetVisibility(Int_t vis=1)
to be documented
TGeometry description.
Definition: TGeometry.h:39
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
virtual Double_t GetX(Int_t indx=0) const
This is the base class for all geometry shapes.
Definition: TShape.h:35
virtual void SetLineAttributes()
to be documented
Manages a detector rotation matrix.
Definition: TRotMatrix.h:28
virtual Double_t * Local2Master(const Double_t *local, Double_t *master, Int_t nPoints=1) const
Convert one point from local system to master reference system.
virtual void SetMatrix(TRotMatrix *matrix=0)
to be documented
virtual char * GetObjectInfo(Int_t px, Int_t py) const
to be documented
static float * mxmpy(const float *a, const float *b, float *c, int i, int j, int k)
Definition: TCernLib.h:200
static int * ucopy(const int *a, int *b, int n)
Definition: TCernLib.h:325
TVolumePosition(TVolume *node=0, Double_t x=0, Double_t y=0, Double_t z=0, TRotMatrix *matrix=0)
Node normal constructor.
virtual void UpdatePosition(Option_t *option="")
to be documented
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:880
char * Form(const char *fmt,...)
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
static float * mxmpy2(const float *a, const float *b, float *c, int i, int j, int k)
Definition: TCernLib.h:210
virtual TVolumePosition * Reset(TVolume *node=0, Double_t x=0, Double_t y=0, Double_t z=0, TRotMatrix *matrix=0)
Reset this position.
const Bool_t kFALSE
Definition: RtypesCore.h:88
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
static float * trasat(const float *a, const float *s, float *r, int m, int n)
Transformation of Symmetric Matrix.
Definition: TCernLib.cxx:540
THashList * GetListOfMatrices() const
Definition: TGeometry.h:78
#define ClassImp(name)
Definition: Rtypes.h:359
double Double_t
Definition: RtypesCore.h:55
Double_t y[n]
Definition: legend1.C:17
static float * vzero(float *a, int n2)
Definition: TCernLib.h:485
static constexpr double s
static float * vadd(const float *b, const float *c, float *a, int n)
Definition: TCernLib.h:380
virtual TVolume * GetNode() const
Mother of all ROOT objects.
Definition: TObject.h:37
you should not use this method at all Int_t Int_t z
Definition: TRolke.cxx:630
virtual void UpdateTempMatrix(Double_t x=0, Double_t y=0, Double_t z=0, TRotMatrix *matrix=0)
Update temp matrix.
Definition: TGeometry.cxx:661
char Char_t
Definition: RtypesCore.h:29
virtual const char * GetTitle() const
Returns title of object.
Definition: TObject.cxx:401
virtual Float_t * Errmx2Local(const Float_t *masterError, Float_t *localError) const
to be documented
TShape * GetShape() const
Definition: TVolume.h:79
virtual Double_t * Master2Local(const Double_t *master, Double_t *local, Int_t nPoints=1) const
Convert one point from master system to local reference system.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
#define snprintf
Definition: civetweb.c:822
std::ostream & operator<<(std::ostream &s, const TVolumePosition &target)
to be documented
#define gPad
Definition: TVirtualPad.h:285
static float * tratsa(const float *a, const float *s, float *r, int m, int n)
tratsa.F – translated by f2c (version 19970219).
Definition: TCernLib.cxx:677
virtual Double_t * Cormx2Master(const Double_t *localCorr, Double_t *masterCorr) const
to be documented
static float * vsub(const float *a, const float *b, float *x, int n)
Definition: TCernLib.h:434
virtual Int_t GetSize() const
Definition: TCollection.h:180
R__EXTERN TGeometry * gGeometry
Definition: TGeometry.h:158
const Bool_t kTRUE
Definition: RtypesCore.h:87
virtual const Char_t * GetName() const
return VolumePosition name
Bool_t IsMatrixOwner() const
virtual void Paint(Option_t *option="")
Paint Referenced node with current parameters.