]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coding conventions
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 28 Mar 2002 14:59:07 +0000 (14:59 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 28 Mar 2002 14:59:07 +0000 (14:59 +0000)
51 files changed:
TRD/AliTRD.cxx
TRD/AliTRD.h
TRD/AliTRDarrayF.h
TRD/AliTRDarrayI.h
TRD/AliTRDcluster.cxx
TRD/AliTRDcluster.h
TRD/AliTRDdataArrayF.cxx
TRD/AliTRDdataArrayF.h
TRD/AliTRDdataArrayI.cxx
TRD/AliTRDdataArrayI.h
TRD/AliTRDdigit.h
TRD/AliTRDdigitizer.cxx
TRD/AliTRDdigitizer.h
TRD/AliTRDdigitsManager.cxx
TRD/AliTRDgeometry.cxx
TRD/AliTRDgeometry.h
TRD/AliTRDgeometryDetail.cxx
TRD/AliTRDgeometryDetail.h
TRD/AliTRDgeometryFull.h
TRD/AliTRDgeometryHole.h
TRD/AliTRDmatrix.cxx
TRD/AliTRDmatrix.h
TRD/AliTRDmcTrack.cxx
TRD/AliTRDmcTrack.h
TRD/AliTRDparameter.cxx
TRD/AliTRDparameter.h
TRD/AliTRDpid.h
TRD/AliTRDpidLQ.cxx
TRD/AliTRDpidLQ.h
TRD/AliTRDpoints.cxx
TRD/AliTRDpoints.h
TRD/AliTRDrecPoint.cxx
TRD/AliTRDrecPoint.h
TRD/AliTRDsegmentArrayBase.cxx
TRD/AliTRDsegmentArrayBase.h
TRD/AliTRDsegmentID.cxx
TRD/AliTRDsegmentID.h
TRD/AliTRDsim.h
TRD/AliTRDsimple.h
TRD/AliTRDsimpleGen.h
TRD/AliTRDsimpleMC.h
TRD/AliTRDtimeBin.cxx
TRD/AliTRDtimeBin.h
TRD/AliTRDtrack.cxx
TRD/AliTRDtrack.h
TRD/AliTRDtrackHits.cxx
TRD/AliTRDtrackHits.h
TRD/AliTRDtracker.cxx
TRD/AliTRDtracker.h
TRD/AliTRDtrackingSector.cxx
TRD/AliTRDtrackingSector.h

index 4a8421072796a51c315af46a24dc0d1025c468b9..4762f1f531007d3d1c3f1160a2ab4b9bd570d887 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.37  2002/03/25 20:01:49  cblume
+Introduce parameter class
+
 Revision 1.36  2002/02/11 14:25:27  cblume
 Geometry update, compressed hit structure
 
@@ -825,7 +828,7 @@ void AliTRD::CreateMaterials()
 }
 
 //_____________________________________________________________________________
-void AliTRD::DrawModule()
+void AliTRD::DrawModule() const
 {
   //
   // Draw a shaded view of the Transition Radiation Detector version 0
@@ -884,7 +887,7 @@ void AliTRD::DrawModule()
 }
 
 //_____________________________________________________________________________
-Int_t AliTRD::DistancetoPrimitive(Int_t , Int_t )
+Int_t AliTRD::DistancetoPrimitive(Int_t , Int_t ) const
 {
   //
   // Distance between the mouse and the TRD detector on the screen
@@ -1287,7 +1290,7 @@ AliHit* AliTRD::NextHit()
 }
 
 //_____________________________________________________________________________
-AliHit* AliTRD::FirstHit2(Int_t track)
+AliHit* AliTRD::FirstHit2(Int_t track) 
 {
   //
   // Initializes the hit iterator.
@@ -1362,14 +1365,14 @@ void AliTRD::MakeBranch2(Option_t *option, const char *file)
             ,branchname);
     }
 
-    const char folder[] = "RunMC/Event/Data";
+    const char kFolder[] = "RunMC/Event/Data";
 
     if (GetDebug()) {
       printf("<AliTRD::MakeBranch2> %15s: Publishing %s to %s\n"
-            ,ClassName(),branchname,folder);
+            ,ClassName(),branchname,kFolder);
     }
 
-    Publish(folder,&fTrackHits,branchname);
+    Publish(kFolder,&fTrackHits,branchname);
 
     if (file) {
       TBranch *b = gAlice->TreeH()->GetBranch(branchname);
index 97899abdf93a9ea51e7faccf6779d73fe57d3a69..f8796b1b873bd5e06ec743469c53130a4c8b0304 100644 (file)
@@ -41,8 +41,8 @@ class AliTRD : public AliDetector {
   virtual void       Copy(TObject &trd);
   virtual void       CreateGeometry();
   virtual void       CreateMaterials();
-  virtual void       DrawModule();
-  Int_t              DistancetoPrimitive(Int_t px, Int_t py);
+  virtual void       DrawModule() const;
+  Int_t              DistancetoPrimitive(Int_t px, Int_t py) const;
   virtual void       LoadPoints(Int_t track);    
   TObjArray         *RecPoints() const              { return fRecPoints;   };
   virtual void       Init();
index d39542cfc30b1ac98b6b7c737416c5906afdeefd..1c9bb4a26f24a4a26152ca280114e461a96db2aa 100644 (file)
@@ -7,6 +7,13 @@
 
 #include <TObject.h>
 #include <TArrayF.h>
+/////////////////////////////////////////////////////////////
+//                                                         //
+//  Array of floats                                        //
+//  Origin M.Ivanov                                        //
+//                                                         //
+/////////////////////////////////////////////////////////////                   
 
 class AliTRDarrayF: public TObject, public TArrayF {
 
index 10e506c90e6a8ddfc801b2cbacfe0a248949bc43..6558b1732a65f043ff0feec27883005f4b662ebc 100644 (file)
@@ -7,6 +7,13 @@
 
 #include <TObject.h>
 #include <TArrayI.h>
+/////////////////////////////////////////////////////////////
+//                                                         //
+//  Array of integers                                      //
+//  Origin M.Ivanov                                        //
+//                                                         //
+/////////////////////////////////////////////////////////////                   
 
 class AliTRDarrayI: public TObject, public TArrayI {
 
index b70e5b6b8301f845bc1d27bbf91790695a776ea0..2b0191652a560347f768ee854a06541ebe8ae58e 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.4  2001/05/07 08:08:05  cblume
+Update of TRD code
+
 Revision 1.3  2000/12/08 16:07:02  cblume
 Update of the tracking by Sergei
 
@@ -25,9 +28,14 @@ Revision 1.1.2.1  2000/09/22 14:47:52  cblume
 Add the tracking code
 
 */
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD cluster                                                              //
+//                                                                           //
+/////////////////////////////////////////////////////////////////////////////// 
 
 #include "AliTRDcluster.h"
-#include "AliTRDgeometry.h"
 #include "AliTRDrecPoint.h"
 
 ClassImp(AliTRDcluster)
@@ -146,26 +154,27 @@ void AliTRDcluster::AddTrackIndex(Int_t *track)
   //     ones are stored first;
   //
 
-  const Int_t size = 9;
+  const Int_t kSize = 9;
 
-  Int_t entries[size][2], i, j, index;
+  Int_t entries[kSize][2], i, j, index;
 
-  Bool_t index_added;
+  Bool_t indexAdded;
 
-  for (i=0; i<size; i++) {
+  for (i=0; i<kSize; i++) {
     entries[i][0]=-1;
     entries[i][1]=0;
   }
 
-  for (Int_t k=0; k<size; k++) {
+  for (Int_t k=0; k<kSize; k++) {
     index=track[k];
-    index_added=kFALSE; j=0;
+    indexAdded=kFALSE; 
+    j=0;
     if (index >= 0) {
-      while ( (!index_added) && ( j < size ) ) {
+      while ( (!indexAdded) && ( j < kSize ) ) {
         if ((entries[j][0]==index) || (entries[j][1]==0)) {
           entries[j][0]=index;
           entries[j][1]=entries[j][1]+1;
-          index_added=kTRUE;
+          indexAdded=kTRUE;
         }
         j++;
       }
@@ -176,7 +185,7 @@ void AliTRDcluster::AddTrackIndex(Int_t *track)
   Int_t swap=1, tmp0, tmp1;
   while ( swap > 0) {
     swap=0;
-    for(i=0; i<(size-1); i++) {
+    for(i=0; i<(kSize-1); i++) {
       if ((entries[i][0] >= 0) && (entries[i+1][0] >= 0)) {
         if ((entries[i][1] < entries[i+1][1]) ||
             ((entries[i][1] == entries[i+1][1]) &&
index ea563f20c461896aece31ce955e8333b8ce2dadd..cc16efc9216b83de96f37f79b9ab86737686c048 100644 (file)
@@ -6,6 +6,12 @@
 /* $Id$ */
 
 #include <TObject.h>
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD cluster                                                              //
+//                                                                           //
+/////////////////////////////////////////////////////////////////////////////// 
 
 class AliTRDrecPoint;
 
index 0758bd74460250404f4c6a097a61d8bbdec62135..c32a50030e193b18ea2ec6f28998c149c5c25985 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.10  2002/02/11 14:27:54  cblume
+Geometry and hit structure update
+
 Revision 1.9  2001/05/07 08:08:05  cblume
 Update of TRD code
 
@@ -159,7 +162,7 @@ void AliTRDdataArrayF::Reset()
 }
 
 //_____________________________________________________________________________
-Int_t AliTRDdataArrayF::GetSize()
+Int_t AliTRDdataArrayF::GetSize() const
 {
   //
   // Returns the size of the complete object
@@ -177,7 +180,7 @@ Int_t AliTRDdataArrayF::GetSize()
 }
 
 //_____________________________________________________________________________
-Int_t AliTRDdataArrayF::GetDataSize() 
+Int_t AliTRDdataArrayF::GetDataSize() const 
 {
   //
   // Returns the size of only the data part
index e8f34f71bd2a9993ab425c9291bcc110e9d38b88..6ccbabc1afc2c747f9eca711e31a7fd2ede1e806 100644 (file)
@@ -51,8 +51,8 @@ class AliTRDdataArrayF : public AliTRDdataArray {
                                                   
   virtual Float_t GetThreshold() const            { return fThreshold;  };
 
-  virtual Int_t   GetSize();
-  virtual Int_t   GetDataSize(); 
+  virtual Int_t   GetSize() const;
+  virtual Int_t   GetDataSize() const
   virtual Int_t   GetOverThreshold(Float_t threshold);  
 
  protected:
index 948b75d5ffa1e9044de65d62a59031bd00b91c78..40010d543b7fdf430465ab7e2f61faec7dfa7c4e 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.10  2002/02/11 14:27:54  cblume
+Geometry and hit structure update
+
 Revision 1.9  2001/05/07 08:08:05  cblume
 Update of TRD code
 
@@ -159,7 +162,7 @@ void AliTRDdataArrayI::Reset()
 }
 
 //_____________________________________________________________________________
-Int_t AliTRDdataArrayI::GetSize()
+Int_t AliTRDdataArrayI::GetSize() const
 {
   //
   // Returns the size of the complete object
@@ -177,7 +180,7 @@ Int_t AliTRDdataArrayI::GetSize()
 }
 
 //_____________________________________________________________________________
-Int_t AliTRDdataArrayI::GetDataSize()
+Int_t AliTRDdataArrayI::GetDataSize() const
 {
   //
   // Returns the size of only the data part
index 4f584e50cbb171b599c41ae42b191cb856c71871..11f33d25e2729f7b19015ad4dd98c10f4de6ec2d 100644 (file)
@@ -47,8 +47,8 @@ class AliTRDdataArrayI : public AliTRDdataArray {
 
   virtual Int_t  GetThreshold() const          { return fThreshold;  };
 
-  virtual Int_t  GetSize();
-  virtual Int_t  GetDataSize(); 
+  virtual Int_t  GetSize() const;
+  virtual Int_t  GetDataSize() const
   virtual Int_t  GetOverThreshold(Int_t threshold);  
 
  protected:
index 8d48938cdd7e47f05bee737654b87119e7e51f5c..78151a53db271a5404b94ca7103e7ba9ada71f01 100644 (file)
@@ -5,6 +5,12 @@
 
 /* $Id: AliTRDdigit.h,v */
 
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  The TRD digit                                                            //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
 #include "AliDigitNew.h"
 
 //_____________________________________________________________________________
index f414f9462b263dac57f4ebb30ba28b5d20c35741..890d53c3017d128f6a275c785d35a447b231335b 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.34  2002/03/25 20:00:44  cblume
+Introduce parameter class and regions of interest for merging
+
 Revision 1.33  2002/02/12 17:32:03  cblume
 Rearrange the deleting of the list of sdigitsmanager
 
@@ -567,7 +570,7 @@ Bool_t AliTRDdigitizer::InitDetector()
 }
 
 //_____________________________________________________________________________
-Bool_t AliTRDdigitizer::MakeBranch(const Char_t *file)
+Bool_t AliTRDdigitizer::MakeBranch(const Char_t *file) const
 {
   // 
   // Create the branches for the digits array
@@ -661,11 +664,11 @@ Bool_t AliTRDdigitizer::MakeDigits()
   }
 
   // Get the pointer to the hit tree
-  TTree *HitTree = gAlice->TreeH();
+  TTree *hitTree = gAlice->TreeH();
 
   // Get the number of entries in the hit tree
   // (Number of primary particles creating a hit somewhere)
-  Int_t nTrack = (Int_t) HitTree->GetEntries();
+  Int_t nTrack = (Int_t) hitTree->GetEntries();
   if (fDebug > 0) {
     printf("<AliTRDdigitizer::MakeDigits> ");
     printf("Found %d primary particles\n",nTrack);
@@ -678,7 +681,7 @@ Bool_t AliTRDdigitizer::MakeDigits()
   for (Int_t iTrack = 0; iTrack < nTrack; iTrack++) {
 
     gAlice->ResetHits();
-    nBytes += HitTree->GetEvent(iTrack);
+    nBytes += hitTree->GetEvent(iTrack);
 
     // Loop through the TRD hits
     Int_t iHit = 0;
@@ -1449,7 +1452,7 @@ Bool_t AliTRDdigitizer::CheckDetector(Int_t plane, Int_t chamber, Int_t sector)
 }
 
 //_____________________________________________________________________________
-Bool_t AliTRDdigitizer::WriteDigits()
+Bool_t AliTRDdigitizer::WriteDigits() const
 {
   //
   // Writes out the TRD-digits and the dictionaries
index 4b73fd792c803927c422b2b54d12b09e4d88c76b..d6c589cf42d80f22a96a58f602996224a25dd010 100644 (file)
@@ -37,14 +37,14 @@ class AliTRDdigitizer : public AliDigitizer {
   virtual Bool_t       InitDetector();
   virtual void         Exec(Option_t* option = 0);  
   virtual Bool_t       Open(const Char_t *file, Int_t nEvent = 0);
-  virtual Bool_t       MakeBranch(const Char_t *file = 0);
+  virtual Bool_t       MakeBranch(const Char_t *file = 0) const;
   virtual Bool_t       MakeDigits();
   virtual void         AddSDigitsManager(AliTRDdigitsManager *manager);
   virtual void         DeleteSDigitsManager();
   virtual Bool_t       ConvertSDigits();
   virtual Bool_t       MergeSDigits();
   virtual Bool_t       SDigits2Digits();
-  virtual Bool_t       WriteDigits();
+  virtual Bool_t       WriteDigits() const;
 
   virtual void         SetCompress(Int_t c = 1)             { fCompress        = c;   };
   virtual void         SetDebug(Int_t v = 1)                { fDebug           = v;   };
index cc979aed776b249fb3db1010935a98c70f322294..84f2390ec18c4b2d915f09267e416f032b49cb42 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.16  2002/02/12 11:42:08  cblume
+Remove fTree from destructor
+
 Revision 1.15  2002/02/11 14:27:54  cblume
 Geometry and hit structure update
 
@@ -194,6 +197,9 @@ void AliTRDdigitsManager::CreateArrays()
 //_____________________________________________________________________________
 void AliTRDdigitsManager::SetRaw()
 {
+  //
+  // Switch on the raw digits flag
+  //
 
   fIsRaw = kTRUE;
 
index 16ef0df121c633bc0562001c730c94cefbc889ce..5e0b9d8960ec875b6bf2d662da766c366f858ee9 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.15  2002/02/11 14:21:16  cblume
+Update of the geometry. Get rid of MANY
+
 Revision 1.14  2001/11/06 17:19:41  cblume
 Add detailed geometry and simple simulator
 
@@ -408,7 +411,7 @@ void AliTRDgeometry::SetNTimeBin(const Int_t nbin)
 }
 
 //_____________________________________________________________________________
-void AliTRDgeometry::CreateGeometry(Int_t *idtmed)
+void AliTRDgeometry::CreateGeometry(Int_t *idtmed) const
 {
   //
   // Create TRD geometry
index 4480ac0c4cbec93e7c2818221d2884a3d790e858..be2174346be15e8d118267e39d5218e31e9fd6ad 100644 (file)
@@ -5,6 +5,12 @@
 
 /* $Id$ */
 
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD geometry class                                                       //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
 #include "AliGeometry.h"
 
 class AliTRDgeometry : public AliGeometry {
@@ -16,7 +22,7 @@ class AliTRDgeometry : public AliGeometry {
   AliTRDgeometry();
   virtual ~AliTRDgeometry();
 
-  virtual void     CreateGeometry(Int_t *idtmed);
+  virtual void     CreateGeometry(Int_t *idtmed) const;
   virtual Int_t    IsVersion() const = 0;
   virtual void     Init();
   virtual Bool_t   Local2Global(Int_t d, Float_t *local, Float_t *global) const;
@@ -63,7 +69,7 @@ class AliTRDgeometry : public AliGeometry {
   virtual Bool_t   GetPHOShole() const = 0;
   virtual Bool_t   GetRICHhole() const = 0;
 
-  virtual Int_t    GetDetectorSec(const Int_t p, const Int_t) const;
+  virtual Int_t    GetDetectorSec(const Int_t p, const Int_t c) const;
   virtual Int_t    GetDetector(const Int_t p, const Int_t c, const Int_t s) const;
   virtual Int_t    GetPlane(const Int_t d)   const;
   virtual Int_t    GetChamber(const Int_t d) const;
index d58c0d393193eb879392a2f6977318671e595bc2..c8c2597f21f657bce3f30ed225bcc1253ed344d9 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.3  2002/02/11 14:21:16  cblume
+Update of the geometry. Get rid of MANY
+
 Revision 1.2  2001/11/08 13:13:08  cblume
 Change to MANY for UCFI/M/O and UAFI/M/O
 
@@ -314,7 +317,7 @@ void AliTRDgeometryDetail::CreateGeometry(Int_t *idtmed)
 }
 
 //_____________________________________________________________________________
-void AliTRDgeometryDetail::CreateReadout(Int_t *idtmed)
+void AliTRDgeometryDetail::CreateReadout(Int_t *idtmed) const
 {
   //
   // Create the volumina of the readout electronics
@@ -450,7 +453,7 @@ void AliTRDgeometryDetail::PositionReadout(Int_t ipla, Int_t icha)
 }
 
 //_____________________________________________________________________________
-void AliTRDgeometryDetail::CreateCooling(Int_t *idtmed)
+void AliTRDgeometryDetail::CreateCooling(Int_t *idtmed) const
 {
   //
   // Create the volumina of the cooling
index 527ae4ea9cb1c5cb6cb4015b9b2e9c460f4acb67..d38b88dc41144632980dfb6da53ffdc928d9c665 100644 (file)
@@ -5,6 +5,12 @@
 
 /* $Id$ */
 
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  Detailed TRD geometry for the spaceframe without holes                   //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
 #include "AliTRDgeometryFull.h"
 
 class AliTRDgeometryDetail : public AliTRDgeometryFull {
@@ -15,8 +21,8 @@ class AliTRDgeometryDetail : public AliTRDgeometryFull {
   virtual ~AliTRDgeometryDetail();
 
           void    CreateGeometry(Int_t *idtmed);
-          void    CreateReadout(Int_t *idtmed);
-          void    CreateCooling(Int_t *idtmed);
+          void    CreateReadout(Int_t *idtmed) const;
+          void    CreateCooling(Int_t *idtmed) const;
           void    PositionReadout(Int_t ipla, Int_t icha);
           void    PositionCooling(Int_t ipla, Int_t icha, Int_t idrotm);
           Int_t   IsVersion() const { return 2; };
index c1716cd2a609f59b9e70421074f860a2104d4c80..837693ff6d8af6fc5af8b10a0cb79a35717a6f48 100644 (file)
@@ -5,6 +5,12 @@
 
 /* $Id$ */
 
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD geometry for the spaceframe without holes                            //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
 #include "AliTRDgeometry.h"
 
 class AliTRDgeometryFull : public AliTRDgeometry {
index 6ba37856d2a6892778a3b069bb99495c8c07d8a0..70d4c42ce307b83a980d0edaf0c8a4664abee999 100644 (file)
@@ -5,6 +5,12 @@
 
 /* $Id$ */
 
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD geometry with holes                                                  //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
 #include "AliTRDgeometry.h"
 
 class AliTRDgeometryHole : public AliTRDgeometry {
index 5b40846b772776f84ff5b2db70d1b4f7ef0c5f19..e98e5d87fc95ded14ab0d63a6fe23bf2ee226e1a 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.10  2000/11/20 08:56:51  cblume
+Fix the binning of the histograms
+
 Revision 1.9  2000/11/01 14:53:21  cblume
 Merge with TRD-develop
 
@@ -60,6 +63,7 @@ Introduction of the Copyright and cvs Log
 //                                                                           //
 //  Contains the pixel information for one TRD chamber                       //
 //                                                                           //
+//                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
 #include <TObjArray.h>
@@ -525,6 +529,9 @@ Int_t AliTRDmatrix::GetTrack(Int_t iRow, Int_t iCol, Int_t iTime
 //_____________________________________________________________________________
 Int_t AliTRDmatrix::GetIndex(Int_t iRow, Int_t iCol, Int_t iTime) const
 {
+  //
+  // Get the index of a given pixel
+  //
 
   if ((iRow  >= 0) && (iRow  < fRow ) &&
       (iCol  >= 0) && (iCol  < fCol ) &&
@@ -540,6 +547,9 @@ Int_t AliTRDmatrix::GetIndex(Int_t iRow, Int_t iCol, Int_t iTime) const
 //_____________________________________________________________________________
 AliTRDpixel *AliTRDmatrix::GetPixel(Int_t iRow, Int_t iCol, Int_t iTime) const
 {
+  //
+  // Get one pixel
+  //
 
   Int_t iPixel = GetIndex(iRow,iCol,iTime);
   if (iPixel < 0) {
index d28e61b01a2c334af5c1ef1df4d6924733b18d60..32edbb21390b978d275fe2be3ac18fe6740ad683 100644 (file)
@@ -12,7 +12,9 @@ class TObjArray;
 class AliTRDpixel;
 
 ///////////////////////////////////////////////////////
+//                                                   //
 //  Stores the pixel-information of one TRD chamber  //
+//                                                   //
 ///////////////////////////////////////////////////////
 
 class AliTRDmatrix : public TObject {
index 536fee09d4e2d23705f9d07e293a69f02b25fc22..780466eb72c221fbf69b12c3ab11a51a09363274 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD MC track                                                             //
+//  Used for efficiency estimates and matching of reconstructed tracks       //
+//  to MC particles                                                          //                    
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
 #include "AliTRDmcTrack.h"
 #include "AliTRDgeometry.h"
 
@@ -36,8 +44,8 @@ AliTRDmcTrack::AliTRDmcTrack()
   
   for(Int_t i=0; i<6; i++) {
     for(Int_t j=0; j<3; j++) { 
-      Pin[i][j]=0.; 
-      Pout[i][j] = 0.;
+      fPin[i][j]=0.; 
+      fPout[i][j] = 0.;
     }
   }
 
@@ -63,8 +71,8 @@ AliTRDmcTrack::AliTRDmcTrack(Int_t label, Bool_t primary, Float_t mass
   
   for(Int_t i=0; i<6; i++) {
     for(Int_t j=0; j<3; j++) { 
-      Pin[i][j]=0.; 
-      Pout[i][j] = 0.;
+      fPin[i][j]=0.; 
+      fPout[i][j] = 0.;
     }
   }
 
@@ -83,19 +91,19 @@ void AliTRDmcTrack::GetPxPyPz(Double_t& px, Double_t& py, Double_t& pz,
 
   if(opt >= 0) {
     for(i = 0; i < AliTRDgeometry::Nplan(); i++) {
-      if(  Pin[i][0] * Pin[i][0]
-         + Pin[i][1] * Pin[i][1]
-         + Pin[i][2] * Pin[i][2] > 0.0005) break;
+      if(  fPin[i][0] * fPin[i][0]
+         + fPin[i][1] * fPin[i][1]
+         + fPin[i][2] * fPin[i][2] > 0.0005) break;
     }
-    px = Pin[0][0]; py = Pin[0][1]; pz = Pin[0][2];
+    px = fPin[0][0]; py = fPin[0][1]; pz = fPin[0][2];
   }
   else {
     for(i = AliTRDgeometry::Nplan() - 1; i >= 0; i--) {
-      if(  Pout[i][0] * Pout[i][0]
-         + Pout[i][1] * Pout[i][1]
-         + Pout[i][2] * Pout[i][2] > 0.0005) break;
+      if(  fPout[i][0] * fPout[i][0]
+         + fPout[i][1] * fPout[i][1]
+         + fPout[i][2] * fPout[i][2] > 0.0005) break;
     }
-    px = Pout[i][0]; py = Pout[i][1]; pz = Pout[i][2];
+    px = fPout[i][0]; py = fPout[i][1]; pz = fPout[i][2];
   }
 
   return;
@@ -112,10 +120,10 @@ void AliTRDmcTrack::GetPlanePxPyPz(Double_t& px, Double_t& py, Double_t& pz,
   //
 
   if(opt >= 0) {
-    px = Pin[plane][0]; py = Pin[plane][1]; pz = Pin[plane][2];
+    px = fPin[plane][0]; py = fPin[plane][1]; pz = fPin[plane][2];
   }
   else {
-    px = Pout[plane][0]; py = Pout[plane][1]; pz = Pout[plane][2];
+    px = fPout[plane][0]; py = fPout[plane][1]; pz = fPout[plane][2];
   }
 
   return;
index 3c39143990fbf03ae5c1f6270cd91c604ec4c1a0..229a5f0d8f14eb7fb249fc1c9f0b4c7dddf915c5 100644 (file)
@@ -4,6 +4,14 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */ 
 
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD MC track                                                             //
+//  Used for efficiency estimates and matching of reconstructed tracks       //
+//  to MC particles                                                          //                    
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
 #include <TObject.h> 
 
 class AliTRDgeometry;
@@ -18,10 +26,10 @@ public:
   AliTRDmcTrack(Int_t label, Bool_t primary, Float_t mass, Int_t charge, Int_t pdg); 
 
   void SetPin(Int_t plane, Double_t px, Double_t py, Double_t pz)
-              { Pin[plane][0]  = px; Pin[plane][1]  = py; Pin[plane][2]  = pz; }
+              { fPin[plane][0]  = px; fPin[plane][1]  = py; fPin[plane][2]  = pz; }
 
   void SetPout(Int_t plane, Double_t px, Double_t py, Double_t pz)
-              { Pout[plane][0] = px; Pout[plane][1] = py; Pout[plane][2] = pz; }
+              { fPout[plane][0] = px; fPout[plane][1] = py; fPout[plane][2] = pz; }
 
   void GetPxPyPz(Double_t &px, Double_t &py, Double_t &pz, Int_t opt = 0) const;
   void GetPlanePxPyPz(Double_t &px, Double_t &py, Double_t &pz
@@ -49,8 +57,8 @@ protected:
    Int_t    fN;               // Number of TRD clusters associated with the track
    Int_t    fIndex[200];      // Indices of these clusters  
                           
-   Double_t Pin[6][3];        // Px,Py,Pz at the entrance of each TRD plane   
-   Double_t Pout[6][3];       // Px,Py,Pz at the exit of each TRD plane
+   Double_t fPin[6][3];       // Px,Py,Pz at the entrance of each TRD plane   
+   Double_t fPout[6][3];      // Px,Py,Pz at the exit of each TRD plane
 
    ClassDef(AliTRDmcTrack,1)  // TRD MC track
 
index 7d0e993aa831c02fcf9f0279d6af818e6b713e8e..70a8716aedd20cb32b246c3f649debb15c4a8807 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.2  2002/03/28 10:00:36  hristov
+Some additional initialisation
+
 Revision 1.1  2002/03/25 20:01:18  cblume
 Introduce parameter class
 
@@ -541,7 +544,7 @@ void AliTRDparameter::SetNTimeBin(const Int_t nbin)
 }
 
 //_____________________________________________________________________________
-Float_t AliTRDparameter::CrossTalk(Float_t time)
+Float_t AliTRDparameter::CrossTalk(Float_t time) const
 {
   //
   // Applies the pad-pad capacitive cross talk
@@ -576,7 +579,7 @@ Int_t AliTRDparameter::Diffusion(Float_t driftlength, Float_t *xyz)
 }
 
 //_____________________________________________________________________________
-Int_t AliTRDparameter::ExB(Float_t driftlength, Float_t *xyz)
+Int_t AliTRDparameter::ExB(Float_t driftlength, Float_t *xyz) const
 {
   //
   // Applies E x B effects to the position of a single electron
@@ -592,7 +595,7 @@ Int_t AliTRDparameter::ExB(Float_t driftlength, Float_t *xyz)
 
 //_____________________________________________________________________________
 Int_t AliTRDparameter::PadResponse(Float_t signal, Float_t dist
-                                 , Int_t plane, Float_t *pad)
+                                 , Int_t plane, Float_t *pad) const
 {
   //
   // Applies the pad response
@@ -632,7 +635,7 @@ Int_t AliTRDparameter::PadResponse(Float_t signal, Float_t dist
 }
 
 //_____________________________________________________________________________
-Float_t AliTRDparameter::TimeResponse(Float_t time)
+Float_t AliTRDparameter::TimeResponse(Float_t time) const
 {
   //
   // Applies the preamp shaper time response
@@ -1301,9 +1304,9 @@ Float_t AliTRDparameter::GetOmegaTau(Float_t vd, Float_t b)
 }
 
 //_____________________________________________________________________________
-Double_t AliTRDparameter::LUTposition(Int_t iplane, Double_t ampL, 
-                                                    Double_t ampC,
-                                                     Double_t ampR)
+Double_t AliTRDparameter::LUTposition(Int_t iplane, Double_t ampL 
+                                                  , Double_t ampC
+                                                  , Double_t ampR) const
 {
   //
   // Calculates the cluster position using the lookup table.
index 01c2187bdf33ac592ca9c10cd837c3c354a5b863..7d4ccd49734735e6d778d6dd1eed8723ca12f000 100644 (file)
@@ -5,6 +5,12 @@
 
 /* $Id$ */
 
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD parameter class                                                      //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
 #include "TNamed.h"
 
 class AliTRDgeometry;
@@ -116,12 +122,12 @@ class AliTRDparameter : public TNamed {
           Int_t    LUTOn()                                  const { return fLUTOn;         };
 
   virtual Int_t    Diffusion(Float_t driftlength, Float_t *xyz);
-  virtual Int_t    ExB(Float_t driftlength, Float_t *xyz);  
+  virtual Int_t    ExB(Float_t driftlength, Float_t *xyz) const;  
   virtual Float_t  Col0Tilted(Float_t col0, Float_t rowOffset, Int_t plane);
-  virtual Int_t    PadResponse(Float_t signal, Float_t dist, Int_t plane, Float_t *pad);
-  virtual Float_t  CrossTalk(Float_t time); 
-  virtual Float_t  TimeResponse(Float_t time);  
-  virtual Double_t LUTposition(Int_t iplane, Double_t ampL, Double_t ampC, Double_t ampR);
+  virtual Int_t    PadResponse(Float_t signal, Float_t dist, Int_t plane, Float_t *pad) const;
+  virtual Float_t  CrossTalk(Float_t time) const
+  virtual Float_t  TimeResponse(Float_t time) const;  
+  virtual Double_t LUTposition(Int_t iplane, Double_t ampL, Double_t ampC, Double_t ampR) const;
 
  protected:
 
index 0b15f44dc386ee0bd790c347c8f28c8c553afb80..2571718f281660663a9a7eff7cdfcbdae8b1abcf 100644 (file)
@@ -5,6 +5,16 @@
 
 /* $Id$ */                   
 
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//   The TRD particle identification base class                              //
+//                                                                           //
+//   Its main purposes are:                                                  //
+//      - Provide I/O framework for all neccessary files                     //
+//      - Assignment of a e/pi propability to a given track                  //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
 #include <TNamed.h>
 
 class TObjArray;
@@ -56,15 +66,15 @@ class AliTRDpid : public TNamed {
           void          SetThreePadOnly(Bool_t only)        { fThreePadOnly  = only;   };
           void          SetEvent(Int_t event)               { fEvent         = event;  };
 
-          TObjArray    *GetTrackArray()                     { return fTrackArray;      }; 
-          TObjArray    *GetClusterArray()                   { return fClusterArray;    };
+          TObjArray    *GetTrackArray()               const { return fTrackArray;      }; 
+          TObjArray    *GetClusterArray()             const { return fClusterArray;    };
 
-          Float_t       GetPIDratioMin()                    { return fPIDratioMin;     };
-          Bool_t        GetPIDpurePoints()                  { return fPIDpurePoints;   };
-          Float_t       GetPIDindexMin()                    { return fPIDindexMin;     };
-          Float_t       GetPIDindexMax()                    { return fPIDindexMax;     };
+          Float_t       GetPIDratioMin()              const { return fPIDratioMin;     };
+          Bool_t        GetPIDpurePoints()            const { return fPIDpurePoints;   };
+          Float_t       GetPIDindexMin()              const { return fPIDindexMin;     };
+          Float_t       GetPIDindexMax()              const { return fPIDindexMax;     };
 
-          Bool_t        GetThreePadOnly()                   { return fThreePadOnly;    };
+          Bool_t        GetThreePadOnly()             const { return fThreePadOnly;    };
 
  protected:
 
index 2d6150087c89e7c683333261425aafc650a509c3..c27efb342c39201943dfe84d14e479978d4a5c47 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.2  2001/11/07 11:04:22  hristov
+Minor corrections needed on Sun (arrays with undefined size created by new, inline decration removed when the body was hot in the header file)
+
 Revision 1.1  2001/11/06 17:19:41  cblume
 Add detailed geometry and simple simulator
 
@@ -409,7 +412,7 @@ Int_t AliTRDpidLQ::GetIndex(const Float_t mom, const Int_t ipid)
 }
 
 //_____________________________________________________________________________
-Int_t AliTRDpidLQ::GetIndex(const Int_t imom, const Int_t ipid)
+Int_t AliTRDpidLQ::GetIndex(const Int_t imom, const Int_t ipid) const
 {
   //
   // Returns the histogram index
index 1fdd521c243457df70f638011e47de0e801750a6..218caf54bad0c07c00a3a15e28fb4070bab62c6f 100644 (file)
@@ -5,6 +5,18 @@
 
 /* $Id$ */
 
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//   The TRD particle identification class                                   //
+//                                                                           //
+//   Its main purposes are:                                                  //
+//      - Creation and bookkeeping of the propability distributions          //
+//      - Assignment of a e/pi propability to a given track based on         //
+//        the LQ method                                                      //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
 #include "AliTRDpid.h"
 
 class AliTRDpidLQ : public AliTRDpid {
@@ -26,7 +38,7 @@ class AliTRDpidLQ : public AliTRDpid {
   virtual Bool_t        FillSpectra(const AliTRDtrack *t);
 
   Int_t         GetIndex(const AliTRDtrack *t);
-  Int_t         GetIndex(const Int_t imom, const Int_t ipid);
+  Int_t         GetIndex(const Int_t imom, const Int_t ipid) const;
   Int_t         GetIndex(const Float_t mom, const Int_t ipid);
 
           TObjArray*    GetHist() const                     { return fHist;        };
index 8effe433d809d93d903f418b992625d9b600b981..cbdde16eb259bb40a8b3f597360cfd6a65e68035 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.3  2000/10/15 23:40:01  cblume
+Remove AliTRDconst
+
 Revision 1.2  2000/10/06 16:49:46  cblume
 Made Getters const
 
@@ -25,7 +28,8 @@ New class AliTRDpoints to display the TR photon hits
 
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
-//  This class contains the TRD points for the ALICE event display           //
+//  This class contains the TRD points for the ALICE event display.          //
+//  Used to seperately display dEdx and TR photon hits.                      //
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
index 64662c7fafd1cbd20c63ff75bed4e9f30ef48040..6cdeb8402b899f4e3d2accad31e60194c60a9330 100644 (file)
@@ -5,6 +5,13 @@
 
 /* $Id$ */
 
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  This class contains the TRD points for the ALICE event display.          //
+//  Used to seperately display dEdx and TR photon hits.                      //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
 #include "AliPoints.h"
 
 class AliTRDpoints : public AliPoints {
index 30fafdadb1cbf01ae86b95e5cde06af30f7fba11..0eee224fe9675faa9a183c298d28ab60e4cd682c 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.7  2001/12/05 15:04:34  hristov
+Changes related to the corrections of AliRecPoint
+
 Revision 1.6  2001/02/14 18:22:26  cblume
 Change in the geometry of the padplane
 
@@ -217,27 +220,27 @@ void AliTRDrecPoint::AddTrackIndex(Int_t *track)
  //  2) if two or more indexes appear equal number of times, the lowest
  //     ones are stored first;
 
-  const Int_t size = 9;
+  const Int_t kSize = 9;
 
-  Int_t entries[size][2], i, j, index;
+  Int_t entries[kSize][2], i, j, index;
 
-  Bool_t index_added;
+  Bool_t indexAdded;
 
-  for (i=0; i<size; i++) {
+  for (i=0; i<kSize; i++) {
     entries[i][0]=-1;
     entries[i][1]=0;
   }
 
 
-  for (Int_t k=0; k<size; k++) {
+  for (Int_t k=0; k<kSize; k++) {
     index=track[k];
-    index_added=kFALSE; j=0;
+    indexAdded=kFALSE; j=0;
     if (index >= 0) {
-      while ( (!index_added) && ( j < size ) ) {
+      while ( (!indexAdded) && ( j < kSize ) ) {
         if ((entries[j][0]==index) || (entries[j][1]==0)) {
           entries[j][0]=index;
           entries[j][1]=entries[j][1]+1;
-          index_added=kTRUE;
+          indexAdded=kTRUE;
         }
         j++;
       }
@@ -248,7 +251,7 @@ void AliTRDrecPoint::AddTrackIndex(Int_t *track)
   Int_t swap=1, tmp0, tmp1;
   while ( swap > 0) {
     swap=0;
-    for(i=0; i<(size-1); i++) {
+    for(i=0; i<(kSize-1); i++) {
       if ((entries[i][0] >= 0) && (entries[i+1][0] >= 0)) {
         if ((entries[i][1] < entries[i+1][1]) ||
             ((entries[i][1] == entries[i+1][1]) &&
index 59a9230ce9bbf32d8c4d61bc08a2a2595b10a1db..18fb5a25f34a363e8efeca6c3162ca375c4d711f 100644 (file)
@@ -5,6 +5,12 @@
 
 /* $Id$ */
 
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD reconstructed point                                                  //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
 #include "AliRecPoint.h"
 
 class AliTRDrecPoint : public AliRecPoint {
@@ -15,7 +21,7 @@ class AliTRDrecPoint : public AliRecPoint {
   AliTRDrecPoint(const char * opt);
   virtual ~AliTRDrecPoint();
 
-  virtual void    Print(Option_t* opt) {};
+  virtual void    Print(Option_t* opt) const {};
   virtual void    AddDigit(Int_t digit);
   virtual void    AddDigit(AliDigitNew &digit) {};
 
index 95cd8cd69055df02b9632060efcced15de4306ba..57fc438d3f36db05c3b2929fb1bd5920f0997a26 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.12  2002/02/12 16:06:45  cblume
+Remove delete fTree
+
 Revision 1.11  2001/11/19 08:44:08  cblume
 Fix bugs reported by Rene
 
@@ -472,7 +475,7 @@ Bool_t  AliTRDsegmentArrayBase::MakeDictionary(Int_t size)
 }
 
 //_____________________________________________________________________________
-const AliTRDsegmentID * AliTRDsegmentArrayBase::operator[](Int_t i)
+const AliTRDsegmentID * AliTRDsegmentArrayBase::operator[](Int_t i) const
 {
   //
   // Returns a segment with the given index <i>
index f842b0c17dc8c64707a2cc19515c5ce9386f36f0..f8e997bb4e6db32435fdbfdba853823ec7e97cf6 100644 (file)
@@ -28,7 +28,7 @@ class AliTRDsegmentArrayBase: public TNamed {
   AliTRDsegmentArrayBase &operator=(const AliTRDsegmentArrayBase &a);
  
   const AliTRDsegmentID *At(Int_t i) const; 
-  const AliTRDsegmentID *operator[](Int_t i); 
+  const AliTRDsegmentID *operator[](Int_t i) const
 
           Bool_t           AddSegment(AliTRDsegmentID *segment);
           AliTRDsegmentID *AddSegment(Int_t index);  
index 5975e8fea88f6f21631df1f6eda687f1ef8a8133..217395f7ef5c005bf113821a3132542164c6e982 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.3  2000/11/01 14:53:21  cblume
+Merge with TRD-develop
+
 Revision 1.1.4.1  2000/10/04 16:34:58  cblume
 Replace include files by forward declarations
 
@@ -27,7 +30,9 @@ Add new TRD classes
 */
 
 ///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
 //     Base class for a detector segment                                     // 
+//                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
 #include "AliTRDsegmentID.h"
index a5344d00a46e38490b890a104543ec8ed078930b..da81d490d505d41be2d25c27c7ce2d12cf333fc3 100644 (file)
@@ -6,9 +6,11 @@
 
 /* $Id: AliTRDsegmentID.h,v */
 
-////////////////////////////////////////////////
-//     Base class for a detector segment      // 
-////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//     Base class for a detector segment                                     // 
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
 
 #include <TObject.h>
 
index ef7a76ba5474d302bc06f00c486b1125358e6bde..71971e179c8237048b0268f9f972c99d806ce8f4 100644 (file)
@@ -5,6 +5,12 @@
 
 /* $Id$ */
 
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD simulation - multimodule (regular rad.)                              //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
 #include <TObject.h>
 
 class TH1D;
index f704d012ffe7431bda3b8bc9b99f3501effb966b..7637630f70c5a09ded3ceb15d372ddd9ff85595f 100644 (file)
@@ -5,6 +5,12 @@
  
 /* $Id$ */
  
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  Simplified TRD slow simulator                                            //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
 #include <TObject.h>
 
 class AliTRDsimpleGen;
@@ -23,7 +29,7 @@ class AliTRDsimple : public TObject {
   virtual void             Copy(TObject &s);
   virtual void             ProcessEvent(Int_t ievent);
 
-  virtual AliTRDsimpleGen *GetGenerator()             { return fGenerator; };
+  virtual AliTRDsimpleGen *GetGenerator()      const { return fGenerator; };
 
  protected:
 
index b663bd306b73a14ba142815d5cccaabfed03bfe2..8248fe37477b9a6ec1d93565faefcb657b793eb8 100644 (file)
@@ -5,6 +5,12 @@
  
 /* $Id$ */
  
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  Particle generator for the simplescopic TRD simulator                    //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
 #include <TObject.h>
 
 class AliTRDsimpleGen : public TObject {
index 52f18773b2824aa93c690188f4566a10052f10cf..9ed9163aec6efc43ff3e2504e82aa9a08e612722 100644 (file)
@@ -5,6 +5,12 @@
  
 /* $Id$ */
  
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  Simple TRD Monte Carlo class                                             //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
 #include "AliMC.h"
 #include "AliMCProcess.h"
 
index c32cbf8f8b72450dcf4d41af621b62cf6a40bcf9..70eb5e449d8b5fd0619a3a9e29e5a2d52cb87d25 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.5  2001/11/06 17:19:41  cblume
+Add detailed geometry and simple simulator
+
 Revision 1.4  2001/10/21 18:30:02  hristov
 Several pointers were set to zero in the default constructors to avoid memory management problems
 
@@ -31,7 +34,14 @@ Revision 1.1.2.1  2000/09/22 14:47:52  cblume
 Add the tracking code
 
 */                        
-                                
+             
+//////////////////////////////////////////////////////////////////////
+//                                                                  //
+//  Hit compression class                                           //
+//  Adapted from AliTPCTimeBin by Marian                            //
+//                                                                  //
+//////////////////////////////////////////////////////////////////////
+                   
 #include "AliTRDcluster.h" 
 #include "AliTRDtimeBin.h" 
 
@@ -42,7 +52,7 @@ ClassImp(AliTRDtimeBin)
   AliTRDtimeBin::AliTRDtimeBin() {
   //default constructor
     fN=0;
-    for (UInt_t i=0; i<kMAX_CLUSTER_PER_TIME_BIN; i++) 
+    for (UInt_t i=0; i<kMaxClusterPerTimeBin; i++) 
       fClusters[i]=0;
   }
 //______________________________________________________
@@ -52,7 +62,7 @@ void AliTRDtimeBin::InsertCluster(AliTRDcluster* c, UInt_t index) {
 // Insert cluster in TimeBin cluster array.
 // Clusters are sorted according to Y coordinate.  
 
-  if (fN==kMAX_CLUSTER_PER_TIME_BIN) {
+  if (fN==kMaxClusterPerTimeBin) {
     printf("AliTRDtimeBin::InsertCluster(): Too many clusters !\n"); 
     return;
   }
index 01ff9e5f54bccf79f7b5bae157cbecac88a4a748..3930e081a342f445326edb54d388ad8d3f0cace1 100644 (file)
@@ -6,12 +6,17 @@
 
 /* $Id: AliTRDtimeBin.h,v */
 
+//////////////////////////////////////////////////////////////////////
+//                                                                  //
+//  Hit compression class                                           //
+//  Adapted from AliTPCTimeBin by Marian                            //
+//                                                                  //
+//////////////////////////////////////////////////////////////////////
+
 #include <TObject.h>
 
 class AliTRDcluster;
 
-const unsigned kMAX_CLUSTER_PER_TIME_BIN=3500; 
-
 //----------------------------------------------------------------- 
 class AliTRDtimeBin : public TObject {
 
@@ -21,7 +26,7 @@ public:
 
   AliTRDtimeBin();
   virtual ~AliTRDtimeBin() { };
-  void InsertCluster(AliTRDcluster*,UInt_t);
+  void InsertCluster(AliTRDcluster *c, UInt_t index);
  
   operator Int_t() const {return fN;}
   AliTRDcluster* operator[](Int_t i);
@@ -30,10 +35,12 @@ public:
   Int_t Find(Double_t y) const; 
 
 protected:
+
+  enum { kMaxClusterPerTimeBin=3500 };
  
-   UInt_t fN;
-   AliTRDcluster *fClusters[kMAX_CLUSTER_PER_TIME_BIN];
-   UInt_t fIndex[kMAX_CLUSTER_PER_TIME_BIN]; 
+   UInt_t         fN;                                 // ????
+   AliTRDcluster *fClusters[kMaxClusterPerTimeBin];   // ????
+   UInt_t         fIndex[kMaxClusterPerTimeBin];      // ????
 
   ClassDef(AliTRDtimeBin,1) // Provides tools to address clusters which lay within one time bin
 
index 3f0f47776103574caeffb954268e587988b1b635..ca389636cc3cb1dc75e9c1a513d6ebd681d97cf2 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.8  2001/05/30 12:17:47  hristov
+Loop variables declared once
+
 Revision 1.7  2001/05/28 17:07:58  hristov
 Last minute changes; ExB correction in AliTRDclusterizerV1; taking into account of material in G10 TEC frames and material between TEC planes (C.Blume,S.Sedykh)
 
@@ -32,6 +35,12 @@ Add the tracking code
 
 */                                                        
 
+/////////////////////////////////////////////////////////////////////////////
+//                                                                         //
+//  TRD track object                                                       //
+//                                                                         //
+/////////////////////////////////////////////////////////////////////////////
+
 #include <iostream.h>
 
 #include <TObject.h>
index 2dea83a97542d80661eae0d123709aacbd81c004..1366cdb60444c39288f1cd341bc3e139bc706ab2 100644 (file)
@@ -4,6 +4,12 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */ 
 
+/////////////////////////////////////////////////////////////////////////////
+//                                                                         //
+//  TRD track object                                                       //
+//                                                                         //
+/////////////////////////////////////////////////////////////////////////////
+
 #include <TObject.h> 
 
 class AliTRDcluster;
@@ -36,7 +42,7 @@ public:
    Double_t GetP()     const {  
      return TMath::Abs(GetPt())*sqrt(1.+GetTgl()*GetTgl());
    }
-   Double_t GetPredictedChi2(const AliTRDcluster*) const ;
+   Double_t GetPredictedChi2(const AliTRDcluster *c) const ;
    Double_t GetPt()    const {return 0.299792458*0.4/GetC()/100;}
    void     GetPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const ;
    Double_t GetSigmaC2()   const {return fCcc;}
index b950a4528639b50cc35fe7b358ffc52ddebe4af1..5986b800828c2ebf7b64c5dfd8c8b099566c63c6 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+////////////////////////////////////////////////
+//                                            //
+//  Manager class for TRD   hits              //
+//                                            //
+////////////////////////////////////////////////
+
 #include "AliTRDtrackHits.h"
 #include "TClonesArray.h"    
 #include "AliTRDhit.h"    
@@ -25,6 +31,10 @@ ClassImp(AliTRDtrackHits)
 void  AliTRDtrackHits::AddHitTRD(Int_t volumeID, Int_t trackID, Double_t x, 
                    Double_t y, Double_t z,Int_t q, Bool_t inDrift)
 {
+  //
+  // Add one TRD hit
+  //
+
   if (inDrift) q=2*q+1;
   else q=2*q;
   AddHitKartez(volumeID, trackID,x,y,z,q);
index 24fd4bf3a2f544a0d36589c6cac64da86211a342..12fefb13623a6ab51d49c6b2b6492b36c693a315 100644 (file)
@@ -4,7 +4,9 @@
  * See cxx source for full Copyright notice                               */
 
 ////////////////////////////////////////////////
-//  Manager class for TRD   hits                   //
+//                                            //
+//  Manager class for TRD   hits              //
+//                                            //
 ////////////////////////////////////////////////
 
 #include "../TPC/AliTPCTrackHitsV2.h"
index 30640e7f3d1f86cccfe6337e265cc8f18dff742d..16b15f152645fb4cef6901dec0c76550a2ce1fd4 100644 (file)
@@ -15,6 +15,9 @@
                                                       
 /*
 $Log$
+Revision 1.14  2001/11/14 10:50:46  cblume
+Changes in digits IO. Add merging of summable digits
+
 Revision 1.13  2001/05/30 12:17:47  hristov
 Loop variables declared once
 
@@ -50,6 +53,12 @@ Add the tracking code
 
 */   
 
+////////////////////////////////////////////////////////////////////////////////
+//                                                                            //
+//  The TRD tracker                                                           //
+//                                                                            //
+////////////////////////////////////////////////////////////////////////////////
+
 #include <iostream.h>
 
 #include <TFile.h>
@@ -70,28 +79,28 @@ Add the tracking code
 
 ClassImp(AliTRDtracker) 
 
-  const  Float_t     AliTRDtracker::fSeedDepth          = 0.5; 
-  const  Float_t     AliTRDtracker::fSeedStep           = 0.05;   
-  const  Float_t     AliTRDtracker::fSeedGap            = 0.25;  
+  const  Float_t     AliTRDtracker::fgkSeedDepth          = 0.5; 
+  const  Float_t     AliTRDtracker::fgkSeedStep           = 0.05;   
+  const  Float_t     AliTRDtracker::fgkSeedGap            = 0.25;  
 
-  const  Float_t     AliTRDtracker::fMaxSeedDeltaZ12    = 40.;  
-  const  Float_t     AliTRDtracker::fMaxSeedDeltaZ      = 25.;  
-  const  Float_t     AliTRDtracker::fMaxSeedC           = 0.0052; 
-  const  Float_t     AliTRDtracker::fMaxSeedTan         = 1.2;  
-  const  Float_t     AliTRDtracker::fMaxSeedVertexZ     = 150.; 
+  const  Float_t     AliTRDtracker::fgkMaxSeedDeltaZ12    = 40.;  
+  const  Float_t     AliTRDtracker::fgkMaxSeedDeltaZ      = 25.;  
+  const  Float_t     AliTRDtracker::fgkMaxSeedC           = 0.0052; 
+  const  Float_t     AliTRDtracker::fgkMaxSeedTan         = 1.2;  
+  const  Float_t     AliTRDtracker::fgkMaxSeedVertexZ     = 150.; 
 
-  const  Double_t    AliTRDtracker::fSeedErrorSY        = 0.2;
-  const  Double_t    AliTRDtracker::fSeedErrorSY3       = 2.5;
-  const  Double_t    AliTRDtracker::fSeedErrorSZ        = 0.1;
+  const  Double_t    AliTRDtracker::fgkSeedErrorSY        = 0.2;
+  const  Double_t    AliTRDtracker::fgkSeedErrorSY3       = 2.5;
+  const  Double_t    AliTRDtracker::fgkSeedErrorSZ        = 0.1;
 
-  const  Float_t     AliTRDtracker::fMinClustersInSeed  = 0.7;  
+  const  Float_t     AliTRDtracker::fgkMinClustersInSeed  = 0.7;  
 
-  const  Float_t     AliTRDtracker::fMinClustersInTrack = 0.5;  
-  const  Float_t     AliTRDtracker::fSkipDepth          = 0.05;
-  const  Float_t     AliTRDtracker::fLabelFraction      = 0.5;  
-  const  Float_t     AliTRDtracker::fWideRoad           = 20.;
+  const  Float_t     AliTRDtracker::fgkMinClustersInTrack = 0.5;  
+  const  Float_t     AliTRDtracker::fgkSkipDepth          = 0.05;
+  const  Float_t     AliTRDtracker::fgkLabelFraction      = 0.5;  
+  const  Float_t     AliTRDtracker::fgkWideRoad           = 20.;
 
-  const  Double_t    AliTRDtracker::fMaxChi2            = 24.; 
+  const  Double_t    AliTRDtracker::fgkMaxChi2            = 24.; 
 
 //____________________________________________________________________
 AliTRDtracker::AliTRDtracker()
@@ -117,6 +126,10 @@ AliTRDtracker::AliTRDtracker()
 AliTRDtracker::AliTRDtracker(const Text_t* name, const Text_t* title)
                   :TNamed(name, title)
 {
+  //
+  // TRD tracker contructor
+  //
+
   fEvent     = 0;
   fGeom      = NULL;
 
@@ -133,22 +146,31 @@ AliTRDtracker::AliTRDtracker(const Text_t* name, const Text_t* title)
 //___________________________________________________________________
 AliTRDtracker::~AliTRDtracker()
 {
+  //
+  // Destructor
+  //
+
   delete fClusters;
   delete fTracks;
   delete fSeeds;
   delete fGeom;
+
 }   
 
 //___________________________________________________________________
 void AliTRDtracker::Clusters2Tracks(TH1F *hs, TH1F *hd)
 {
+  //
+  // Do the trackfinding
+  //
+
   Int_t i;
 
   Int_t inner, outer;
   Int_t fTotalNofTimeBins = fGeom->GetTimeMax() * AliTRDgeometry::Nplan();
-  Int_t nSteps = (Int_t) (fSeedDepth / fSeedStep);
-  Int_t gap = (Int_t) (fTotalNofTimeBins * fSeedGap);
-  Int_t step = (Int_t) (fTotalNofTimeBins * fSeedStep);
+  Int_t nSteps = (Int_t) (fgkSeedDepth / fgkSeedStep);
+  Int_t gap = (Int_t) (fTotalNofTimeBins * fgkSeedGap);
+  Int_t step = (Int_t) (fTotalNofTimeBins * fgkSeedStep);
 
 
   //  nSteps = 1;
@@ -181,21 +203,27 @@ void AliTRDtracker::Clusters2Tracks(TH1F *hs, TH1F *hd)
 }          
 
 //_____________________________________________________________________
-Double_t AliTRDtracker::ExpectedSigmaY2(Double_t r, Double_t tgl, Double_t pt)
+Double_t AliTRDtracker::ExpectedSigmaY2(Double_t r, Double_t tgl, Double_t pt) const
 {
+  //
   // Parametrised "expected" error of the cluster reconstruction in Y 
+  //
 
   Double_t s = 0.08 * 0.08;    
   return s;
+
 }
 
 //_____________________________________________________________________
-Double_t AliTRDtracker::ExpectedSigmaZ2(Double_t r, Double_t tgl)
+Double_t AliTRDtracker::ExpectedSigmaZ2(Double_t r, Double_t tgl) const
 {
+  //
   // Parametrised "expected" error of the cluster reconstruction in Z 
+  //
 
   Double_t s = 6 * 6 /12.;  
   return s;
+
 }                  
 
 //_____________________________________________________________________
@@ -203,8 +231,10 @@ Double_t f1trd(Double_t x1,Double_t y1,
               Double_t x2,Double_t y2,
               Double_t x3,Double_t y3)
 {
+  //
   // Initial approximation of the track curvature
   // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
+  //
 
   Double_t d=(x2-x1)*(y3-y2)-(x3-x2)*(y2-y1);
   Double_t a=0.5*((y3-y2)*(y2*y2-y1*y1+x2*x2-x1*x1)-
@@ -215,6 +245,7 @@ Double_t f1trd(Double_t x1,Double_t y1,
   Double_t xr=TMath::Abs(d/(d*x1-a)), yr=d/(d*y1-b);
 
   return -xr*yr/sqrt(xr*xr+yr*yr);
+
 }          
 
 //_____________________________________________________________________
@@ -222,8 +253,10 @@ Double_t f2trd(Double_t x1,Double_t y1,
               Double_t x2,Double_t y2,
               Double_t x3,Double_t y3)
 {
+  //
   // Initial approximation of the track curvature times center of curvature
   // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
+  //
 
   Double_t d=(x2-x1)*(y3-y2)-(x3-x2)*(y2-y1);
   Double_t a=0.5*((y3-y2)*(y2*y2-y1*y1+x2*x2-x1*x1)-
@@ -234,6 +267,7 @@ Double_t f2trd(Double_t x1,Double_t y1,
   Double_t xr=TMath::Abs(d/(d*x1-a)), yr=d/(d*y1-b);
 
   return -a/(d*y1-b)*xr/sqrt(xr*xr+yr*yr);
+
 }          
 
 //_____________________________________________________________________
@@ -241,32 +275,36 @@ Double_t f3trd(Double_t x1,Double_t y1,
               Double_t x2,Double_t y2,
               Double_t z1,Double_t z2)
 {
+  //
   // Initial approximation of the tangent of the track dip angle
   // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
+  //
 
   return (z1 - z2)/sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
+
 }            
 
 
 //___________________________________________________________________
 
 Int_t AliTRDtracker::FindProlongation(AliTRDtrack& t, AliTRDtrackingSector *sec,
-                            Int_t s, Int_t rf, Int_t matched_index, 
+                            Int_t s, Int_t rf, Int_t matchedIndex, 
                                      TH1F *hs, TH1F *hd)
 {
+  //
   // Starting from current position on track=t this function tries 
   // to extrapolate the track up to timeBin=rf and to confirm prolongation
   // if a close cluster is found. *sec is a pointer to allocated
   // array of sectors, in which the initial sector has index=s. 
-
+  //
 
   //  TH1F *hsame = hs;     
   //  TH1F *hdiff = hd;   
 
   //  Bool_t good_match;
 
-  const Int_t TIME_BINS_TO_SKIP=Int_t(fSkipDepth*sec->GetNtimeBins());
-  Int_t try_again=TIME_BINS_TO_SKIP;
+  const Int_t kTimeBinsToSkip=Int_t(fgkSkipDepth*sec->GetNtimeBins());
+  Int_t tryAgain=kTimeBinsToSkip;
 
   Double_t alpha=AliTRDgeometry::GetAlpha();
 
@@ -291,12 +329,12 @@ Int_t AliTRDtracker::FindProlongation(AliTRDtrack& t, AliTRDtrackingSector *sec,
       return 0;
     }
 
-    AliTRDtimeBin& time_bin=sec[s][nr];
+    AliTRDtimeBin& timeBin=sec[s][nr];
     Double_t sy2=ExpectedSigmaY2(t.GetX(),t.GetTgl(),t.GetPt());
     Double_t sz2=ExpectedSigmaZ2(t.GetX(),t.GetTgl());
     Double_t road=25.*sqrt(t.GetSigmaY2() + sy2), y=t.GetY(), z=t.GetZ();
 
-    if (road>fWideRoad) {
+    if (road>fgkWideRoad) {
       if (t.GetNclusters() > 4) {
        cerr<<t.GetNclusters()<<" FindProlongation: Road is too wide !\n";
       }
@@ -307,17 +345,17 @@ Int_t AliTRDtracker::FindProlongation(AliTRDtrack& t, AliTRDtrackingSector *sec,
     UInt_t index=0;
     //    Int_t ncl = 0;
 
-    Double_t max_chi2=fMaxChi2;
+    Double_t maxChi2=fgkMaxChi2;
 
-    if (time_bin) {
+    if (timeBin) {
 
-      for (Int_t i=time_bin.Find(y-road); i<time_bin; i++) {
-        AliTRDcluster* c=(AliTRDcluster*)(time_bin[i]);
+      for (Int_t i=timeBin.Find(y-road); i<timeBin; i++) {
+        AliTRDcluster* c=(AliTRDcluster*)(timeBin[i]);
 
        //      good_match = kFALSE;
-       //      if((c->GetTrackIndex(0) == matched_index) ||
-       //   (c->GetTrackIndex(1) == matched_index) ||
-       //   (c->GetTrackIndex(2) == matched_index)) good_match = kTRUE;
+       //      if((c->GetTrackIndex(0) == matchedIndex) ||
+       //   (c->GetTrackIndex(1) == matchedIndex) ||
+       //   (c->GetTrackIndex(2) == matchedIndex)) good_match = kTRUE;
        //        if(hsame) hsame->Fill(TMath::Abs(c->GetY()-y)/road);
        //        if(hdiff) hdiff->Fill(road);
 
@@ -333,23 +371,23 @@ Int_t AliTRDtracker::FindProlongation(AliTRDtrack& t, AliTRDtrackingSector *sec,
 
         Double_t chi2=t.GetPredictedChi2(c);
 
-       //      if((c->GetTrackIndex(0) == matched_index) ||
-       //         (c->GetTrackIndex(1) == matched_index) ||
-       //         (c->GetTrackIndex(2) == matched_index))
+       //      if((c->GetTrackIndex(0) == matchedIndex) ||
+       //         (c->GetTrackIndex(1) == matchedIndex) ||
+       //         (c->GetTrackIndex(2) == matchedIndex))
        //        hdiff->Fill(chi2);
 
        //      ncl++;
 
-        if (chi2 > max_chi2) continue;
-        max_chi2=chi2;
+        if (chi2 > maxChi2) continue;
+        maxChi2=chi2;
         cl=c;
-        index=time_bin.GetIndex(i);
+        index=timeBin.GetIndex(i);
       }   
       
       if(!cl) {
 
-       for (Int_t i=time_bin.Find(y-road); i<time_bin; i++) {
-         AliTRDcluster* c=(AliTRDcluster*)(time_bin[i]);
+       for (Int_t i=timeBin.Find(y-road); i<timeBin; i++) {
+         AliTRDcluster* c=(AliTRDcluster*)(timeBin[i]);
 
          if (c->GetY() > y+road) break;
          if (c->IsUsed() > 0) continue;          
@@ -359,10 +397,10 @@ Int_t AliTRDtracker::FindProlongation(AliTRDtrack& t, AliTRDtrackingSector *sec,
          
          //      ncl++;
 
-         if (chi2 > max_chi2) continue;
-         max_chi2=chi2;
+         if (chi2 > maxChi2) continue;
+         maxChi2=chi2;
          cl=c;
-         index=time_bin.GetIndex(i);
+         index=timeBin.GetIndex(i);
        }   
       }
       
@@ -370,11 +408,11 @@ Int_t AliTRDtracker::FindProlongation(AliTRDtrack& t, AliTRDtrackingSector *sec,
 
     if (cl) {
 
-      t.Update(cl,max_chi2,index);
+      t.Update(cl,maxChi2,index);
 
-      try_again=TIME_BINS_TO_SKIP;
+      tryAgain=kTimeBinsToSkip;
     } else {
-      if (try_again==0) break;
+      if (tryAgain==0) break;
       if (y > ymax) {
        //      cerr<<"y > ymax: "<<y<<" > "<<ymax<<endl;
          s = (s+1) % ns;
@@ -390,7 +428,7 @@ Int_t AliTRDtracker::FindProlongation(AliTRDtrack& t, AliTRDtrackingSector *sec,
           return 0;
         }
       }
-      if(!sec->TECframe(nr,y,z)) try_again--;
+      if(!sec->TECframe(nr,y,z)) tryAgain--;
     }
   }
 
@@ -402,7 +440,9 @@ Int_t AliTRDtracker::FindProlongation(AliTRDtrack& t, AliTRDtrackingSector *sec,
 //_____________________________________________________________________________
 void AliTRDtracker::GetEvent(const Char_t *hitfile, const Char_t *clusterfile)
 {
+  //
   // Opens a ROOT-file with TRD-clusters and reads the cluster-tree in
+  //
 
   ReadClusters(fClusters, clusterfile);
 
@@ -442,8 +482,8 @@ void AliTRDtracker::GetEvent(const Char_t *hitfile, const Char_t *clusterfile)
   }
   */  
 
-  AliTRD *TRD = (AliTRD*) gAlice->GetDetector("TRD");
-  fGeom = TRD->GetGeometry();
+  AliTRD *trd = (AliTRD*) gAlice->GetDetector("TRD");
+  fGeom = trd->GetGeometry();
 
 }     
 
@@ -451,9 +491,11 @@ void AliTRDtracker::GetEvent(const Char_t *hitfile, const Char_t *clusterfile)
 //_____________________________________________________________________________
 void AliTRDtracker::SetUpSectors(AliTRDtrackingSector *sec)
 {
+  //
   // Fills clusters into TRD tracking_sectors 
   // Note that the numbering scheme for the TRD tracking_sectors 
   // differs from that of TRD sectors
+  //
 
   for (Int_t i=0; i<AliTRDgeometry::Nsect(); i++) sec[i].SetUp();
 
@@ -466,14 +508,14 @@ void AliTRDtracker::SetUpSectors(AliTRDtrackingSector *sec)
   while (ncl--) {
     printf("\r %d left  ",ncl); 
     AliTRDcluster *c=(AliTRDcluster*)fClusters->UncheckedAt(ncl);
-    Int_t detector=c->GetDetector(), local_time_bin=c->GetLocalTimeBin();
+    Int_t detector=c->GetDetector(), localTimeBin=c->GetLocalTimeBin();
     Int_t sector=fGeom->GetSector(detector);
 
-    Int_t tracking_sector = AliTRDgeometry::kNsect - sector - 1;
+    Int_t trackingSector = AliTRDgeometry::kNsect - sector - 1;
 
-    Int_t tb=sec[sector].GetTimeBin(detector,local_time_bin); 
+    Int_t tb=sec[sector].GetTimeBin(detector,localTimeBin); 
     index=ncl;
-    sec[tracking_sector][tb].InsertCluster(c,index);
+    sec[trackingSector][tb].InsertCluster(c,index);
 
   }    
   printf("\r\n");
@@ -485,7 +527,9 @@ void AliTRDtracker::MakeSeeds(Int_t inner, Int_t outer,
                               AliTRDtrackingSector* fTrSec, Int_t turn,
                              TH1F *hs, TH1F *hd)
 {
+  //
   // Creates track seeds using clusters in timeBins=i1,i2
+  //
 
   Int_t i2 = inner, i1 = outer; 
   Int_t ti[3], to[3];
@@ -495,12 +539,12 @@ void AliTRDtracker::MakeSeeds(Int_t inner, Int_t outer,
   TH1F *hsame = hs;
   TH1F *hdiff = hd;   
   Bool_t match = false;
-  Int_t matched_index;
+  Int_t matchedIndex;
 
   // find seeds
 
   Double_t x[5], c[15];
-  Int_t max_sec=AliTRDgeometry::kNsect;
+  Int_t maxSec=AliTRDgeometry::kNsect;
 
   Double_t alpha=AliTRDgeometry::GetAlpha();
   Double_t shift=AliTRDgeometry::GetAlpha()/2.;
@@ -519,15 +563,15 @@ void AliTRDtracker::MakeSeeds(Int_t inner, Int_t outer,
   }
 
 
-  for (Int_t ns=0; ns<max_sec; ns++) {
+  for (Int_t ns=0; ns<maxSec; ns++) {
 
     printf("\n MakeSeeds: sector %d \n", ns); 
 
-    Int_t nl2=fTrSec[(ns-2+max_sec)%max_sec][i2]; 
-    Int_t nl=fTrSec[(ns-1+max_sec)%max_sec][i2];
+    Int_t nl2=fTrSec[(ns-2+maxSec)%maxSec][i2]; 
+    Int_t nl=fTrSec[(ns-1+maxSec)%maxSec][i2];
     Int_t nm=fTrSec[ns][i2];
-    Int_t nu=fTrSec[(ns+1)%max_sec][i2];
-    Int_t nu2=fTrSec[(ns+2)%max_sec][i2]; 
+    Int_t nu=fTrSec[(ns+1)%maxSec][i2];
+    Int_t nu2=fTrSec[(ns+2)%maxSec][i2]; 
 
     AliTRDtimeBin& r1=fTrSec[ns][i1];
 
@@ -543,7 +587,7 @@ void AliTRDtracker::MakeSeeds(Int_t inner, Int_t outer,
 
        if (js<nl2) {
          if(turn != 2) continue;
-         AliTRDtimeBin& r2=fTrSec[(ns-2+max_sec)%max_sec][i2];
+         AliTRDtimeBin& r2=fTrSec[(ns-2+maxSec)%maxSec][i2];
          cl=r2[js];
          y2=cl->GetY(); z2=cl->GetZ();
          for(Int_t ii=0; ii<3; ii++) ti[ii] = cl->GetTrackIndex(ii);
@@ -553,7 +597,7 @@ void AliTRDtracker::MakeSeeds(Int_t inner, Int_t outer,
        }        
        else if (js<nl2+nl) {
          if(turn != 1) continue;
-         AliTRDtimeBin& r2=fTrSec[(ns-1+max_sec)%max_sec][i2];
+         AliTRDtimeBin& r2=fTrSec[(ns-1+maxSec)%maxSec][i2];
          cl=r2[js-nl2];
          y2=cl->GetY(); z2=cl->GetZ();
          for(Int_t ii=0; ii<3; ii++) ti[ii] = cl->GetTrackIndex(ii);
@@ -571,7 +615,7 @@ void AliTRDtracker::MakeSeeds(Int_t inner, Int_t outer,
        }
        else if (js<nl2+nl+nm+nu) {
          if(turn != 1) continue;
-         AliTRDtimeBin& r2=fTrSec[(ns+1)%max_sec][i2];
+         AliTRDtimeBin& r2=fTrSec[(ns+1)%maxSec][i2];
          cl=r2[js-nl2-nl-nm];
          y2=cl->GetY(); z2=cl->GetZ();
          for(Int_t ii=0; ii<3; ii++) ti[ii] = cl->GetTrackIndex(ii);
@@ -582,7 +626,7 @@ void AliTRDtracker::MakeSeeds(Int_t inner, Int_t outer,
        }
        else {
          if(turn != 2) continue;
-         AliTRDtimeBin& r2=fTrSec[(ns+2)%max_sec][i2];
+         AliTRDtimeBin& r2=fTrSec[(ns+2)%maxSec][i2];
          cl=r2[js-nl2-nl-nm-nu];
          y2=cl->GetY(); z2=cl->GetZ();
          for(Int_t ii=0; ii<3; ii++) ti[ii] = cl->GetTrackIndex(ii);
@@ -593,7 +637,7 @@ void AliTRDtracker::MakeSeeds(Int_t inner, Int_t outer,
        
 
        match = false;
-       matched_index = -1;
+       matchedIndex = -1;
        for (Int_t ii=0; ii<3; ii++) {
          // cerr<<"ti["<<ii<<"] = "<<ti[ii]<<"; to["<<ii<<"] = "<<to[ii]<<endl;
          if(ti[ii] < 0) continue;
@@ -603,17 +647,17 @@ void AliTRDtracker::MakeSeeds(Int_t inner, Int_t outer,
            if(to[kk] >= nprim) continue;
            if(ti[ii] == to[kk]) {
              //cerr<<"ti["<<ii<<"] = "<<ti[ii]<<" = "<<to[kk]<<" = to["<<kk<<"]"<<endl;
-             matched_index = ti[ii];
+             matchedIndex = ti[ii];
              match = true;
            }
          }
        }                 
        
-       if(TMath::Abs(z1-z2) > fMaxSeedDeltaZ12) continue;
+       if(TMath::Abs(z1-z2) > fgkMaxSeedDeltaZ12) continue;
 
         Double_t zz=z1 - z1/x1*(x1-x2);
 
-        if (TMath::Abs(zz-z2)>fMaxSeedDeltaZ) continue;   
+        if (TMath::Abs(zz-z2)>fgkMaxSeedDeltaZ) continue;   
 
         Double_t d=(x2-x1)*(0.-y2)-(0.-x2)*(y2-y1);
         if (d==0.) {cerr<<"TRD MakeSeeds: Straight seed !\n"; continue;}
@@ -622,7 +666,7 @@ void AliTRDtracker::MakeSeeds(Int_t inner, Int_t outer,
         x[1]=z1;
         x[2]=f1trd(x1,y1,x2,y2,x3,y3);
 
-        if (TMath::Abs(x[2]) > fMaxSeedC) continue;
+        if (TMath::Abs(x[2]) > fgkMaxSeedC) continue;
 
         x[3]=f2trd(x1,y1,x2,y2,x3,y3);
 
@@ -630,16 +674,16 @@ void AliTRDtracker::MakeSeeds(Int_t inner, Int_t outer,
 
         x[4]=f3trd(x1,y1,x2,y2,z1,z2);
 
-        if (TMath::Abs(x[4]) > fMaxSeedTan) continue;
+        if (TMath::Abs(x[4]) > fgkMaxSeedTan) continue;
 
         Double_t a=asin(x[3]);
         Double_t zv=z1 - x[4]/x[2]*(a+asin(x[2]*x1-x[3]));
 
-        if (TMath::Abs(zv)>fMaxSeedVertexZ) continue;    
+        if (TMath::Abs(zv)>fgkMaxSeedVertexZ) continue;    
 
         Double_t sy1=r1[is]->GetSigmaY2(), sz1=r1[is]->GetSigmaZ2();
         Double_t sy2=cl->GetSigmaY2(),     sz2=cl->GetSigmaZ2();
-        Double_t sy3=fSeedErrorSY3, sy=fSeedErrorSY, sz=fSeedErrorSZ;
+        Double_t sy3=fgkSeedErrorSY3, sy=fgkSeedErrorSY, sz=fgkSeedErrorSZ;
 
         Double_t f20=(f1trd(x1,y1+sy,x2,y2,x3,y3)-x[2])/sy;
         Double_t f22=(f1trd(x1,y1,x2,y2+sy,x3,y3)-x[2])/sy;
@@ -665,7 +709,7 @@ void AliTRDtracker::MakeSeeds(Int_t inner, Int_t outer,
        
         AliTRDtrack *track=new AliTRDtrack(r1[is],index,x,c,x1,ns*alpha+shift); 
 
-        Int_t rc=FindProlongation(*track,fTrSec,ns,i2,matched_index,hsame,hdiff);
+        Int_t rc=FindProlongation(*track,fTrSec,ns,i2,matchedIndex,hsame,hdiff);
 
        //      if (match) hsame->Fill((Float_t) track->GetNclusters());
        //      else hdiff->Fill((Float_t) track->GetNclusters());  
@@ -673,7 +717,7 @@ void AliTRDtracker::MakeSeeds(Int_t inner, Int_t outer,
        //      continue;
 
         if ((rc < 0) || 
-            (track->GetNclusters() < (i1-i2)*fMinClustersInSeed)) delete track;
+            (track->GetNclusters() < (i1-i2)*fgkMinClustersInSeed)) delete track;
         else { 
          fSeeds->AddLast(track); fNseeds++; 
          printf("\r found seed %d  ", fNseeds);
@@ -701,14 +745,14 @@ void AliTRDtracker::ReadClusters(TObjArray *array, const Char_t *filename)
 
   Char_t treeName[12];
   sprintf(treeName,"TreeR%d_TRD",fEvent);
-  TTree *ClusterTree = (TTree*) file->Get(treeName);
+  TTree *clusterTree = (TTree*) file->Get(treeName);
 
-  TObjArray *ClusterArray = new TObjArray(400); 
+  TObjArray *clusterArray = new TObjArray(400); 
  
-  ClusterTree->GetBranch("TRDcluster")->SetAddress(&ClusterArray); 
+  clusterTree->GetBranch("TRDcluster")->SetAddress(&clusterArray); 
   
-  Int_t nEntries = (Int_t) ClusterTree->GetEntries();
-  printf("found %d entries in %s.\n",nEntries,ClusterTree->GetName());
+  Int_t nEntries = (Int_t) clusterTree->GetEntries();
+  printf("found %d entries in %s.\n",nEntries,clusterTree->GetName());
 
   // Loop through all entries in the tree
   Int_t nbytes;
@@ -717,24 +761,24 @@ void AliTRDtracker::ReadClusters(TObjArray *array, const Char_t *filename)
   for (Int_t iEntry = 0; iEntry < nEntries; iEntry++) {    
     
     // Import the tree
-    nbytes += ClusterTree->GetEvent(iEntry);  
+    nbytes += clusterTree->GetEvent(iEntry);  
 
     // Get the number of points in the detector
-    Int_t nCluster = ClusterArray->GetEntriesFast();  
+    Int_t nCluster = clusterArray->GetEntriesFast();  
     printf("Read %d clusters from entry %d \n", nCluster, iEntry);
 
     // Loop through all TRD digits
     for (Int_t iCluster = 0; iCluster < nCluster; iCluster++) { 
-      c = (AliTRDcluster*)ClusterArray->UncheckedAt(iCluster);
+      c = (AliTRDcluster*)clusterArray->UncheckedAt(iCluster);
       AliTRDcluster *co = new AliTRDcluster(*c);
       co->SetSigmaY2(c->GetSigmaY2() * fSY2corr);
       array->AddLast(co);
-      delete ClusterArray->RemoveAt(iCluster); 
+      delete clusterArray->RemoveAt(iCluster); 
     }
   }
 
   file->Close();                   
-  delete ClusterArray;
+  delete clusterArray;
   savedir->cd(); 
   
 }
@@ -749,7 +793,7 @@ void AliTRDtracker::FindTracks(AliTRDtrackingSector* fTrSec, TH1F *hs, TH1F *hd)
   TH1F *hsame = hs;
   TH1F *hdiff = hd;   
 
-  Int_t num_of_time_bins = fTrSec[0].GetNtimeBins(); 
+  Int_t numOfTimeBins = fTrSec[0].GetNtimeBins(); 
   Int_t nseed=fSeeds->GetEntriesFast();
 
   Int_t nSeedClusters;
@@ -769,7 +813,7 @@ void AliTRDtracker::FindTracks(AliTRDtrackingSector* fTrSec, TH1F *hs, TH1F *hd)
 
     if (FindProlongation(t,fTrSec,ns,0,label,hsame,hdiff)) {
       cerr<<"No of clusters in the track = "<<t.GetNclusters()<<endl; 
-      if (t.GetNclusters() >= Int_t(fMinClustersInTrack*num_of_time_bins)) {
+      if (t.GetNclusters() >= Int_t(fgkMinClustersInTrack*numOfTimeBins)) {
        Int_t label = GetTrackLabel(t);
        t.SetLabel(label);
        t.CookdEdx();
@@ -787,29 +831,39 @@ void AliTRDtracker::FindTracks(AliTRDtrackingSector* fTrSec, TH1F *hs, TH1F *hd)
 }
 
 //__________________________________________________________________
-void AliTRDtracker::UseClusters(AliTRDtrack t) {
+void AliTRDtracker::UseClusters(AliTRDtrack t) 
+{
+  //
+  // Mark used cluster
+  //
+
   Int_t ncl=t.GetNclusters();
   for (Int_t i=0; i<ncl; i++) {
     Int_t index = t.GetClusterIndex(i);
     AliTRDcluster *c=(AliTRDcluster*)fClusters->UncheckedAt(index);
     c->Use();
   }
+
 }
 
 //__________________________________________________________________
-Int_t AliTRDtracker::GetTrackLabel(AliTRDtrack t) {
+Int_t AliTRDtracker::GetTrackLabel(AliTRDtrack t) 
+{
+  //
+  // Get MC label
+  //
 
   Int_t label=123456789, index, i, j;
   Int_t ncl=t.GetNclusters();
-  const Int_t range = AliTRDgeometry::kNplan * fGeom->GetTimeMax();
-  Bool_t label_added;
+  const Int_t kRange = AliTRDgeometry::kNplan * fGeom->GetTimeMax();
+  Bool_t labelAdded;
 
-  //  Int_t s[range][2];
-  Int_t **s = new Int_t* [range];
-  for (i=0; i<range; i++) {
+  //  Int_t s[kRange][2];
+  Int_t **s = new Int_t* [kRange];
+  for (i=0; i<kRange; i++) {
     s[i] = new Int_t[2];
   }
-  for (i=0; i<range; i++) {
+  for (i=0; i<kRange; i++) {
     s[i][0]=-1;
     s[i][1]=0;
   }
@@ -828,13 +882,13 @@ Int_t AliTRDtracker::GetTrackLabel(AliTRDtrack t) {
     AliTRDcluster *c=(AliTRDcluster*)fClusters->UncheckedAt(index);
     for (Int_t k=0; k<3; k++) { 
       label=c->GetTrackIndex(k);
-      label_added=kFALSE; j=0;
+      labelAdded=kFALSE; j=0;
       if (label >= 0) {
-       while ( (!label_added) && ( j < range ) ) {
+       while ( (!labelAdded) && ( j < kRange ) ) {
          if (s[j][0]==label || s[j][1]==0) {
            s[j][0]=label; 
            s[j][1]=s[j][1]+1; 
-           label_added=kTRUE;
+           labelAdded=kTRUE;
          }
          j++;
        }
@@ -845,19 +899,22 @@ Int_t AliTRDtracker::GetTrackLabel(AliTRDtrack t) {
   Int_t max=0;
   label = -123456789;
 
-  for (i=0; i<range; i++) {
+  for (i=0; i<kRange; i++) {
     if (s[i][1]>max) {
       max=s[i][1]; label=s[i][0];
     }
   }
   delete []s;
-  if(max > ncl*fLabelFraction) return label;
+  if(max > ncl*fgkLabelFraction) return label;
   else return -1;
 }
 
 //___________________________________________________________________
-
-Int_t AliTRDtracker::WriteTracks(const Char_t *filename) {
+Int_t AliTRDtracker::WriteTracks(const Char_t *filename) 
+{
+  //
+  // Write the tracks to the output file
+  //
 
   TDirectory *savedir=gDirectory;   
 
@@ -896,5 +953,6 @@ Int_t AliTRDtracker::WriteTracks(const Char_t *filename) {
 
   cerr<<"WriteTracks: done"<<endl;
   return 1;
+
 }
 
index bc67eb3be6c7f30ad0b8d186f4739c9ca1e9ad22..68e91fef04a23bc5c95f8882382fa0199b58fabc 100644 (file)
@@ -4,6 +4,12 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */ 
 
+////////////////////////////////////////////////////////////////////////////////
+//                                                                            //
+//  The TRD tracker                                                           //
+//                                                                            //
+////////////////////////////////////////////////////////////////////////////////
+
 #include <TNamed.h>
 #include <TH1.h>   
 
@@ -23,11 +29,11 @@ class AliTRDtracker : public TNamed {
 
   AliTRDtracker();
   AliTRDtracker(const Text_t* name, const Text_t* title);
-  ~AliTRDtracker(); 
+  virtual ~AliTRDtracker(); 
 
   virtual void  Clusters2Tracks(TH1F *hs, TH1F *hd); 
-  Double_t      ExpectedSigmaY2(Double_t r, Double_t tgl, Double_t pt);
-  Double_t      ExpectedSigmaZ2(Double_t r, Double_t tgl);
+  Double_t      ExpectedSigmaY2(Double_t r, Double_t tgl, Double_t pt) const;
+  Double_t      ExpectedSigmaZ2(Double_t r, Double_t tgl) const;
   Int_t         FindProlongation(AliTRDtrack& t, AliTRDtrackingSector *sec,
                               Int_t s, Int_t rf=0, Int_t matched_index = -1,
                                 TH1F *hs=0, TH1F *hd=0);
@@ -41,23 +47,23 @@ class AliTRDtracker : public TNamed {
   Int_t         WriteTracks(const Char_t *filename); 
   void          ReadClusters(TObjArray *array, const Char_t *filename);
 
-  Float_t  GetSeedGap()       const {return fSeedGap;}   
-  Float_t  GetSeedStep()      const {return fSeedStep;}
-  Float_t  GetSeedDepth()     const {return fSeedDepth;}
-  Float_t  GetSkipDepth()     const {return fSkipDepth;}
-  Double_t GetMaxChi2()       const {return fMaxChi2;}
-  Float_t  GetMaxSeedC()      const {return fMaxSeedC;}
-  Float_t  GetMaxSeedTan()    const {return fMaxSeedTan;}
-  Double_t GetSeedErrorSY()   const {return fSeedErrorSY;}
-  Double_t GetSeedErrorSY3()  const {return fSeedErrorSY3;}
-  Double_t GetSeedErrorSZ()   const {return fSeedErrorSZ;}
-  Float_t  GetLabelFraction() const {return fLabelFraction;}
-  Float_t  GetWideRoad()      const {return fWideRoad;}
-
-  Float_t  GetMinClustersInTrack() const {return fMinClustersInTrack;}
-  Float_t  GetMinClustersInSeed()  const {return fMinClustersInSeed;} 
-  Float_t  GetMaxSeedDeltaZ()      const {return fMaxSeedDeltaZ;}
-  Float_t  GetMaxSeedVertexZ()     const {return fMaxSeedVertexZ;}
+  Float_t  GetSeedGap()       const {return fgkSeedGap;}   
+  Float_t  GetSeedStep()      const {return fgkSeedStep;}
+  Float_t  GetSeedDepth()     const {return fgkSeedDepth;}
+  Float_t  GetSkipDepth()     const {return fgkSkipDepth;}
+  Double_t GetMaxChi2()       const {return fgkMaxChi2;}
+  Float_t  GetMaxSeedC()      const {return fgkMaxSeedC;}
+  Float_t  GetMaxSeedTan()    const {return fgkMaxSeedTan;}
+  Double_t GetSeedErrorSY()   const {return fgkSeedErrorSY;}
+  Double_t GetSeedErrorSY3()  const {return fgkSeedErrorSY3;}
+  Double_t GetSeedErrorSZ()   const {return fgkSeedErrorSZ;}
+  Float_t  GetLabelFraction() const {return fgkLabelFraction;}
+  Float_t  GetWideRoad()      const {return fgkWideRoad;}
+
+  Float_t  GetMinClustersInTrack() const {return fgkMinClustersInTrack;}
+  Float_t  GetMinClustersInSeed()  const {return fgkMinClustersInSeed;} 
+  Float_t  GetMaxSeedDeltaZ()      const {return fgkMaxSeedDeltaZ;}
+  Float_t  GetMaxSeedVertexZ()     const {return fgkMaxSeedVertexZ;}
 
   void     SetSY2corr(Float_t w)    {fSY2corr = w;}
 
@@ -79,28 +85,28 @@ class AliTRDtracker : public TNamed {
   Float_t          fSY2corr;          // Correction coefficient for
                                       // cluster SigmaY2 
 
-  static const Float_t  fSeedGap;   // Distance between inner and outer
-                                    // time bin in seeding 
-                                   // (fraction of all time bins) 
+  static const Float_t  fgkSeedGap;   // Distance between inner and outer
+                                      // time bin in seeding 
+                                     // (fraction of all time bins) 
   
-  static const Float_t  fSeedStep;    // Step in iterations
-  static const Float_t         fSeedDepth;   // Fraction of TRD allocated for seeding
-  static const Float_t  fSkipDepth;   // Fraction of TRD which can be skipped
+  static const Float_t  fgkSeedStep;  // Step in iterations
+  static const Float_t         fgkSeedDepth; // Fraction of TRD allocated for seeding
+  static const Float_t  fgkSkipDepth; // Fraction of TRD which can be skipped
                                       // in track prolongation            
-  static const Double_t fMaxChi2;     // max increment in track chi2 
+  static const Double_t fgkMaxChi2;   // max increment in track chi2 
        
-  static const Float_t  fMinClustersInTrack; // min fraction of clusters in track
-  static const Float_t  fMinClustersInSeed;  // min fraction of clusters in seed
-  static const Float_t  fMaxSeedDeltaZ;   // max dZ in MakeSeeds
-  static const Float_t  fMaxSeedDeltaZ12; // max abs(z1-z2) in MakeSeeds
-  static const Float_t  fMaxSeedC;       // max initial curvature in MakeSeeds
-  static const Float_t  fMaxSeedTan;     // max initial Tangens(lambda) in MakeSeeds
-  static const Float_t  fMaxSeedVertexZ; // max vertex Z in MakeSeeds
-  static const Double_t fSeedErrorSY;    // sy parameter in MakeSeeds
-  static const Double_t fSeedErrorSY3;   // sy3 parameter in MakeSeeds
-  static const Double_t fSeedErrorSZ;    // sz parameter in MakeSeeds
-  static const Float_t  fLabelFraction;  // min fraction of clusters in GetTrackLabel
-  static const Float_t  fWideRoad;       // max road width in FindProlongation
+  static const Float_t  fgkMinClustersInTrack; // min fraction of clusters in track
+  static const Float_t  fgkMinClustersInSeed;  // min fraction of clusters in seed
+  static const Float_t  fgkMaxSeedDeltaZ;      // max dZ in MakeSeeds
+  static const Float_t  fgkMaxSeedDeltaZ12;    // max abs(z1-z2) in MakeSeeds
+  static const Float_t  fgkMaxSeedC;           // max initial curvature in MakeSeeds
+  static const Float_t  fgkMaxSeedTan;         // max initial Tangens(lambda) in MakeSeeds
+  static const Float_t  fgkMaxSeedVertexZ;     // max vertex Z in MakeSeeds
+  static const Double_t fgkSeedErrorSY;        // sy parameter in MakeSeeds
+  static const Double_t fgkSeedErrorSY3;       // sy3 parameter in MakeSeeds
+  static const Double_t fgkSeedErrorSZ;        // sz parameter in MakeSeeds
+  static const Float_t  fgkLabelFraction;      // min fraction of clusters in GetTrackLabel
+  static const Float_t  fgkWideRoad;           // max road width in FindProlongation
  
   ClassDef(AliTRDtracker,1)           // manager base class  
 
index aecfbc53bb13eb0ffbeced0a1990cfd9c65e2086..22521eaeeddde41056c0b4602f8f2c31de288194 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.7  2001/11/19 08:44:08  cblume
+Fix bugs reported by Rene
+
 Revision 1.6  2001/05/28 17:07:58  hristov
 Last minute changes; ExB correction in AliTRDclusterizerV1; taking into account of material in G10 TEC frames and material between TEC planes (C.Blume,S.Sedykh)
 
@@ -36,7 +39,13 @@ Replace include files by forward declarations
 Revision 1.1.2.1  2000/09/22 14:47:52  cblume
 Add the tracking code
 
-*/                        
+*/ 
+
+/////////////////////////////////////////////////////////////////////////
+//                                                                     //
+//  Tracking sector                                                    //
+//                                                                     //
+/////////////////////////////////////////////////////////////////////////                       
                                 
 #include <TObject.h>
 
@@ -51,7 +60,6 @@ Add the tracking code
 ClassImp(AliTRDtrackingSector) 
 
 //_______________________________________________________
-
 AliTRDtrackingSector::~AliTRDtrackingSector()
 {
   //
@@ -74,11 +82,14 @@ AliTRDtimeBin &AliTRDtrackingSector::operator[](Int_t i)
 }
 
 //_______________________________________________________
-
 void AliTRDtrackingSector::SetUp()
 { 
-  AliTRD *TRD = (AliTRD*) gAlice->GetDetector("TRD");
-  fGeom = TRD->GetGeometry();
+  //
+  // Initialization
+  //
+
+  AliTRD *trd = (AliTRD*) gAlice->GetDetector("TRD");
+  fGeom = trd->GetGeometry();
 
   fTimeBinSize = fGeom->GetTimeBinSize();
 
@@ -90,68 +101,80 @@ void AliTRDtrackingSector::SetUp()
 }
 
 //______________________________________________________
-
 Double_t AliTRDtrackingSector::GetX(Int_t tb) const
 {
+  //
+  // Get global x coordinate
+  //
+
   if( (tb<0) || (tb>fN-1)) {
     fprintf(stderr,"AliTRDtrackingSector::GetX: TimeBin index is out of range !\n");
     return -99999.;
   }
   else { 
     
-    Int_t tb_per_plane = fN/AliTRDgeometry::Nplan();
-    Int_t local_tb = tb_per_plane - tb%tb_per_plane - 1;
+    Int_t tbPerPlane = fN/AliTRDgeometry::Nplan();
+    Int_t localTb = tbPerPlane - tb%tbPerPlane - 1;
 
-    Int_t plane = tb/tb_per_plane;
+    Int_t plane = tb/tbPerPlane;
     Float_t t0 = fGeom->GetTime0(plane);
-    Double_t x = t0 - (local_tb + 0.5) * fTimeBinSize;
+    Double_t x = t0 - (localTb + 0.5) * fTimeBinSize;
 
     return x;
+
   }
+
 }
 
 //______________________________________________________
-
 Int_t AliTRDtrackingSector::GetTimeBinNumber(Double_t x) const
 {
-  Float_t r_out = fGeom->GetTime0(AliTRDgeometry::Nplan()-1); 
-  Float_t r_in = fGeom->GetTime0(0) - AliTRDgeometry::DrThick();
+  //
+  // Returns the time bin number
+  //
+
+  Float_t rOut = fGeom->GetTime0(AliTRDgeometry::Nplan()-1); 
+  Float_t rIn  = fGeom->GetTime0(0) - AliTRDgeometry::DrThick();
 
 
-  if(x >= r_out) return fN-1;
-  if(x <= r_in) return 0;
+  if(x >= rOut) return fN-1;
+  if(x <= rIn)  return 0;
 
   Int_t plane;
   for (plane = AliTRDgeometry::Nplan()-1; plane >= 0; plane--) {
     if(x > (fGeom->GetTime0(plane) - AliTRDgeometry::DrThick())) break;
   }  
  
-  Int_t tb_per_plane = fN/AliTRDgeometry::Nplan();
-  Int_t local_tb = Int_t((fGeom->GetTime0(plane)-x)/fTimeBinSize);
+  Int_t tbPerPlane = fN/AliTRDgeometry::Nplan();
+  Int_t localTb = Int_t((fGeom->GetTime0(plane)-x)/fTimeBinSize);
 
-  if((local_tb < 0) || (local_tb >= tb_per_plane)) {
+  if((localTb < 0) || (localTb >= tbPerPlane)) {
     printf("AliTRDtrackingSector::GetTimeBinNumber: \n");
     printf("local time bin %d is out of bounds [0..%d]: x = %f \n",
-          local_tb,tb_per_plane-1,x);
+          localTb,tbPerPlane-1,x);
     return -1;
   }
       
-  Int_t time_bin = (plane + 1) * tb_per_plane - 1 - local_tb;
+  Int_t timeBin = (plane + 1) * tbPerPlane - 1 - localTb;
 
-  return time_bin;
+  return timeBin;
 }
 
 //______________________________________________________
-
-Int_t AliTRDtrackingSector::GetTimeBin(Int_t det, Int_t local_tb) const 
+Int_t AliTRDtrackingSector::GetTimeBin(Int_t det, Int_t localTb) const 
 {
+  //
+  // Time bin
+  //
+
   Int_t plane = fGeom->GetPlane(det);
 
-  Int_t tb_per_plane = fN/AliTRDgeometry::Nplan();
+  Int_t tbPerPlane = fN/AliTRDgeometry::Nplan();
 
-  Int_t time_bin = (plane + 1) * tb_per_plane - 1 - local_tb;
+  Int_t timeBin = (plane + 1) * tbPerPlane - 1 - localTb;
+
+  return timeBin;
 
-  return time_bin;
 }
 
 
@@ -159,15 +182,15 @@ Int_t AliTRDtrackingSector::GetTimeBin(Int_t det, Int_t local_tb) const
 
 Bool_t AliTRDtrackingSector::TECframe(Int_t tb, Double_t y, Double_t z) const
 {
-// 
-// Returns <true> if point defined by <x(tb),y,z> is within 
-// the TEC G10 frame, otherwise returns <false>  
-//  
+  //  
+  // Returns <true> if point defined by <x(tb),y,z> is within 
+  // the TEC G10 frame, otherwise returns <false>  
+  //  
 
   if((tb > (fN-1)) || (tb < 0)) return kFALSE; 
 
-  Int_t tb_per_plane = fN/AliTRDgeometry::Nplan();
-  Int_t plane = tb/tb_per_plane;
+  Int_t tbPerPlane = fN/AliTRDgeometry::Nplan();
+  Int_t plane = tb/tbPerPlane;
   
   Double_t x = GetX(tb);
   y = TMath::Abs(y);
@@ -194,4 +217,5 @@ Bool_t AliTRDtrackingSector::TECframe(Int_t tb, Double_t y, Double_t z) const
   }
 
   return kFALSE;
+
 }
index 7e38676d7009af3956e65a2a3c91e83d9f62f98c..2ab16a47fdac5faf1317ac28fac6f682a26a6722 100644 (file)
@@ -6,6 +6,12 @@
 
 /* $Id: AliTRDtrackingSector.h,v */
 
+/////////////////////////////////////////////////////////////////////////
+//                                                                     //
+//  Tracking sector                                                    //
+//                                                                     //
+/////////////////////////////////////////////////////////////////////////                       
+
 #include <TObject.h>
 
 class AliTRDtimeBin;
@@ -30,10 +36,10 @@ public:
 
 protected:
 
-  Int_t fN;
-  AliTRDgeometry          *fGeom;       // Pointer to TRD geometry
-  AliTRDtimeBin           *fTimeBin;    // Pointer to array of AliTRDtimeBin
-  Float_t                  fTimeBinSize;  // Time bin size in cm  
+  Int_t fN;                                // ???????
+  AliTRDgeometry          *fGeom;          // Pointer to TRD geometry
+  AliTRDtimeBin           *fTimeBin;       // Pointer to array of AliTRDtimeBin
+  Float_t                  fTimeBinSize;   // Time bin size in cm  
                                              
   ClassDef(AliTRDtrackingSector,1)  // Provides tools to address clusters which lay within one sector