// Author: Anders Vestbo <mailto:vestbo@fi.uib.no>
//*-- Copyright © ALICE HLT Group
+//_____________________________________________________________
+// AliL3Modeller
+//
+// Class for modeling TPC data.
+//
+// This performs the cluster finding, based on track parameters.
+// Basically it propagates the tracks to all padrows, and looks
+// for a corresponding cluster. For the moment only cog is calculated,
+// and no deconvolution is done.
+
#include "AliL3StandardIncludes.h"
#include "AliL3FileHandler.h"
#endif
-#if __GNUC__ == 3
+#if __GNUC__ >= 3
using namespace std;
#endif
-//_____________________________________________________________
-// AliL3Modeller
-//
-// Class for modeling TPC data.
-//
-// This performs the cluster finding, based on track parameters.
-// Basically it propagates the tracks to all padrows, and looks
-// for a corresponding cluster. For the moment only cog is calculated,
-// and no deconvolution is done.
-
ClassImp(AliL3Modeller)
AliL3Modeller::AliL3Modeller()
{
+ // default constructor
fMemHandler=0;
fTracks=0;
fRow=0;
AliL3Modeller::~AliL3Modeller()
{
+ // destructor
if(fMemHandler)
delete fMemHandler;
if(fTracks)
void AliL3Modeller::Init(Int_t slice,Int_t patch,Char_t *trackdata,Char_t *path,Bool_t houghtracks,Bool_t binary)
{
+ // Initialization
fSlice = slice;
fPatch = patch;
fHoughTracks=houghtracks;
void AliL3Modeller::FindClusters()
{
+ // Finds clusters
if(fDebug)
cout<<"AliL3Modeller::FindClusters : Processing slice "<<fSlice<<" patch "<<fPatch<<endl;
if(!fTracks)
for(pad=minpad; pad<=maxpad; pad++)
{
Int_t ntimes=0;
- for(time=region[pad].mintime; time<=region[pad].maxtime; time++)
+ for(time=region[pad].fMintime; time<=region[pad].fMaxtime; time++)
{
charge = fRow[(AliL3Transform::GetNTimeBins()+1)*pad+time].fCharge;
if(!charge) continue;
//cout<<"Incrementing pad "<<endl;
npads++;
- region[pad].mintime=tmin;
- region[pad].maxtime=tmax;
+ region[pad].fMintime=tmin;
+ region[pad].fMaxtime=tmax;
/*
if(tmin < timemin)
void AliL3Modeller::FillCluster(AliL3ModelTrack *track,Cluster *cluster,Int_t row,Int_t npads)
{
+ // Fill clusters
if(cluster->fCharge==0)
{
track->SetCluster(row,0,0,0,0,0,0);
AliL3DigitRowData *rowPt;
rowPt = (AliL3DigitRowData*)fRowData;
Int_t digitcount=0;
- Int_t ndigits[(AliL3Transform::GetNRows(fPatch))];
+ Int_t *ndigits=new Int_t[(AliL3Transform::GetNRows(fPatch))];
for(Int_t i=AliL3Transform::GetFirstRow(fPatch); i<=AliL3Transform::GetLastRow(fPatch); i++)
{
AliL3DigitData *digPt = (AliL3DigitData*)rowPt->fDigitData;
mem->CloseBinaryOutput();
delete mem;
delete [] data;
+ delete [] ndigits;
}
void AliL3Modeller::RemoveBadTracks()
void AliL3Modeller::CalculateCrossingPoints()
{
+ // calculates crossing points
if(fDebug)
cout<<"Calculating crossing points on "<<fTracks->GetNTracks()<<" tracks"<<endl;
if(!fTracks)
void AliL3Modeller::CalcClusterWidth(Cluster *cl,Float_t &sigmaY2,Float_t &sigmaZ2)
{
-
+ // calculates cluster's width
Float_t padw,timew;
padw = AliL3Transform::GetPadPitchWidth(fPatch);
*/
}
+#ifdef do_mc
void AliL3Modeller::GetTrackID(Int_t pad,Int_t time,Int_t *trackID)
{
-#ifdef do_mc
+ // Gets track ID
AliL3DigitRowData *rowPt = (AliL3DigitRowData*)fRowData;
trackID[0]=trackID[1]=trackID[2]=-2;
}
break;
}
-#endif
+#else
+ void AliL3Modeller::GetTrackID(Int_t /*pad*/,Int_t /*time*/,Int_t */*trackID*/)
+{
+ // Does nothing if do_mc undefined
return;
+#endif
}