]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
the reconstruction now can be done setting up to 8 layers in ITSUpgrade
authorcterrevo <cterrevo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 18 Feb 2011 10:14:16 +0000 (10:14 +0000)
committercterrevo <cterrevo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 18 Feb 2011 10:14:16 +0000 (10:14 +0000)
ITS/UPGRADE/AliITSUpgradeClusterFinder.cxx
ITS/UPGRADE/AliITSUpgradeClusterFinder.h
ITS/UPGRADE/AliITSUpgradeReconstructor.cxx
ITS/UPGRADE/AliITStrackU.cxx
ITS/UPGRADE/AliITStrackU.h
ITS/UPGRADE/AliITStrackerUpgrade.cxx
ITS/UPGRADE/AliITStrackerUpgrade.h

index 31729d9801862e6c1f08041238760f4d57e46ea3..11bbb34a53686e06eb5bb0cb799b01f5c7255dae 100644 (file)
@@ -49,11 +49,15 @@ AliITSUpgradeClusterFinder::AliITSUpgradeClusterFinder() :
   fClusterWidthMaxRow(0),
   fClusterWidthMinRow(0),
   fChargeArray(0x0),
-  fRecPoints(0x0)
+  fRecPoints(0x0),
+  fNlayers()
 { 
   //
   // Default constructor
   //
+  AliITSsegmentationUpgrade *s = new AliITSsegmentationUpgrade();
+  fNlayers = s->GetNLayers();
+  delete s;
   
   fChargeArray = new TObjArray();
   fChargeArray->SetOwner(kTRUE);
@@ -63,8 +67,8 @@ AliITSUpgradeClusterFinder::AliITSUpgradeClusterFinder() :
   fTmpLabel[2]=-5;
   for(int il=0; il<10;il++) fLabels[il]=-5;
   for(int k=0; k<999999; k++){
-  fHitCol[k]=999;
-  fHitRow[k]=999;
+    fHitCol[k]=999;
+    fHitRow[k]=999;
   }
 }
 
@@ -83,7 +87,7 @@ Int_t AliITSUpgradeClusterFinder::ProcessHit(Int_t layer , UInt_t col, UInt_t ro
   // Adds one pixel to the cluster 
   //
   
-  if (layer>=6) {
+  if (layer>=fNlayers) {
     printf("ERROR: UpgradeClusterFinder::ProcessHit: Out of bounds: layer ,col,row, charge, label(0,1,2)= %d,%d,%d,%d,(%d,%d,%d)\n",layer ,col,row,charge,label[0],label[1],label[2]); 
     return 1;
   }
@@ -118,7 +122,7 @@ UInt_t AliITSUpgradeClusterFinder::GetClusterCount(Int_t layer) const {
   //
   // number of clusters in the layer
   // 
-  if (layer>=6) {
+  if (layer>=fNlayers ) {
     printf("ERROR: UpgradeClusterFinder::GetClusterCount: Module out of bounds: layer = %d\n",layer);
     return 0;
   }
@@ -129,7 +133,7 @@ Float_t AliITSUpgradeClusterFinder::GetClusterMeanCol(Int_t layer, UInt_t index)
   //
   // cluster position in terms of colums : mean column ID
   //
-  if (layer>=6) {
+  if (layer>=fNlayers) {
     printf("ERROR: UpgradeClusterFinder::GetClusterMeanCol: Module out of bounds: layer = %d\n",layer);
     return 0;
   }
@@ -140,7 +144,7 @@ Float_t AliITSUpgradeClusterFinder::GetClusterMeanRow(Int_t layer, UInt_t index)
   //
   // cluster position in terms of rows : mean row ID
   //
-  if (layer>=6) {
+  if (layer>=fNlayers) {
     printf("ERROR: UpgradeClusterFinder::GetClusterMeanRow: Module out of bounds: layer = %d\n",layer);
     return 0;
   }
@@ -151,7 +155,7 @@ UInt_t AliITSUpgradeClusterFinder::GetClusterSize(Int_t layer, UInt_t index) {
   //
   // total number of pixels of the cluster 
   //
-  if (layer>=6) {
+  if (layer>=fNlayers) {
     printf("ERROR: UpgradeClusterFinder::GetClusterSize: Module out of bounds: layer = %d\n",layer);
     return 0;
   }
@@ -163,7 +167,7 @@ UInt_t AliITSUpgradeClusterFinder::GetClusterWidthZ(Int_t layer, UInt_t index) {
   // # pixels of the cluster in Z direction
   //
   
-  if (layer>=6) {
+  if (layer>=fNlayers) {
     printf("ERROR: UpgradeClusterFinder::GetClusterWidthZ: Module out of bounds: layer = %d\n",layer);
     return 0;
   }
@@ -175,7 +179,7 @@ UInt_t AliITSUpgradeClusterFinder::GetClusterWidthPhi(Int_t layer, UInt_t index)
   // # pixels of the cluster in phi direction (XY plane)
   //
 
-    if (layer>=6) {
+  if (layer>=fNlayers) {
     printf("ERROR: UpgradeClusterFinder::GetClusterWidthPhi: Module out of bounds: layer = %d\n",layer);
     return 0;
   }
@@ -187,7 +191,7 @@ UInt_t AliITSUpgradeClusterFinder::GetClusterType(Int_t layer, UInt_t index) {
   // cluster shape
   //
 
-  if (layer>=6) {
+  if (layer>=fNlayers) {
     printf("ERROR: UpgradeClusterFinder::GetClusterType: Module out of bounds: layer = %d\n",layer);
     return 0;
   }
@@ -199,7 +203,7 @@ void AliITSUpgradeClusterFinder::PrintAllClusters() {
   // printout of the cluster information
   // 
   
-  for (Int_t layer=0; layer<6; layer++) {
+  for (Int_t layer=0; layer<fNlayers; layer++) {
     PrintClusters(layer);
   }
 }
@@ -209,7 +213,7 @@ void AliITSUpgradeClusterFinder::PrintClusters(Int_t layer) {
   // printout of the cluster information
   //   
   
-  if (layer>=6) {
+  if (layer>=fNlayers) {
     printf("ERROR: UpgradeClusterFinder::PrintClusters: Out of bounds: layer = %d\n",layer);
     return;
   }
@@ -227,7 +231,7 @@ void AliITSUpgradeClusterFinder::NewEvent() {
   // Cleaning up and preparation for the clustering procedure
   //
   
-  for (Int_t i=0; i<6; i++) {
+  for (Int_t i=0; i<fNlayers; i++) {
     fClusterList[i].Clear();
   }
   NewModule();
@@ -238,7 +242,6 @@ void AliITSUpgradeClusterFinder::NewModule() {
   //
   // Initializations
   //
-  
   fNhitsLeft=0;
   memset(fHits,0,999*999*sizeof(Bool_t));
   fChargeArray->Clear();
@@ -248,16 +251,14 @@ Int_t AliITSUpgradeClusterFinder::DoModuleClustering(Int_t Layer, UShort_t charg
   //
   // Clustering and cluster-list container filling
   //
-  
   UInt_t maxHits=fNhitsLeft;
   for (UInt_t hit=0; hit<maxHits; hit++) {
     if (fClusterTypeFlag) fFindClusterType = kTRUE;
-
+    
     fClusterWidthMinCol = fHitCol[hit];
     fClusterWidthMinRow = fHitRow[hit];
     fClusterWidthMaxCol = fHitCol[hit];
     fClusterWidthMaxRow = fHitRow[hit];
-    
  
     fClusterTypeOrigCol = fHitCol[hit];
     fClusterTypeOrigRow = fHitRow[hit];
@@ -265,7 +266,6 @@ Int_t AliITSUpgradeClusterFinder::DoModuleClustering(Int_t Layer, UShort_t charg
     fColSum=0;
     fRowSum=0;
     UInt_t size = FindClusterRecu(fClusterTypeOrigCol,fClusterTypeOrigRow,charge);
-
     if(size==1){
       fCharge=GetPixelCharge(fColSum,fRowSum);
       AddLabelIndex(fColSum,fRowSum);
@@ -285,8 +285,9 @@ UInt_t AliITSUpgradeClusterFinder::FindClusterRecu(Int_t col, Int_t row, UShort_
   //
   // Pixel selection for the clusters (adjiacent pixels or pixels at the corners) 
   //
-  
-    if (col<0 || !fHits[col][row]) {return 0;}
+  if (col<0 || !fHits[col][row]) {
+    return 0;
+  }
   fHits[col][row]=kFALSE;
   fColSum+=col;
   fRowSum+=row;
@@ -349,7 +350,6 @@ UInt_t AliITSUpgradeClusterFinder::FindClusterRecu(Int_t col, Int_t row, UShort_
   size+=FindClusterRecu(col+1,row+1,charge);
   fCharge+=GetPixelCharge(col+1,row+1);
   AddLabelIndex(col+1,row+1);
-
   return size;
 }
 //___________________________________________________________________________________
@@ -745,9 +745,8 @@ void AliITSUpgradeClusterFinder::AddLabelIndex(UInt_t col, UInt_t row){
 //____________________________________________________
 
 void AliITSUpgradeClusterFinder::SetLabels(Int_t label[3]){
-  //
-  //
-   //Set the MC lables to the cluster
+  
+  //Set the MC lables to the cluster
 
   Bool_t isAssigned[3]={kFALSE,kFALSE,kFALSE};
 
@@ -803,7 +802,7 @@ void AliITSUpgradeClusterFinder::DigitsToRecPoints(const TObjArray *digList) {
   Int_t nClusters =0;
   TClonesArray &lrecp = *fRecPoints;
 
-  for(Int_t ilayer=0; ilayer < 6 ;ilayer ++){
+  for(Int_t ilayer=0; ilayer < fNlayers ;ilayer ++){
     TClonesArray *pArrDig= (TClonesArray*)digList->At(ilayer);
     StartEvent();
     AliDebug(1,Form("layer %i : # digits %i",ilayer,pArrDig->GetEntries()));
@@ -812,6 +811,7 @@ void AliITSUpgradeClusterFinder::DigitsToRecPoints(const TObjArray *digList) {
       Int_t colz=dig->GetzPixelNumber();
       Int_t rowx=dig->GetxPixelNumber();
       Double_t hitcharge= (dig->GetNelectrons());
+
       ProcessHit(ilayer,colz, rowx,(Short_t)hitcharge,dig->GetTracks());
     }//ientr
     FinishEvent();
index 9db57b9234b44912a0eb524d55f3fd955320dab4..e9f018a2dda629672da8d811cf20867d815483b1 100644 (file)
@@ -101,6 +101,8 @@ class AliITSUpgradeClusterFinder :public TObject{
   AliITSUpgradeClusterList fClusterList[8]; // cluster container
   TObjArray *fChargeArray;  // charge identifier
   TClonesArray *fRecPoints; // used to fill treeR
+  
+  Int_t fNlayers;//number of layer in ITSUpgrade
 
   AliITSUpgradeClusterFinder(const AliITSUpgradeClusterFinder &source); // copy constructor
   // assignment operator
index 5ece2d155cb8515a6d8281a4de0ac05bccf52166..0927efda5b5ddab2e5b586c64e0bca8e3b5fa067 100644 (file)
@@ -48,7 +48,7 @@ ClassImp(AliITSUpgradeReconstructor)
   //
   //ctor
   //
-  
+
   AliITSsegmentationUpgrade *s = new AliITSsegmentationUpgrade();
   fNlayers = s->GetNLayers();
   delete s;
@@ -93,8 +93,8 @@ void AliITSUpgradeReconstructor::SetTreeAddressD(TTree* const treeD){
   Int_t i;
   char branchname[30];
   if(!treeD) return;
-  if (fDigits == 0x0) fDigits = new TObjArray(6);
-  for (i=0; i<6; i++) {
+  if (fDigits == 0x0) fDigits = new TObjArray(fNlayers);
+  for (i=0; i<fNlayers; i++) {
     if(!(fDigits->At(i))) {
       fDigits->AddAt(new TClonesArray("AliITSDigitUpgrade",1000),i);
     }
@@ -113,7 +113,7 @@ void AliITSUpgradeReconstructor::ResetDigits(){
   // Reset number of digits and the digits array for the ITS detector.
 
   if(!fDigits) return;
-  for(Int_t i=0;i<6;i++){
+  for(Int_t i=0;i<fNlayers;i++){
     ResetDigits(i);
   }
 }
@@ -154,21 +154,21 @@ AliTracker* AliITSUpgradeReconstructor::CreateTracker() const
   // 
 
   if(GetRecoParam()->GetTrackerSAOnly()){
-  AliITStrackerUpgrade *trackUp = new AliITStrackerUpgrade(fNlayers);
-  if(GetRecoParam()->GetTrackerSAOnly()) trackUp->SetSAFlag(kTRUE);
-  if(trackUp->GetSAFlag())AliDebug(1,"Tracking Performed in ITS only\n");
-  if(GetRecoParam()->GetInwardFindingSA()){
-    trackUp->SetInwardFinding();
-    trackUp->SetInnerStartLayer(GetRecoParam()->GetInnerStartLayerSA());
-  }else{
-    trackUp->SetOutwardFinding();
-    trackUp->SetOuterStartLayer(GetRecoParam()->GetOuterStartLayerSA());
-  }
-  trackUp->SetMinNPoints(GetRecoParam()->GetMinNPointsSA());
-  return trackUp;
+    AliITStrackerUpgrade *trackUp = new AliITStrackerUpgrade(fNlayers);
+    if(GetRecoParam()->GetTrackerSAOnly()) trackUp->SetSAFlag(kTRUE);
+    if(trackUp->GetSAFlag())AliDebug(1,"Tracking Performed in ITS only\n");
+    if(GetRecoParam()->GetInwardFindingSA()){
+      trackUp->SetInwardFinding();
+      trackUp->SetInnerStartLayer(GetRecoParam()->GetInnerStartLayerSA());
+    }else{
+      trackUp->SetOutwardFinding();
+      trackUp->SetOuterStartLayer(GetRecoParam()->GetOuterStartLayerSA());
+    }
+    trackUp->SetMinNPoints(GetRecoParam()->GetMinNPointsSA());
+    return trackUp;
   } else {
-  AliITStrackerU *t = new AliITStrackerU();
-  return t;
+    AliITStrackerU *t = new AliITStrackerU();
+    return t;
   }
 }
 //_______________________________________________________________________
index f8ea96c1f5fb7c260744a888394a8293038e7f97..d323bf9c78befc3dfa348a0da564835386ae753f 100755 (executable)
 //           cristina.terrevoli@ba.infn.it            //                                                    
 ////////////////////////////////////////////////////////
 
+#include "AliESDtrack.h"
 #include "AliITStrackU.h"
 #include "AliITSsegmentationUpgrade.cxx"
 
 ClassImp(AliITStrackU)
 
 //_____________________________________
-AliITStrackU:: AliITStrackU() : AliITStrackMI(),
-fNU(0),
-fNLayers(0)
+  AliITStrackU:: AliITStrackU() : AliITStrackV2(),
+                                 fNLayers(0),
+                                 fNU(0),
+                                 fExpQ(40)
 {
-// Default constructor  
+  // Default constructor  
   SetNumberOfClusters(0);
   SetNumberOfClustersU(0);
   ResetIndexU();
+  for(Int_t i=0; i<12; i++) {fDy[i]=0; fDz[i]=0; fSigmaY[i]=0; fSigmaZ[i]=0; fSigmaYZ[i]=0;}
   for(Int_t nlay=0;nlay<fNLayers;nlay++){ 
+    fClIndex[nlay]=-1; 
+    fNy[nlay]=0; fNz[nlay]=0; fNormQ[nlay]=0; fNormChi2[nlay]=1000;
     SetNumberOfMarked(nlay,0);
   }
   ResetMarked();
 }
 //_____________________________________
-AliITStrackU:: AliITStrackU(Int_t nlay) : AliITStrackMI(),
-fNU(0),
-fNLayers(nlay)
+AliITStrackU:: AliITStrackU(Int_t nlay) : AliITStrackV2(),
+                                         fNLayers(nlay),
+                                         fNU(0),
+                                         fExpQ(40)
 {
-// Constructor
+  // Constructor
   SetNumberOfClusters(0);
   SetNumberOfClustersU(0);
   ResetIndexU();
+  for(Int_t i=0; i<12; i++) {fDy[i]=0; fDz[i]=0; fSigmaY[i]=0; fSigmaZ[i]=0; fSigmaYZ[i]=0;}
   for(Int_t nl=0;nl<fNLayers;nl++){
+    fClIndex[nl]=-1;
+    fNy[nl]=0; fNz[nl]=0; fNormQ[nl]=0; fNormChi2[nl]=1000;
     SetNumberOfMarked(nl,0);
   }
   ResetMarked();
 }
 
-//___________________________________________________
-AliITStrackU::AliITStrackU(const AliITStrackMI& t) : 
-AliITStrackMI(t),
-fNU(0),
-fNLayers(0)
+//_____________________________________________________
+AliITStrackU::AliITStrackU(AliESDtrack& t,Bool_t c):
+  AliITStrackV2(t,c),
+  fNLayers(0),
+  fNU(0),
+  fExpQ(40)
 {
-//
-// Copy a V2 track into a U track
-// -> to be checked
+  //------------------------------------------------------------------
+  // Copy a V2 track into a U track
+  // -> to be checked
+  //------------------------------------------------------------------
+  for(Int_t i=0; i<12; i++) {fDy[i]=0; fDz[i]=0; fSigmaY[i]=0; fSigmaZ[i]=0; fSigmaYZ[i]=0; }
 
-  SetNumberOfClustersU(0);
-  ResetIndexU();
-  for(Int_t nlay=0;nlay<fNLayers;nlay++){ 
-    SetNumberOfMarked(nlay,0);
+  for(Int_t nlay=0;nlay<fNLayers;nlay++){
+    fClIndex[nlay]=-1; fNy[nlay]=0; fNz[nlay]=0; fNormQ[nlay]=0; fNormChi2[nlay]=1000;  
   }
-  ResetMarked();
-
 }
 //___________________________________________________
-AliITStrackU::AliITStrackU(const AliITStrackU& t) : 
-AliITStrackMI(t),
-fNU(t.fNU),
-fNLayers(t.fNLayers)
+
+AliITStrackU::AliITStrackU(const AliITStrackU& t, Bool_t trackMI) : 
+  AliITStrackV2(t),
+  fNLayers(t.fNLayers),
+  fNU(t.fNU),
+  fExpQ(t.fExpQ)
 {
-//
-// Copy constructor
-// to be checked
+  // Copy constructor
 
   ResetIndexU();
   ResetMarked();
   Int_t number = t.GetNumberOfClustersU();
   SetNumberOfClustersU(number);
-  for(Int_t nlay=0;nlay<fNLayers;nlay++){
-    SetNumberOfMarked(nlay,t.GetNumberOfMarked(nlay));
+  for(Int_t lay=0;lay<fNLayers;lay++){
+    SetNumberOfMarked(lay,t.GetNumberOfMarked(lay));
   }
   for(Int_t i=0;i<number;i++){
     fSain[i]=t.fSain[i];
@@ -98,26 +106,46 @@ fNLayers(t.fNLayers)
     for(Int_t i=0;i<t.GetNumberOfMarked(nlay);i++){
       fCluMark[nlay][i]=t.fCluMark[nlay][i];
     }
+    fClIndex[nlay]= t.fClIndex[nlay]; fNy[nlay]=t.fNy[nlay]; fNz[nlay]=t.fNz[nlay]; fNormQ[nlay]=t.fNormQ[nlay]; fNormChi2[nlay] = t.fNormChi2[nlay];
+  } 
+  
+  //  for(Int_t i=0; i<12; i++) {fDy[i]=t.fDy[i]; fDz[i]=t.fDz[i];
+  // fSigmaY[i]=t.fSigmaY[i]; fSigmaZ[i]=t.fSigmaZ[i]; fSigmaYZ[i]=t.fSigmaYZ[i]; }
+
+  if(trackMI){
+    fLab = t.fLab;
+    fFakeRatio = t.fFakeRatio;
+    for(Int_t i=0; i<fNLayers; i++) {
+      fClIndex[i]= t.fClIndex[i]; fNy[i]=t.fNy[i]; fNz[i]=t.fNz[i]; fNormQ[i]=t.fNormQ[i]; fNormChi2[i] = t.fNormChi2[i];
+    }
+    for(Int_t i=0; i<12; i++) {fDy[i]=t.fDy[i]; fDz[i]=t.fDz[i];
+      fSigmaY[i]=t.fSigmaY[i]; fSigmaZ[i]=t.fSigmaZ[i]; fSigmaYZ[i]=t.fSigmaYZ[i]; }
   }
+
 }
+
 //____________________________________________________
 AliITStrackU::AliITStrackU(Double_t alpha, Double_t radius, Double_t Ycoor, Double_t Zcoor, Double_t phi, Double_t tanlambda, Double_t curv, Int_t lab, Int_t nlay ):
-fNU(0), fNLayers(nlay)
+  fNLayers(nlay),
+  fNU(0), 
+  fExpQ(40)
 {
+  
+  for(Int_t i=0; i<fNLayers; i++) { fClIndex[i]=-1; fNy[i]=0; fNz[i]=0; fNormQ[i]=0; fNormChi2[i]=1000; }
   // standard constructor. Used for ITSUpgrade standalone tracking
+
   // get the azimuthal angle of the detector containing the innermost
   // cluster of this track (data member fAlpha)
+  for(Int_t i=0; i<12; i++) {fDy[i]=0; fDz[i]=0; fSigmaY[i]=0; fSigmaZ[i]=0; fSigmaYZ[i]=0;}
 
   if (alpha<0) alpha+=TMath::TwoPi();
   else if (alpha>=TMath::TwoPi()) alpha-=TMath::TwoPi();
-  Init(alpha,radius,Ycoor,Zcoor,phi,tanlambda,curv,lab);
+  Init(alpha,radius,Ycoor,Zcoor,phi,tanlambda,curv,lab/*,nlay*/);
 }
 //____________________________________________________
-  void AliITStrackU::Init(Double_t alpha, Double_t radius, Double_t Ycoor, Double_t Zcoor, Double_t phi, Double_t tanlambda, Double_t curv, Int_t lab ){
-    // initialize parameters
-
+void AliITStrackU::Init(Double_t alpha, Double_t radius, Double_t Ycoor, Double_t Zcoor, Double_t phi, Double_t tanlambda, Double_t curv, Int_t lab/*, Int_t nlay*/){
+  // initialize parameters
   fdEdx = 0;
-
   Double_t conv=GetBz()*kB2C;
   Double_t sC[] = {0.000009, // 0.000009
                    0.,
@@ -157,7 +185,7 @@ fNU(0), fNLayers(nlay)
 
   SetNumberOfClusters(0);
   SetNumberOfClustersU(0);
-  for(Int_t nlay=0;nlay<fNLayers;nlay++) SetNumberOfMarked(nlay,0);
+  for(Int_t nl=0;nl<fNLayers;nl++) SetNumberOfMarked(nl,0);
   ResetIndexU();
   ResetMarked();
   SetChi2(0);
@@ -184,7 +212,7 @@ void AliITStrackU::AddClusterU(Int_t layer, Int_t clnumb) {
 void AliITStrackU::AddClusterMark(Int_t layer, Int_t clnumb) {
   // add one clusters to the list (maximum number=kMaxNumberOfClusters)
   Int_t presnum = GetNumberOfMarked(layer);
-    //printf("presnum=%d\n",presnum);
+  //printf("presnum=%d\n",presnum);
   if(presnum>=kMaxNumberOfClustersL){
     Warning("AddClusterMark","Maximum number of clusters already reached. Nothing is done\n");
     return;
@@ -202,7 +230,7 @@ void AliITStrackU::AddClusterV2(Int_t layer,Int_t clnumb) {
   if(presnum>=fNLayers){
     Warning("AddClusterV2","Maximum number of clusters already reached. Nothing is done\n");
     return;
-   }    
+  }    
 
   fIndex[presnum] = (layer<<28)+clnumb;  
   presnum++;
@@ -217,4 +245,31 @@ void AliITStrackU::ResetMarked(){
     for(Int_t k=0; k<kMaxNumberOfClustersL; k++) fCluMark[nlay][k]=0;
   }
 }
+//_____________________________________________________________
+Double_t AliITStrackU::GetPredictedChi2MI(Double_t cy, Double_t cz, Double_t cerry, Double_t cerrz, Double_t covyz) const
+{
+  //-----------------------------------------------------------------
+  // This function calculates a predicted chi2 increment.
+  //-----------------------------------------------------------------
+  Double_t p[2]={cy, cz};
+  Double_t cov[3]={cerry*cerry, covyz, cerrz*cerrz};
+  return AliExternalTrackParam::GetPredictedChi2(p,cov);
+}
 
+//____________________________________________________________________________
+Bool_t AliITStrackU::UpdateMI(const AliCluster *c, Double_t chi2, Int_t index) {
+  //------------------------------------------------------------------
+  //This function updates track parameters
+  //------------------------------------------------------------------
+  Double_t dy=c->GetY() - GetY(), dz=c->GetZ() - GetZ();
+  Int_t layer = (index & 0xf0000000) >> 28;
+  fDy[layer] = dy;
+  fDz[layer] = dz;
+  fSigmaY[layer] = TMath::Sqrt(c->GetSigmaY2()+GetSigmaY2());
+  fSigmaZ[layer] = TMath::Sqrt(c->GetSigmaZ2()+GetSigmaZ2());
+  fSigmaYZ[layer] = c->GetSigmaYZ()+GetSigmaZY();
+
+
+  return Update(c,chi2,index);
+}
index e2a64d8eaaa4e074fa78fcd9379f9d880f0edded..03e59063d95ca5f5744d8e8108d018a2164a91fd 100755 (executable)
 //           cristina.terrevoli@ba.infn.it            //                                                    
 ////////////////////////////////////////////////////////
 
-#include "AliITStrackMI.h"
+#include "AliITStrackV2.h"
+#include "AliCluster.h"
 
-class AliITStrackU : public AliITStrackMI {
+
+class AliESDtrack;
+
+class AliITStrackU : public AliITStrackV2 {
 
 
  public:
 
   AliITStrackU();
   AliITStrackU(Int_t nlay);
-  AliITStrackU(const AliITStrackMI& t);
-  AliITStrackU(const AliITStrackU& t);
+  AliITStrackU(AliESDtrack& t,Bool_t c=kFALSE);
+  AliITStrackU(const AliITStrackU& t, Bool_t trackMI=kFALSE);
   AliITStrackU(Double_t alpha, Double_t radius,
-                Double_t Ycoor, Double_t Zcoor, Double_t phi, 
-                Double_t tanlambda, Double_t curv, Int_t lab, Int_t nlay);
+              Double_t Ycoor, Double_t Zcoor, Double_t phi, 
+              Double_t tanlambda, Double_t curv, Int_t lab, Int_t nlay);
+  Bool_t UpdateMI(const AliCluster *c, Double_t chi2, Int_t i);
+  Int_t* ClIndex() {return fClIndex;}
+  Float_t GetSigmaY(Int_t i) const {return fSigmaY[i];}
+  Float_t GetSigmaZ(Int_t i) const {return fSigmaZ[i];}
+  Float_t GetSigmaYZ(Int_t i) const {return fSigmaYZ[i];}
+  void SetSigmaY(Int_t i, Float_t s) {fSigmaY[i]=s;}
+  void SetSigmaZ(Int_t i, Float_t s) {fSigmaZ[i]=s;}
+  void SetSigmaYZ(Int_t i, Float_t s) {fSigmaYZ[i]=s;}
+  
+  Float_t GetExpQ() const {return fExpQ;}
+  void SetExpQ(Float_t f) {fExpQ=f;}
+
+  
+  Int_t GetClIndex(Int_t i) const {return fClIndex[i];}
+  void SetClIndex(Int_t i, Int_t c) {fClIndex[i]=c;}
+  Float_t GetNormChi2(Int_t i) const {return fNormChi2[i];}
+  void SetNormChi2(Int_t i, Float_t n) {fNormChi2[i]=n;}
+  Float_t GetNormQ(Int_t i) const {return fNormQ[i];}
+  void SetNormQ(Int_t i, Float_t q) {fNormQ[i]=q;}
+  Float_t GetNy(Int_t i) const {return fNy[i];}
+  void SetNy(Int_t i, Float_t f) {fNy[i]=f;}
+  Float_t GetNz(Int_t i) const {return fNz[i];}
+  void SetNz(Int_t i, Float_t f) {fNz[i]=f;}
+  Double_t GetPredictedChi2MI(Double_t cy, Double_t cz, Double_t cerry, Double_t cerrz, Double_t covyz=0.) const;
 
   Int_t GetClusterIndexU(Int_t i) const {return fSain[i];}
   Int_t GetClusterMark(Int_t layer,Int_t i) const {return fCluMark[layer][i];}
@@ -42,23 +70,37 @@ class AliITStrackU : public AliITStrackMI {
   
   void Init(Double_t alpha, Double_t radius,
            Double_t Ycoor, Double_t Zcoor, Double_t phi, 
-           Double_t tanlambda, Double_t curv, Int_t lab);
+           Double_t tanlambda, Double_t curv, Int_t lab/*,Int_t nlay*/);
   void SetNumberOfClustersU(Int_t n){fNU = n;}
   void SetNumberOfMarked(Int_t lay,Int_t n) {fNM[lay] = n;}
   void ResetIndexU(){for(Int_t k=0; k<kMaxNumberOfClusters; k++) fSain[k]=0;}
   void ResetMarked(); 
 
   static const Int_t fgMaxNLayer = 8; //max number of layers in ITSUpgrade
-  Int_t fNU;          // number of clusters Stand Alone Upgrade 
   Int_t fNLayers;    // number of layers
-
   UInt_t  fSain[kMaxNumberOfClusters];   // cluster index (Stand Alone Upgrade)
+  Int_t fNU;          // number of clusters Stand Alone Upgrade 
 
   Int_t fCluMark[fgMaxNLayer][kMaxNumberOfClustersL]; //indices for cluster used
   Int_t fNM[fgMaxNLayer]; //number of marked clusters
-
-  ClassDef(AliITStrackU,1)
-};
+  
+  Float_t fDy[12];           //dy in layer
+  Float_t fDz[12];           //dz in layer
+  Float_t fSigmaY[12];       //sigma y 
+  Float_t fSigmaZ[12];       //sigma z
+  Float_t fSigmaYZ[12];       //covariance of y and z
+
+  Float_t fNy[fgMaxNLayer];              //expected size of cluster
+  Float_t fNz[fgMaxNLayer];              //expected size of cluster
+  Float_t fNormQ[fgMaxNLayer];           // normalized Q
+  Float_t fExpQ;            // expected Q
+
+  Float_t fNormChi2[fgMaxNLayer];        // normalized chi2
+  Int_t    fClIndex[fgMaxNLayer];        //cluster Index
+  
+  
+  ClassDef(AliITStrackU,2)
+    };
 
 #endif
 
index 9aaaa3afc88617d140047e26114b8b7448a276eb..59e6246c4626c99f2c17dda55a7076dbdf26e3b6 100644 (file)
@@ -49,70 +49,66 @@ ClassImp(AliITStrackerUpgrade)
 
 //____________________________________________________________________________
   AliITStrackerUpgrade::AliITStrackerUpgrade():AliITStrackerMI(),
-   fNLayers(), fPhiEstimate(0), fITSStandAlone(0), fLambdac(0),
-   fPhic(0), fCoef1(0), fCoef2(0), fCoef3(0), fNloop(0), 
-   fPhiWin(0),  fLambdaWin(0), fVert(0), fVertexer(0),
-   fListOfTracks(0), fListOfUTracks(0), fITSclusters(0),
-   fInwardFlag(0), fOuterStartLayer(0),  fInnerStartLayer(0),
-   fMinNPoints(0),  fMinQ(0),  fLayers(0), fSegmentation(0x0),
-   fCluLayer(0), fCluCoord(0)
-   {
-    //
-    // Default constructor
-    //
-    Init();
+                                              fNLayers(), fPhiEstimate(0), fITSStandAlone(0), fLambdac(0),
+                                              fPhic(0), fCoef1(0), fCoef2(0), fCoef3(0), fNloop(0), 
+                                              fPhiWin(0),  fLambdaWin(0), fVert(0), fVertexer(0),
+                                              fListOfTracks(0), fListOfUTracks(0), fITSclusters(0),
+                                              fInwardFlag(0), fOuterStartLayer(0),  fInnerStartLayer(0),
+                                              fMinNPoints(0),  fMinQ(0), fTrackToFollow(), fLayers(0), fSegmentation(0x0),
+                                              fCluLayer(0), fCluCoord(0)
+{
+  // Default constructor
+  Init();
  
-  }
-  
-  //____________________________________________________________________________
-  AliITStrackerUpgrade::AliITStrackerUpgrade(Int_t nLay):AliITStrackerMI(),
-   fNLayers(nLay), fPhiEstimate(0), fITSStandAlone(0), fLambdac(0),
-   fPhic(0), fCoef1(0), fCoef2(0), fCoef3(0), fNloop(0), 
-   fPhiWin(0),  fLambdaWin(0), fVert(0), fVertexer(0),
-   fListOfTracks(0), fListOfUTracks(0), fITSclusters(0),
-   fInwardFlag(0), fOuterStartLayer(0),  fInnerStartLayer(nLay),
-   fMinNPoints(0),  fMinQ(0),  fLayers(0), fSegmentation(0x0),
-   fCluLayer(0), fCluCoord(0)
-   {
-    //
-    // constructor
-    //
-    Init();
+}
+//____________________________________________________________________________
+AliITStrackerUpgrade::AliITStrackerUpgrade(Int_t nLay):AliITStrackerMI(),
+                                                      fNLayers(nLay), fPhiEstimate(0), fITSStandAlone(0), fLambdac(0),
+                                                      fPhic(0), fCoef1(0), fCoef2(0), fCoef3(0), fNloop(0), 
+                                                      fPhiWin(0),  fLambdaWin(0), fVert(0), fVertexer(0),
+                                                      fListOfTracks(0), fListOfUTracks(0), fITSclusters(0),
+                                                      fInwardFlag(0), fOuterStartLayer(0),  fInnerStartLayer(nLay),
+                                                      fMinNPoints(0),  fMinQ(0),  fTrackToFollow(), fLayers(0), fSegmentation(0x0),
+                                                      fCluLayer(0), fCluCoord(0)
+{
+  //
+  // constructor
+  //
+  Init();
  
-  }
+}
   
 //________________________________________________________________________
 AliITStrackerUpgrade::AliITStrackerUpgrade(const AliITStrackerUpgrade& tracker):AliITStrackerMI(),
-    fNLayers(tracker.fNLayers), fPhiEstimate(tracker.fPhiEstimate),
-    fITSStandAlone(tracker.fITSStandAlone), fLambdac(tracker.fLambdac),
-    fPhic(tracker.fPhic), fCoef1(tracker.fCoef1), fCoef2(tracker.fCoef2),
-    fCoef3(tracker.fCoef3), fNloop(tracker.fNloop), fPhiWin(tracker.fPhiWin),
-    fLambdaWin(tracker.fLambdaWin), fVert(tracker.fVert), fVertexer(tracker.fVertexer),
-    fListOfTracks(tracker.fListOfTracks), fListOfUTracks(tracker.fListOfUTracks),
-    fITSclusters(tracker.fITSclusters), fInwardFlag(tracker.fInwardFlag),
-    fOuterStartLayer(tracker.fOuterStartLayer), fInnerStartLayer(tracker.fInnerStartLayer),
-    fMinNPoints(tracker.fMinNPoints), fMinQ(tracker.fMinQ), fLayers(tracker.fLayers),
-    fSegmentation(tracker.fSegmentation), fCluLayer(tracker.fCluLayer), fCluCoord(tracker.fCluCoord) 
-    {
-    //                                                                 
-    // Copy constructor
-    for(Int_t i=0;i<2;i++){
-     fPoint1[i]=tracker.fPoint1[i];
-     fPoint2[i]=tracker.fPoint2[i];
-     fPoint3[i]=tracker.fPoint3[i];
-     fPointc[i]=tracker.fPointc[i];
-    }
-    if(tracker.fVertexer && tracker.fVert){
-      fVert = new AliESDVertex(*tracker.fVert);
-    }
-     else {
-     fVert = tracker.fVert;
-    }
-    
-    for(Int_t i=0;i<fNLayers;i++){
-     fCluLayer[i] = tracker.fCluLayer[i];
-     fCluCoord[i] = tracker.fCluCoord[i];
-    }
+                                                                               fNLayers(tracker.fNLayers), fPhiEstimate(tracker.fPhiEstimate),
+                                                                               fITSStandAlone(tracker.fITSStandAlone), fLambdac(tracker.fLambdac),
+                                                                               fPhic(tracker.fPhic), fCoef1(tracker.fCoef1), fCoef2(tracker.fCoef2),
+                                                                               fCoef3(tracker.fCoef3), fNloop(tracker.fNloop), fPhiWin(tracker.fPhiWin),
+                                                                               fLambdaWin(tracker.fLambdaWin), fVert(tracker.fVert), fVertexer(tracker.fVertexer),
+                                                                               fListOfTracks(tracker.fListOfTracks), fListOfUTracks(tracker.fListOfUTracks),
+                                                                               fITSclusters(tracker.fITSclusters), fInwardFlag(tracker.fInwardFlag),
+                                                                               fOuterStartLayer(tracker.fOuterStartLayer), fInnerStartLayer(tracker.fInnerStartLayer),
+                                                                               fMinNPoints(tracker.fMinNPoints), fMinQ(tracker.fMinQ), fTrackToFollow(tracker.fTrackToFollow), fLayers(tracker.fLayers),
+                                                                               fSegmentation(tracker.fSegmentation), fCluLayer(tracker.fCluLayer), fCluCoord(tracker.fCluCoord) 
+{
+  //                                                                   
+  // Copy constructor
+  for(Int_t i=0;i<2;i++){
+    fPoint1[i]=tracker.fPoint1[i];
+    fPoint2[i]=tracker.fPoint2[i];
+    fPoint3[i]=tracker.fPoint3[i];
+    fPointc[i]=tracker.fPointc[i];
+  }
+  if(tracker.fVertexer && tracker.fVert){
+    fVert = new AliESDVertex(*tracker.fVert);
+  }
+  else {
+    fVert = tracker.fVert;
+  }
+  for(Int_t i=0;i<fNLayers;i++){
+    fCluLayer[i] = tracker.fCluLayer[i];
+    fCluCoord[i] = tracker.fCluCoord[i];
+  }
 }
 //______________________________________________________________________
 AliITStrackerUpgrade& AliITStrackerUpgrade::operator=(const AliITStrackerUpgrade& source){
@@ -213,7 +209,7 @@ void AliITStrackerUpgrade::Init(){
   fITSclusters = 0;
   SetOuterStartLayer(1);
   SetSAFlag(kFALSE);
-  fListOfTracks=new TClonesArray("AliITStrackMI",100);
+  fListOfTracks=new TClonesArray("AliITStrackU",100);
   fListOfUTracks=new TClonesArray("AliITStrackU",100);
   fLayers=new AliITSlayerUpgrade*[nL];//to be fixed
   fCluLayer = 0;
@@ -313,12 +309,12 @@ Int_t AliITStrackerUpgrade::FindTracks(AliESDEvent* event,Bool_t useAllClusters)
   //Get primary vertex
   Double_t primaryVertex[3];
   event->GetVertex()->GetXYZ(primaryVertex);
-  Int_t nclusters[fNLayers];//={0,0,0,0,0,0};
+  Int_t nclusters[fNLayers];
   for(Int_t i=0; i<fNLayers; i++){
     nclusters[i]=0;
   }
   
-  Int_t dmar[fNLayers];//={0,0,0,0,0,0};
+  Int_t dmar[fNLayers];
   for(Int_t i=0; i<fNLayers; i++){ 
     dmar[i]=0;
   }
@@ -380,7 +376,7 @@ Int_t AliITStrackerUpgrade::FindTracks(AliESDEvent* event,Bool_t useAllClusters)
   // track counter
   Int_t ntrack=0;
 
-  static Int_t nClusLay[6];//counter for clusters on each layer
+  static Int_t nClusLay[fgMaxNLayer];//counter for clusters on each layer
   Int_t startLayForSeed=0;
   Int_t lastLayForSeed=fOuterStartLayer;
   Int_t nSeedSteps=lastLayForSeed-startLayForSeed;
@@ -416,7 +412,6 @@ Int_t AliITStrackerUpgrade::FindTracks(AliESDEvent* event,Bool_t useAllClusters)
           Int_t pflag=0;
           Int_t kk;
           for(kk=0;kk<fNLayers;kk++) nClusLay[kk] = 0;
-
           kk=0;
           nClusLay[kk] = SearchClusters(theLay,fPhiWin[nloop],fLambdaWin[nloop],
                                         &trs,primaryVertex[2],pflag);
@@ -456,16 +451,16 @@ Int_t AliITStrackerUpgrade::FindTracks(AliESDEvent* event,Bool_t useAllClusters)
            AliDebug(2,Form("---NPOINTS: %d; MAP: %d %d %d %d %d %d\n",layOK,nClusLay[0],nClusLay[1],nClusLay[2],nClusLay[3],nClusLay[4],nClusLay[5]));
             AliITStrackV2* tr2 = 0;
             Bool_t onePoint = kFALSE;
-            tr2 = FitTrack(&trs,primaryVertex,onePoint);
-            if(!tr2){
-              continue;
-            }
-            AliDebug(2,Form("---NPOINTS fit: %d\n",tr2->GetNumberOfClusters()));
-       
-            StoreTrack(tr2,event,useAllClusters);
-            ntrack++;
+           tr2 = FitTrack(&trs,primaryVertex,onePoint);
+           if(!tr2){
+             continue;
+           }
+           AliDebug(2,Form("---NPOINTS fit: %d\n",tr2->GetNumberOfClusters()));
 
-          }
+           StoreTrack(tr2,event,useAllClusters);
+           ntrack++;
+
+         }
 
         }//end loop on clusters of theLay
       } //end loop on window sizes
@@ -482,17 +477,16 @@ Int_t AliITStrackerUpgrade::FindTracks(AliESDEvent* event,Bool_t useAllClusters)
 
 AliITStrackV2* AliITStrackerUpgrade::FitTrack(AliITStrackU* tr,Double_t *primaryVertex,Bool_t onePoint) {
 
-  
   const Int_t kMaxClu=AliITStrackU::kMaxNumberOfClusters;
 
   
-  static Int_t clind[6][kMaxClu];
-  static Int_t clmark[6][kMaxClu];
-  static Int_t end[6];
-  static AliITSRecPoint *listlayer[6][kMaxClu];
+  static Int_t clind[fgMaxNLayer][kMaxClu];
+  static Int_t clmark[fgMaxNLayer][kMaxClu];
+  static Int_t end[fgMaxNLayer];
+  static AliITSRecPoint *listlayer[fgMaxNLayer][kMaxClu];
+  for(Int_t k=0;k<fgMaxNLayer; k++)end[k]=0;
 
   for(Int_t i=0;i<fNLayers;i++) {
-    end[i]=0;
     for(Int_t j=0;j<kMaxClu; j++){
       clind[i][j]=0;
       clmark[i][j]=0;
@@ -538,11 +532,21 @@ AliITStrackV2* AliITStrackerUpgrade::FitTrack(AliITStrackU* tr,Double_t *primary
     }
   }
 
+  //---adding initialization for non existent layers
+  for(Int_t i=fNLayers;i<fgMaxNLayer;i++) {
+    if(end[i]==0) {
+      end[i]=1;
+    }
+  }
+
+
+
   if(firstLay==-1 || (secondLay==-1 && !onePoint)) return 0;
-  TClonesArray &arrMI= *fListOfTracks;
+
   TClonesArray &arrSA= *fListOfUTracks;
   Int_t nFoundTracks=0;
 
+
   for(Int_t l0=0;l0<end[0];l0++){ //loop on layer 1
     AliITSRecPoint* cl0 = (AliITSRecPoint*)listlayer[0][l0];
     for(Int_t l1=0;l1<end[1];l1++){ //loop on layer 2
@@ -555,161 +559,184 @@ AliITStrackV2* AliITStrackerUpgrade::FitTrack(AliITStrackU* tr,Double_t *primary
             AliITSRecPoint* cl4 = (AliITSRecPoint*)listlayer[4][l4];
             for(Int_t l5=0;l5<end[5];l5++){ //loop on layer 6  
               AliITSRecPoint* cl5 = (AliITSRecPoint*)listlayer[5][l5];
-
-
-             Double_t x1,y1,z1,sx1,sy1,sz1;
-             Double_t x2,y2,z2,sx2,sy2,sz2;
-             AliITSRecPoint* p1=0;
-             AliITSRecPoint* p2=0;
-             Int_t index1=0,index2=0;
-             Int_t mrk1=0,mrk2=0;
-
-             switch(firstLay) {
-             case 0:
-               p1=cl0;
-               index1=clind[0][l0];mrk1=clmark[0][l0];
-               break;
-             case 1:
-               p1=cl1;
-               index1=clind[1][l1];mrk1=clmark[1][l1];
-               break;
-             case 2:
-               p1=cl2;
-               index1=clind[2][l2];mrk1=clmark[2][l2];
-               break;
-             case 3:
-               p1=cl3;
-               index1=clind[3][l3];mrk1=clmark[3][l3];
-               break;
-             case 4:
-               p1=cl4;
-               index1=clind[4][l4];mrk1=clmark[4][l4];
-               break;
-             }
-
-             switch(secondLay) {
-             case 1:
-               p2=cl1;
-               index2=clind[1][l1];mrk2=clmark[1][l1];
-               break;
-             case 2:
-               p2=cl2;
-               index2=clind[2][l2];mrk2=clmark[2][l2];
-               break;
-             case 3:
-               p2=cl3;
-               index2=clind[3][l3];mrk2=clmark[3][l3];
-               break;
-             case 4:
-               p2=cl4;
-               index2=clind[4][l4];mrk2=clmark[4][l4];
-               break;
-             case 5:
-               p2=cl5;
-               index2=clind[5][l5];mrk2=clmark[5][l5];
-               break;
-             default:
-               p2=0;
-               index2=-1;mrk2=-1;
-               break;
-             }
-
-             Int_t layer = 0;
-             Double_t radius = 0.;
-              Double_t yclu1 = p1->GetY();
-              Double_t zclu1 = p1->GetZ();
-             layer=p1->GetLayer();
-             radius = fSegmentation->GetRadius(layer);
-             Double_t cv=0.,tgl2=0.,phi2=0.;
-             Int_t cln1=mrk1;
-             AliITSclusterTable* arr1 = (AliITSclusterTable*)GetClusterCoord(firstLay,cln1);
-             x1 = arr1->GetX();
-             y1 = arr1->GetY();
-             z1 = arr1->GetZ();
-             sx1 = arr1->GetSx();
-             sy1 = arr1->GetSy();
-             sz1 = arr1->GetSz();
-
-             if(secondLay>0) {
-               Int_t cln2=mrk2;
-               AliITSclusterTable* arr2 = (AliITSclusterTable*)GetClusterCoord(secondLay,cln2);
-               x2 = arr2->GetX();
-               y2 = arr2->GetY();
-               z2 = arr2->GetZ();
-               sx2 = arr2->GetSx();
-               sy2 = arr2->GetSy();
-               sz2 = arr2->GetSz();
-               cv = Curvature(primaryVertex[0],primaryVertex[1],x1,y1,x2,y2);
-               tgl2 = (z2-z1)/TMath::Sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
-               phi2 = TMath::ATan2((y2-y1),(x2-x1));
-             }
-             Double_t x,y,z = 0.;
-             Double_t xz[2];
-             xz[0]= p1->GetDetLocalX(); 
-             xz[1]= p1->GetDetLocalZ();   
-             Bool_t check2;
-             check2 = fSegmentation->DetToGlobal(layer,xz[0], xz[1],x,y,z);
-
-
-              Double_t phiclrad, phicldeg;
-              phiclrad=TMath::ATan2(y,x); 
-              if (phiclrad<0) phiclrad+=TMath::TwoPi();
-              else if (phiclrad>=TMath::TwoPi()) phiclrad-=TMath::TwoPi();
-
-              phicldeg=180.*phiclrad/TMath::Pi();
-              Int_t ladder=(Int_t)(phicldeg/18.);//virtual segmentation
-              Double_t alpha= (ladder*18.+9.)*TMath::Pi()/180.;
-
-
-              AliITStrackU trac(alpha,radius,yclu1,zclu1,phi2,tgl2,cv,1,fNLayers);
-
-
-              if(cl5!=0) {
-               trac.AddClusterV2(5,(clind[5][l5] & 0x0fffffff)>>0);
-               trac.AddClusterMark(5,clmark[5][l5]);
-             }
-              if(cl4!=0){
-               trac.AddClusterV2(4,(clind[4][l4] & 0x0fffffff)>>0);
-               trac.AddClusterMark(4,clmark[4][l4]);
-             }
-              if(cl3!=0){
-               trac.AddClusterV2(3,(clind[3][l3] & 0x0fffffff)>>0);
-               trac.AddClusterMark(3,clmark[3][l3]);
-             }
-              if(cl2!=0){
-               trac.AddClusterV2(2,(clind[2][l2] & 0x0fffffff)>>0);
-               trac.AddClusterMark(2,clmark[2][l2]);
-             }
-              if(cl1!=0){
-               trac.AddClusterV2(1,(clind[1][l1] & 0x0fffffff)>>0);
-               trac.AddClusterMark(1,clmark[1][l1]);
-             }
-              if(cl0!=0){
-               trac.AddClusterV2(0,(clind[0][l0] & 0x0fffffff)>>0);
-               trac.AddClusterMark(0,clmark[0][l0]);
-             }
+              for(Int_t l6=0;l6<end[6];l6++){//loop on layer 7
+               AliITSRecPoint* cl6 = (AliITSRecPoint*)listlayer[6][l6];
+               for(Int_t l7=0;l7<end[7];l7++){ //loop on layer 8
+                 AliITSRecPoint* cl7 = (AliITSRecPoint*)listlayer[7][l7];
+                 Double_t x1,y1,z1,sx1,sy1,sz1;
+                 Double_t x2,y2,z2,sx2,sy2,sz2;
+                 AliITSRecPoint* p1=0;
+                 AliITSRecPoint* p2=0;
+                 Int_t index1=0,index2=0;
+                 Int_t mrk1=0,mrk2=0;
+                 switch(firstLay) {
+                 case 0:
+                   p1=cl0;
+                   index1=clind[0][l0];mrk1=clmark[0][l0];
+                   break;
+                 case 1:
+                   p1=cl1;
+                   index1=clind[1][l1];mrk1=clmark[1][l1];
+                   break;
+                 case 2:
+                   p1=cl2;
+                   index1=clind[2][l2];mrk1=clmark[2][l2];
+                   break;
+                 case 3:
+                   p1=cl3;
+                   index1=clind[3][l3];mrk1=clmark[3][l3];
+                   break;
+                 case 4:
+                   p1=cl4;
+                   index1=clind[4][l4];mrk1=clmark[4][l4];
+                   break;
+                 case 5:
+                    p1=cl5;
+                    index1=clind[5][l5];mrk1=clmark[5][l5];
+                    break;
+                 case 6:
+                    p1=cl6;
+                    index1=clind[6][l6];mrk1=clmark[6][l6];
+                    break;
+                 }
+                 switch(secondLay) {
+                 case 1:
+                   p2=cl1;
+                   index2=clind[1][l1];mrk2=clmark[1][l1];
+                   break;
+                 case 2:
+                   p2=cl2;
+                   index2=clind[2][l2];mrk2=clmark[2][l2];
+                   break;
+                 case 3:
+                   p2=cl3;
+                   index2=clind[3][l3];mrk2=clmark[3][l3];
+                   break;
+                 case 4:
+                   p2=cl4;
+                   index2=clind[4][l4];mrk2=clmark[4][l4];
+                   break;
+                 case 5:
+                   p2=cl5;
+                   index2=clind[5][l5];mrk2=clmark[5][l5];
+                   break;
+                 case 6:
+                    p2=cl6;
+                    index2=clind[6][l6];mrk2=clmark[6][l6];
+                    break;
+                 case 7:
+                    p2=cl7;
+                    index2=clind[7][l7];mrk2=clmark[7][l7];
+                    break;
+
+                 default:
+                   p2=0;
+                   index2=-1;mrk2=-1;
+                   break;
+                 }
+                 Int_t layer = 0;
+                 Double_t radius = 0.;
+                 Double_t yclu1 = p1->GetY();
+                 Double_t zclu1 = p1->GetZ();
+                 layer=p1->GetLayer();
+                 radius = fSegmentation->GetRadius(layer);
+                 Double_t cv=0.,tgl2=0.,phi2=0.;
+                 Int_t cln1=mrk1;
+                 AliITSclusterTable* arr1 = (AliITSclusterTable*)GetClusterCoord(firstLay,cln1);
+                 x1 = arr1->GetX();
+                 y1 = arr1->GetY();
+                 z1 = arr1->GetZ();
+                 sx1 = arr1->GetSx();
+                 sy1 = arr1->GetSy();
+                 sz1 = arr1->GetSz();
+
+                 if(secondLay>0) {
+                    Int_t cln2=mrk2;
+                   AliITSclusterTable* arr2 = (AliITSclusterTable*)GetClusterCoord(secondLay,cln2);
+                   x2 = arr2->GetX();
+                   y2 = arr2->GetY();
+                   z2 = arr2->GetZ();
+                   sx2 = arr2->GetSx();
+                   sy2 = arr2->GetSy();
+                   sz2 = arr2->GetSz();
+                   cv = Curvature(primaryVertex[0],primaryVertex[1],x1,y1,x2,y2);
+                   tgl2 = (z2-z1)/TMath::Sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
+                   phi2 = TMath::ATan2((y2-y1),(x2-x1));
+                 }
+                 Double_t x,y,z = 0.;
+                 Double_t xz[2];
+                 xz[0]= p1->GetDetLocalX(); 
+                 xz[1]= p1->GetDetLocalZ();   
+                 Bool_t check2;
+                 check2 = fSegmentation->DetToGlobal(layer,xz[0], xz[1],x,y,z);
+
+
+                 Double_t phiclrad, phicldeg;
+                 phiclrad=TMath::ATan2(y,x); 
+                 if (phiclrad<0) phiclrad+=TMath::TwoPi();
+                 else if (phiclrad>=TMath::TwoPi()) phiclrad-=TMath::TwoPi();
+
+                 phicldeg=180.*phiclrad/TMath::Pi();
+                 Int_t ladder=(Int_t)(phicldeg/18.);//virtual segmentation
+                 Double_t alpha= (ladder*18.+9.)*TMath::Pi()/180.;
+                 AliITStrackU trac(alpha,radius,yclu1,zclu1,phi2,tgl2,cv,1,fNLayers);
+                 if(cl7!=0){
+                    trac.AddClusterV2(7,(clind[7][l7] & 0x0fffffff)>>0);
+                    trac.AddClusterMark(7,clmark[7][l7]);
+                  }
+                 if(cl6!=0){
+                    trac.AddClusterV2(6,(clind[6][l6] & 0x0fffffff)>>0);
+                    trac.AddClusterMark(6,clmark[6][l6]);
+                  }
+                 if(cl5!=0) {
+                   trac.AddClusterV2(5,(clind[5][l5] & 0x0fffffff)>>0);
+                   trac.AddClusterMark(5,clmark[5][l5]);
+                 }
+                 if(cl4!=0){
+                   trac.AddClusterV2(4,(clind[4][l4] & 0x0fffffff)>>0);
+                   trac.AddClusterMark(4,clmark[4][l4]);
+                 }
+                 if(cl3!=0){
+                   trac.AddClusterV2(3,(clind[3][l3] & 0x0fffffff)>>0);
+                   trac.AddClusterMark(3,clmark[3][l3]);
+                 }
+                 if(cl2!=0){
+                   trac.AddClusterV2(2,(clind[2][l2] & 0x0fffffff)>>0);
+                   trac.AddClusterMark(2,clmark[2][l2]);
+                 }
+                 if(cl1!=0){
+                   trac.AddClusterV2(1,(clind[1][l1] & 0x0fffffff)>>0);
+                   trac.AddClusterMark(1,clmark[1][l1]);
+                 }
+                 if(cl0!=0){
+                   trac.AddClusterV2(0,(clind[0][l0] & 0x0fffffff)>>0);
+                   trac.AddClusterMark(0,clmark[0][l0]);
+                 }
   
-             //fit with Kalman filter using AliITStrackerMI::RefitAtBase()
-             AliITStrackU ot(trac);
-              ot.ResetCovariance(10.);
-              ot.ResetClusters();
+                 //fit with Kalman filter using RefitAtBase()
+                 AliITStrackU ot(trac, kFALSE);
+                 ot.ResetCovariance(10.);
+                 ot.ResetClusters();
               
-             // Propagate inside the innermost layer with a cluster 
-             if(ot.Propagate(ot.GetX()-0.1*ot.GetX())) {
-               if(RefitAtBase(AliITSRecoParam::GetrInsideITSscreen(),&ot,inx)){ //fit from layer 1 to layer 6
-                 AliITStrackMI otrack2(ot);
-                 otrack2.ResetCovariance(10.); 
-                 otrack2.ResetClusters();
+                 // Propagate inside the innermost layer with a cluster 
+                 if(ot.Propagate(ot.GetX()-0.1*ot.GetX())) {
+                   if(RefitAtBase(AliITSRecoParam::GetrInsideITSscreen(),&ot,inx)){ //fit from layer 1 to layer 6
+                     AliITStrackU otrack2(ot,kFALSE);
+                     otrack2.ResetCovariance(10.); 
+                     otrack2.ResetClusters();
                  
-                 //fit from layer 6 to layer 1
-                 if(RefitAtBase(/*AliITSRecoParam::GetrInsideSPD1()*/fSegmentation->GetRadius(0)-0.3,&otrack2,inx)) {//check clind
-                   new(arrMI[nFoundTracks]) AliITStrackMI(otrack2);
-                   new(arrSA[nFoundTracks]) AliITStrackU(trac);
-                   ++nFoundTracks;
-                 }
+                     //fit from last layer to layer 1
+                     if(RefitAtBase(/*AliITSRecoParam::GetrInsideSPD1()*/fSegmentation->GetRadius(0)-0.3,&otrack2,inx)) {//check clind
+                       new(arrSA[nFoundTracks]) AliITStrackU(otrack2);
+                       ++nFoundTracks;
+                     }
                               
-               }       
-             }
+                   }       
+                 }
+
+
+               }//end loop layer 8
+              }//end loop layer 7
             }//end loop layer 6
           }//end loop layer 5
         }//end loop layer 4        
@@ -720,12 +747,11 @@ AliITStrackV2* AliITStrackerUpgrade::FitTrack(AliITStrackU* tr,Double_t *primary
 
 
 
-  if(fListOfTracks->GetEntries()==0) return 0;
+  if(fListOfUTracks->GetEntries()==0) return 0;
 
   Int_t lowchi2 = FindTrackLowChiSquare();
-  AliITStrackV2* otrack =(AliITStrackV2*)fListOfTracks->At(lowchi2);
-  AliITStrackU* trsa = (AliITStrackU*)fListOfUTracks->At(lowchi2);
+  AliITStrackU* otrack = (AliITStrackU*)fListOfUTracks->At(lowchi2);
+   
   if(otrack==0) {
     return 0;
   }
@@ -734,17 +760,15 @@ AliITStrackV2* AliITStrackerUpgrade::FitTrack(AliITStrackU* tr,Double_t *primary
   Int_t label=FindLabel(otrack);
   otrack->SetLabel(label);
 
-
   Int_t indexc[fNLayers];
   for(Int_t i=0;i<fNLayers;i++) indexc[i]=0;
   for(Int_t nind=0;nind<otrack->GetNumberOfClusters();nind++){
     indexc[nind] = otrack->GetClusterIndex(nind);
   }      
   //remove clusters of found track
   for(Int_t nlay=0;nlay<fNLayers;nlay++){
-    for(Int_t cln=0;cln<trsa->GetNumberOfMarked(nlay);cln++){
-      Int_t index = trsa->GetClusterMark(nlay,cln);
+    for(Int_t cln=0;cln<otrack->GetNumberOfMarked(nlay);cln++){
+      Int_t index = otrack->GetClusterMark(nlay,cln);
       fCluLayer[nlay]->RemoveAt(index);
       RemoveClusterCoord(nlay,index);
       fCluLayer[nlay]->Compress();
@@ -944,13 +968,13 @@ Double_t AliITStrackerUpgrade::ChoosePoint(Double_t p1, Double_t p2, Double_t pp
 //_________________________________________________________________
 Int_t AliITStrackerUpgrade::FindTrackLowChiSquare() const {
   // returns track with lowest chi square  
-  Int_t dim=fListOfTracks->GetEntries();
+  Int_t dim=fListOfUTracks->GetEntries();
   if(dim<=1) return 0;
-  AliITStrackV2* trk = (AliITStrackV2*)fListOfTracks->At(0);
+  AliITStrackV2* trk = (AliITStrackV2*)fListOfUTracks->At(0);
   Double_t minChi2=trk->GetChi2();
   Int_t index=0;
   for(Int_t i=1;i<dim;i++){
-    trk = (AliITStrackV2*)fListOfTracks->At(i);
+    trk = (AliITStrackV2*)fListOfUTracks->At(i);
     Double_t chi2=trk->GetChi2();
     if(chi2<minChi2){
       minChi2=chi2;
@@ -1017,30 +1041,6 @@ Int_t AliITStrackerUpgrade::FindLabel(AliITStrackV2* track) const {
   return label;
 }
 //_____________________________________________________________________________
-/*Int_t AliITStrackerUpgrade::Label(Int_t gl1, Int_t gl2, Int_t gl3, Int_t gl4, Int_t gl5, Int_t gl6,Int_t gl7, Int_t gl8, Int_t gl9, Int_t gl10,Int_t gl11,
-  Int_t gl12, Int_t gl13, Int_t gl14,Int_t gl15, Int_t gl16, Int_t gl17, Int_t gl18, Int_t minNPoints){
-
-  //function used to assign label to the found track. If track is fake, the label is negative
-
-  Int_t lb0[6] = {gl1,gl2,gl3,gl4,gl5,gl6};
-  Int_t lb1[6] = {gl7,gl8,gl9,gl10,gl11,gl12};
-  Int_t lb2[6] = {gl13,gl14,gl15,gl16,gl17,gl18};
-  Int_t ll=FindLabel(lb0[0],lb0[1],lb0[2],lb0[3],lb0[4],lb0[5]);
-  Int_t lflag=0;Int_t num=6;
-  if(lb0[5]==-1 && lb1[5]==-1 && lb2[5]==-1) num=5;
-
-  for(Int_t i=0;i<num;i++){
-  if(lb0[i]==ll || lb1[i]==ll || lb2[i]==ll) lflag+=1;
-  }
-
-  if(lflag>=minNPoints) return ll;
-  else return -ll;
-
-  
-  }
-*/
-//_____________________________________________________________________________
 void AliITStrackerUpgrade::SetCalculatedWindowSizes(Int_t n, Float_t phimin, Float_t phimax, Float_t lambdamin, Float_t lambdamax){
   // Set sizes of the phi and lambda windows used for track finding
   fNloop = n;
@@ -1175,7 +1175,7 @@ void AliITStrackerUpgrade::UnloadClusters() {
   for (Int_t i=0; i<fNLayers; i++) fLayers[i]->ResetClusters();
 }
 //______________________________________________________________________
-Bool_t AliITStrackerUpgrade::RefitAtBase(Double_t xx,AliITStrackMI *track,
+Bool_t AliITStrackerUpgrade::RefitAtBase(Double_t xx,AliITStrackU *track,
                                         const Int_t *clusters)
 {
   //--------------------------------------------------------------------
@@ -1220,13 +1220,6 @@ Bool_t AliITStrackerUpgrade::RefitAtBase(Double_t xx,AliITStrackMI *track,
       break;
     }
 
-    // material between SSD and SDD, SDD and SPD
-    //      Double_t hI=ilayer-0.5*step; 
-    //      if (TMath::Abs(hI-3.5)<0.01) // SDDouter
-    //        if(!CorrectForShieldMaterial(track,"SDD",dir)) return kFALSE;
-    //      if (TMath::Abs(hI-1.5)<0.01) // SPDouter
-    //        if(!CorrectForShieldMaterial(track,"SPD",dir)) return kFALSE;
-
 
     Double_t oldGlobXYZ[3];
 
@@ -1303,7 +1296,7 @@ Bool_t AliITStrackerUpgrade::RefitAtBase(Double_t xx,AliITStrackMI *track,
 }
 
 //_____________________________________________________________________
-Int_t AliITStrackerUpgrade::UpdateMI(AliITStrackMI* track, const AliITSRecPoint* cl,Double_t chi2,Int_t index) const
+Int_t AliITStrackerUpgrade::UpdateMI(AliITStrackU* track, const AliITSRecPoint* cl,Double_t chi2,Int_t index) const
 {
   //
   // Update ITS track
@@ -1338,7 +1331,7 @@ Int_t AliITStrackerUpgrade::UpdateMI(AliITStrackMI* track, const AliITSRecPoint*
   return updated;
 }
 //____________________________________________________________________-
-Int_t AliITStrackerUpgrade::CorrectForLayerMaterial(AliITStrackMI *t,
+Int_t AliITStrackerUpgrade::CorrectForLayerMaterial(AliITStrackU *t,
                                                    Int_t layerindex,
                                                    Double_t oldGlobXYZ[3],
                                                    TString direction) {
@@ -1451,7 +1444,7 @@ Int_t AliITStrackerUpgrade::CorrectForLayerMaterial(AliITStrackMI *t,
 
 
 //_____________________________________________________________________________
-Double_t AliITStrackerUpgrade::GetPredictedChi2MI(AliITStrackMI* track, const AliITSRecPoint *cluster,Int_t layer)
+Double_t AliITStrackerUpgrade::GetPredictedChi2MI(AliITStrackU* track, const AliITSRecPoint *cluster,Int_t layer)
 {
   //
   // Compute predicted chi2
@@ -1483,7 +1476,7 @@ Double_t AliITStrackerUpgrade::GetPredictedChi2MI(AliITStrackMI* track, const Al
   track->SetSigmaY(layer,erry);
   track->SetSigmaZ(layer, errz);
   track->SetSigmaYZ(layer,covyz);
-  //track->fNormQ[layer] = cluster->GetQ()/TMath::Sqrt(1+theta*theta+phi*phi);
+
   track->SetNormQ(layer,cluster->GetQ()/TMath::Sqrt((1.+ track->GetTgl()*track->GetTgl())/((1.-track->GetSnp())*(1.+track->GetSnp()))));
   return chi2;
 }
@@ -1578,7 +1571,7 @@ Int_t AliITStrackerUpgrade::PropagateBack(AliESDEvent *event) {
       continue;
       }
     */
-    AliITStrackMI *t = new AliITStrackMI(*esd);
+    AliITStrackU *t = new AliITStrackU(*esd);
     t->SetExpQ(TMath::Max(0.8*t->GetESDtrack()->GetTPCsignal(),30.));
 
     ResetTrackToFollow(*t);
@@ -1643,7 +1636,7 @@ AliCluster *AliITStrackerUpgrade::GetCluster(Int_t index) const {
   return fLayers[l]->GetCluster(c);
 }
 //______________________________________________________________________________
-Int_t AliITStrackerUpgrade::CorrectForPipeMaterial(AliITStrackMI *t, TString direction) {
+Int_t AliITStrackerUpgrade::CorrectForPipeMaterial(AliITStrackU *t, TString direction) {
   //-------------------------------------------------------------------
   // Propagate beyond beam pipe and correct for material
   // (material budget in different ways according to fUseTGeo value)
@@ -1741,9 +1734,9 @@ Int_t AliITStrackerUpgrade::RefitInward(AliESDEvent *event) {
     // if (esd->GetStatus()&AliESDtrack::kITSrefit) continue;
     //if (esd->GetStatus()&AliESDtrack::kTPCout)
     //  if ((esd->GetStatus()&AliESDtrack::kTPCrefit)==0) continue;
-    AliITStrackMI *t=0;
+    AliITStrackU *t=0;
     try {
-      t=new AliITStrackMI(*esd);
+      t=new AliITStrackU(*esd);
     } catch (const Char_t *msg) {
       //Warning("RefitInward",msg);
       delete t;
index b7baea46bed5595278d5262a979725ecc29e1cd5..232b5a8a01586e96981abef45dcb9d927bff5a31 100644 (file)
@@ -5,7 +5,7 @@
 
 #include "AliITStrackerMI.h"
 #include "AliITSlayerUpgrade.h"
-#include "AliITStrackMI.h"
+#include "AliITStrackU.h"
 
 /* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
@@ -40,11 +40,11 @@ class AliITStrackerUpgrade : public AliITStrackerMI {
   AliITStrackerUpgrade(const AliITStrackerUpgrade& tracker);
   AliITStrackerUpgrade& operator=(const AliITStrackerUpgrade& source);
   virtual ~AliITStrackerUpgrade();  
- virtual Int_t Clusters2Tracks(AliESDEvent *event);  
- Int_t FindTracks(AliESDEvent* event,Bool_t useAllClusters=kFALSE);
 virtual Int_t Clusters2Tracks(AliESDEvent *event);  
 Int_t FindTracks(AliESDEvent* event,Bool_t useAllClusters=kFALSE);
   Int_t PropagateBack(AliESDEvent *event);
-  Int_t CorrectForPipeMaterial(AliITStrackMI *t, TString direction="inward");  
-  Int_t RefitInward(AliESDEvent *event);//{return 0;}
+  Int_t CorrectForPipeMaterial(AliITStrackU *t, TString direction="inward");  
+  Int_t RefitInward(AliESDEvent *event);
   AliCluster *GetCluster(Int_t index) const;
 
   AliITStrackV2* FitTrack(AliITStrackU* tr,Double_t* primaryVertex,Bool_t onePoint=kFALSE);
@@ -77,25 +77,32 @@ class AliITStrackerUpgrade : public AliITStrackerMI {
   enum {kSAflag=0x8000}; //flag to mark clusters used in the SA tracker
 
   void SetNlayers(Int_t nlay) {fNLayers = nlay;}
-  
+
  protected:
 
   //Initialization
   void Init();
   void  CreateLayers(Int_t iEvent);
   void ResetForFinding();
+  void ResetTrackToFollow(const AliITStrackU &t) {
+    fTrackToFollow.~AliITStrackU();
+    Bool_t trackMI = kTRUE;
+    new(&fTrackToFollow) AliITStrackU(t,trackMI);
+  }
+
+
   void UpdatePoints();
   Bool_t SetFirstPoint(Int_t lay, Int_t clu, Double_t* primaryVertex);
   static Double_t Curvature(Double_t x1,Double_t y1,Double_t x2,Double_t y2,
-                     Double_t x3,Double_t y3);
+                           Double_t x3,Double_t y3);
 
   Double_t ChoosePoint(Double_t p1, Double_t p2, Double_t pp); 
 
   static Int_t   FindIntersection(Float_t a1, Float_t b1, Float_t c1, Float_t c2, 
-                           Float_t& x1,Float_t& y1, Float_t& x2, Float_t& y2);
+                                 Float_t& x1,Float_t& y1, Float_t& x2, Float_t& y2);
   static Int_t   FindEquation(Float_t x1, Float_t y1, Float_t x2, Float_t y2, 
-                       Float_t x3, Float_t y3,Float_t& a, Float_t& b, 
-                       Float_t& c);
+                             Float_t x3, Float_t y3,Float_t& a, Float_t& b, 
+                             Float_t& c);
  
   Int_t FindLabel(AliITStrackV2* track) const;
  
@@ -106,11 +113,11 @@ class AliITStrackerUpgrade : public AliITStrackerMI {
   void GetCoorErrors(AliITSRecPoint* cl,Float_t &sx,Float_t &sy, Float_t &sz);
   AliITSclusterTable* GetClusterCoord(Int_t layer,Int_t n) const {return (AliITSclusterTable*)fCluCoord[layer]->UncheckedAt(n);}
   void RemoveClusterCoord(Int_t layer, Int_t n) {fCluCoord[layer]->RemoveAt(n);fCluCoord[layer]->Compress();}
-  Bool_t RefitAtBase(Double_t x, AliITStrackMI *track,
-                 const Int_t *clusters);
-  Int_t UpdateMI(AliITStrackMI* track, const AliITSRecPoint* cl,Double_t chi2,Int_t layer) const;
Int_t CorrectForLayerMaterial(AliITStrackMI *t, Int_t layerindex, Double_t oldGlobXYZ[3], TString direction="inward");
-  Double_t GetPredictedChi2MI(AliITStrackMI* track, const AliITSRecPoint *cluster,Int_t layer);
+  Bool_t RefitAtBase(Double_t x, AliITStrackU *track,
+                    const Int_t *clusters);
+  Int_t UpdateMI(AliITStrackU* track, const AliITSRecPoint* cl,Double_t chi2,Int_t layer) const;
 Int_t CorrectForLayerMaterial(AliITStrackU *t, Int_t layerindex, Double_t oldGlobXYZ[3], TString direction="inward");
+  Double_t GetPredictedChi2MI(AliITStrackU* track, const AliITSRecPoint *cluster,Int_t layer);
   static Int_t GetError(Int_t layer,const AliITSRecPoint*cl,
                         Float_t tgl,Float_t tgphitr,Float_t expQ,
                         Float_t &erry,Float_t &errz,Float_t &covyz,
@@ -147,6 +154,8 @@ class AliITStrackerUpgrade : public AliITStrackerMI {
   Int_t fInnerStartLayer;     // Inward search for tracks with <6 points: inner layer to start from
   Int_t fMinNPoints;        // minimum number of clusters for a track
   Float_t fMinQ;              // lower cut on cluster charge (SDD and SSD)
+  AliITStrackU fTrackToFollow;          
+
   AliITSlayerUpgrade** fLayers;
   AliITSsegmentationUpgrade *fSegmentation;
 
@@ -154,7 +163,7 @@ class AliITStrackerUpgrade : public AliITStrackerMI {
   TClonesArray** fCluCoord; //! array with cluster info
 
   ClassDef(AliITStrackerUpgrade,2)
-};
+    };
 
 #endif