67 fX[0] =
x; fX[1] =
y; fX[2] = z;
69 static Int_t counter = 0;
71 if(!(counter%1000))std::cout<<
"TVolumePosition count="<<counter<<
" name="<<node->GetName()<<std::endl;
92 :
fMatrix(matrix),fNode(node),fId(0)
109 curNode = curPosition->
GetNode();
110 curPositionId = curPosition->
GetId();
114 fX[0] = 0;
fX[1] = 0;
fX[2] = 0;
115 Double_t oldTranslation[] = { 0, 0, 0 };
118 oldTranslation[0] = oldPosition->
GetX();
119 oldTranslation[1] = oldPosition->
GetY();
120 oldTranslation[2] = oldPosition->
GetZ();
128 if(oldMatrix && curMatrix && curPosition) {
130 curPosition->
GetX(),curPosition->
GetY(),curPosition->
GetZ(),
135 snprintf(anum,100,
"%d",num+1);
140 fX[0] = oldTranslation[0] + curPosition->
GetX();
141 fX[1] = oldTranslation[1] + curPosition->
GetY();
142 fX[2] = oldTranslation[2] + curPosition->
GetZ();
155 for (
int i=0;i<3;i++)
fX[i] = pos.
GetX(i);
207 if (node) node->
Draw(option);
242 static char info[64];
254 error[0] = localError[0]; error[2] = localError[1]; error[5] = localError[2];
265 error[0] = localError[0]; error[2] = localError[1]; error[5] = localError[2];
293 double corLocal[6], corGlobal[6];
308 error[0] = masterError[0]; error[2] = masterError[1]; error[5] = masterError[2];
318 error[0] = masterError[0]; error[2] = masterError[1]; error[5] = masterError[2];
345 double corLocal[6], corGlobal[6];
370 for (
int i =0; i < nPoints; i++,local += 3, master += 3)
TCL::vadd(local,
fX,master,3);
373 for (
int i =0; i < nPoints; i++, local += 3, master += 3) {
398 for (
int i =0; i < nPoints; i++,local += 3, master += 3)
TCL::vadd(local,
fX,master,3);
401 for (
int i =0; i < nPoints; i++, local += 3, master += 3) {
426 for (
int i =0; i < nPoints; i++,master += 3, local += 3)
TCL::vsub(master,
fX,local,3);
429 for (
int i =0; i < nPoints; i++, master += 3, local += 3) {
454 for (
int i =0; i < nPoints; i++,master += 3, local += 3)
TCL::vsub(master,
fX,local,3);
457 for (
int i =0; i < nPoints; i++, master += 3, local += 3) {
474 Error(
"Paint",
"Position can not be painted");
482 std::cout << *
this << std::endl;
511 out <<
"TVolumePosition *CreatePosition() { " << std::endl;
512 out <<
" TVolumePosition *myPosition = 0; " << std::endl;
521 out <<
" return myPosition; " << std::endl;
522 out <<
"} " << std::endl;
579 curNode = curPosition.
GetNode();
582 Double_t oldTranslation[] = { 0, 0, 0 };
584 oldTranslation[0] =
GetX();
585 oldTranslation[1] =
GetY();
586 oldTranslation[2] =
GetZ();
596 ,curPosition.
GetX(),curPosition.
GetY(),curPosition.
GetZ(),
598 ,newTranslation,newMatrix);
601 snprintf(anum,100,
"%d",num+1);
604 ,newTranslation[0],newTranslation[1],newTranslation[2]
608 newTranslation[0] = oldTranslation[0] + curPosition.
GetX();
609 newTranslation[1] = oldTranslation[1] + curPosition.
GetY();
610 newTranslation[2] = oldTranslation[2] + curPosition.
GetZ();
611 Reset(curNode,newTranslation[0],newTranslation[1],newTranslation[2]);
622 if (xyz) memcpy(
fX,xyz,
sizeof(
fX));
623 else memset(
fX,0,
sizeof(
fX));
629 void TVolumePosition::Streamer(
TBuffer &R__b)
649 else s <<
"NILL" << std::endl;
650 s <<
Form(
" Position: x=%10.5f : y=%10.5f : z=%10.5f\n", target.
GetX(), target.
GetY(), target.
GetZ());
653 s << rot->IsA()->
GetName() <<
"\t" << rot->GetName() <<
"\t" << rot->GetTitle() << std::endl;
657 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.
THashList * GetListOfMatrices() const
virtual void SetPosition(Double_t x=0, Double_t y=0, Double_t z=0)
virtual Double_t * GetMatrix()
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.
virtual Double_t GetY() const
virtual TVolume * GetNode() const
ClassImp(TVolumePosition) TVolumePosition
*-*-*-*-*-*-*-*-*-*-*Node normal constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-* *-* ====================== ...
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 UInt_t GetId() const
virtual Double_t * Cormx2Master(const Double_t *localCorr, Double_t *masterCorr) const
to be documented
static float * tratsa(const float *a, const float *s, float *r, int m, int n)
Buffer base class used for serializing objects.
virtual Float_t * Errmx2Master(const Float_t *localError, Float_t *masterError) const
to be documented
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
*-*-*-*-*-*-*-*-*-*-*Compute distance from point px,py to a Node*-*-*-*-*-* *-* =====================...
Bool_t IsMatrixOwner() const
virtual Double_t GetZ() const
virtual void Draw(Option_t *depth="3")
*-*-*-*-*-*-*-*-*-*-*-*Draw Referenced node with current parameters*-*-*-* *-* ======================...
virtual TVolumePosition & Mult(const TVolumePosition &position)
TRotMatrix * GetRotMatrix(const char *name) const
Return pointer to RotMatrix with name.
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 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*-*-* *-* ====================...
const TRotMatrix * GetMatrix() const
virtual ~TVolumePosition()
to be documented
static TRotMatrix * GetIdentity()
Return a pointer the "identity" matrix.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void SetVisibility(Int_t vis=1)
to be documented
virtual Double_t * Cormx2Local(const Double_t *masterCorr, Double_t *localCorr) const
to be documented
Using a TBrowser one can browse all ROOT objects.
virtual char * GetObjectInfo(Int_t px, Int_t py) const
to be documented
This is the base class for all geometry shapes.
virtual void SetLineAttributes()
to be documented
Manages a detector rotation matrix.
virtual void SetMatrix(TRotMatrix *matrix=0)
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)
virtual const char * ClassName() const
Returns name of class to which the object belongs.
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
char * Form(const char *fmt,...)
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
*-*-*-*-*-*-*-*-*-*-*Execute action corresponding to one event*-*-*-* *-* ===========================...
virtual const char * GetName() const
Returns name of object.
virtual Double_t GetX(Int_t indx=0) const
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 *-*-*-*-*-*-*-*-*-*-* *-* =================== *-* x...
static float * trasat(const float *a, const float *s, float *r, int m, int n)
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*-*-* *-* ====================...
TShape * GetShape() const
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
virtual Int_t GetSize() const
static float * vzero(float *a, int n2)
static float * vadd(const float *b, const float *c, float *a, int n)
Mother of all ROOT objects.
virtual void UpdateTempMatrix(Double_t x=0, Double_t y=0, Double_t z=0, TRotMatrix *matrix=0)
Update temp matrix.
std::ostream & operator<<(std::ostream &s, const TVolumePosition &target)
to be documented
virtual Float_t * Errmx2Local(const Float_t *masterError, Float_t *localError) const
to be documented
virtual void Print(Option_t *option="") const
to be documented
static float * vsub(const float *a, const float *b, float *x, int n)
virtual const char * GetTitle() const
Returns title of object.
R__EXTERN TGeometry * gGeometry
virtual Bool_t IsReflection() const
virtual void Paint(Option_t *option="")
*-*-*-*-*-*-*-*-*-*-*-*Paint Referenced node with current parameters*-*-*-* *-* =====================...
virtual const Char_t * GetName() const
return VolumePosition name