- Double_t qTot = clus->GetCharge(0), fmin = clus->GetChi2(0);
- Double_t xreco = clus->GetX(0), yreco = clus->GetY(0), zreco = clus->GetZ(0);
- Double_t sigmax[2] = {0};
-
- Int_t nInX = 1, nInY, maxdig[2] ={-1, -1}, digit, cath1, isec;
- PadsInXandY(nInX, nInY);
-
- // Find pad with maximum signal
- for (Int_t cath = 0; cath < 2; cath++) {
- for (Int_t j = 0; j < clus->GetMultiplicity(cath); j++) {
- cath1 = cath;
- digit = clus->GetIndex(j, cath);
- if (digit < 0) { cath1 = TMath::Even(cath); digit = -digit - 1; } // from the other cathode
-
- if (clus->GetContrib(j,cath) > sigmax[cath1]) {
- sigmax[cath1] = clus->GetContrib(j,cath);
- maxdig[cath1] = digit;
- }
- }
- }
-
- // Size of pad with maximum signal and reco coordinate distance from the pad center
- AliMUONDigit *mdig = 0;
- Double_t wx[2], wy[2], dxc[2], dyc[2];
- Float_t xpad, ypad, zpad;
- Int_t ix, iy;
- for (Int_t cath = 0; cath < 2; cath++) {
- if (maxdig[cath] < 0) continue;
- mdig = fInput->Digit(cath,maxdig[cath]);
- isec = fSegmentation[cath]->Sector(mdig->PadX(), mdig->PadY());
- wx[cath] = fSegmentation[cath]->Dpx(isec);
- wy[cath] = fSegmentation[cath]->Dpy(isec);
- fSegmentation[cath]->GetPadI(xreco, yreco, zreco, ix, iy);
- isec = fSegmentation[cath]->Sector(ix, iy);
- if (isec > 0) {
- fSegmentation[cath]->GetPadC(ix, iy, xpad, ypad, zpad);
- dxc[cath] = xreco - xpad;
- dyc[cath] = yreco - ypad;
- }
- }
-
- // Check if pad with max charge at the edge (number of neughbours)
- Int_t nn, xList[10], yList[10], neighbx[2][2] = {{0,0}, {0,0}}, neighby[2][2]= {{0,0}, {0,0}};
- for (Int_t cath = 0; cath < 2; cath++) {
- if (maxdig[cath] < 0) continue;
- mdig = fInput->Digit(cath,maxdig[cath]);
- fSegmentation[cath]->Neighbours(mdig->PadX(), mdig->PadY(), &nn, xList, yList);
- isec = fSegmentation[cath]->Sector(mdig->PadX(), mdig->PadY());
- /*??
- Float_t sprX = fResponse->SigmaIntegration() * fResponse->ChargeSpreadX();
- Float_t sprY = fResponse->SigmaIntegration() * fResponse->ChargeSpreadY();
- //fSegmentation[cath]->FirstPad(fInput->DetElemId(),muons[ihit][1], muons[ihit][2], muons[ihit][3], sprX, sprY);
- //fSegmentation[cath]->FirstPad(fInput->DetElemId(),xreco, yreco, zreco, sprX, sprY);
- fSegmentation[cath]->FirstPad(xreco, yreco, zreco, sprX, sprY);
- Int_t border = 0;
- //if (fSegmentation[cath]->Sector(fInput->DetElemId(),fSegmentation[cath]->Ix(),fSegmentation[cath]->Iy()) <= 0) {
- if (fSegmentation[cath]->Sector(fSegmentation[cath]->Ix(), fSegmentation[cath]->Iy()) <= 0) {
- //fSegmentation[cath]->NextPad(fInput->DetElemId());
- fSegmentation[cath]->NextPad();
- border = 1;
- }
- */
- for (Int_t j=0; j<nn; j++) {
- //if (border && yList[j] < fSegmentation[cath]->Iy()) continue;
- fSegmentation[cath]->GetPadC(xList[j], yList[j], xpad, ypad, zpad);
- //cout << ch << " " << xList[j] << " " << yList[j] << " " << border << " " << x << " " << y << " " << xpad << " " << ypad << endl;
- if (TMath::Abs(xpad) < 1 && TMath::Abs(ypad) < 1) continue;
- if (xList[j] == mdig->PadX()-1 || mdig->PadX() == 1 &&
- xList[j] == -1) neighbx[cath][0] = 1;
- else if (xList[j] == mdig->PadX()+1 || mdig->PadX() == -1 &&
- xList[j] == 1) neighbx[cath][1] = 1;
- if (yList[j] == mdig->PadY()-1 || mdig->PadY() == 1 &&
- yList[j] == -1) neighby[cath][0] = 1;
- else if (yList[j] == mdig->PadY()+1 || mdig->PadY() == -1 &&
- yList[j] == 1) neighby[cath][1] = 1;
- } // for (Int_t j=0; j<nn;
- if (neighbx[cath][0] && neighbx[cath][1]) neighbx[cath][0] = 0;
- else if (neighbx[cath][1]) neighbx[cath][0] = -1;
- else neighbx[cath][0] = 1;
- if (neighby[cath][0] && neighby[cath][1]) neighby[cath][0] = 0;
- else if (neighby[cath][1]) neighby[cath][0] = -1;
- else neighby[cath][0] = 1;
- }
-
- Int_t iOver = clus->GetClusterType();
- // One-sided cluster
- if (!clus->GetMultiplicity(0)) {
- neighby[0][0] = neighby[1][0];
- wy[0] = wy[1];
- if (iOver < 99) iOver += 100 * iOver;
- dyc[0] = dyc[1];
- } else if (!clus->GetMultiplicity(1)) {
- neighbx[1][0] = neighbx[0][0];
- wx[1] = wx[0];
- if (iOver < 99) iOver += 100 * iOver;
- dxc[1] = dxc[0];
- }
-
- // Apply corrections and evaluate errors
- Double_t errY, errX;
- Errors(nInY, nInX, neighby[0][0],neighbx[1][0], fmin, wy[0]*10, wx[1]*10, iOver,
- dyc[0], dxc[1], qTot, yreco, xreco, errY, errX);
- errY = TMath::Max (errY, 0.01);
- //errY = 0.01;
- //errX = TMath::Max (errX, 0.144);
- clus->SetX(0, xreco); clus->SetY(0, yreco);
- clus->SetErrX(errX); clus->SetErrY(errY);
+ AliWarning("Reimplement me!");
+
+// Double_t qTot = clus->GetCharge(0), fmin = clus->GetChi2(0);
+// Double_t xreco = clus->GetX(0), yreco = clus->GetY(0), zreco = clus->GetZ(0);
+// Double_t sigmax[2] = {0};
+//
+// Int_t nInX = 1, nInY, maxdig[2] ={-1, -1}, digit, cath1, isec;
+// PadsInXandY(nInX, nInY);
+//
+// // Find pad with maximum signal
+// for (Int_t cath = 0; cath < 2; cath++) {
+// for (Int_t j = 0; j < clus->GetMultiplicity(cath); j++) {
+// cath1 = cath;
+// digit = clus->GetIndex(j, cath);
+// if (digit < 0) { cath1 = TMath::Even(cath); digit = -digit - 1; } // from the other cathode
+//
+// if (clus->GetContrib(j,cath) > sigmax[cath1]) {
+// sigmax[cath1] = clus->GetContrib(j,cath);
+// maxdig[cath1] = digit;
+// }
+// }
+// }
+//
+// // Size of pad with maximum signal and reco coordinate distance from the pad center
+// AliMUONVDigit *mdig = 0;
+// Double_t wx[2], wy[2], dxc[2], dyc[2];
+// Float_t xpad, ypad, zpad;
+// Int_t ix, iy;
+// for (Int_t cath = 0; cath < 2; cath++) {
+// if (maxdig[cath] < 0) continue;
+// mdig = fDigitStore->Find(maxdig[cath]);
+// isec = fSegmentation[cath]->Sector(mdig->PadX(), mdig->PadY());
+// wx[cath] = fSegmentation[cath]->Dpx(isec);
+// wy[cath] = fSegmentation[cath]->Dpy(isec);
+// fSegmentation[cath]->GetPadI(xreco, yreco, zreco, ix, iy);
+// isec = fSegmentation[cath]->Sector(ix, iy);
+// if (isec > 0) {
+// fSegmentation[cath]->GetPadC(ix, iy, xpad, ypad, zpad);
+// dxc[cath] = xreco - xpad;
+// dyc[cath] = yreco - ypad;
+// }
+// }
+//
+// // Check if pad with max charge at the edge (number of neughbours)
+// Int_t nn, xList[10], yList[10], neighbx[2][2] = {{0,0}, {0,0}}, neighby[2][2]= {{0,0}, {0,0}};
+// for (Int_t cath = 0; cath < 2; cath++) {
+// if (maxdig[cath] < 0) continue;
+// mdig = fDigitStore->FindObject(maxdig[cath]);
+// fSegmentation[cath]->Neighbours(mdig->PadX(), mdig->PadY(), &nn, xList, yList);
+// isec = fSegmentation[cath]->Sector(mdig->PadX(), mdig->PadY());
+// for (Int_t j=0; j<nn; j++) {
+// fSegmentation[cath]->GetPadC(xList[j], yList[j], xpad, ypad, zpad);
+// if (TMath::Abs(xpad) < 1 && TMath::Abs(ypad) < 1) continue;
+// if (xList[j] == mdig->PadX()-1 || mdig->PadX() == 1 &&
+// xList[j] == -1) neighbx[cath][0] = 1;
+// else if (xList[j] == mdig->PadX()+1 || mdig->PadX() == -1 &&
+// xList[j] == 1) neighbx[cath][1] = 1;
+// if (yList[j] == mdig->PadY()-1 || mdig->PadY() == 1 &&
+// yList[j] == -1) neighby[cath][0] = 1;
+// else if (yList[j] == mdig->PadY()+1 || mdig->PadY() == -1 &&
+// yList[j] == 1) neighby[cath][1] = 1;
+// } // for (Int_t j=0; j<nn;
+// if (neighbx[cath][0] && neighbx[cath][1]) neighbx[cath][0] = 0;
+// else if (neighbx[cath][1]) neighbx[cath][0] = -1;
+// else neighbx[cath][0] = 1;
+// if (neighby[cath][0] && neighby[cath][1]) neighby[cath][0] = 0;
+// else if (neighby[cath][1]) neighby[cath][0] = -1;
+// else neighby[cath][0] = 1;
+// }
+//
+// Int_t iOver = clus->GetClusterType();
+// // One-sided cluster
+// if (!clus->GetMultiplicity(0)) {
+// neighby[0][0] = neighby[1][0];
+// wy[0] = wy[1];
+// if (iOver < 99) iOver += 100 * iOver;
+// dyc[0] = dyc[1];
+// } else if (!clus->GetMultiplicity(1)) {
+// neighbx[1][0] = neighbx[0][0];
+// wx[1] = wx[0];
+// if (iOver < 99) iOver += 100 * iOver;
+// dxc[1] = dxc[0];
+// }
+//
+// // Apply corrections and evaluate errors
+// Double_t errY, errX;
+// Errors(nInY, nInX, neighby[0][0],neighbx[1][0], fmin, wy[0]*10, wx[1]*10, iOver,
+// dyc[0], dxc[1], qTot, yreco, xreco, errY, errX);
+// errY = TMath::Max (errY, 0.01);
+// //errY = 0.01;
+// //errX = TMath::Max (errX, 0.144);
+// clus->SetX(0, xreco); clus->SetY(0, yreco);
+// clus->SetErrX(errX); clus->SetErrY(errY);