- if (fitType == 1) { // parabolic fit
- fitParam.ResizeTo(6);
- covMatrix.ResizeTo(6,6);
- for (UInt_t irow = 0; irow < GetNrows(); irow++) {
- for (UInt_t ipad = 0; ipad < GetNPads(irow); ipad++) {
- // fill fitterG
- tpcROCinstance->GetPositionLocal(fSector, irow, ipad, localXY); // calculate position localXY by pad and row number
- dlx = centerPad[0] - localXY[0];
- dly = centerPad[1] - localXY[1];
- xx[0] = 1;
- xx[1] = dlx;
- xx[2] = dly;
- xx[3] = dlx*dlx;
- xx[4] = dly*dly;
- xx[5] = dlx*dly;
- if (!ROCoutliers || ROCoutliers->GetValue(irow, ipad) != 1) {
- npoints++;
- fitterG->AddPoint(xx, GetValue(irow, ipad), 1);
- }
- }
- }
- }
- else { // linear fit
- fitParam.ResizeTo(3);
- covMatrix.ResizeTo(3,3);
- for (UInt_t irow = 0; irow < GetNrows(); irow++) {
- for (UInt_t ipad = 0; ipad < GetNPads(irow); ipad++) {
- // fill fitterG
- tpcROCinstance->GetPositionLocal(fSector, irow, ipad, localXY); // calculate position localXY by pad and row number
- dlx = centerPad[0] - localXY[0];
- dly = centerPad[1] - localXY[1];
- xx[0] = 1;
- xx[1] = dlx;
- xx[2] = dly;
- if (!ROCoutliers || ROCoutliers->GetValue(irow, ipad) != 1) {
- npoints++;
- fitterG->AddPoint(xx, GetValue(irow, ipad), 1);
- }
- }
+ for (UInt_t irow = 0; irow < GetNrows(); irow++) {
+ for (UInt_t ipad = 0; ipad < GetNPads(irow); ipad++) {
+ // fill fitterG
+ if (ROCoutliers && ROCoutliers->GetValue(irow, ipad) != 0) continue;
+ tpcROCinstance->GetPositionLocal(fSector, irow, ipad, localXY); // calculate position localXY by pad and row number
+ dlx = localXY[0] - centerPad[0];
+ dly = localXY[1] - centerPad[1];
+ xx[0] = 1;
+ xx[1] = dlx;
+ xx[2] = dly;
+ xx[3] = dlx*dlx;
+ xx[4] = dly*dly;
+ xx[5] = dlx*dly;
+ npoints++;
+ fitterG->AddPoint(xx, GetValue(irow, ipad), err);