#include <TMath.h>
-#include "AliL3StandardIncludes.h"
-
-#include "AliESDHLTtrack.h"
#include "AliL3ITStrack.h"
ClassImp(AliL3ITStrack)
//____________________________________________________________________________
AliL3ITStrack::AliL3ITStrack()
- :AliITStrackV2(),fESDHLTtrack(0)
+ :AliITStrackV2()
{
//------------------------------------------------------------------
//Constructor
}
//____________________________________________________________________________
-AliL3ITStrack::AliL3ITStrack(const AliL3ITStrack& t)
- : AliITStrackV2(t), fESDHLTtrack(0)
+AliL3ITStrack::AliL3ITStrack(AliESDtrack& t)
+ :AliITStrackV2(t)
{
//------------------------------------------------------------------
- //Copy constructor
+ //Constructor
//------------------------------------------------------------------
- fESDHLTtrack=t.fESDHLTtrack;
}
//____________________________________________________________________________
-AliL3ITStrack::AliL3ITStrack(AliESDHLTtrack& t, Double_t zvertex) throw (const Char_t *)
- : AliITStrackV2(), fESDHLTtrack(0)
-{
- // The method constructs an AliL3ITStrack object from an ESD HLT track
-
- fESDHLTtrack=&t;
- Set(t,zvertex);
-}
-
-//____________________________________________________________________________
-AliL3ITStrack::AliL3ITStrack(const AliESDHLTtrack& t, Double_t zvertex) throw (const Char_t *)
- : AliITStrackV2(), fESDHLTtrack(0)
+AliL3ITStrack::AliL3ITStrack(const AliL3ITStrack& t)
+ : AliITStrackV2(t)
{
- // The method constructs an AliL3ITStrack object from an ESD HLT track
- Set(t,zvertex);
-}
-
-//____________________________________________________________________________
-void AliL3ITStrack::Set(const AliESDHLTtrack& t, Double_t zvertex) throw (const Char_t *) {
- // The method constructs an AliL3ITStrack object from an ESD HLT track
-
- SetChi2(0.);
- if(t.GetNHits()==1)
- SetNumberOfClusters(0);
- else
- SetNumberOfClusters(t.GetNHits());
- SetLabel(t.GetMCid());
- SetMass(0.13957);
-
- fdEdx=0;
- fAlpha = fmod((t.GetSector()+0.5)*(2*TMath::Pi()/18),2*TMath::Pi());
- if (fAlpha < -TMath::Pi()) fAlpha += 2*TMath::Pi();
- else if (fAlpha >= TMath::Pi()) fAlpha -= 2*TMath::Pi();
-
- //First the emiision angle
- Double_t psi = t.GetPsi()-(t.GetSector()+0.5)*(2*TMath::Pi()/18);
-
- //Then local x,y coordinates
- Double_t radius = t.GetPt()*GetConvConst();
- Double_t xhit = 82.97; //Position at first TPC padrow
- Double_t trackphi0 = psi + (-t.GetCharge())*TMath::Pi()/2;
- Double_t x0 = t.GetFirstPointX()*TMath::Cos(fAlpha) + t.GetFirstPointY()*TMath::Sin(fAlpha);
- Double_t y0 = t.GetFirstPointY()*TMath::Cos(fAlpha) - t.GetFirstPointX()*TMath::Sin(fAlpha);
- Double_t centerx = radius * cos(trackphi0) + x0;
- Double_t centery = radius * sin(trackphi0) + y0;
- Double_t aa = (xhit - centerx)*(xhit - centerx);
- Double_t r2 = radius*radius;
- if(aa > r2) throw "AliITStrackV2: conversion failed !\n";
- Double_t aa2 = sqrt(r2 - aa);
- Double_t y1 = centery + aa2;
- Double_t y2 = centery - aa2;
- Double_t yhit = y1;
- if(fabs(y2) < fabs(y1)) yhit = y2;
-
- //Local z coordinate
- Double_t angle1 = atan2((yhit - centery),(xhit - centerx));
- if(angle1 < 0) angle1 += 2.*TMath::Pi();
- Double_t angle2 = atan2((x0-centery),(y0-centerx));
- if(angle2 < 0) angle2 += 2.*TMath::Pi();
- Double_t diffangle = angle1 - angle2;
- diffangle = fmod(diffangle,2.*TMath::Pi());
- if(((-t.GetCharge())*diffangle) < 0) diffangle = diffangle - (-t.GetCharge())*2.*TMath::Pi();
- Double_t stot = fabs(diffangle)*radius;
- Double_t zhit;
- if(t.GetNHits()==1)
- zhit = zvertex + stot*t.GetTgl();
- else
- zhit = t.GetFirstPointZ() + stot*t.GetTgl();
-
- //Local sine of track azimuthal angle
- if((-t.GetCharge())<0)
- radius = -radius;
- Double_t sinbeta = -1.*(centerx - xhit)/radius;
-
- //Filling of the track paramaters
- fX=xhit;
- fP0=yhit;
- fP1=zhit;
- fP2=sinbeta;
- fP3=t.GetTgl();
- fP4=1./radius;
-
- //and covariance matrix
- fC22=0.005*0.005;
- fC33=0.005*0.005;
- fC00=fC22*82.97*82.97;
- fC11=fC33*82.97*82.97;
- // fC44=(0.005+0.025*t.GetPt())*(0.005+0.025*t.GetPt())*fP4*fP4;
- // fC44=(0.01+0.01*t.GetPt())*(0.01+0.01*t.GetPt())*fP4*fP4;
- fC44=0.01*0.01*fP4*fP4;
-
- fC10=0;
- fC20=0; fC21=0;
- fC30=0; fC31=0; fC32=0;
- fC40=0; fC41=0; fC42=0; fC43=0;
-
- fESDtrack=0;
-
- SetFakeRatio(0.);
+ //------------------------------------------------------------------
+ //Copy constructor
+ //------------------------------------------------------------------
}
//_____________________________________________________________________________
#include <AliITStrackV2.h>
-class AliESDHLTtrack;
-
class AliL3ITStrack : public AliITStrackV2 {
public:
AliL3ITStrack();
+ AliL3ITStrack(AliESDtrack& t);
AliL3ITStrack(const AliL3ITStrack& t);
- AliL3ITStrack(AliESDHLTtrack& t, Double_t zvertex) throw (const Char_t *);
- AliL3ITStrack(const AliESDHLTtrack& t, Double_t zvertex) throw (const Char_t *);
Int_t Compare(const TObject *o) const;
- // Set and get the pointer to the HLT ESD track
- AliESDHLTtrack *GetESDHLTtrack() const {return fESDHLTtrack; }
- void SetESDHLTtrack(AliESDHLTtrack *esdhlttrack) { fESDHLTtrack = esdhlttrack; }
Bool_t GetPxPyPzAt(Double_t x,Double_t *p) const;
-protected:
- void Set(const AliESDHLTtrack& t, Double_t zvertex) throw (const Char_t *);
-
- AliESDHLTtrack *fESDHLTtrack; //! pointer to the connected ESD HLT track
-
- ClassDef(AliL3ITStrack,1) //HLT ITS reconstructed track
+ ClassDef(AliL3ITStrack,2) //HLT ITS reconstructed track
};
#endif
{/* Read HLT ESD tracks */
Int_t nentr;
- nentr=event->GetNumberOfHLTHoughTracks();
+ nentr=event->GetNumberOfTracks();
Info("Clusters2Tracks", "Number of ESD HLT tracks: %d\n", nentr);
while (nentr--) {
- AliESDHLTtrack *esd=event->GetHLTHoughTrack(nentr);
- if (esd->GetWeight() > 500) continue;
+ AliESDtrack *esd=event->GetTrack(nentr);
AliL3ITStrack *t=0;
try {
- t=new AliL3ITStrack(*esd,GetZ());
+ t=new AliL3ITStrack(*esd);
} catch (const Char_t *msg) {
Warning("Clusters2Tracks",msg);
delete t;
for (fPass=0; fPass<2; fPass++) {
Int_t &constraint=fConstraint[fPass]; if (constraint<0) continue;
for (Int_t i=0; i<nentr; i++) {
- // Info("Clusters2Tracks"," %d ",i);
AliL3ITStrack *t=(AliL3ITStrack*)itsTracks.UncheckedAt(i);
if (t==0) continue; //this track has been already tracked
Int_t tpcLabel=t->GetLabel(); //save the TPC track label
- // Info("Clusters2Tracks","Pt:%f",1/t->Get1Pt());
ResetTrackToFollow(*t);
ResetBestTrack();
fBestTrack.SetLabel(tpcLabel);
fBestTrack.CookdEdx();
CookLabel(&fBestTrack,0.); //For comparison only
- // Specific to the AliL3ITStracker
- // fBestTrack.UpdateESDtrack(AliESDtrack::kITSin);
- t->GetESDHLTtrack()->UpdateTrackParams(&fBestTrack);
- //
+ fBestTrack.UpdateESDtrack(AliESDtrack::kITSin);
UseClusters(&fBestTrack);
delete itsTracks.RemoveAt(i);
ntrk++;
//--------------------------------------------------------------------
// This functions propagates reconstructed ITS tracks back
//--------------------------------------------------------------------
- Int_t nentr=event->GetNumberOfHLTHoughTracks();
- Info("PropagateBack", "Number of HLT ESD tracks: %d\n", nentr);
-
- Int_t ntrk=0;
- for (Int_t i=0; i<nentr; i++) {
- AliESDHLTtrack *esd=event->GetHLTHoughTrack(i);
- if (esd->GetWeight() > 500) continue;
-
- AliL3ITStrack *t=0;
- try {
- t=new AliL3ITStrack(*esd,GetZ());
- } catch (const Char_t *msg) {
- Warning("PropagateBack",msg);
- delete t;
- continue;
- }
-
- ResetTrackToFollow(*t);
-
- // propagete to vertex [SR, GSI 17.02.2003]
- // Start Time measurement [SR, GSI 17.02.2003], corrected by I.Belikov
- if (fTrackToFollow.PropagateTo(3.,0.0028,65.19)) {
- if (fTrackToFollow.PropagateToVertex()) {
- fTrackToFollow.StartTimeIntegral();
- }
- fTrackToFollow.PropagateTo(3.,-0.0028,65.19);
- }
-
- fTrackToFollow.ResetCovariance(); fTrackToFollow.ResetClusters();
- if (RefitAt(49.,&fTrackToFollow,t)) {
- if (CorrectForDeadZoneMaterial(&fTrackToFollow)!=0) {
- Warning("PropagateBack",
- "failed to correct for the material in the dead zone !\n");
- delete t;
- continue;
- }
- fTrackToFollow.SetLabel(t->GetLabel());
- //fTrackToFollow.CookdEdx();
- CookLabel(&fTrackToFollow,0.); //For comparison only
- // cout<<" Backtrack "<<fTrackToFollow.GetLabel()<<" "<<fTrackToFollow.GetNumberOfClusters()<<" "<<fTrackToFollow.fFakeRatio<<endl;
- fTrackToFollow.UpdateESDtrack(AliESDtrack::kITSout);
- //UseClusters(&fTrackToFollow);
- ntrk++;
- }
- delete t;
- }
-
- Info("PropagateBack","Number of back propagated HLT ITS tracks: %d\n",ntrk);
-
+ Int_t nentr=event->GetNumberOfTracks();
+ Info("PropagateBack", "The method is not yet implemented! %d\n", nentr);
return 0;
}
// "inward propagated" TPC tracks
//--------------------------------------------------------------------
- Int_t nentr=event->GetNumberOfHLTHoughTracks();
+ Int_t nentr=event->GetNumberOfTracks();
Info("RefitInward", "The method is not yet implemented! %d",nentr);
return 0;
}
#include "AliL3TrackArray.h"
#include "AliL3HoughTrack.h"
#include "AliL3DDLDataFileHandler.h"
+#include "AliL3HoughKalmanTrack.h"
#include "TThread.h"
for(Int_t i=0; i<npatches; i++)
{
AliL3HoughBaseTransformer *tr = fHoughTransformer[i];
+ AliL3Histogram *h = tr->GetHistogram(0);
+ Float_t deltax = h->GetBinWidthX()*AliL3HoughTransformerRow::GetDAlpha();
+ Float_t deltay = h->GetBinWidthY()*AliL3HoughTransformerRow::GetDAlpha();
+ Float_t deltaeta = (tr->GetEtaMax()-tr->GetEtaMin())/tr->GetNEtaSegments()*AliL3HoughTransformerRow::GetDEta();
+ Float_t zvertex = tr->GetZVertex();
fTracks[i]->Reset();
fPeakFinder->Reset();
#endif
fPeakFinder->SetThreshold(fPeakThreshold[i]);
fPeakFinder->FindAdaptedRowPeaks(1,0,0);//Maxima finder for HoughTransformerRow
-
- //fPeakFinder->FindMaxima(fPeakThreshold[i]); //Simple maxima finder
}
for(Int_t k=0; k<fPeakFinder->GetEntries(); k++)
{
// if(fPeakFinder->GetWeight(k) < 0) continue;
AliL3HoughTrack *track = (AliL3HoughTrack*)fTracks[i]->NextTrack();
- Float_t psi = atan((fPeakFinder->GetXPeak(k)-fPeakFinder->GetYPeak(k))/(AliL3HoughTransformerRow::GetBeta1()-AliL3HoughTransformerRow::GetBeta2()));
- Float_t kappa = 2.0*(fPeakFinder->GetXPeak(k)*cos(psi)-AliL3HoughTransformerRow::GetBeta1()*sin(psi));
- // track->SetTrackParameters(fPeakFinder->GetXPeak(k),fPeakFinder->GetYPeak(k),fPeakFinder->GetWeight(k));
- track->SetTrackParameters(kappa,psi,fPeakFinder->GetWeight(k));
+ Double_t starteta = tr->GetEta(fPeakFinder->GetStartEta(k),fCurrentSlice);
+ Double_t endeta = tr->GetEta(fPeakFinder->GetEndEta(k),fCurrentSlice);
+ Double_t eta = (starteta+endeta)/2.0;
+ track->SetTrackParametersRow(fPeakFinder->GetXPeak(k),fPeakFinder->GetYPeak(k),eta,fPeakFinder->GetWeight(k));
+ track->SetPterr(deltax); track->SetPsierr(deltay); track->SetTglerr(deltaeta);
track->SetBinXY(fPeakFinder->GetXPeak(k),fPeakFinder->GetYPeak(k),fPeakFinder->GetXPeakSize(k),fPeakFinder->GetYPeakSize(k));
+ track->SetZ0(zvertex);
Int_t etaindex = (fPeakFinder->GetStartEta(k)+fPeakFinder->GetEndEta(k))/2;
track->SetEtaIndex(etaindex);
- Float_t starteta = tr->GetEta(fPeakFinder->GetStartEta(k),fCurrentSlice);
- Float_t endeta = tr->GetEta(fPeakFinder->GetEndEta(k),fCurrentSlice);
- track->SetEta((starteta+endeta)/2.0);
- track->SetRowRange(AliL3Transform::GetFirstRow(0),AliL3Transform::GetLastRow(5));
+ Int_t rows[2];
+ ((AliL3HoughTransformerRow *)tr)->GetTrackLength(fPeakFinder->GetXPeak(k),fPeakFinder->GetYPeak(k),rows);
+ track->SetRowRange(rows[0],rows[1]);
track->SetSector(fCurrentSlice);
track->SetSlice(fCurrentSlice);
#ifdef do_mc
Int_t label = tr->GetTrackID(etaindex,fPeakFinder->GetXPeak(k),fPeakFinder->GetYPeak(k));
track->SetMCid(label);
- // cout<<"Track found with label "<<label<<" at "<<fPeakFinder->GetXPeak(k)<<" "<<fPeakFinder->GetYPeak(k)<<" with weight "<<fPeakFinder->GetWeight(k)<<endl;
#endif
}
LOG(AliL3Log::kInformational,"AliL3Hough::FindTrackCandidates()","")
AliL3HoughTrack *tpt = (AliL3HoughTrack *)fGlobalTracks->GetCheckedTrack(i);
if(!tpt) continue;
- AliESDHLTtrack *esdtrack = new AliESDHLTtrack();
-
- esdtrack->SetRowRange(tpt->GetFirstRow(),tpt->GetLastRow());
- esdtrack->SetNHits(tpt->GetNHits());
- esdtrack->SetFirstPoint(tpt->GetFirstPointX(),tpt->GetFirstPointY(),tpt->GetFirstPointZ());
- esdtrack->SetLastPoint(tpt->GetLastPointX(),tpt->GetLastPointY(),tpt->GetLastPointZ());
- esdtrack->SetPt(tpt->GetPt());
- esdtrack->SetPsi(tpt->GetPsi());
- esdtrack->SetTgl(tpt->GetTgl());
- esdtrack->SetCharge(tpt->GetCharge());
- esdtrack->SetMCid(tpt->GetMCid());
- esdtrack->SetWeight(tpt->GetWeight());
- esdtrack->SetSector(tpt->GetSector());
- esdtrack->SetBinXY(tpt->GetBinX(),tpt->GetBinY(),tpt->GetSizeX(),tpt->GetSizeY());
- esdtrack->SetPID(tpt->GetPID());
- esdtrack->ComesFromMainVertex(tpt->ComesFromMainVertex());
-
- esd->AddHLTHoughTrack(esdtrack);
+ if(tpt->GetWeight()<0) continue;
+ AliL3HoughKalmanTrack *tpctrack = new AliL3HoughKalmanTrack(*tpt);
+ if(!tpctrack) continue;
+ AliESDtrack *esdtrack2 = new AliESDtrack() ;
+ esdtrack2->UpdateTrackParams(tpctrack,AliESDtrack::kTPCin);
+ esd->AddTrack(esdtrack2);
nglobaltracks++;
- delete esdtrack;
+ delete esdtrack2;
+ delete tpctrack;
}
return nglobaltracks;
}
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+//-------------------------------------------------------------------------
+// Implementation of the HLT TPC Hough Kalman track class
+//
+// Origin: Cvetan Cheshkov, CERN, Cvetan.Cheshkov@cern.ch
+//-------------------------------------------------------------------------
+
+#include "AliL3HoughKalmanTrack.h"
+
+#include "AliL3StandardIncludes.h"
+#include "AliL3HoughTrack.h"
+#include "AliL3HoughBaseTransformer.h"
+#include "AliL3HoughTransformerRow.h"
+#include "AliL3Histogram.h"
+
+Int_t CalcExternalParams(const AliL3HoughTrack& t, Double_t deltax, Double_t deltay, Double_t deltaeta, const Double_t zvertex, const Double_t xhit, Double_t xx[5]);
+
+ClassImp(AliL3HoughKalmanTrack)
+
+//____________________________________________________________________________
+AliL3HoughKalmanTrack::AliL3HoughKalmanTrack(const AliL3HoughTrack& t) throw (const Char_t *)
+ : AliTPCtrack()
+{
+ // The method constructs an AliL3HoughKalmanTrack object
+ // from an HLT Hough track
+
+ SetChi2(0.);
+ SetNumberOfClusters(t.GetLastRow()-t.GetFirstRow());
+ SetLabel(t.GetMCid());
+ SetFakeRatio(0.);
+ SetMass(0.13957);
+
+ fdEdx=0;
+ fAlpha = fmod((t.GetSector()+0.5)*(2*TMath::Pi()/18),2*TMath::Pi());
+ if (fAlpha < -TMath::Pi()) fAlpha += 2*TMath::Pi();
+ else if (fAlpha >= TMath::Pi()) fAlpha -= 2*TMath::Pi();
+
+ const Double_t xhit = 82.97;
+ const Double_t zvertex = t.GetFirstPointZ();
+ Double_t xx[5];
+ Double_t deltax = t.GetPterr();
+ Double_t deltay = t.GetPsierr();
+ Double_t deltaeta = t.GetTglerr();
+ if(CalcExternalParams(t,0,0,0,zvertex,xhit,xx)==0) throw "AliL3HoughKalmanTrack: conversion failed !\n";
+
+ //Filling of the track paramaters
+ fX=xhit;
+ fP0=xx[0];
+ fP1=xx[1];
+ fP2=xx[2];
+ fP3=xx[3];
+ fP4=xx[4];
+
+ //and covariance matrix
+ //For the moment estimate the covariance matrix numerically
+ Double_t xx1[5];
+ if(CalcExternalParams(t,deltax,0,0,zvertex,xhit,xx1)==0) throw "AliL3HoughKalmanTrack: conversion failed !\n";
+ Double_t xx2[5];
+ if(CalcExternalParams(t,0,deltay,0,zvertex,xhit,xx2)==0) throw "AliL3HoughKalmanTrack: conversion failed !\n";
+ Double_t xx3[5];
+ if(CalcExternalParams(t,0,0,deltaeta,zvertex,xhit,xx3)==0) throw "AliL3HoughKalmanTrack: conversion failed !\n";
+
+ Double_t dx1[5],dx2[5],dx3[5];
+ for(Int_t i=0;i<5;i++) {
+ dx1[i]=xx1[i]-xx[i];
+ dx2[i]=xx2[i]-xx[i];
+ dx3[i]=xx3[i]-xx[i];
+ }
+
+ fC00=dx1[0]*dx1[0]+dx2[0]*dx2[0];
+ fC22=dx1[2]*dx1[2]+dx2[2]*dx2[2];
+ fC44=dx1[4]*dx1[4]+dx2[4]*dx2[4];
+ fC20=dx1[2]*dx1[0]+dx2[2]*dx2[0];
+ fC40=dx1[4]*dx1[0]+dx2[4]*dx2[0];
+ fC42=dx1[4]*dx1[2]+dx2[4]*dx2[2];
+ fC33=dx3[3]*dx3[3];
+ fC11=dx3[1]*dx3[1];
+ fC31=dx3[3]*dx3[1];
+ fC10=fC30=fC21=fC41=fC32=fC43=0;
+ fC20=fC42=fC40=0;
+
+}
+
+//____________________________________________________________________________
+Int_t CalcExternalParams(const AliL3HoughTrack& t, Double_t deltax, Double_t deltay, Double_t deltaeta, const Double_t zvertex, const Double_t xhit, Double_t xx[5])
+{
+ // Translate the parameters of the Hough tracks into
+ // AliKalmanTrack paramters
+
+ //First get the emiision angle and track curvature
+ Double_t binx = t.GetBinX()+deltax;
+ Double_t biny = t.GetBinY()+deltay;
+ Double_t psi = atan((binx-biny)/(AliL3HoughTransformerRow::GetBeta1()-AliL3HoughTransformerRow::GetBeta2()));
+ Double_t kappa = 2.0*(binx*cos(psi)-AliL3HoughTransformerRow::GetBeta1()*sin(psi));
+ Double_t radius = 1./kappa;
+
+ //Local y coordinate
+ Double_t centerx = -1.*radius*sin(psi);
+ Double_t centery = radius*cos(psi);
+ Double_t aa = (xhit - centerx)*(xhit - centerx);
+ Double_t r2 = radius*radius;
+ if(aa > r2) return 0;
+ Double_t aa2 = sqrt(r2 - aa);
+ Double_t y1 = centery + aa2;
+ Double_t y2 = centery - aa2;
+ Double_t yhit = y1;
+ if(fabs(y2) < fabs(y1)) yhit = y2;
+
+ //Local z coordinate
+ Double_t stot = sqrt(xhit*xhit+yhit*yhit);
+ Double_t zhit;
+
+ //Lambda
+ Double_t eta=t.GetPseudoRapidity()+deltaeta;
+ Double_t theta = 2*atan(exp(-1.*eta));
+ Double_t tanl = 1./tan(theta);
+ zhit = zvertex + stot*tanl;
+
+ //Local sine of track azimuthal angle
+ Double_t sinbeta = centerx/radius;
+
+ xx[0] = yhit;
+ xx[1] = zhit;
+ xx[2] = sinbeta;
+ xx[3] = tanl;
+ xx[4] = kappa;
+ return 1;
+}
--- /dev/null
+#ifndef ALIL3HOUGHKALMANTRACK_H
+#define ALIL3HOUGHKALMANTRACK_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+//-------------------------------------------------------------------------
+// High Level Trigger TPC Hough Kalman Track Class
+//
+// Origin: Cvetan Cheshkov, CERN, Cvetan.Cheshkov@cern.ch
+//-------------------------------------------------------------------------
+
+
+/*****************************************************************************
+ * October 11, 2004 *
+ * The class inherits from the off-line AliTPCtrack class. *
+ * It is used to transform AliL3HoughTrack into AliTPCTrack, which is *
+ * then stored as AliESDtrack object in the ESD *
+ *****************************************************************************/
+
+#include <AliTPCtrack.h>
+
+class AliL3HoughTrack;
+class AliL3HoughBaseTransformer;
+
+class AliL3HoughKalmanTrack : public AliTPCtrack {
+public:
+ AliL3HoughKalmanTrack(const AliL3HoughTrack& t) throw (const Char_t *);
+
+ ClassDef(AliL3HoughKalmanTrack,1) //HLT TPC Hough track
+};
+
+#endif
#pragma link C++ class AliL3HoughTransformerRow;
#ifndef macosx
#pragma link C++ class AliL3HoughTrack;
+#pragma link C++ class AliL3HoughKalmanTrack;
#endif
#pragma link C++ class AliL3HoughMaxFinder;
#pragma link C++ class AliL3HoughEval;
#include "AliL3Track.h"
#include "AliL3HoughTrack.h"
#include "AliL3Transform.h"
+#include "AliL3HoughTransformerRow.h"
#if __GNUC__ == 3
using namespace std;
SetEta(tpt->GetEta());
SetTgl(tpt->GetTgl());
SetPsi(tpt->GetPsi());
+ SetPterr(tpt->GetPterr());
+ SetTglerr(tpt->GetTglerr());
+ SetPsierr(tpt->GetPsierr());
SetCenterX(tpt->GetCenterX());
SetCenterY(tpt->GetCenterY());
SetFirstPoint(tpt->GetFirstPointX(),tpt->GetFirstPointY(),tpt->GetFirstPointZ());
fIsHelix = true;
}
+void AliL3HoughTrack::SetTrackParametersRow(Double_t alpha1,Double_t alpha2,Double_t eta,Int_t weight)
+{
+ //Set track parameters for HoughTransformerRow
+ //This includes curvature,emission angle and eta
+ Double_t psi = atan((alpha1-alpha2)/(AliL3HoughTransformerRow::GetBeta1()-AliL3HoughTransformerRow::GetBeta2()));
+ Double_t kappa = 2.0*(alpha1*cos(psi)-AliL3HoughTransformerRow::GetBeta1()*sin(psi));
+ SetTrackParameters(kappa,psi,weight);
+
+ Double_t zovr;
+ Double_t etaparam1 = AliL3HoughTransformerRow::GetEtaCalcParam1();
+ Double_t etaparam2 = AliL3HoughTransformerRow::GetEtaCalcParam2();
+ if(eta>0)
+ zovr = (etaparam1 - sqrt(etaparam1*etaparam1 - 4.*etaparam2*eta))/(2.*etaparam2);
+ else
+ zovr = -1.*(etaparam1 - sqrt(etaparam1*etaparam1 + 4.*etaparam2*eta))/(2.*etaparam2);
+ Double_t r = sqrt(1.+zovr*zovr);
+ Double_t exacteta = 0.5*log((1+zovr/r)/(1-zovr/r));
+ SetEta(exacteta);
+}
+
void AliL3HoughTrack::SetLineParameters(Double_t psi,Double_t D,Int_t weight,Int_t *rowrange,Int_t /*ref_row*/)
{
//Initialize a track piece, not yet a track
Bool_t IsHelix() const {return fIsHelix;}
void UpdateToFirstRow();
void SetTrackParameters(Double_t kappa,Double_t eangle,Int_t weight);
+ void SetTrackParametersRow(Double_t alpha1,Double_t alpha2,Double_t eta,Int_t weight);
void SetLineParameters(Double_t psi,Double_t D,Int_t weight,Int_t *rowrange,Int_t refrow);
Int_t GetWeight() const {return fWeight;}
Float_t AliL3HoughTransformerRow::fgBeta1 = 1.0/AliL3Transform::Row2X(84);
Float_t AliL3HoughTransformerRow::fgBeta2 = 1.0/(AliL3Transform::Row2X(158)*(1.0+tan(AliL3Transform::Pi()*10/180)*tan(AliL3Transform::Pi()*10/180)));
+Float_t AliL3HoughTransformerRow::fgDAlpha = 0.22;
+Float_t AliL3HoughTransformerRow::fgDEta = 0.40;
+Double_t AliL3HoughTransformerRow::fgEtaCalcParam1 = 1.0289;
+Double_t AliL3HoughTransformerRow::fgEtaCalcParam2 = 0.15192;
+Double_t AliL3HoughTransformerRow::fgEtaCalcParam3 = 1./(32.*600.*600.);
AliL3HoughTransformerRow::AliL3HoughTransformerRow()
{
fStartPadParams = 0;
fEndPadParams = 0;
- fLUTr2 = 0;
+ fLUTr = 0;
fLUTforwardZ = 0;
- fLUTforwardZ2 = 0;
fLUTbackwardZ = 0;
- fLUTbackwardZ2 = 0;
}
fStartPadParams = 0;
fEndPadParams = 0;
- fLUTr2 = 0;
+ fLUTr = 0;
fLUTforwardZ = 0;
- fLUTforwardZ2 = 0;
fLUTbackwardZ = 0;
- fLUTbackwardZ2 = 0;
}
delete [] fEndPadParams;
fEndPadParams = 0;
}
- if(fLUTr2)
+ if(fLUTr)
{
for(Int_t i = AliL3Transform::GetFirstRow(0); i<=AliL3Transform::GetLastRow(5); i++)
{
- if(!fLUTr2[i]) continue;
- delete [] fLUTr2[i];
+ if(!fLUTr[i]) continue;
+ delete [] fLUTr[i];
}
- delete [] fLUTr2;
- fLUTr2 = 0;
+ delete [] fLUTr;
+ fLUTr = 0;
}
if(fLUTforwardZ)
{
delete[] fLUTforwardZ;
fLUTforwardZ=0;
}
- if(fLUTforwardZ2)
- {
- delete[] fLUTforwardZ2;
- fLUTforwardZ2=0;
- }
if(fLUTbackwardZ)
{
delete[] fLUTbackwardZ;
fLUTbackwardZ=0;
}
- if(fLUTbackwardZ2)
- {
- delete[] fLUTbackwardZ2;
- fLUTbackwardZ2=0;
- }
}
void AliL3HoughTransformerRow::DeleteHistograms()
if((maxlastrow-maxfirstrow) < fTrackNRows[xbin + ybin*nxbins]) {
fTrackNRows[xbin + ybin*nxbins] = maxlastrow-maxfirstrow;
fInitialGapCount[xbin + ybin*nxbins] = 1;
- if((maxlastrow-maxfirstrow+1)<MIN_TRACK_LENGTH)
- fInitialGapCount[xbin + ybin*nxbins] = MAX_N_GAPS+1;
+ if((maxlastrow-maxfirstrow+1)<MIN_TRACK_LENGTH)
+ fInitialGapCount[xbin + ybin*nxbins] = MAX_N_GAPS+1;
if(maxtrackpt < 0.9*0.1*AliL3Transform::GetSolenoidField())
fInitialGapCount[xbin + ybin*nxbins] = MAX_N_GAPS;
fTrackFirstRow[xbin + ybin*nxbins] = maxfirstrow;
<<"Transformer: Allocating about "<<nrows*100*sizeof(AliL3PadHoughParams)<<" bytes to fEndPadParams"<<ENDLOG;
fEndPadParams = new AliL3PadHoughParams*[nrows];
LOG(AliL3Log::kInformational,"AliL3HoughTransformerRow::CreateHistograms()","")
- <<"Transformer: Allocating about "<<nrows*100*sizeof(Float_t)<<" bytes to fLUTr2"<<ENDLOG;
- fLUTr2 = new Float_t*[nrows];
+ <<"Transformer: Allocating about "<<nrows*100*sizeof(Float_t)<<" bytes to fLUTr"<<ENDLOG;
+ fLUTr = new Float_t*[nrows];
Float_t beta1 = fgBeta1;
Float_t beta2 = fgBeta2;
fStartPadParams[i] = new AliL3PadHoughParams[npads];
fEndPadParams[i] = new AliL3PadHoughParams[npads];
- fLUTr2[i] = new Float_t[npads];
+ fLUTr[i] = new Float_t[npads];
for(Int_t pad=0; pad<npads; pad++)
{
Float_t y = (pad-0.5*(npads-1))*padpitch;
- fLUTr2[i][pad] = x2 + y*y;
+ fLUTr[i][pad] = sqrt(x2 + y*y);
Float_t starty = (pad-0.5*npads)*padpitch;
Float_t r1 = x2 + starty*starty;
Float_t xoverr1 = x/r1;
LOG(AliL3Log::kInformational,"AliL3HoughTransformerRow::CreateHistograms()","")
<<"Transformer: Allocating "<<ntimebins*sizeof(Float_t)<<" bytes to fLUTforwardZ"<<ENDLOG;
fLUTforwardZ = new Float_t[ntimebins];
- LOG(AliL3Log::kInformational,"AliL3HoughTransformerRow::CreateHistograms()","")
- <<"Transformer: Allocating "<<ntimebins*sizeof(Float_t)<<" bytes to fLUTforwardZ2"<<ENDLOG;
- fLUTforwardZ2 = new Float_t[ntimebins];
LOG(AliL3Log::kInformational,"AliL3HoughTransformerRow::CreateHistograms()","")
<<"Transformer: Allocating "<<ntimebins*sizeof(Float_t)<<" bytes to fLUTbackwardZ"<<ENDLOG;
fLUTbackwardZ = new Float_t[ntimebins];
- LOG(AliL3Log::kInformational,"AliL3HoughTransformerRow::CreateHistograms()","")
- <<"Transformer: Allocating "<<ntimebins*sizeof(Float_t)<<" bytes to fLUTbackwardZ2"<<ENDLOG;
- fLUTbackwardZ2 = new Float_t[ntimebins];
for(Int_t i=0; i<ntimebins; i++){
Float_t z;
z=AliL3Transform::GetZFast(0,i,GetZVertex());
fLUTforwardZ[i]=z;
- fLUTforwardZ2[i]=z*z;
z=AliL3Transform::GetZFast(18,i,GetZVertex());
fLUTbackwardZ[i]=z;
- fLUTbackwardZ2[i]=z*z;
}
}
}
{
//Do the Hough Transform
+ //Load the parameters used by the fast calculation of eta
+ Double_t etaparam1 = GetEtaCalcParam1();
+ Double_t etaparam2 = GetEtaCalcParam2();
+ Double_t etaparam3 = GetEtaCalcParam3();
+
Int_t netasegments = GetNEtaSegments();
Double_t etamin = GetEtaMin();
Double_t etaslice = (GetEtaMax() - etamin)/netasegments;
Int_t ilastpatch = GetLastPatch();
Int_t islice = GetSlice();
Float_t *lutz;
- Float_t *lutz2;
- if(islice < 18) {
+ if(islice < 18)
lutz = fLUTforwardZ;
- lutz2 = fLUTforwardZ2;
- }
- else {
+ else
lutz = fLUTbackwardZ;
- lutz2 = fLUTbackwardZ2;
- }
//Loop over the padrows:
for(UChar_t i=AliL3Transform::GetFirstRow(ipatch); i<=AliL3Transform::GetLastRow(ipatch); i++)
//Flush eta clusters array
memset(etaclust,0,netasegments*sizeof(AliL3EtaRow));
- Float_t x = AliL3Transform::Row2X((Int_t)i);
- Float_t x2 = x*x;
- Float_t radius2=0;
+ Float_t radius=0;
//Get the data on this padrow:
AliL3DigitData *digPt = tempPt->fDigitData;
if(pad != lastpad)
{
- radius2 = fLUTr2[(Int_t)i][(Int_t)pad];
+ radius = fLUTr[(Int_t)i][(Int_t)pad];
lastetaindex = -1;
}
- //Transform data to local cartesian coordinates:
Float_t z = lutz[(Int_t)time];
- Float_t z2 = lutz2[(Int_t)time];
- // Acceptance cut : to be verified
- // if(radius2<0.72406166*z2) continue;
- if(x2<0.8464*z2) continue;
- //Calculate the eta:
- Double_t r = sqrt(radius2+z2);
- Double_t eta = 0.5 * log((r+z)/(r-z));
+ Double_t radiuscorr = radius*(1.+etaparam3*radius*radius);
+ Double_t zovr = z/radiuscorr;
+ Double_t eta = (etaparam1-etaparam2*fabs(zovr))*zovr;
//Get the corresponding index, which determines which histogram to fill:
Int_t etaindex = (Int_t)((eta-etamin)/etaslice);
{
//Do the Hough Transform
+ //Load the parameters used by the fast calculation of eta
+ Double_t etaparam1 = GetEtaCalcParam1();
+ Double_t etaparam2 = GetEtaCalcParam2();
+ Double_t etaparam3 = GetEtaCalcParam3();
+
Int_t netasegments = GetNEtaSegments();
Double_t etamin = GetEtaMin();
Double_t etaslice = (GetEtaMax() - etamin)/netasegments;
Int_t ilastpatch = GetLastPatch();
Int_t islice = GetSlice();
Float_t *lutz;
- Float_t *lutz2;
- if(islice < 18) {
+ if(islice < 18)
lutz = fLUTforwardZ;
- lutz2 = fLUTforwardZ2;
- }
- else {
+ else
lutz = fLUTbackwardZ;
- lutz2 = fLUTbackwardZ2;
- }
//Flush eta clusters array
memset(etaclust,0,netasegments*sizeof(AliL3EtaRow));
UChar_t i=0;
Int_t npads=0;
- Float_t x=0;
- Float_t x2=0;
- Float_t radius2=0;
+ Float_t radius=0;
UChar_t pad=0;
//Loop over the rawdata:
//Flush eta clusters array
memset(etaclust,0,netasegments*sizeof(AliL3EtaRow));
- x = AliL3Transform::Row2X((Int_t)i);
- x2 = x*x;
- radius2=0;
+ radius=0;
}
continue;
}
*/
- radius2 = fLUTr2[(Int_t)i][(Int_t)pad];
+ radius = fLUTr[(Int_t)i][(Int_t)pad];
lastetaindex = -1;
}
if(fTPCRawStream->GetSignal() <= lowerthreshold)
continue;
- //Transform data to local cartesian coordinates:
Float_t z = lutz[(Int_t)time];
- Float_t z2 = lutz2[(Int_t)time];
- // if(radius2<0.72406166*z2) continue;
- if(x2<0.8464*z2) continue;
- //Calculate the eta:
- Double_t r = sqrt(radius2+z2);
- Double_t eta = 0.5 * log((r+z)/(r-z));
+ Double_t radiuscorr = radius*(1.+etaparam3*radius*radius);
+ Double_t zovr = z/radiuscorr;
+ Double_t eta = (etaparam1-etaparam2*fabs(zovr))*zovr;
//Get the corresponding index, which determines which histogram to fill:
Int_t etaindex = (Int_t)((eta-etamin)/etaslice);
#endif
}
+Int_t AliL3HoughTransformerRow::GetTrackLength(Double_t alpha1,Double_t alpha2,Int_t *rows) const
+{
+ // Returns the track length for a given peak found in the Hough space
+
+ AliL3Histogram *hist = fParamSpace[0];
+ Int_t bin = hist->FindBin(alpha1,alpha2);
+ if(bin==-1) {
+ LOG(AliL3Log::kWarning,"AliL3HoughTransformerRow::GetTrackLength()","")
+ <<"Track candidate outside Hough space boundaries: "<<alpha1<<" "<<alpha2<<ENDLOG;
+ return -1;
+ }
+ rows[0] = fTrackFirstRow[bin];
+ rows[1] = fTrackLastRow[bin];
+
+ return 0;
+}
+
inline void AliL3HoughTransformerRow::FillClusterRow(UChar_t i,Int_t binx1,Int_t binx2,UChar_t *ngaps2,UChar_t *currentrow2,UChar_t *lastrow2
#ifdef do_mc
,AliL3EtaRow etaclust,AliL3TrackIndex *trackid
fStartPadParams = tr->fStartPadParams;
fEndPadParams = tr->fEndPadParams;
- fLUTr2 = tr->fLUTr2;
+ fLUTr = tr->fLUTr;
fLUTforwardZ = tr->fLUTforwardZ;
- fLUTforwardZ2 = tr->fLUTforwardZ2;
fLUTbackwardZ = tr->fLUTbackwardZ;
- fLUTbackwardZ2 = tr->fLUTbackwardZ2;
fParamSpace = tr->fParamSpace;
UChar_t fStartPad; //First pad in the cluster
UChar_t fEndPad; //Last pad in the cluster
Bool_t fIsFound; //Is the cluster already found
- Float_t fStartY; //Y position of the first pad in the cluster
#ifdef do_mc
Int_t fMcLabels[MaxTrack]; //Array to store mc labels inside cluster
#endif
AliL3Histogram *GetHistogram(Int_t etaindex);
Double_t GetEta(Int_t etaindex,Int_t slice) const;
Int_t GetTrackID(Int_t etaindex,Double_t alpha1,Double_t alpha2) const;
+ Int_t GetTrackLength(Double_t alpha1,Double_t alpha2,Int_t *rows) const;
UChar_t *GetGapCount(Int_t etaindex) const { return fGapCount[etaindex]; }
UChar_t *GetCurrentRowCount(Int_t etaindex) const { return fCurrentRowCount[etaindex]; }
UChar_t *GetPrevBin(Int_t etaindex) const { return fPrevBin[etaindex]; }
UChar_t *GetTrackLastRow() const { return fTrackLastRow; }
static Float_t GetBeta1() {return fgBeta1;}
static Float_t GetBeta2() {return fgBeta2;}
+ static Float_t GetDAlpha() {return fgDAlpha;}
+ static Float_t GetDEta() {return fgDEta;}
+ static Double_t GetEtaCalcParam1() {return fgEtaCalcParam1;}
+ static Double_t GetEtaCalcParam2() {return fgEtaCalcParam2;}
+ static Double_t GetEtaCalcParam3() {return fgEtaCalcParam3;}
void SetTPCRawStream(AliTPCRawStream *rawstream) {fTPCRawStream=rawstream;}
AliL3PadHoughParams **fStartPadParams; //!
AliL3PadHoughParams **fEndPadParams; //!
- Float_t **fLUTr2; //!
+ Float_t **fLUTr; //!
Float_t *fLUTforwardZ; //!
- Float_t *fLUTforwardZ2; //!
Float_t *fLUTbackwardZ; //!
- Float_t *fLUTbackwardZ2; //!
AliL3Histogram **fParamSpace; //!
void SetTransformerArrays(AliL3HoughTransformerRow *tr);
static Float_t fgBeta1,fgBeta2; // Two curves which define the Hough space
+ static Float_t fgDAlpha, fgDEta; // Correlation factor between Hough space bin size and resolution
+ static Double_t fgEtaCalcParam1, fgEtaCalcParam2; // Parameters used for fast calculation of eta during the binning of Hough space
+ static Double_t fgEtaCalcParam3; // Parameter used during the eta binning of the Hough Space in order to account for finite track radii
AliTPCRawStream *fTPCRawStream; // Pointer to the raw stream in case of fast reading of the raw data (fast_raw flag)
hough/AliL3HoughMerger.cxx \
hough/AliL3HoughTest.cxx \
hough/AliL3HoughTrack.cxx \
+hough/AliL3HoughKalmanTrack.cxx \
hough/AliL3HoughTransformer.cxx \
hough/AliL3HoughTransformerGlobal.cxx \
hough/AliL3HoughTransformerLUT.cxx \
src/AliL3VertexFinder.cxx \
src/AliLevel3.cxx \
src/AliHLTReconstructor.cxx \
+src/AliL3TPCtracker.cxx \
src/AliL3Log.cxx \
src/AliL3TPCBeamTestMemHandler.cxx
PACKCFLAGS := ${HLTCLFAGS}
PACKDCXXFLAGS:= ${HLTDCXXFLAGS}
-EINCLUDE += HLT/src HLT/hough HLT/comp HLT/misc TPC ITS STEER CONTAINERS RAW
+EINCLUDE += HLT/src HLT/hough HLT/comp HLT/misc HLT/ITS TPC ITS STEER CONTAINERS RAW
SUBDIR:=src
#include "AliL3HoughTrack.h"
#include "AliL3TrackArray.h"
+#include "AliRun.h"
+#include "AliITS.h"
+#include "AliITSgeom.h"
+#include "AliL3ITStracker.h"
+#include "AliL3TPCtracker.h"
+
#if __GNUC__== 3
using namespace std;
#endif
AliL3Log::fgLevel=AliL3Log::kWarning;
#endif
fDoTracker=1;
- fDoHough=1;
+ fDoHough=0;
fDoBench=0;
fDoCleanUp=1;
}
void AliHLTReconstructor::ReconstructWithHoughTransform(AliRunLoader* runLoader,Int_t iEvent) const
{
//reconstruct with hough
+ //not used anymore, Hough tracking is moved out of the local
+ //reconstruction chain
Float_t ptmin = 0.1*AliL3Transform::GetSolenoidField();
Float_t zvertex = 0;
delete fTracks;
}
+
+AliTracker* AliHLTReconstructor::CreateTracker(AliRunLoader* runLoader) const
+{
+ //Create HLT trackers for TPC and ITS
+
+ TString opt = GetOption();
+ if(!opt.CompareTo("TPC")) {
+ // Create Hough tracker for TPC
+ return new AliL3TPCtracker(runLoader);
+ }
+ if(!opt.CompareTo("ITS")) {
+ // Create ITS tracker
+ AliITSgeom* geom = GetITSgeom(runLoader);
+ if (!geom) return NULL;
+ return new AliL3ITStracker(geom);
+ }
+
+ return NULL;
+}
+
+//_____________________________________________________________________________
+AliITSgeom* AliHLTReconstructor::GetITSgeom(AliRunLoader* runLoader) const
+{
+// get the ITS geometry
+
+ if (!runLoader->GetAliRun()) runLoader->LoadgAlice();
+ if (!runLoader->GetAliRun()) {
+ Error("GetITSgeom", "couldn't get AliRun object");
+ return NULL;
+ }
+ AliITS* its = (AliITS*) runLoader->GetAliRun()->GetDetector("ITS");
+ if (!its) {
+ Error("GetITSgeom", "couldn't get ITS detector");
+ return NULL;
+ }
+ if (!its->GetITSgeom()) {
+ Error("GetITSgeom", "no ITS geometry available");
+ return NULL;
+ }
+ return its->GetITSgeom();
+}
+
#endif
#ifdef use_reconstruction
#include "AliReconstructor.h"
+class AliITSgeom;
+
class AliHLTReconstructor: public AliReconstructor {
public:
AliHLTReconstructor();
virtual ~AliHLTReconstructor();
virtual void Reconstruct(AliRunLoader* runLoader) const;
+ virtual AliTracker* CreateTracker(AliRunLoader*) const;
virtual void FillESD(AliRunLoader* runLoader, AliESD* esd) const;
void SetDoBench(Bool_t b){fDoBench=b;}
void SetDoCleanup(Bool_t b){fDoCleanUp=b;}
void FillESDforConformalMapping(AliESD* esd,Int_t iEvent) const;
void FillESDforHoughTransform(AliESD* esd,Int_t iEvent) const;
+ AliITSgeom* GetITSgeom(AliRunLoader* runLoader) const;
Bool_t fDoHough; //do the hough transform
Bool_t fDoTracker; //do the standard conformal tracker
#pragma link C++ class AliL3Evaluate;
#ifdef use_reconstruction
#pragma link C++ class AliHLTReconstructor;
+#pragma link C++ class AliL3TPCtracker;
#endif
#endif
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+//-------------------------------------------------------------------------
+// Implementation of the HLT TPC hough transform tracker class
+//
+// It reads directly TPC digits using runloader and runs the HT
+// algorithm over them.
+// It stores the reconstructed hough tracks in the HLT ESD using the
+// the off-line AliESDtrack format.
+//
+// Origin: Cvetan Cheshkov, CERN, Cvetan.Cheshkov@cern.ch
+//-------------------------------------------------------------------------
+
+#include "AliESD.h"
+#include "AliRunLoader.h"
+#include "AliL3TPCtracker.h"
+#include "AliL3Hough.h"
+
+ClassImp(AliL3TPCtracker)
+
+AliL3TPCtracker::AliL3TPCtracker(AliRunLoader *runLoader):AliTracker()
+{
+ //--------------------------------------------------------------
+ // Constructor
+ //--------------------------------------------------------------
+
+ if(AliL3Transform::GetVersion() == AliL3Transform::kVdefault) {
+ Bool_t isinit=AliL3Transform::Init(runLoader);
+ if(!isinit) AliWarning("Could not init AliL3Transform settings, using defaults!");
+ }
+
+ fRunLoader = runLoader;
+}
+
+Int_t AliL3TPCtracker::Clusters2Tracks(AliESD *event)
+{
+ //--------------------------------------------------------------------
+ // This method reconstructs HLT TPC Hough tracks
+ //--------------------------------------------------------------------
+
+ if (!fRunLoader) {
+ AliError("Missing runloader!");
+ return kTRUE;
+ }
+
+ Float_t ptmin = 0.1*AliL3Transform::GetSolenoidField();
+
+ Float_t zvertex = GetZ();
+
+ AliInfo(Form("Hough Transform will run with ptmin=%f and zvertex=%f",ptmin,zvertex));
+
+ AliL3Hough *hough = new AliL3Hough();
+
+ hough->SetThreshold(4);
+ hough->CalcTransformerParams(ptmin);
+ hough->SetPeakThreshold(70,-1);
+ hough->SetRunLoader(fRunLoader);
+ hough->Init("./", kFALSE, 100, kFALSE,4,0,0,zvertex);
+ hough->SetAddHistograms();
+
+ for(Int_t slice=0; slice<=35; slice++)
+ {
+ hough->ReadData(slice);
+ hough->Transform();
+ hough->AddAllHistogramsRows();
+ hough->FindTrackCandidatesRow();
+ hough->AddTracks();
+ }
+
+ Int_t ntrk = hough->FillESD(event);
+
+ Info("Clusters2Tracks","Number of found tracks: %d\n",ntrk);
+
+ delete hough;
+
+ return 0;
+}
--- /dev/null
+#ifndef ALIL3TPCTRACKER_H
+#define ALIL3TPCTRACKER_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+//-------------------------------------------------------------------------
+// High Level Trigger TPC tracker
+// This class encapsulates the Hough transform HLT tracking
+// algorithm. It is used to call the algorithm inside the off-line
+// reconstruction chain. So far the tracker uses AliRunLoader to
+// to get the TPC digits. In the future all the references to
+// runloaders will be removed and the tracker will take as an input
+// the digits tree.
+//
+// Origin: Cvetan Cheshkov, CERN, Cvetan.Cheshkov@cern.ch
+//-------------------------------------------------------------------------
+
+#include "AliTracker.h"
+#include "AliLog.h"
+
+#include "AliL3Transform.h"
+
+class AliRunLoader;
+class AliESD;
+
+//-------------------------------------------------------------------------
+class AliL3TPCtracker : public AliTracker {
+public:
+ AliL3TPCtracker(AliRunLoader *runLoader);
+
+ Int_t Clusters2Tracks(AliESD *event);
+
+ Int_t PropagateBack(AliESD */*event*/) {return 0;}
+ Int_t RefitInward(AliESD */*event*/) {return 0;}
+ Int_t LoadClusters(TTree */*cf*/) {return 0;}
+ void UnloadClusters() {return;}
+
+ AliCluster *GetCluster(Int_t /*index*/) const {return NULL;}
+
+private:
+ AliRunLoader *fRunLoader; // Pointer to the runloader
+
+ ClassDef(AliL3TPCtracker,1) //HLT TPC Hough tracker
+};
+
+#endif
SetPt(tpt->GetPt());
SetPsi(tpt->GetPsi());
SetTgl(tpt->GetTgl());
+ SetPterr(tpt->GetPterr());
+ SetPsierr(tpt->GetPsierr());
+ SetTglerr(tpt->GetTglerr());
SetCharge(tpt->GetCharge());
SetHits(tpt->GetNHits(),(UInt_t *)tpt->GetHitNumbers());
#ifdef do_mc
Double_t GetR0() const {return fR0;}
Double_t GetZ0() const {return fFirstPoint[2];}
Float_t GetPID() const {return fPID;}
+
+ Double_t GetPterr() const {return fPterr;}
+ Double_t GetPsierr() const {return fPsierr;}
+ Double_t GetTglerr() const {return fTanlerr;}
Double_t GetKappa() const {return fKappa;}
Double_t GetRadius() const {return fRadius;}
track->SetPt(trs->fPt);
track->SetPsi(trs->fPsi);
track->SetTgl(trs->fTgl);
+ track->SetPterr(trs->fPterr);
+ track->SetPsierr(trs->fPsierr);
+ track->SetTglerr(trs->fTglerr);
track->SetNHits(trs->fNPoints);
track->SetCharge(trs->fCharge);
track->SetFirstPoint(trs->fX,trs->fY,trs->fZ);
for(Int_t i=0; i<ntracks; i++){
AliL3Track *track = NextTrack();
track->SetPt(trs->fPt);
+ track->SetPterr(trs->fPterr);
Float_t psi[1];
psi[0]=trs->fPsi;
AliL3Transform::Local2GlobalAngle(psi,slice);
track->SetPsi(psi[0]);
track->SetTgl(trs->fTgl);
+ track->SetPsierr(trs->fPsierr);
+ track->SetTglerr(trs->fTglerr);
track->SetNHits(trs->fNPoints);
track->SetCharge(trs->fCharge);
Float_t first[3];
tP->fY = track->GetFirstPointY();
tP->fZ = track->GetFirstPointZ();
tP->fPt = track->GetPt();
+ tP->fPterr = track->GetPterr();
tP->fLastX = track->GetLastPointX();
tP->fLastY = track->GetLastPointY();
tP->fLastZ = track->GetLastPointZ();
tP->fPsi = track->GetPsi();
tP->fTgl = track->GetTgl();
+ tP->fPsierr = track->GetPsierr();
+ tP->fTglerr = track->GetTglerr();
tP->fCharge = track->GetCharge();
tP->fNPoints = track->GetNHits();
#ifdef ROWHOUGHPARAMS
// tP->fY = track->GetFirstPointY();
// tP->fZ = track->GetFirstPointZ();
tP->fPt = track->GetPt();
+ tP->fPterr = track->GetPterr();
// tP->fLastX = track->GetLastPointX();
// tP->fLastY = track->GetLastPointY();
// tP->fLastZ = track->GetLastPointZ();
tP->fPsi = track->GetPsi();
tP->fTgl = track->GetTgl();
+ tP->fPsierr = track->GetPsierr();
+ tP->fTglerr = track->GetTglerr();
tP->fCharge = track->GetCharge();
#ifdef ROWHOUGHPARAMS
tP->fTrackID = track->GetMCid();
Double_t fPt;
Double_t fPsi;
Double_t fTgl;
+ Double_t fPterr;
+ Double_t fPsierr;
+ Double_t fTglerr;
Int_t fCharge;
#ifdef ROWHOUGHPARAMS
/* needed for PDC */