X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TRD%2FAliTRDseed.cxx;h=6a77664081e268f8f3d1e31026c5350604859af9;hb=16cca13fba85b012581627ba67c75052e49d646e;hp=6e3ae84176d41efb6e6e3e71af407671708b0b11;hpb=9eb2d46c5315e34ed88eb54aced7241f3a2c928c;p=u%2Fmrichter%2FAliRoot.git diff --git a/TRD/AliTRDseed.cxx b/TRD/AliTRDseed.cxx index 6e3ae84176d..6a77664081e 100644 --- a/TRD/AliTRDseed.cxx +++ b/TRD/AliTRDseed.cxx @@ -280,7 +280,6 @@ void AliTRDseed::Update() const Int_t kClmin = 5; const Float_t kmaxtan = 2; - if (TMath::Abs(fYref[1]) > kmaxtan){ //printf("Exit: Abs(fYref[1]) = %3.3f, kmaxtan = %3.3f\n", TMath::Abs(fYref[1]), kmaxtan); return; // Track inclined too much @@ -304,7 +303,7 @@ void AliTRDseed::Update() Int_t zouts[2*knTimebins]; Float_t allowedz[knTimebins]; // Allowed z for given time bin Float_t yres[knTimebins]; // Residuals from reference - Float_t anglecor = fTilt * fZref[1]; // Correction to the angle + //Float_t anglecor = fTilt * fZref[1]; // Correction to the angle fN = 0; @@ -313,10 +312,9 @@ void AliTRDseed::Update() yres[i] = 10000.0; if (!fClusters[i]) continue; if(!fClusters[i]->IsInChamber()) continue; - //yres[i] = fY[i] - fYref[0] - (fYref[1] + anglecor) * fX[i] - fTilt*(fZ[i] - fZref[0]); // Residual y - yres[i] = fY[i] - (fYref[0] + fX[i] * fYref[1]) - fTilt*(fZ[i] - (fZref[0] + fX[i]*fZref[1])); // Residual y - - //printf("dy[%2d]=%6.2f\n", i, yres[i]); + // Residual y + //yres[i] = fY[i] - fYref[0] - (fYref[1] + anglecor) * fX[i] + fTilt*(fZ[i] - fZref[0]); + yres[i] = fY[i] - fTilt*(fZ[i] - (fZref[0] - fX[i]*fZref[1])); zints[fN] = Int_t(fZ[i]); fN++; } @@ -341,9 +339,12 @@ void AliTRDseed::Update() Int_t cumul[knTimebins][2]; Int_t counts[2] = { 0, 0 }; - // Find the break time allowing one chage on pad-rows - // with maximal number of accepted clusters if (zouts[3] >= 3) { + + // + // Find the break time allowing one chage on pad-rows + // with maximal number of accepted clusters + // fNChange = 1; for (Int_t i = 0; i < AliTRDtrackerV1::GetNTimeBins(); i++) { cumul[i][0] = counts[0]; @@ -353,22 +354,24 @@ void AliTRDseed::Update() } Int_t maxcount = 0; for (Int_t i = 0; i < AliTRDtrackerV1::GetNTimeBins(); i++) { - Int_t after = counts[0]- cumul[i][0]; + Int_t after = cumul[AliTRDtrackerV1::GetNTimeBins()][0] - cumul[i][0]; Int_t before = cumul[i][1]; if (after + before > maxcount) { - maxcount = after + before; - breaktime = i; - mbefore = kFALSE; + maxcount = after + before; + breaktime = i; + mbefore = kFALSE; } - after = counts[1] - cumul[i][1]; + after = cumul[AliTRDtrackerV1::GetNTimeBins()-1][1] - cumul[i][1]; before = cumul[i][0]; if (after + before > maxcount) { - maxcount = after + before; - breaktime = i; - mbefore = kTRUE; + maxcount = after + before; + breaktime = i; + mbefore = kTRUE; } } + breaktime -= 1; + } for (Int_t i = 0; i < AliTRDtrackerV1::GetNTimeBins()+1; i++) { @@ -382,11 +385,12 @@ void AliTRDseed::Update() // Tracklet z-direction not in correspondance with track z direction // fNChange = 0; - // Only longest taken - for (Int_t i = 0; i < AliTRDtrackerV1::GetNTimeBins()+1; i++) allowedz[i] = zouts[0]; + for (Int_t i = 0; i < AliTRDtrackerV1::GetNTimeBins()+1; i++) { + allowedz[i] = zouts[0]; // Only longest taken + } } -/* if (fNChange > 0) { + if (fNChange > 0) { // // Cross pad -row tracklet - take the step change into account // @@ -395,15 +399,14 @@ void AliTRDseed::Update() if(!fClusters[i]->IsInChamber()) continue; if (TMath::Abs(fZ[i] - allowedz[i]) > 2) continue; // Residual y - yres[i] = fY[i] - fYref[0] - (fYref[1] + anglecor) * fX[i] + fTilt*(fZ[i] - fZref[0]); - printf("dy[%2d]=%6.2f\n", i, yres[i]); - if (TMath::Abs(fZ[i] - fZProb) < 2.) continue; - // correction for pad row change - if (fZ[i] > fZProb) yres[i] += fTilt * fPadLength; - if (fZ[i] < fZProb) yres[i] -= fTilt * fPadLength; - printf("z[%7.2f] zp[%7.2f] yres[%6.2f]\n", fZ[i], fZProb, yres[i]); + //yres[i] = fY[i] - fYref[0] - (fYref[1] + anglecor) * fX[i] /*+ fTilt*(fZ[i] - fZref[0])*/; + yres[i] = fY[i] - fTilt*(fZ[i] - (fZref[0] - fX[i]*fZref[1])); +/* if (TMath::Abs(fZ[i] - fZProb) > 2) { + if (fZ[i] > fZProb) yres[i] += fTilt * fPadLength; + if (fZ[i] < fZProb) yres[i] -= fTilt * fPadLength; + }*/ } - }*/ + } Double_t yres2[knTimebins]; Double_t mean; @@ -498,10 +501,10 @@ void AliTRDseed::Update() fZfitR[1] = (sumw * sumwxz - sumwx * sumwz) / det; fZfit[0] = (sumwx2 * sumwz - sumwx * sumwxz) / det; fZfit[1] = (sumw * sumwxz - sumwx * sumwz) / det; - fYfitR[0] += fYref[0] + correction; - fYfitR[1] += fYref[1]; +// fYfitR[0] += fYref[0] + correction; +// fYfitR[1] += fYref[1]; fYfit[0] = fYfitR[0]; - fYfit[1] = fYfitR[1]; + fYfit[1] = -fYfitR[1]; //printf("y0 = %7.3f tgy = %7.3f z0 = %7.3f tgz = %7.3f \n", fYfitR[0], fYfitR[1], fZfitR[0], fZfitR[1]); @@ -635,7 +638,7 @@ Float_t AliTRDseed::FitRiemanTilt(AliTRDseed * cseed, Bool_t terror) if (-params[2]*params[0] + params[1]*params[1] + 1 > 0) { Double_t rm1 = params[0] / TMath::Sqrt(-params[2]*params[0] + params[1]*params[1] + 1); if (1.0/(rm1*rm1) - (x-x0) * (x-x0) > 0.0) { - Double_t res = (x - x0) / TMath::Sqrt(1.0 / (rm1*rm1) - (x-x0)*(x-x0)); + Double_t res = (x - x0) / TMath::Sqrt((1./rm1-(x-x0))*(1./rm1+(x-x0))); if (params[0] < 0) res *= -1.0; dy = res; }