// Author: Anders Vestbo <mailto:vestbo@fi.uib.no>
//*-- Copyright © ASV
-#include <iostream.h>
-#include <math.h>
+
+#include "AliL3StandardIncludes.h"
+
#include "AliL3Logging.h"
#include "AliL3ClustFinderNew.h"
#include "AliL3DigitData.h"
#include "AliL3SpacePointData.h"
#include "AliL3MemHandler.h"
+#if GCCVERSION == 3
+using namespace std;
+#endif
+
+/** \class AliL3ClustFinderNew
+//<pre>
//_____________________________________________________________
// AliL3ClustFinderNew
//
// The current cluster finder for HLT
// Based on STAR L3
+//</pre> */
ClassImp(AliL3ClustFinderNew)
AliL3ClustFinderNew::AliL3ClustFinderNew()
{
- fMatch = 4;
+ fMatch = 2;
fThreshold = 10;
fXYErr = 0.2;
fZErr = 0.3;
//Loop over sequences of this row:
for(UInt_t bin=0; bin<tempPt->fNDigit; bin++)
{
-
AliL3DigitData *data = tempPt->fDigitData;
if(data[bin].fPad != last_pad)
{
//Calculate mean in pad direction:
Int_t pad_mean = seq_charge*data[bin].fPad;
Int_t pad_error = data[bin].fPad*pad_mean;
-
+
//Compare with results on previous pad:
for(UInt_t p=0; p<n_previous; p++)
{
+ //dont merge sequences on the same pad twice
+ if(previousPt[p]->fLastMergedPad==data[bin].fPad) continue;
+
Int_t difference = seq_mean - previousPt[p]->fMean;
- if(difference < -fMatch)
- break;
+ if(difference < -fMatch) break;
if(difference <= fMatch) //There is a match here!!
{
-
ClusterData *local = previousPt[p];
+
if(fDeconvPad)
{
if(seq_charge > local->fLastCharge)
new_cluster = kFALSE;
//Update cluster on current pad with the matching one:
- //currentPt[n_current] = previousPt[p];
-
local->fTotalCharge += seq_charge;
local->fPad += pad_mean;
local->fPad2 += pad_error;
local->fTime2 += seq_error;
local->fMean = seq_mean;
local->fFlags++; //means we have more than one pad
-
+ local->fLastMergedPad = data[bin].fPad;
+
currentPt[n_current] = local;
n_current++;
tmp->fTime2 = seq_error;
tmp->fMean = seq_mean;
tmp->fFlags = 0; //flags for 1 pad clusters
+ tmp->fLastMergedPad = data[bin].fPad;
if(fDeconvPad)
{
tmp->fChargeFalling = 0;
n_total++;
n_current++;
}
+
if(fDeconvTime)
if(new_bin >= 0) goto redo;
-
}//Loop over digits on this padrow
WriteClusters(n_total,clusterlist);
}
if(fstdout==kTRUE)
- cout<<"WriteCluster: padrow "<<fCurrentRow<<" pad "<<fpad << "+-"<<fpad2<<" time "<<ftime<<"+-"<<ftime2<<" charge "<<list[j].fTotalCharge<<endl;
+ cout<<"WriteCluster: padrow "<<fCurrentRow<<" pad "<<fpad << " +- "<<fpad2<<" time "<<ftime<<" +- "<<ftime2<<" charge "<<list[j].fTotalCharge<<endl;
AliL3Transform::Slice2Sector(fCurrentSlice,fCurrentRow,thissector,thisrow);
AliL3Transform::Raw2Local(xyz,thissector,thisrow,fpad,ftime);
fSpacePointData[counter].fTrackID[1] = trackID[1];
fSpacePointData[counter].fTrackID[2] = trackID[2];
#endif
+
fNClusters++;
counter++;
}