// Author: Anders Vestbo <mailto:vestbo@fi.uib.no>
//*-- Copyright © ALICE HLT Group
+/** \class AliL3HoughTransformer
+<pre>
+//_____________________________________________________________
+// AliL3HoughTransformer
+//
+// Hough transformation class
+//
+</pre>
+*/
+
#include "AliL3StandardIncludes.h"
#include "AliL3Logging.h"
#include "AliL3DigitData.h"
#include "AliL3HistogramAdaptive.h"
-#if __GNUC__ == 3
+#if __GNUC__ >= 3
using namespace std;
#endif
-/** \class AliL3HoughTransformer
-<pre>
-//_____________________________________________________________
-// AliL3HoughTransformer
-//
-// Hough transformation class
-//
-</pre>
-*/
-
ClassImp(AliL3HoughTransformer)
AliL3HoughTransformer::AliL3HoughTransformer()
delete fParamSpace[i];
}
delete [] fParamSpace;
+ fParamSpace = 0;
}
void AliL3HoughTransformer::CreateHistograms(Float_t ptmin,Float_t ptmax,Float_t ptres,
{
AliL3Histogram *hist = fParamSpace[0];
Int_t ncells = (hist->GetNbinsX()+2)*(hist->GetNbinsY()+2);
- cout<<"Transformer: Allocating "<<GetNEtaSegments()*ncells*sizeof(TrackIndex)<<" bytes to fTrackID"<<endl;
- fTrackID = new TrackIndex*[GetNEtaSegments()];
+ cout<<"Transformer: Allocating "<<GetNEtaSegments()*ncells*sizeof(AliL3TrackIndex)<<" bytes to fTrackID"<<endl;
+ fTrackID = new AliL3TrackIndex*[GetNEtaSegments()];
for(Int_t i=0; i<GetNEtaSegments(); i++)
- fTrackID[i] = new TrackIndex[ncells];
+ fTrackID[i] = new AliL3TrackIndex[ncells];
}
#endif
}
AliL3Histogram *hist = fParamSpace[0];
Int_t ncells = (hist->GetNbinsX()+2)*(hist->GetNbinsY()+2);
for(Int_t i=0; i<GetNEtaSegments(); i++)
- memset(fTrackID[i],0,ncells*sizeof(TrackIndex));
+ memset(fTrackID[i],0,ncells*sizeof(AliL3TrackIndex));
}
#endif
}
-Int_t AliL3HoughTransformer::GetEtaIndex(Double_t eta)
+Int_t AliL3HoughTransformer::GetEtaIndex(Double_t eta) const
{
//Return the histogram index of the corresponding eta.
return (Int_t)index;
}
-void AliL3HoughTransformer::GetEtaIndexes(Double_t eta,Int_t *indexes)
+void AliL3HoughTransformer::GetEtaIndexes(Double_t eta,Int_t *indexes) const
{
//Return histogram indexes in case of overlapping etaslices.
}
}
-inline AliL3Histogram *AliL3HoughTransformer::GetHistogram(Int_t etaindex)
+AliL3Histogram *AliL3HoughTransformer::GetHistogram(Int_t etaindex)
{
// Return a pointer to the histogram which contains etaindex eta slice
if(!fParamSpace || etaindex >= GetNEtaSegments() || etaindex < 0)
delete [] digits;
}
-Int_t AliL3HoughTransformer::GetTrackID(Int_t etaindex,Double_t kappa,Double_t psi)
+#ifdef do_mc
+Int_t AliL3HoughTransformer::GetTrackID(Int_t etaindex,Double_t kappa,Double_t psi) const
{
// Returns the MC label for a given peak found in the Hough space
if(!fDoMC)
return -1;
}
-#ifdef do_mc
if(etaindex < 0 || etaindex > GetNEtaSegments())
{
cerr<<"AliL3HoughTransformer::GetTrackID : Wrong etaindex "<<etaindex<<endl;
}
//nhits = max;
return label;
-#endif
+#else
+ Int_t AliL3HoughTransformer::GetTrackID(Int_t /*etaindex*/,Double_t /*kappa*/,Double_t /*psi*/) const
+{
+ // Returns the MC label for a given peak found in the Hough space
+ if(!fDoMC)
+ {
+ cerr<<"AliL3HoughTransformer::GetTrackID : Flag switched off"<<endl;
+ return -1;
+ }
+
cout<<"AliL3HoughTransformer::GetTrackID : Compile with do_mc flag!"<<endl;
return -1;
+#endif
}