fCoeffs(npar),
fError(err)
{
+ // create module
for (int i=0;i<npar;i++) {fCoeffs[i] = parcf[i]; if (parcf[i]!=0) SetBit(0x1<<i);}
}
//________________________________________________________________________________________________________
void AliITSAlignMille2ConstrArray::AddModule(AliITSAlignMille2Module* mod, Bool_t needGeom)
{
+ // add module to constraint
int nmd = GetNModules();
// check if its already not there
for (int im=nmd;im--;) {if (mod->GetUniqueID() == (UInt_t)fModuleIDs[im]) return; }
if (mod->GeomParamsGlobal()) {
// the constraint is defined in the module's local frame. If the alignment of geom params is
// done in the global frame, we need to set the real parameter involved
- patt &= (Short_t) 0xffff & (0xffff<< AliITSAlignMille2Module::kMaxParGeom); // reset the geometry parameters
+ for (int i=AliITSAlignMille2Module::kMaxParGeom;i--;) patt &= ~BIT(i); // reset the geometry parameters
for (int i=0;i<AliITSAlignMille2Module::kMaxParGeom;i++) {
if (!IncludesParam(i)) continue;
- for (int j=0;j<AliITSAlignMille2Module::kMaxParGeom;j++) if (jacobian[i][j]!=0) patt |= (0x1<<j);
+ for (int j=0;j<AliITSAlignMille2Module::kMaxParGeom;j++) if (jacobian[i][j]!=0) patt |= BIT(j);
}
}
fModulePatt[nmd] = patt;
//________________________________________________________________________________________________________
void AliITSAlignMille2ConstrArray::Print(Option_t* ) const
{
+ // print data
printf("#%3d Constraint %s of type %d | Value=%+e Error=%+e\n",GetConstraintID(),GetName(),GetType(),GetValue(),GetError());
printf("Weights on params: "); for (int i=0;i<GetNCoeffs();i++) printf("%+.3e ",GetCoeff(i));
printf("\nModules involved: \n");