Corrections to obey the coding conventions (M.Ivanov)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 21 Jan 2004 18:05:07 +0000 (18:05 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 21 Jan 2004 18:05:07 +0000 (18:05 +0000)
MONITOR/AliMonitorProcess.cxx
TPC/AliTPCtrackerMI.cxx
TPC/AliTPCtrackerMI.h

index 3b2c6b7e41db02b25dd1536e6a52f76fbed65c91..2f0b21f22e69e9d1a5a580a05896982f660955a4 100644 (file)
@@ -37,6 +37,7 @@
 #include "AliRun.h"
 #include "AliTPC.h"
 #include "AliTPCclustererMI.h"
+#include "AliComplexCluster.h"
 #include "AliTPCtrackerMI.h"
 #include "AliITS.h"
 #include "AliITSclustererV2.h"
index fcbee5332716b3c299f387da290a7811a37d12b6..4ee8ce48866a6ace5ffad869eccd76f4ea3db7e7 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.19  2003/10/21 11:11:52  kowal2
-Removed compiler warning (Bool_t accept  changed to Int_t accept)
-
-Revision 1.18  2003/10/17 15:42:14  kowal2
-Back to the previous version. The warning was erronously generated
-by the compiler
-
-Revision 1.17  2003/10/17 12:28:02  kowal2
-Removed "always true" comparison
-
-Revision 1.16  2003/10/17 12:01:16  kowal2
-Removed compiler warning.
-
-Revision 1.15  2003/09/29 11:56:58  kowal2
-bug fix2
-
-Revision 1.14  2003/09/29 11:39:43  kowal2
-bug fix
-
-Revision 1.13  2003/09/29 11:28:19  kowal2
-completly rewritten
-
-Revision 1.9.4.3  2003/06/23 14:47:10  hristov
-Minor fix
-
-Revision 1.9.4.2  2003/06/23 10:06:13  hristov
-Updated information about the overlapping clusters (M.Ivanov)
-
-Revision 1.9.4.1  2003/06/19 06:59:58  hristov
-Updated version of parallel tracking (M.Ivanov)
-
-Revision 1.9  2003/03/19 17:14:11  hristov
-Load/UnloadClusters added to the base class and the derived classes changed correspondingly. Possibility to give 2 input files for ITS and TPC tracks in PropagateBack. TRD tracker uses fEventN from the base class (T.Kuhr)
-
-Revision 1.8  2003/03/05 11:16:15  kowal2
-Logs added
-
-*/
-
-
-
-
-
-
-
-/*
-  AliTPC parallel tracker - 
-  How to use?  - 
-  run AliTPCFindClusters.C macro - clusters neccessary for tracker are founded
-  run AliTPCFindTracksMI.C macro - to find tracks
-  tracks are written to AliTPCtracks.root file
-  for comparison also seeds are written to the same file - to special branch
-*/
 
 //-------------------------------------------------------
 //          Implementation of the TPC tracker
 //
 //   Origin: Marian Ivanov   Marian.Ivanov@cern.ch
 // 
+//  AliTPC parallel tracker - 
+//  How to use?  - 
+//  run AliTPCFindClusters.C macro - clusters neccessary for tracker are founded
+//  run AliTPCFindTracksMI.C macro - to find tracks
+//  tracks are written to AliTPCtracks.root file
+//  for comparison also seeds are written to the same file - to special branch
 //-------------------------------------------------------
+
+
+/* $Id$ */
+
+
 #include <TObjArray.h>
 #include <TFile.h>
 #include <TTree.h>
@@ -83,6 +39,7 @@ Logs added
 #include "Riostream.h"
 
 #include "AliTPCclusterMI.h"
+#include "AliComplexCluster.h"
 #include "AliTPCParam.h"
 #include "AliTPCClustersRow.h"
 #include "AliComplexCluster.h"
@@ -381,6 +338,9 @@ void AliTPCtrackerMI::SetIO(TTree * input, TTree * output, AliESD * event)
 
 void AliTPCtrackerMI::FillESD(TObjArray* arr)
 {
+  //
+  //
+  //fill esds using updated tracks
   if (fEvent){
     // write tracks to the event
     // store index of the track
@@ -399,8 +359,10 @@ void AliTPCtrackerMI::FillESD(TObjArray* arr)
   }
 }
 
-void AliTPCtrackerMI::WriteTracks(TTree * tree){
+void AliTPCtrackerMI::WriteTracks(TTree * tree)
+{
   //
+  // write tracks from seed array to selected tree
   //
   fOutput  = tree;
   if (fOutput){
@@ -2107,7 +2069,7 @@ void  AliTPCtrackerMI::RemoveDouble(TObjArray * arr, Float_t factor1, Float_t fa
 
 
 
-void AliTPCtrackerMI::SortTracks(TObjArray * arr, Int_t mode)
+void AliTPCtrackerMI::SortTracks(TObjArray * arr, Int_t mode) const
 {
   //
   //sort tracks in array according mode criteria
@@ -2381,7 +2343,7 @@ void AliTPCtrackerMI::SignClusters(TObjArray * arr, Float_t fnumber, Float_t fde
 }
 
 
-void  AliTPCtrackerMI::StopNotActive(TObjArray * arr, Int_t row0, Float_t th0, Float_t th1, Float_t th2)
+void  AliTPCtrackerMI::StopNotActive(TObjArray * arr, Int_t row0, Float_t th0, Float_t th1, Float_t th2) const
 {
   // stop not active tracks
   // take th1 as threshold for number of founded to number of foundable on last 10 active rows
@@ -2401,7 +2363,7 @@ void  AliTPCtrackerMI::StopNotActive(TObjArray * arr, Int_t row0, Float_t th0, F
 
 
 void  AliTPCtrackerMI::StopNotActive(AliTPCseed * seed, Int_t row0, Float_t th0, Float_t th1,
- Float_t th2)
+ Float_t th2) const
 {
   // stop not active tracks
   // take th1 as threshold for number of founded to number of foundable on last 10 active rows
@@ -2522,7 +2484,7 @@ void AliTPCtrackerMI::ReadSeeds(AliESD *event, Int_t direction)
     ULong_t status=esd->GetStatus();    
     AliTPCtrack t(*esd);
     AliTPCseed *seed = new AliTPCseed(t,t.GetAlpha());
-    if (status==AliESDtrack::kTPCin) seed->Modify(0.8);
+    if (status==AliESDtrack::kTPCin&&direction==1) seed->Modify(0.8);
     //
     //
     // rotate to the local coordinate system
@@ -2549,6 +2511,7 @@ void AliTPCtrackerMI::ReadSeeds(AliESD *event, Int_t direction)
     // seed = seed2;
     //  }
     //}
+    
     fSeeds->AddLast(seed);
   }
 }
@@ -3557,7 +3520,7 @@ AliTPCseed *AliTPCtrackerMI::ReSeed(AliTPCseed *track, Float_t r0, Float_t r1, F
     AliTPCclusterMI * cl = GetClusterMI(clindex);
     if (cl==0) {
       printf("Bug\n");
-      AliTPCclusterMI * cl = GetClusterMI(clindex);
+      //      AliTPCclusterMI * cl = GetClusterMI(clindex);
       return 0;
     }
     sec[ipoint]     = ((clindex&0xff000000)>>24)%18;
@@ -4292,7 +4255,7 @@ TObjArray * AliTPCtrackerMI::Tracking()
 }
 
 
-void AliTPCtrackerMI::SumTracks(TObjArray *arr1,TObjArray *arr2)
+void AliTPCtrackerMI::SumTracks(TObjArray *arr1,TObjArray *arr2) const
 {
   //
   //sum tracks to common container
@@ -4376,7 +4339,7 @@ void  AliTPCtrackerMI::ParallelTracking(TObjArray * arr, Int_t rfirst, Int_t rla
   }    
 }
 
-void AliTPCtrackerMI::PrepareForBackProlongation(TObjArray * arr,Float_t fac)
+void AliTPCtrackerMI::PrepareForBackProlongation(TObjArray * arr,Float_t fac) const
 {
   //
   //
@@ -4412,7 +4375,7 @@ void AliTPCtrackerMI::PrepareForBackProlongation(TObjArray * arr,Float_t fac)
 
 
 }
-void AliTPCtrackerMI::PrepareForProlongation(TObjArray * arr, Float_t fac)
+void AliTPCtrackerMI::PrepareForProlongation(TObjArray * arr, Float_t fac) const
 {
   //
   //
@@ -4689,6 +4652,30 @@ void AliTPCtrackerMI::CookLabel(AliTPCseed *t, Float_t wrong) const {
   //delete[] clusters;
 }
 
+
+Int_t  AliTPCtrackerMI::AliTPCSector::GetRowNumber(Double_t x) const 
+{
+  //return pad row number for this x
+  Double_t r;
+  if (fN < 64){
+    r=fRow[fN-1].GetX();
+    if (x > r) return fN;
+    r=fRow[0].GetX();
+    if (x < r) return -1;
+    return Int_t((x-r)/fPadPitchLength + 0.5);}
+  else{    
+    r=fRow[fN-1].GetX();
+    if (x > r) return fN;
+    r=fRow[0].GetX();
+    if (x < r) return -1;
+    Double_t r1=fRow[64].GetX();
+    if(x<r1){       
+      return Int_t((x-r)/f1PadPitchLength + 0.5);}
+    else{
+      return (Int_t((x-r1)/f2PadPitchLength + 0.5)+64);} 
+  }
+}
+
 //_________________________________________________________________________
 void AliTPCtrackerMI::AliTPCSector::Setup(const AliTPCParam *par, Int_t f) {
   //-----------------------------------------------------------------------
index 5c8ebb85f0b06a03de2a7794b13bfe062b3c3118..d589419a4d49be4a5e34b40e5daed1ef7085c0ad 100644 (file)
@@ -7,13 +7,13 @@
 /* $Id$ */
 
 //-------------------------------------------------------
-//                       TPC trackerMI
+//                       TPC tracker
+//   Parallel tracker 
 //
 //   Origin: 
 //-------------------------------------------------------
 #include "AliTracker.h"
 #include "AliTPCtrack.h"
-#include "AliComplexCluster.h"
 
 class TFile;
 class AliTPCParam;
@@ -22,7 +22,7 @@ class AliTPCclusterMI;
 class AliTPCTrackerPoint;
 class AliESD;   
 class TTree;
-
+class AliComplexCluster;
 
 class AliTPCseed : public AliTPCtrack {
   friend class AliTPCtrackerMI;
@@ -66,8 +66,8 @@ class AliTPCseed : public AliTPCtrack {
      void Desactivate(Int_t reason){ fRemoval = reason;} 
      //
      //
-     AliESDtrack * fEsd; //!
  private:
+     AliESDtrack * fEsd; //!
      AliTPCclusterMI*   fClusterPointer[160];  //! array of cluster pointers  - 
      TClonesArray * fPoints;              // array with points along the track
      TClonesArray * fEPoints;             // array with exact points - calculated in special macro not used in tracking
@@ -157,7 +157,7 @@ public:
    Int_t PropagateForward2(TObjArray * arr);
 
    Int_t CheckKinkPoint(AliTPCseed*seed, Float_t th);
-   void SortTracks(TObjArray * arr, Int_t mode);
+   void SortTracks(TObjArray * arr, Int_t mode) const;
   
 
    virtual Double_t ErrY2(AliTPCseed* seed, AliTPCclusterMI * cl = 0);
@@ -228,27 +228,7 @@ public:
      Double_t GetAlpha() const {return fAlpha;}
      Double_t GetAlphaShift() const {return fAlphaShift;}     
      //Int_t GetFirst(){return fFirstRow;}
-     Int_t GetRowNumber(Double_t x) const {
-        //return pad row number for this x
-       Double_t r;
-       if (fN < 64){
-         r=fRow[fN-1].GetX();
-         if (x > r) return fN;
-         r=fRow[0].GetX();
-         if (x < r) return -1;
-         return Int_t((x-r)/fPadPitchLength + 0.5);}
-       else{    
-           r=fRow[fN-1].GetX();
-           if (x > r) return fN;
-           r=fRow[0].GetX();
-           if (x < r) return -1;
-          Double_t r1=fRow[64].GetX();
-          if(x<r1){       
-            return Int_t((x-r)/f1PadPitchLength + 0.5);}
-          else{
-            return (Int_t((x-r1)/f2PadPitchLength + 0.5)+64);} 
-       }
-     }
+     Int_t GetRowNumber(Double_t x) const;
      Double_t GetPadPitchWidth()  const {return fPadPitchWidth;}
      Double_t GetPadPitchLength() const {return fPadPitchLength;}
      Double_t GetPadPitchLength(Float_t x) const {return (x<200) ? fPadPitchLength:f2PadPitchLength ;}
@@ -276,17 +256,17 @@ public:
    void  RemoveUsed(TObjArray * arr, Float_t factor1, Float_t factor2,  Int_t removalindex);
    void  RemoveDouble(TObjArray * arr, Float_t factor1, Float_t factor2,  Int_t removalindex);
 
-   void  StopNotActive(TObjArray * arr, Int_t row0, Float_t th0, Float_t th1, Float_t th2);
-   void  StopNotActive(AliTPCseed * seed, Int_t row0, Float_t th0, Float_t th1, Float_t th2);
+   void  StopNotActive(TObjArray * arr, Int_t row0, Float_t th0, Float_t th1, Float_t th2) const;
+   void  StopNotActive(AliTPCseed * seed, Int_t row0, Float_t th0, Float_t th1, Float_t th2) const;
    Int_t AcceptCluster(AliTPCseed * seed, AliTPCclusterMI * cluster, Float_t factor, Float_t cory=1., Float_t corz=1.);
 
 private:
    inline AliTPCRow &GetRow(Int_t sec, Int_t row);
-   inline Double_t  GetXrow(Int_t row);
-   inline Double_t  GetMaxY(Int_t row);
-   inline Int_t GetRowNumber(Double_t x);
-   inline Double_t GetPadPitchLength(Double_t x);
-   inline Double_t GetPadPitchLength(Int_t row);
+   inline Double_t  GetXrow(Int_t row) const;
+   inline Double_t  GetMaxY(Int_t row) const;
+   inline Int_t GetRowNumber(Double_t x) const;
+   inline Double_t GetPadPitchLength(Double_t x) const;
+   inline Double_t GetPadPitchLength(Int_t row) const;
 
    Float_t  GetSigmaY(AliTPCseed * seed);
    Float_t  GetSigmaZ(AliTPCseed * seed);
@@ -315,9 +295,9 @@ private:
    void Tracking(TObjArray * arr);
    TObjArray * Tracking(Int_t seedtype, Int_t i1, Int_t i2, Float_t cuts[4], Float_t dy=-1, Int_t dsec=0);
    TObjArray * Tracking();
-   void SumTracks(TObjArray *arr1,TObjArray *arr2);
-   void PrepareForBackProlongation(TObjArray * arr, Float_t fac);
-   void PrepareForProlongation(TObjArray * arr, Float_t fac);
+   void SumTracks(TObjArray *arr1,TObjArray *arr2) const;
+   void PrepareForBackProlongation(TObjArray * arr, Float_t fac) const;
+   void PrepareForProlongation(TObjArray * arr, Float_t fac) const;
 
    void SetSampledEdx(AliTPCseed *t, Float_t q, Int_t i) {;}
    Int_t UpdateTrack(AliTPCseed *t, Int_t accept); //update trackinfo
@@ -360,30 +340,30 @@ AliTPCtrackerMI::AliTPCRow & AliTPCtrackerMI::GetRow(Int_t sec, Int_t row)
   return (row>=fInnerSec->GetNRows()) ? fOuterSec[sec][row-fInnerSec->GetNRows()]:fInnerSec[sec][row];
 }
 
-Double_t  AliTPCtrackerMI::GetXrow(Int_t row) {
+Double_t  AliTPCtrackerMI::GetXrow(Int_t row) const {
   //  return (row>=fInnerSec->GetNRows()) ? fOuterSec->GetX(row-fInnerSec->GetNRows()):fInnerSec->GetX(row);
   return fXRow[row];
 }
 
-Double_t  AliTPCtrackerMI::GetMaxY(Int_t row)  {
+Double_t  AliTPCtrackerMI::GetMaxY(Int_t row) const {
   //return (row>=fInnerSec->GetNRows()) ? fOuterSec->GetMaxY(row-fInnerSec->GetNRows()):fInnerSec->GetMaxY(row);
   return fYMax[row];
 }
 
-Int_t AliTPCtrackerMI::GetRowNumber(Double_t x)
+Int_t AliTPCtrackerMI::GetRowNumber(Double_t x) const
 {
   //
   return (x>133.) ? fOuterSec->GetRowNumber(x)+fInnerSec->GetNRows():fInnerSec->GetRowNumber(x);
 }
 
-Double_t  AliTPCtrackerMI::GetPadPitchLength(Double_t x)
+Double_t  AliTPCtrackerMI::GetPadPitchLength(Double_t x) const
 {
   //
   return (x>133.) ? fOuterSec->GetPadPitchLength(x):fInnerSec->GetPadPitchLength(x);
   //return fPadLength[row];
 }
 
-Double_t  AliTPCtrackerMI::GetPadPitchLength(Int_t row)
+Double_t  AliTPCtrackerMI::GetPadPitchLength(Int_t row) const
 {
   //
   return fPadLength[row];