62: fMatrix(0),fNode(node),fId(0)
67 static Int_t counter = 0;
69 if(!(counter%1000))std::cout<<
"TVolumePosition count="<<counter<<
" name="<<node->
GetName()<<std::endl;
88 : fMatrix(matrix),fNode(node),fId(0)
105 curNode = curPosition->
GetNode();
106 curPositionId = curPosition->
GetId();
110 fX[0] = 0;
fX[1] = 0;
fX[2] = 0;
111 Double_t oldTranslation[] = { 0, 0, 0 };
114 oldTranslation[0] = oldPosition->
GetX();
115 oldTranslation[1] = oldPosition->
GetY();
116 oldTranslation[2] = oldPosition->
GetZ();
124 if(oldMatrix && curMatrix && curPosition) {
126 curPosition->
GetX(),curPosition->
GetY(),curPosition->
GetZ(),
136 fX[0] = oldTranslation[0] + curPosition->
GetX();
137 fX[1] = oldTranslation[1] + curPosition->
GetY();
138 fX[2] = oldTranslation[2] + curPosition->
GetZ();
148 , fMatrix(((
TVolumePosition &)pos).GetMatrix()),fNode(pos.GetNode()),fId(pos.GetId())
151 for (
int i=0;i<3;i++)
fX[i] = pos.
GetX(i);
198 if (node) node->
Draw(option);
231 static char info[64];
243 error[0] = localError[0]; error[2] = localError[1]; error[5] = localError[2];
254 error[0] = localError[0]; error[2] = localError[1]; error[5] = localError[2];
282 double corLocal[6], corGlobal[6];
297 error[0] = masterError[0]; error[2] = masterError[1]; error[5] = masterError[2];
307 error[0] = masterError[0]; error[2] = masterError[1]; error[5] = masterError[2];
334 double corLocal[6], corGlobal[6];
358 for (
int i =0; i < nPoints; i++,local += 3, master += 3)
TCL::vadd(local,
fX,master,3);
361 for (
int i =0; i < nPoints; i++, local += 3, master += 3) {
384 for (
int i =0; i < nPoints; i++,local += 3, master += 3)
TCL::vadd(local,
fX,master,3);
387 for (
int i =0; i < nPoints; i++, local += 3, master += 3) {
411 for (
int i =0; i < nPoints; i++,master += 3, local += 3)
TCL::vsub(master,
fX,local,3);
414 for (
int i =0; i < nPoints; i++, master += 3, local += 3) {
437 for (
int i =0; i < nPoints; i++,master += 3, local += 3)
TCL::vsub(master,
fX,local,3);
440 for (
int i =0; i < nPoints; i++, master += 3, local += 3) {
455 Error(
"Paint",
"Position can not be painted");
463 std::cout << *
this << std::endl;
491 out <<
"TVolumePosition *CreatePosition() { " << std::endl;
492 out <<
" TVolumePosition *myPosition = 0; " << std::endl;
501 out <<
" return myPosition; " << std::endl;
502 out <<
"} " << std::endl;
559 curNode = curPosition.
GetNode();
562 Double_t oldTranslation[] = { 0, 0, 0 };
564 oldTranslation[0] =
GetX();
565 oldTranslation[1] =
GetY();
566 oldTranslation[2] =
GetZ();
576 ,curPosition.
GetX(),curPosition.
GetY(),curPosition.
GetZ(),
578 ,newTranslation,newMatrix);
584 ,newTranslation[0],newTranslation[1],newTranslation[2]
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]);
602 if (xyz) memcpy(
fX,xyz,
sizeof(
fX));
603 else memset(
fX,0,
sizeof(
fX));
609void TVolumePosition::Streamer(
TBuffer &R__b)
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());
637 for (
Int_t j=0;j<3;j++)
s <<
Form(
"%10.5f:", *matrix++);
R__EXTERN TGeometry * gGeometry
char * Form(const char *fmt,...)
std::ostream & operator<<(std::ostream &s, const TVolumePosition &target)
to be documented
virtual void SetLineAttributes()
Invoke the DialogCanvas Line attributes.
Using a TBrowser one can browse all ROOT objects.
Buffer base class used for serializing objects.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
static float * mxmpy(const float *a, const float *b, float *c, int i, int j, int k)
static float * tratsa(const float *a, const float *s, float *r, int m, int n)
tratsa.F – translated by f2c (version 19970219).
static int * ucopy(const int *a, int *b, int n)
static float * vzero(float *a, int n2)
static float * vsub(const float *a, const float *b, float *x, int n)
static float * trasat(const float *a, const float *s, float *r, int m, int n)
Transformation of Symmetric Matrix.
static float * vadd(const float *b, const float *c, float *a, int n)
static float * mxmpy2(const float *a, const float *b, float *c, int i, int j, int k)
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
virtual void UpdateTempMatrix(Double_t x=0, Double_t y=0, Double_t z=0, TRotMatrix *matrix=0)
Update temp matrix.
THashList * GetListOfMatrices() const
TRotMatrix * GetRotMatrix(const char *name) const
Return pointer to RotMatrix with name.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual const char * GetTitle() const
Returns title of object.
Manages a detector rotation matrix.
virtual Double_t * GetMatrix()
virtual Bool_t IsReflection() const
This is the base class for all geometry shapes.
virtual void UpdatePosition(Double_t x, Double_t y, Double_t z, TRotMatrix *matrix, Option_t *opt="")
virtual void UpdatePosition(Option_t *option="")
to be documented
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.
Bool_t IsMatrixOwner() const
virtual Double_t GetZ() const
virtual char * GetObjectInfo(Int_t px, Int_t py) const
to be documented
virtual void SetMatrix(TRotMatrix *matrix=0)
to be documented
virtual void SetLineAttributes()
to be documented
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.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
virtual const Char_t * GetName() const
return VolumePosition name
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a Node.
virtual TVolume * GetNode() const
virtual Double_t GetY() const
virtual Float_t * Errmx2Local(const Float_t *masterError, Float_t *localError) const
to be documented
virtual void Draw(Option_t *depth="3")
Draw Referenced node with current parameters.
virtual void SetPosition(Double_t x=0, Double_t y=0, Double_t z=0)
virtual Double_t GetX(Int_t indx=0) const
virtual void SetXYZ(Double_t *xyz=0)
to be documented
Bool_t SetMatrixOwner(Bool_t ownerShips=kTRUE)
TVolumePosition(TVolume *node=0, Double_t x=0, Double_t y=0, Double_t z=0, TRotMatrix *matrix=0)
Node normal constructor.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
to be documented
virtual void Paint(Option_t *option="")
Paint Referenced node with current parameters.
virtual void Browse(TBrowser *b)
to be documented
virtual UInt_t GetId() const
virtual Double_t * Cormx2Master(const Double_t *localCorr, Double_t *masterCorr) const
to be documented
virtual TVolumePosition * Reset(TVolume *node=0, Double_t x=0, Double_t y=0, Double_t z=0, TRotMatrix *matrix=0)
Reset this position.
virtual Double_t * Cormx2Local(const Double_t *masterCorr, Double_t *localCorr) const
to be documented
virtual void Print(Option_t *option="") const
to be documented
virtual Float_t * Errmx2Master(const Float_t *localError, Float_t *masterError) const
to be documented
const TRotMatrix * GetMatrix() const
virtual ~TVolumePosition()
to be documented
virtual TVolumePosition & Mult(const TVolumePosition &position)
virtual void SetVisibility(Int_t vis=1)
to be documented
virtual void Draw(Option_t *depth="3")
Default Draw method for all objects.
TShape * GetShape() const
static TRotMatrix * GetIdentity()
Return a pointer the "identity" matrix.
virtual void SetVisibility(ENodeSEEN vis=TVolume::kBothVisible)
Set visibility for this volume and its sons.
static constexpr double s