//
ClassImp(AliTPCtrackerMI)
+ClassImp(AliTPCtrackerRow)
class AliTPCFastMath {
}
//
if (clrow->GetArray()->GetEntriesFast()<=0) continue;
- AliTPCRow * tpcrow=0;
+ AliTPCtrackerRow * tpcrow=0;
Int_t left=0;
if (sec<fkNIS*2){
tpcrow = &(fInnerSec[sec%fkNIS][row]);
Transform((AliTPCclusterMI*)(clrow->GetArray()->At(icl)));
}
//
- AliTPCRow * tpcrow=0;
+ AliTPCtrackerRow * tpcrow=0;
Int_t left=0;
if (sec<fkNIS*2){
tpcrow = &(fInnerSec[sec%fkNIS][row]);
Int_t nrows = fOuterSec->GetNRows();
for (Int_t sec = 0;sec<fkNOS;sec++)
for (Int_t row = 0;row<nrows;row++){
- AliTPCRow* tpcrow = &(fOuterSec[sec%fkNOS][row]);
+ AliTPCtrackerRow* tpcrow = &(fOuterSec[sec%fkNOS][row]);
// if (tpcrow){
// if (tpcrow->fClusters1) delete []tpcrow->fClusters1;
// if (tpcrow->fClusters2) delete []tpcrow->fClusters2;
nrows = fInnerSec->GetNRows();
for (Int_t sec = 0;sec<fkNIS;sec++)
for (Int_t row = 0;row<nrows;row++){
- AliTPCRow* tpcrow = &(fInnerSec[sec%fkNIS][row]);
+ AliTPCtrackerRow* tpcrow = &(fInnerSec[sec%fkNIS][row]);
//if (tpcrow){
// if (tpcrow->fClusters1) delete []tpcrow->fClusters1;
//if (tpcrow->fClusters2) delete []tpcrow->fClusters2;
UInt_t index=0;
for (Int_t sec = 0;sec<fkNOS;sec++)
for (Int_t row = 0;row<nrows;row++){
- AliTPCRow* tpcrow = &(fOuterSec[sec%fkNOS][row]);
+ AliTPCtrackerRow* tpcrow = &(fOuterSec[sec%fkNOS][row]);
Int_t sec2 = sec+2*fkNIS;
//left
Int_t ncl = tpcrow->GetN1();
UInt_t index=0;
for (Int_t sec = 0;sec<fkNIS;sec++)
for (Int_t row = 0;row<nrows;row++){
- AliTPCRow* tpcrow = &(fInnerSec[sec%fkNIS][row]);
+ AliTPCtrackerRow* tpcrow = &(fInnerSec[sec%fkNIS][row]);
//
//left
Int_t ncl = tpcrow->GetN1();
Int_t row=(index&0x00ff0000)>>16;
Int_t ncl=(index&0x00007fff)>>00;
- const AliTPCRow * tpcrow=0;
+ const AliTPCtrackerRow * tpcrow=0;
AliTPCclusterMI * clrow =0;
if (sec<0 || sec>=fkNIS*4) {
if (!isActive || !isActive2) return 0;
- const AliTPCRow &krow=GetRow(t.GetRelativeSector(),nr);
+ const AliTPCtrackerRow &krow=GetRow(t.GetRelativeSector(),nr);
if ( (t.GetSigmaY2()<0) || t.GetSigmaZ2()<0) return 0;
Double_t roady =1.;
Double_t roadz = 1.;
//Int_t nr2 = nr;
- const AliTPCRow &krow=GetRow(t.GetRelativeSector(),nr);
+ const AliTPCtrackerRow &krow=GetRow(t.GetRelativeSector(),nr);
if ( (t.GetSigmaY2()<0) || t.GetSigmaZ2()<0) return 0;
Double_t roady =1.;
Double_t roadz = 1.;
}
//AliInfo(Form("A - Sector%d phi %f - alpha %f", t.fRelativeSector,y/x, t.GetAlpha()));
- AliTPCRow &krow=GetRow(t.GetRelativeSector(),nr);
+ AliTPCtrackerRow &krow=GetRow(t.GetRelativeSector(),nr);
if (TMath::Abs(TMath::Abs(y)-ymax)<krow.GetDeadZone()){
t.SetInDead(kTRUE);
Int_t imiddle = (i2+i1)/2; //middle pad row index
Double_t xm = GetXrow(imiddle); // radius of middle pad-row
- const AliTPCRow& krm=GetRow(sec,imiddle); //middle pad -row
+ const AliTPCtrackerRow& krm=GetRow(sec,imiddle); //middle pad -row
//
Int_t ns =sec;
- const AliTPCRow& kr1=GetRow(ns,i1);
+ const AliTPCtrackerRow& kr1=GetRow(ns,i1);
Double_t ymax = GetMaxY(i1)-kr1.GetDeadZone()-1.5;
Double_t ymaxm = GetMaxY(imiddle)-kr1.GetDeadZone()-1.5;
for (Int_t dsec = dsec1; dsec<=dsec2;dsec++){
Int_t sec2 = sec + dsec;
//
- // AliTPCRow& kr2 = fOuterSec[(sec2+fkNOS)%fkNOS][i2];
- //AliTPCRow& kr2m = fOuterSec[(sec2+fkNOS)%fkNOS][imiddle];
- AliTPCRow& kr2 = GetRow((sec2+fkNOS)%fkNOS,i2);
- AliTPCRow& kr2m = GetRow((sec2+fkNOS)%fkNOS,imiddle);
+ // AliTPCtrackerRow& kr2 = fOuterSec[(sec2+fkNOS)%fkNOS][i2];
+ //AliTPCtrackerRow& kr2m = fOuterSec[(sec2+fkNOS)%fkNOS][imiddle];
+ AliTPCtrackerRow& kr2 = GetRow((sec2+fkNOS)%fkNOS,i2);
+ AliTPCtrackerRow& kr2m = GetRow((sec2+fkNOS)%fkNOS,imiddle);
Int_t index1 = TMath::Max(kr2.Find(extraz-0.6-dddz1*TMath::Abs(z1)*0.05)-1,0);
Int_t index2 = TMath::Min(kr2.Find(extraz+0.6+dddz2*TMath::Abs(z1)*0.05)+1,kr2);
// first 3 padrows
Double_t x1 = GetXrow(i1-1);
- const AliTPCRow& kr1=GetRow(sec,i1-1);
+ const AliTPCtrackerRow& kr1=GetRow(sec,i1-1);
Double_t y1max = GetMaxY(i1-1)-kr1.GetDeadZone()-1.5;
//
Double_t x1p = GetXrow(i1);
- const AliTPCRow& kr1p=GetRow(sec,i1);
+ const AliTPCtrackerRow& kr1p=GetRow(sec,i1);
//
Double_t x1m = GetXrow(i1-2);
- const AliTPCRow& kr1m=GetRow(sec,i1-2);
+ const AliTPCtrackerRow& kr1m=GetRow(sec,i1-2);
//
//last 3 padrow for seeding
- AliTPCRow& kr3 = GetRow((sec+fkNOS)%fkNOS,i1-7);
+ AliTPCtrackerRow& kr3 = GetRow((sec+fkNOS)%fkNOS,i1-7);
Double_t x3 = GetXrow(i1-7);
// Double_t y3max= GetMaxY(i1-7)-kr3.fDeadZone-1.5;
//
- AliTPCRow& kr3p = GetRow((sec+fkNOS)%fkNOS,i1-6);
+ AliTPCtrackerRow& kr3p = GetRow((sec+fkNOS)%fkNOS,i1-6);
Double_t x3p = GetXrow(i1-6);
//
- AliTPCRow& kr3m = GetRow((sec+fkNOS)%fkNOS,i1-8);
+ AliTPCtrackerRow& kr3m = GetRow((sec+fkNOS)%fkNOS,i1-8);
Double_t x3m = GetXrow(i1-8);
//
// middle padrow
Int_t im = i1-4; //middle pad row index
Double_t xm = GetXrow(im); // radius of middle pad-row
- const AliTPCRow& krm=GetRow(sec,im); //middle pad -row
+ const AliTPCtrackerRow& krm=GetRow(sec,im); //middle pad -row
// Double_t ymmax = GetMaxY(im)-kr1.fDeadZone-1.5;
//
//
// Double_t cs=cos(alpha), sn=sin(alpha);
Int_t row0 = (i1+i2)/2;
Int_t drow = (i1-i2)/2;
- const AliTPCRow& kr0=fSectors[sec][row0];
- AliTPCRow * kr=0;
+ const AliTPCtrackerRow& kr0=fSectors[sec][row0];
+ AliTPCtrackerRow * kr=0;
AliTPCpolyTrack polytrack;
Int_t nclusters=fSectors[sec][row0];
Int_t nfound =0;
Int_t nfoundable =0;
for (Int_t iter =1; iter<2; iter++){ //iterations
- const AliTPCRow& krm=fSectors[sec][row0-iter];
- const AliTPCRow& krp=fSectors[sec][row0+iter];
+ const AliTPCtrackerRow& krm=fSectors[sec][row0-iter];
+ const AliTPCtrackerRow& krp=fSectors[sec][row0+iter];
const AliTPCclusterMI * cl= kr0[is];
if (cl->IsUsed(10)) {
fPadPitchLength=par->GetInnerPadPitchLength();
fN=par->GetNRowLow();
if(fRow)delete [] fRow;fRow = 0;
- fRow=new AliTPCRow[fN];
+ fRow=new AliTPCtrackerRow[fN];
for (Int_t i=0; i<fN; i++) {
fRow[i].SetX(par->GetPadRowRadiiLow(i));
fRow[i].SetDeadZone(1.5); //1.5 cm of dead zone
f2PadPitchLength = par->GetOuter2PadPitchLength();
fN=par->GetNRowUp();
if(fRow)delete [] fRow;fRow = 0;
- fRow=new AliTPCRow[fN];
+ fRow=new AliTPCtrackerRow[fN];
for (Int_t i=0; i<fN; i++) {
fRow[i].SetX(par->GetPadRowRadiiUp(i));
fRow[i].SetDeadZone(1.5); // 1.5 cm of dead zone
}
}
-AliTPCtrackerMI::AliTPCRow::AliTPCRow():
+AliTPCtrackerRow::AliTPCtrackerRow():
fDeadZone(0.),
fClusters1(0),
fN1(0),
//
}
-AliTPCtrackerMI::AliTPCRow::~AliTPCRow(){
+AliTPCtrackerRow::~AliTPCtrackerRow(){
//
for (Int_t i = 0; i < fN1; i++)
fClusters1[i].~AliTPCclusterMI();
//_________________________________________________________________________
void
-AliTPCtrackerMI::AliTPCRow::InsertCluster(const AliTPCclusterMI* c, UInt_t index) {
+AliTPCtrackerRow::InsertCluster(const AliTPCclusterMI* c, UInt_t index) {
//-----------------------------------------------------------------------
// Insert a cluster into this pad row in accordence with its y-coordinate
//-----------------------------------------------------------------------
if (fN==kMaxClusterPerRow) {
- //AliInfo("AliTPCRow::InsertCluster(): Too many clusters");
+ //AliInfo("AliTPCtrackerRow::InsertCluster(): Too many clusters");
return;
}
if (fN>=fN1+fN2) {
- //AliInfo("AliTPCRow::InsertCluster(): Too many clusters !");
+ //AliInfo("AliTPCtrackerRow::InsertCluster(): Too many clusters !");
}
if (fN==0) {fIndex[0]=index; fClusters[fN++]=c; return;}
fIndex[i]=index; fClusters[i]=c; fN++;
}
-void AliTPCtrackerMI::AliTPCRow::ResetClusters() {
+void AliTPCtrackerRow::ResetClusters() {
//
// reset clusters
// MvL: Need to call destructors for AliTPCclusterMI, to delete fInfo
//___________________________________________________________________
-Int_t AliTPCtrackerMI::AliTPCRow::Find(Double_t z) const {
+Int_t AliTPCtrackerRow::Find(Double_t z) const {
//-----------------------------------------------------------------------
// Return the index of the nearest cluster
//-----------------------------------------------------------------------
//___________________________________________________________________
-AliTPCclusterMI * AliTPCtrackerMI::AliTPCRow::FindNearest(Double_t y, Double_t z, Double_t roady, Double_t roadz) const {
+AliTPCclusterMI * AliTPCtrackerRow::FindNearest(Double_t y, Double_t z, Double_t roady, Double_t roadz) const {
//-----------------------------------------------------------------------
// Return the index of the nearest cluster in z y
//-----------------------------------------------------------------------
return cl;
}
-AliTPCclusterMI * AliTPCtrackerMI::AliTPCRow::FindNearest2(Double_t y, Double_t z, Double_t roady, Double_t roadz,UInt_t & index) const
+AliTPCclusterMI * AliTPCtrackerRow::FindNearest2(Double_t y, Double_t z, Double_t roady, Double_t roadz,UInt_t & index) const
{
//-----------------------------------------------------------------------
// Return the index of the nearest cluster in z y
}
-void AliTPCtrackerMI::AliTPCRow::SetFastCluster(Int_t i, Short_t cl){
+void AliTPCtrackerRow::SetFastCluster(Int_t i, Short_t cl){
//
// Set cluster info for fast navigation
//
class TTreeSRedirector;
class AliTrackPoint;
+
+class AliTPCtrackerRow : public TObject{
+public:
+ AliTPCtrackerRow();
+ ~AliTPCtrackerRow();
+ void InsertCluster(const AliTPCclusterMI *c, UInt_t index);
+ void ResetClusters();
+ operator int() const {return fN;}
+ Int_t GetN() const {return fN;}
+ const AliTPCclusterMI* operator[](Int_t i) const {return fClusters[i];}
+ UInt_t GetIndex(Int_t i) const {return fIndex[i];}
+ inline Int_t Find(Double_t z) const;
+ AliTPCclusterMI * FindNearest(Double_t y, Double_t z, Double_t roady, Double_t roadz) const;
+ AliTPCclusterMI * FindNearest2(Double_t y, Double_t z, Double_t roady, Double_t roadz, UInt_t & index) const;
+
+ void SetX(Double_t x) {fX=x;}
+ Double_t GetX() const {return fX;}
+ Float_t GetDeadZone() const {return fDeadZone;}
+ void SetDeadZone(Float_t d) {fDeadZone=d;}
+ Int_t GetN1() const {return fN1;}
+ void SetN1(Int_t n) {fN1=n;}
+ Int_t GetN2() const {return fN2;}
+ void SetN2(Int_t n) {fN2=n;}
+ AliTPCclusterMI* GetClusters1() const {return fClusters1;}
+ AliTPCclusterMI* GetClusters2() const {return fClusters2;}
+ void SetClusters1(AliTPCclusterMI* cl) {fClusters1=cl;}
+ void SetClusters2(AliTPCclusterMI* cl) {fClusters2=cl;}
+ void SetCluster1(Int_t i, const AliTPCclusterMI &cl) {fClusters1[i]=cl;}
+ void SetCluster2(Int_t i, const AliTPCclusterMI &cl) {fClusters2[i]=cl;}
+ AliTPCclusterMI* GetCluster1(Int_t i) const {return &fClusters1[i];}
+ AliTPCclusterMI* GetCluster2(Int_t i) const {return &fClusters2[i];}
+ Short_t GetFastCluster(Int_t i) const {return fFastCluster[i];}
+ void SetFastCluster(Int_t i, Short_t cl);
+
+private:
+ AliTPCtrackerRow & operator=(const AliTPCtrackerRow & );
+ AliTPCtrackerRow(const AliTPCtrackerRow& /*r*/); //dummy copy constructor
+ Float_t fDeadZone; // the width of the dead zone
+ AliTPCclusterMI *fClusters1; //array with clusters 1
+ Int_t fN1; //number of clusters on left side
+ AliTPCclusterMI *fClusters2; //array with clusters 2
+ Int_t fN2; // number of clusters on right side of the TPC
+ Short_t fFastCluster[510]; //index of the nearest cluster at given position
+ Int_t fN; //number of clusters
+ const AliTPCclusterMI *fClusters[kMaxClusterPerRow]; //pointers to clusters
+ // indexes for cluster at given position z
+ // AliTPCclusterMI *fClustersArray; //
+ UInt_t fIndex[kMaxClusterPerRow]; //indeces of clusters
+ Double_t fX; //X-coordinate of this row
+ ClassDef(AliTPCtrackerRow,0)
+};
+
+
+
+
class AliTPCtrackerMI : public AliTracker {
public:
AliTPCtrackerMI();
public:
//**************** Internal tracker class **********************
class AliTPCSector;
- class AliTPCRow {
- public:
- AliTPCRow();
- ~AliTPCRow();
- void InsertCluster(const AliTPCclusterMI *c, UInt_t index);
- void ResetClusters();
- operator int() const {return fN;}
- Int_t GetN() const {return fN;}
- const AliTPCclusterMI* operator[](Int_t i) const {return fClusters[i];}
- UInt_t GetIndex(Int_t i) const {return fIndex[i];}
- inline Int_t Find(Double_t z) const;
- AliTPCclusterMI * FindNearest(Double_t y, Double_t z, Double_t roady, Double_t roadz) const;
- AliTPCclusterMI * FindNearest2(Double_t y, Double_t z, Double_t roady, Double_t roadz, UInt_t & index) const;
-
- void SetX(Double_t x) {fX=x;}
- Double_t GetX() const {return fX;}
- Float_t GetDeadZone() const {return fDeadZone;}
- void SetDeadZone(Float_t d) {fDeadZone=d;}
- Int_t GetN1() const {return fN1;}
- void SetN1(Int_t n) {fN1=n;}
- Int_t GetN2() const {return fN2;}
- void SetN2(Int_t n) {fN2=n;}
- AliTPCclusterMI* GetClusters1() const {return fClusters1;}
- AliTPCclusterMI* GetClusters2() const {return fClusters2;}
- void SetClusters1(AliTPCclusterMI* cl) {fClusters1=cl;}
- void SetClusters2(AliTPCclusterMI* cl) {fClusters2=cl;}
- void SetCluster1(Int_t i, const AliTPCclusterMI &cl) {fClusters1[i]=cl;}
- void SetCluster2(Int_t i, const AliTPCclusterMI &cl) {fClusters2[i]=cl;}
- AliTPCclusterMI* GetCluster1(Int_t i) const {return &fClusters1[i];}
- AliTPCclusterMI* GetCluster2(Int_t i) const {return &fClusters2[i];}
- Short_t GetFastCluster(Int_t i) const {return fFastCluster[i];}
- void SetFastCluster(Int_t i, Short_t cl);
-
-private:
- AliTPCRow & operator=(const AliTPCRow & );
- AliTPCRow(const AliTPCRow& /*r*/); //dummy copy constructor
- Float_t fDeadZone; // the width of the dead zone
- AliTPCclusterMI *fClusters1; //array with clusters 1
- Int_t fN1; //number of clusters on left side
- AliTPCclusterMI *fClusters2; //array with clusters 2
- Int_t fN2; // number of clusters on right side of the TPC
- Short_t fFastCluster[510]; //index of the nearest cluster at given position
- Int_t fN; //number of clusters
- const AliTPCclusterMI *fClusters[kMaxClusterPerRow]; //pointers to clusters
- // indexes for cluster at given position z
- // AliTPCclusterMI *fClustersArray; //
- UInt_t fIndex[kMaxClusterPerRow]; //indeces of clusters
- Double_t fX; //X-coordinate of this row
-
- };
//**************** Internal tracker class **********************
class AliTPCSector {
f1PadPitchLength(0.),
f2PadPitchLength(0.){}
~AliTPCSector() { delete[] fRow; }
- AliTPCRow& operator[](Int_t i) const { return *(fRow+i); }
+ AliTPCtrackerRow& operator[](Int_t i) const { return *(fRow+i); }
Int_t GetNRows() const { return fN; }
void Setup(const AliTPCParam *par, Int_t flag);
Double_t GetX(Int_t l) const {return fRow[l].GetX();}
AliTPCSector(const AliTPCSector &/*s*/); //dummy copy contructor
Int_t fN; //number of pad rows
//Int_t fFirstRow; //offset
- AliTPCRow *fRow; //array of pad rows
+ AliTPCtrackerRow *fRow; //array of pad rows
Double_t fAlpha; //opening angle
Double_t fAlphaShift; //shift angle;
Double_t fPadPitchWidth; //pad pitch width
private:
AliTPCtrackerMI(const AliTPCtrackerMI& r); //dummy copy constructor
AliTPCtrackerMI &operator=(const AliTPCtrackerMI& r);//dummy assignment operator
- inline AliTPCRow &GetRow(Int_t sec, Int_t row);
+ inline AliTPCtrackerRow &GetRow(Int_t sec, Int_t row);
inline Bool_t IsActive(Int_t sec, Int_t row);
inline Double_t GetXrow(Int_t row) const;
inline Double_t GetMaxY(Int_t row) const;
};
-AliTPCtrackerMI::AliTPCRow & AliTPCtrackerMI::GetRow(Int_t sec, Int_t row)
+AliTPCtrackerRow & AliTPCtrackerMI::GetRow(Int_t sec, Int_t row)
{
//
return (row>=fInnerSec->GetNRows()) ? fOuterSec[sec][row-fInnerSec->GetNRows()]:fInnerSec[sec][row];