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;
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();
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));
609 void 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());
633 s << rot->IsA()->
GetName() <<
"\t" << rot->GetName() <<
"\t" << rot->GetTitle() << std::endl;
637 for (
Int_t j=0;j<3;j++) s <<
Form(
"%10.5f:", *matrix++);
void Add(TObject *obj, const char *name=0, Int_t check=-1)
Add object with name to browser.
virtual Double_t GetY() const
virtual const char * GetName() const
Returns name of object.
virtual UInt_t GetId() const
virtual void SetPosition(Double_t x=0, Double_t y=0, Double_t z=0)
virtual Double_t * GetMatrix()
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.
TRotMatrix * GetRotMatrix(const char *name) const
Return pointer to RotMatrix with name.
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="")
virtual Double_t * Cormx2Local(const Double_t *masterCorr, Double_t *localCorr) const
to be documented
Buffer base class used for serializing objects.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a Node.
virtual void Print(Option_t *option="") const
to be documented
virtual void Draw(Option_t *depth="3")
Default Draw method for all objects.
virtual Double_t GetZ() const
virtual Bool_t IsReflection() const
const TRotMatrix * GetMatrix() const
virtual TVolumePosition & Mult(const TVolumePosition &position)
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void SetVisibility(ENodeSEEN vis=TVolume::kBothVisible)
Set visibility for this volume and its sons.
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.
virtual void SetVisibility(Int_t vis=1)
to be documented
Using a TBrowser one can browse all ROOT objects.
virtual Double_t GetX(Int_t indx=0) const
This is the base class for all geometry shapes.
virtual void SetLineAttributes()
to be documented
Manages a detector rotation matrix.
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)
static int * ucopy(const int *a, int *b, int n)
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
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
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)
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 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.
THashList * GetListOfMatrices() const
static float * vzero(float *a, int n2)
static constexpr double s
static float * vadd(const float *b, const float *c, float *a, int n)
virtual TVolume * GetNode() const
Mother of all ROOT objects.
you should not use this method at all Int_t Int_t z
virtual void UpdateTempMatrix(Double_t x=0, Double_t y=0, Double_t z=0, TRotMatrix *matrix=0)
Update temp matrix.
virtual const char * GetTitle() const
Returns title of object.
virtual Float_t * Errmx2Local(const Float_t *masterError, Float_t *localError) const
to be documented
TShape * GetShape() const
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
std::ostream & operator<<(std::ostream &s, const TVolumePosition &target)
to be documented
static float * tratsa(const float *a, const float *s, float *r, int m, int n)
tratsa.F – translated by f2c (version 19970219).
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)
virtual Int_t GetSize() const
R__EXTERN TGeometry * gGeometry
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.