// Find clusters produced by large fluctuations of energy deposits
// Largest charge and well separation from neighbors
- Int_t idx[AliTRDseedV1::kNtb];
- TMath::Sort(Int_t(AliTRDseedV1::kNtb), q, idx, kTRUE);
+ Int_t ntb(AliTRDseedV1::kNtb);
+ Int_t idx[ntb+1];
+ TMath::Sort(ntb, q, idx, kTRUE);
Int_t qmax = Int_t(0.3*q[idx[0]]);
mark[0] = kFALSE;
- for(Int_t icl(AliTRDseedV1::kNtb-5); icl<AliTRDseedV1::kNtb; icl++) mark[icl] = kFALSE;
- for(Int_t icl(0); icl<AliTRDseedV1::kNtb; icl++){
+ for(Int_t icl(ntb-5); icl<ntb; icl++) mark[icl] = kFALSE;
+ for(Int_t icl(0); icl<ntb; icl++){
Int_t jcl(idx[icl]);
if(!mark[jcl]) continue;
if(q[jcl-1]>q[jcl] || q[jcl+1]>q[jcl]){
AliErrorGeneral("AliTRDtrackletOflHelper::Segmentation()", "One of the input arrays non initialized.");
return 0;
}
-
+ const Int_t kBuffer = 200;
+ if(n>kBuffer){
+ AliWarningGeneral("AliTRDtrackletOflHelper::Segmentation()", Form("Input array size %d exceed buffer %d. Truncate.", n, kBuffer));
+ n = kBuffer;
+ }
const Double_t kGapSize(0.2); // cm
Int_t ng(0),
nc(0);
- Double_t xx[100], dy;
- Int_t idx[200], jdx[100], kdx[100];
-
+ Double_t xx[kBuffer], dy;
+ Int_t idx[kBuffer+1], jdx[kBuffer], kdx[kBuffer];
TMath::Sort(n, y, idx);
for(Int_t iy(0); iy<n; iy++){
dy = iy>0?(TMath::Abs(y[idx[iy-1]]-y[idx[iy]])):0.;