- Double_t pos[3];
- Double_t rot[9];
- fInfo->fGeom->GetTrans(fID,pos);
- fInfo->fGeom->GetRotMatrix(fID,rot);
- Double_t *s, *d;
-
- // column major ii
- s = &rot[0]; d = &fMatrix[0];
- d[0] = s[0]; d[1] = s[3]; d[2] = s[6]; d[3] = 0;
- s = &rot[1]; d = &fMatrix[4];
- d[0] = s[0]; d[1] = s[3]; d[2] = s[6]; d[3] = 0;
- s = &rot[2]; d = &fMatrix[8];
- d[0] = s[0]; d[1] = s[3]; d[2] = s[6]; d[3] = 0;
- s = &pos[0]; d = &fMatrix[12];
- d[0] = s[0]; d[1] = s[1]; d[2] = s[2]; d[3] = 1;
-
- fTrans = true;
+ // Set transformation matrix based on module id (use geometry to
+ // retrieve this information).
+
+ Double_t x[9];
+ fHMTrans.UnitTrans();
+
+ // !!!! Here should use AliITSgeomTGeo ... but can i be sure
+ // the geometry has been loaded?
+
+ // column major
+ fInfo->fGeom->GetRotMatrix(fID, x);
+ fHMTrans.SetBaseVec(1, x[0], x[3], x[6]);
+ fHMTrans.SetBaseVec(2, x[1], x[4], x[7]);
+ fHMTrans.SetBaseVec(3, x[2], x[5], x[8]);
+ // translation
+ fInfo->fGeom->GetTrans(fID, x);
+ fHMTrans.SetBaseVec(4, x);
+}
+
+/**************************************************************************/
+
+void ITSModule::DigitSelected(Int_t idx)
+{
+ // Override control-click from QuadSet
+
+ DigitBase* qb = GetDigit(idx);
+ TObject* obj = qb->fId.GetObject();
+ AliITSdigit* d = dynamic_cast<AliITSdigit*>(obj);
+ printf("ITSModule::QuadSelected "); Print();
+ printf(" idx=%d, value=%d, obj=0x%lx, digit=0x%lx\n",
+ idx, qb->fValue, (ULong_t)obj, (ULong_t)d);
+ if (d)
+ printf(" coord1=%3d coord2=%3d signal=%d\n",
+ d->GetCoord1(), d->GetCoord2(), d->GetSignal());
+