\r
#define CORHW_\r
\r
-AliAlignObjParams AliITSAlignMille2Module::fgTempAlignObj;\r
+\r
const Float_t AliITSAlignMille2Module::fgkDummyConstraint = 1e-2;//1.E3;\r
\r
//-------------------------------------------------------------\r
// operator =\r
//\r
if(this==&m) return *this;\r
- ((TNamed *)this)->operator=(m);\r
+ this->TNamed::operator=(m);\r
//\r
fNSensVol=m.fNSensVol;\r
fIndex=m.fIndex;\r
ang[1]=delta[4]; // theta (Y)\r
ang[2]=delta[5]; // phi (Z)\r
//\r
- fgTempAlignObj.SetRotation(ang[0],ang[1],ang[2]);\r
- fgTempAlignObj.SetTranslation(tr[0],tr[1],tr[2]);\r
+ static AliAlignObjParams tempAlignObj;\r
+ tempAlignObj.SetRotation(ang[0],ang[1],ang[2]);\r
+ tempAlignObj.SetTranslation(tr[0],tr[1],tr[2]);\r
AliDebug(3,Form("Delta angles: psi=%f theta=%f phi=%f",ang[0],ang[1],ang[2]));\r
TGeoHMatrix hm;\r
- fgTempAlignObj.GetMatrix(hm);\r
+ tempAlignObj.GetMatrix(hm);\r
//printf("\n0: delta matrix\n");hm.Print();\r
\r
// 1) start setting fSensVolModif = fSensVol\r
ang[1]=deltalocal[4]; // theta (Y)\r
ang[2]=deltalocal[5]; // phi (Z)\r
//\r
- fgTempAlignObj.SetRotation(ang[0],ang[1],ang[2]);\r
- fgTempAlignObj.SetTranslation(tr[0],tr[1],tr[2]);\r
+ static AliAlignObjParams tempAlignObj;\r
+ tempAlignObj.SetRotation(ang[0],ang[1],ang[2]);\r
+ tempAlignObj.SetTranslation(tr[0],tr[1],tr[2]);\r
AliDebug(3,Form("Delta angles: psi=%f theta=%f phi=%f",ang[0],ang[1],ang[2]));\r
//\r
- return GetSensitiveVolumeMisalignment(voluid,&fgTempAlignObj);\r
+ return GetSensitiveVolumeMisalignment(voluid,&tempAlignObj);\r
}\r
\r
//-------------------------------------------------------------\r
// << RS\r
\r
// reset align object (may not be needed...)\r
- fgTempAlignObj.SetVolUID(0);\r
- fgTempAlignObj.SetSymName("");\r
- fgTempAlignObj.SetTranslation(0,0,0);\r
- fgTempAlignObj.SetRotation(0,0,0);\r
+ static AliAlignObjParams tempAlignObj;\r
+ tempAlignObj.SetVolUID(0);\r
+ tempAlignObj.SetSymName("");\r
+ tempAlignObj.SetTranslation(0,0,0);\r
+ tempAlignObj.SetRotation(0,0,0);\r
//\r
// >> RS\r
#ifdef CORHW_\r
}\r
#endif\r
// << RS\r
- if (!fgTempAlignObj.SetMatrix(*fSensVolModifMatrix)) return NULL;\r
- fgTempAlignObj.SetVolUID(voluid);\r
- fgTempAlignObj.SetSymName(AliGeomManager::SymName(voluid));\r
+ if (!tempAlignObj.SetMatrix(*fSensVolModifMatrix)) return NULL;\r
+ tempAlignObj.SetVolUID(voluid);\r
+ tempAlignObj.SetSymName(AliGeomManager::SymName(voluid));\r
//\r
- return &fgTempAlignObj;\r
+ return &tempAlignObj;\r
}\r
\r
// >> RS\r
ang[2]=deltalocal[5]; // phi (Z)\r
\r
// reset align object (may not be needed...)\r
- fgTempAlignObj.SetVolUID(0);\r
- fgTempAlignObj.SetSymName("");\r
- fgTempAlignObj.SetRotation(ang[0],ang[1],ang[2]);\r
- fgTempAlignObj.SetTranslation(tr[0],tr[1],tr[2]);\r
+ static AliAlignObjParams tempAlignObj;\r
+ tempAlignObj.SetVolUID(0);\r
+ tempAlignObj.SetSymName("");\r
+ tempAlignObj.SetRotation(ang[0],ang[1],ang[2]);\r
+ tempAlignObj.SetTranslation(tr[0],tr[1],tr[2]);\r
AliDebug(3,Form("Delta angles: psi=%f theta=%f phi=%f",ang[0],ang[1],ang[2]));\r
\r
// Gsv = Gg * Gg-1 * Gsv -> Lsv,g = Gg-1 * Gsv\r
\r
// prepare the Delta matrix Dg\r
TGeoHMatrix dg;\r
- fgTempAlignObj.GetMatrix(dg);\r
+ tempAlignObj.GetMatrix(dg);\r
//dg.Print();\r
\r
// 1) start setting fSensVolModif = Gsv\r
//printf("\n5: modif=finale\n");fSensVolModifMatrix->Print();\r
\r
// reset align object (may not be needed...)\r
- fgTempAlignObj.SetVolUID(0);\r
- fgTempAlignObj.SetSymName("");\r
- fgTempAlignObj.SetTranslation(0,0,0);\r
- fgTempAlignObj.SetRotation(0,0,0);\r
+ tempAlignObj.SetVolUID(0);\r
+ tempAlignObj.SetSymName("");\r
+ tempAlignObj.SetTranslation(0,0,0);\r
+ tempAlignObj.SetRotation(0,0,0);\r
\r
#ifdef CORHW_\r
// correction for SPD y-shift\r
fSensVolModifMatrix->Multiply( &deltay.Inverse() );\r
}\r
#endif\r
- if (!fgTempAlignObj.SetMatrix(*fSensVolModifMatrix)) return NULL;\r
- fgTempAlignObj.SetVolUID(voluid);\r
- fgTempAlignObj.SetSymName(AliGeomManager::SymName(voluid));\r
+ if (!tempAlignObj.SetMatrix(*fSensVolModifMatrix)) return NULL;\r
+ tempAlignObj.SetVolUID(voluid);\r
+ tempAlignObj.SetSymName(AliGeomManager::SymName(voluid));\r
\r
\r
- //fgTempAlignObj.Print("");\r
+ //tempAlignObj.Print("");\r
\r
- return &fgTempAlignObj;\r
+ return &tempAlignObj;\r
}\r
//-------------------------------------------------------------\r
\r
ang[2]=deltalocal[5]; // phi (Z)\r
\r
// reset align object (may not be needed...)\r
- fgTempAlignObj.SetTranslation(0,0,0);\r
- fgTempAlignObj.SetRotation(0,0,0);\r
+ static AliAlignObjParams tempAlignObj;\r
+ tempAlignObj.SetTranslation(0,0,0);\r
+ tempAlignObj.SetRotation(0,0,0);\r
\r
- fgTempAlignObj.SetRotation(ang[0],ang[1],ang[2]);\r
- fgTempAlignObj.SetTranslation(tr[0],tr[1],tr[2]);\r
+ tempAlignObj.SetRotation(ang[0],ang[1],ang[2]);\r
+ tempAlignObj.SetTranslation(tr[0],tr[1],tr[2]);\r
AliDebug(3,Form("Delta angles: psi=%f theta=%f phi=%f",ang[0],ang[1],ang[2]));\r
\r
// Gsv = Gg * Gg-1 * Gsv -> Lsv,g = Gg-1 * Gsv\r
\r
// prepare the Delta matrix Dg\r
TGeoHMatrix dg;\r
- fgTempAlignObj.GetMatrix(dg);\r
+ tempAlignObj.GetMatrix(dg);\r
//dg.Print();\r
\r
dg.MultiplyLeft( fMatrix );\r
dg.Multiply( &fMatrix->Inverse() );\r
\r
// reset align object (may not be needed...)\r
- fgTempAlignObj.SetTranslation(0,0,0);\r
- fgTempAlignObj.SetRotation(0,0,0);\r
+ tempAlignObj.SetTranslation(0,0,0);\r
+ tempAlignObj.SetRotation(0,0,0);\r
\r
- fgTempAlignObj.SetVolUID(voluid);\r
- fgTempAlignObj.SetSymName(AliGeomManager::SymName(voluid));\r
+ tempAlignObj.SetVolUID(voluid);\r
+ tempAlignObj.SetSymName(AliGeomManager::SymName(voluid));\r
\r
- if (!fgTempAlignObj.SetMatrix(dg)) return NULL;\r
+ if (!tempAlignObj.SetMatrix(dg)) return NULL;\r
\r
- //fgTempAlignObj.Print("");\r
+ //tempAlignObj.Print("");\r
\r
- return &fgTempAlignObj;\r
+ return &tempAlignObj;\r
}\r
// << RS\r
\r
// return global parameters of the sensor volid\r
for (int i=3;i--;) t[i] = r[i] = 0.;\r
if (SensVolMatrix(volid,fSensVolMatrix)) return; \r
- fgTempAlignObj.SetMatrix(*fSensVolMatrix);\r
- fgTempAlignObj.GetPars(t,r);\r
+ AliAlignObjParams tempAlignObj;\r
+ tempAlignObj.SetMatrix(*fSensVolMatrix);\r
+ tempAlignObj.GetPars(t,r);\r
}\r
\r
//-------------------------------------------------------------\r
for (int i=3;i--;) t[i] = r[i] = 0.;\r
if (SensVolMatrix(volid,fSensVolMatrix)) return; \r
fSensVolMatrix->MultiplyLeft( &fMatrix->Inverse() );\r
- fgTempAlignObj.SetMatrix(*fSensVolMatrix);\r
- fgTempAlignObj.GetPars(t,r);\r
+ AliAlignObjParams tempAlignObj; \r
+ tempAlignObj.SetMatrix(*fSensVolMatrix);\r
+ tempAlignObj.GetPars(t,r);\r
}\r
\r
//-------------------------------------------------------------\r
// return global parameters of the sensor volid modified by the localDelta params\r
for (int i=3;i--;) t[i] = r[i] = 0.;\r
if (SensVolMatrix(volid,fSensVolMatrix)) return; \r
- fgTempAlignObj.SetTranslation(loct[0],loct[1],loct[2]);\r
- fgTempAlignObj.SetRotation(locr[0],locr[1],locr[2]);\r
+ AliAlignObjParams tempAlignObj;\r
+ tempAlignObj.SetTranslation(loct[0],loct[1],loct[2]);\r
+ tempAlignObj.SetRotation(locr[0],locr[1],locr[2]);\r
//\r
- fgTempAlignObj.GetMatrix(*fSensVolModifMatrix); // obtain local delta\r
+ tempAlignObj.GetMatrix(*fSensVolModifMatrix); // obtain local delta\r
fSensVolModifMatrix->MultiplyLeft( fSensVolMatrix ); // obtain global delta\r
- fgTempAlignObj.SetMatrix(*fSensVolModifMatrix);\r
- fgTempAlignObj.GetPars(t,r); // obtain global params\r
+ tempAlignObj.SetMatrix(*fSensVolModifMatrix);\r
+ tempAlignObj.GetPars(t,r); // obtain global params\r
}\r
\r
//-------------------------------------------------------------\r
// return parameters of the sensor volid (modified by the localDelta params) in the current volume\r
for (int i=3;i--;) t[i] = r[i] = 0.;\r
if (SensVolMatrix(volid,fSensVolMatrix)) return; \r
- fgTempAlignObj.SetTranslation(loct[0],loct[1],loct[2]);\r
- fgTempAlignObj.SetRotation(locr[0],locr[1],locr[2]);\r
+ AliAlignObjParams tempAlignObj;\r
+ tempAlignObj.SetTranslation(loct[0],loct[1],loct[2]);\r
+ tempAlignObj.SetRotation(locr[0],locr[1],locr[2]);\r
//\r
- fgTempAlignObj.GetMatrix(*fSensVolModifMatrix); // obtain local delta\r
+ tempAlignObj.GetMatrix(*fSensVolModifMatrix); // obtain local delta\r
fSensVolModifMatrix->MultiplyLeft( fSensVolMatrix ); // obtain global delta\r
fSensVolModifMatrix->MultiplyLeft( &fMatrix->Inverse() ); // obtain delta in current volume\r
- fgTempAlignObj.SetMatrix(*fSensVolModifMatrix);\r
- fgTempAlignObj.GetPars(t,r); // obtain params\r
+ tempAlignObj.SetMatrix(*fSensVolModifMatrix);\r
+ tempAlignObj.GetPars(t,r); // obtain params\r
}\r
\r
//-------------------------------------------------------------\r
// DeltaGlobal = (ModifParents)*DeltaLocal*(ModifParents)^-1 \r
//\r
*fSensVolMatrix = *fMatrix; // current global matrix\r
+ AliAlignObjParams tempAlignObj;\r
AliITSAlignMille2Module* parent = GetParent();\r
while (parent) {\r
if (parent->GeomParamsGlobal()) {\r
}\r
fSensVolMatrix->MultiplyLeft( &parent->GetMatrix()->Inverse() ); // Local Matrix\r
Float_t *parpar = parent->GetParVals();\r
- fgTempAlignObj.SetTranslation(parpar[0],parpar[1],parpar[2]);\r
- fgTempAlignObj.SetRotation(parpar[3],parpar[4],parpar[5]);\r
- fgTempAlignObj.GetMatrix(*fSensVolModifMatrix);\r
+ tempAlignObj.SetTranslation(parpar[0],parpar[1],parpar[2]);\r
+ tempAlignObj.SetRotation(parpar[3],parpar[4],parpar[5]);\r
+ tempAlignObj.GetMatrix(*fSensVolModifMatrix);\r
fSensVolMatrix->MultiplyLeft(fSensVolModifMatrix);\r
fSensVolMatrix->MultiplyLeft(parent->GetMatrix()); // global matrix after parents modifications\r
parent = parent->GetParent();\r
}\r
//\r
- fgTempAlignObj.SetTranslation(fParVals[0],fParVals[1],fParVals[2]);\r
- fgTempAlignObj.SetRotation(fParVals[3],fParVals[4],fParVals[5]);\r
- fgTempAlignObj.GetMatrix(*fSensVolModifMatrix); // local delta matrix\r
+ tempAlignObj.SetTranslation(fParVals[0],fParVals[1],fParVals[2]);\r
+ tempAlignObj.SetRotation(fParVals[3],fParVals[4],fParVals[5]);\r
+ tempAlignObj.GetMatrix(*fSensVolModifMatrix); // local delta matrix\r
fSensVolModifMatrix->Multiply( &fSensVolMatrix->Inverse() );\r
fSensVolModifMatrix->MultiplyLeft( fSensVolMatrix );\r
- fgTempAlignObj.SetMatrix( *fSensVolModifMatrix ); // global delta matrix\r
- fgTempAlignObj.GetPars(pars,pars+3);\r
+ tempAlignObj.SetMatrix( *fSensVolModifMatrix ); // global delta matrix\r
+ tempAlignObj.GetPars(pars,pars+3);\r
//\r
}\r
\r
// DeltaLocal = (DeltaParents*GlobalMat)^-1*DeltaGlobal*(DeltaParents*GlobalMat)\r
//\r
AliITSAlignMille2Module* parent = GetParent();\r
- fgTempAlignObj.SetTranslation(0.,0.,0.);\r
- fgTempAlignObj.SetRotation(0.,0.,0.);\r
- fgTempAlignObj.GetMatrix(*fSensVolMatrix); // get no-shift matrix\r
+ AliAlignObjParams tempAlignObj;\r
+ tempAlignObj.SetTranslation(0.,0.,0.);\r
+ tempAlignObj.SetRotation(0.,0.,0.);\r
+ tempAlignObj.GetMatrix(*fSensVolMatrix); // get no-shift matrix\r
//\r
while (parent) { // accumulate the product of parents global modifications\r
if (!parent->GeomParamsGlobal()) {\r
return;\r
}\r
Float_t *parpar = parent->GetParVals();\r
- fgTempAlignObj.SetTranslation(parpar[0],parpar[1],parpar[2]);\r
- fgTempAlignObj.SetRotation(parpar[3],parpar[4],parpar[5]);\r
- fgTempAlignObj.GetMatrix(*fSensVolModifMatrix);\r
+ tempAlignObj.SetTranslation(parpar[0],parpar[1],parpar[2]);\r
+ tempAlignObj.SetRotation(parpar[3],parpar[4],parpar[5]);\r
+ tempAlignObj.GetMatrix(*fSensVolModifMatrix);\r
fSensVolMatrix->Multiply(fSensVolModifMatrix); \r
parent = parent->GetParent();\r
}\r
// global matrix after parents modifications\r
fSensVolMatrix->Multiply(fMatrix);\r
//\r
- fgTempAlignObj.SetTranslation(fParVals[0],fParVals[1],fParVals[2]);\r
- fgTempAlignObj.SetRotation(fParVals[3],fParVals[4],fParVals[5]);\r
- fgTempAlignObj.GetMatrix(*fSensVolModifMatrix); // global delta matrix\r
+ tempAlignObj.SetTranslation(fParVals[0],fParVals[1],fParVals[2]);\r
+ tempAlignObj.SetRotation(fParVals[3],fParVals[4],fParVals[5]);\r
+ tempAlignObj.GetMatrix(*fSensVolModifMatrix); // global delta matrix\r
fSensVolModifMatrix->MultiplyLeft( &fSensVolMatrix->Inverse() );\r
fSensVolModifMatrix->Multiply( fSensVolMatrix );\r
- fgTempAlignObj.SetMatrix( *fSensVolModifMatrix ); // local delta matrix\r
- fgTempAlignObj.GetPars(pars,pars+3);\r
+ tempAlignObj.SetMatrix( *fSensVolModifMatrix ); // local delta matrix\r
+ tempAlignObj.GetPars(pars,pars+3);\r
//\r
}\r
\r
\r
\r
//-------------------------------------------------------------\r
-void AliITSAlignMille2Module::GetGlobalParams(Double_t *t, Double_t *r)\r
+void AliITSAlignMille2Module::GetGlobalParams(Double_t *t, Double_t *r) const\r
{\r
// global parameters of the module\r
- fgTempAlignObj.SetMatrix( *fMatrix );\r
- fgTempAlignObj.GetPars(t,r);\r
+ AliAlignObjParams tempAlignObj;\r
+ tempAlignObj.SetMatrix( *fMatrix );\r
+ tempAlignObj.GetPars(t,r);\r
}\r
\r
//-------------------------------------------------------------\r
void AliITSAlignMille2Module::GetGlobalParams(const Double_t* loct, const Double_t* locr, Double_t *t, Double_t *r)\r
{\r
// global parameters of the module after the modification by local loct,locr\r
- fgTempAlignObj.SetTranslation(loct[0],loct[1],loct[2]);\r
- fgTempAlignObj.SetRotation(locr[0],locr[1],locr[2]);\r
- fgTempAlignObj.GetMatrix(*fSensVolModifMatrix); \r
+ AliAlignObjParams tempAlignObj;\r
+ tempAlignObj.SetTranslation(loct[0],loct[1],loct[2]);\r
+ tempAlignObj.SetRotation(locr[0],locr[1],locr[2]);\r
+ tempAlignObj.GetMatrix(*fSensVolModifMatrix); \r
*fSensVolMatrix = *fMatrix;\r
fSensVolMatrix->Multiply(fSensVolModifMatrix);\r
- fgTempAlignObj.SetMatrix(*fSensVolMatrix);\r
- fgTempAlignObj.GetPars(t,r);\r
+ tempAlignObj.SetMatrix(*fSensVolMatrix);\r
+ tempAlignObj.GetPars(t,r);\r
}\r
\r
//-------------------------------------------------------------\r
void AliITSAlignMille2Module::GetLocalParams(const Double_t* glot, const Double_t* glor, Double_t *t, Double_t *r)\r
{\r
// obtain local delta parameters from global delta params\r
- fgTempAlignObj.SetTranslation(glot[0],glot[1],glot[2]);\r
- fgTempAlignObj.SetRotation(glor[0],glor[1],glor[2]);\r
- fgTempAlignObj.GetMatrix(*fSensVolMatrix); \r
+ AliAlignObjParams tempAlignObj;\r
+ tempAlignObj.SetTranslation(glot[0],glot[1],glot[2]);\r
+ tempAlignObj.SetRotation(glor[0],glor[1],glor[2]);\r
+ tempAlignObj.GetMatrix(*fSensVolMatrix); \r
fSensVolMatrix->Multiply( fMatrix );\r
fSensVolMatrix->MultiplyLeft( &fMatrix->Inverse() );\r
- fgTempAlignObj.SetMatrix(*fSensVolMatrix);\r
- fgTempAlignObj.GetPars(t,r);\r
+ tempAlignObj.SetMatrix(*fSensVolMatrix);\r
+ tempAlignObj.GetPars(t,r);\r
}\r