case 1:
fHoughTransformer[i] = new AliL3HoughTransformerVhdl(1,i,fNEtaSegments);
fHoughTransformer[i]->CreateHistograms(180,0.1,180,-90,90);
- fHoughTransformer[i]->SetThreshold(3);
+ fHoughTransformer[i]->SetLowerThreshold(3);
break;
default:
fHoughTransformer[i] = new AliL3HoughTransformer(1,i,fNEtaSegments);
fHoughTransformer[i]->CreateHistograms(64,0.1,64,-30,30);
- fHoughTransformer[i]->SetThreshold(3);
+ fHoughTransformer[i]->SetLowerThreshold(3);
}
fEval[i] = new AliL3HoughEval();
{
fMemHandler[i] = new AliL3FileHandler();
if(!fBinary)
- fMemHandler[i]->SetAliInput(fPath);
+ {
+ Char_t filename[100];
+ sprintf(filename,"%s/digitfile",fPath);
+ fMemHandler[i]->SetAliInput(filename);
+ }
}
#else
fMemHandler[i] = new AliL3MemHandler();
void AliL3Hough::ReadData(Int_t slice,Int_t eventnr=0)
{
//Read data from files, binary or root.
-
+
+ fCurrentSlice = slice;
for(Int_t i=0; i<fNPatches; i++)
{
fMemHandler[i]->Free();
else //read data from root file
{
#ifdef use_aliroot
- digits=(AliL3DigitRowData *)fMemHandler[i]->AliDigits2Memory(ndigits,eventnr);
+ digits=(AliL3DigitRowData *)fMemHandler[i]->AliDigits2Memory(ndigits,eventnr);
fMemHandler[i]->FreeDigitsTree();
#else
cerr<<"You cannot read from rootfile now"<<endl;
fPeakFinder->Reset();
fPeakFinder->SetHistogram(hist);
fPeakFinder->FindMaxima(0,0); //Simple maxima finder
- cout<<"Found "<<fPeakFinder->GetEntries()<<endl;
-
+
+ //fPeakFinder->FindAbsMaxima();
for(Int_t k=0; k<fPeakFinder->GetEntries(); k++)
{
if(fPeakFinder->GetWeight(k) == 0) continue;
AliL3HoughTrack *track = (AliL3HoughTrack*)fTracks[i]->NextTrack();
track->SetTrackParameters(fPeakFinder->GetXPeak(k),fPeakFinder->GetYPeak(k),fPeakFinder->GetWeight(k));
track->SetEtaIndex(j);
- track->SetEta((Double_t)((j+0.5)*eta_slice));
+ Double_t eta = (Double_t)((j+0.5)*eta_slice);
+ if(fCurrentSlice > 17) eta*=-1;
+ track->SetEta(eta);
track->SetRowRange(AliL3Transform::GetFirstRow(0),AliL3Transform::GetLastRow(5));
}
}
Int_t fNEtaSegments;
Double_t fEtaMin;
Double_t fEtaMax;
- Int_t fThreshold;
+ Int_t fLowerThreshold;
+ Int_t fUpperThreshold;
AliL3DigitRowData *fDigitRowData; //!
Int_t GetSlice() {return fSlice;}
Int_t GetPatch() {return fPatch;}
Int_t GetNEtaSegments() {return fNEtaSegments;}
- Int_t GetThreshold() {return fThreshold;}
+ Int_t GetLowerThreshold() {return fLowerThreshold;}
+ Int_t GetUpperThreshold() {return fUpperThreshold;}
Double_t GetEtaMin() {return fEtaMin;}
Double_t GetEtaMax() {return fEtaMax;}
virtual AliL3Histogram *GetHistogram(Int_t eta_index) = 0;
//setters
- void SetThreshold(Int_t i) {fThreshold = i;}
+ void SetLowerThreshold(Int_t i) {fLowerThreshold = i;}
+ void SetUpperThreshold(Int_t i) {fUpperThreshold = i;}
ClassDef(AliL3HoughBaseTransformer,1) //Hough transformation base class
UShort_t charge = digPt[j].fCharge;
UChar_t pad = digPt[j].fPad;
UShort_t time = digPt[j].fTime;
- if(charge <= GetThreshold())
+ if((Int_t)charge <= GetLowerThreshold() || (Int_t)charge > GetUpperThreshold())
continue;
Int_t sector,row;
Float_t xyz[3];
UShort_t charge = digPt[j].fCharge;
UChar_t pad = digPt[j].fPad;
UShort_t time = digPt[j].fTime;
- if(charge < GetThreshold())
+ if(charge < GetLowerThreshold())
continue;
Int_t sector,row;
Float_t xyz[3];
UShort_t charge = digPt[j].fCharge;
UChar_t pad = digPt[j].fPad;
UShort_t time = digPt[j].fTime;
- if(charge <= GetThreshold())
+ if((Int_t)charge <= GetLowerThreshold())
continue;
Int_t sector,row;
Float_t xyz[3];
UShort_t charge = digPt[j].fCharge;
UChar_t pad = digPt[j].fPad;
UShort_t time = digPt[j].fTime;
- if(charge < GetThreshold())
+ if((Int_t)charge < GetLowerThreshold())
continue;
Int_t sector,row;
Float_t xyz[3];