]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PMD/AliPMDtracker.cxx
AliTPCclustererKr.h -
[u/mrichter/AliRoot.git] / PMD / AliPMDtracker.cxx
index 46cf2f9b1f02be327e9eb2f05929f890e6eacbc0..bca40916cb08d75b81981d384a8a169e078a21e4 100644 (file)
@@ -44,7 +44,7 @@
 #include "AliPMDtracker.h"
 
 #include "AliESDPmdTrack.h"
-#include "AliESD.h"
+#include "AliESDEvent.h"
 #include "AliLog.h"
 
 ClassImp(AliPMDtracker)
@@ -69,6 +69,36 @@ AliPMDtracker::AliPMDtracker():
   // Default Constructor
   //
 }
+//--------------------------------------------------------------------//
+AliPMDtracker:: AliPMDtracker(const AliPMDtracker & /* tracker */):
+  TObject(/* tracker */),
+  fTreeR(0),
+  fRecpoints(NULL),
+  fPMDcontin(NULL),
+  fPMDcontout(NULL),
+  fPMDutil(NULL),
+  fPMDrecpoint(0),
+  fPMDclin(0),
+  fPMDclout(0),
+  fXvertex(0.),
+  fYvertex(0.),
+  fZvertex(0.),
+  fSigmaX(0.),
+  fSigmaY(0.),
+  fSigmaZ(0.)
+{
+  // copy constructor
+  AliError("Copy constructor not allowed");
+}
+
+//--------------------------------------------------------------------//
+AliPMDtracker& AliPMDtracker::operator=(const AliPMDtracker & /* tracker */)
+{
+ // assignment operator
+  AliError("Assignment operator not allowed");
+  return *this;
+}
+
 //--------------------------------------------------------------------//
 AliPMDtracker::~AliPMDtracker()
 {
@@ -91,6 +121,7 @@ AliPMDtracker::~AliPMDtracker()
       delete fPMDcontout;
       fPMDcontout=0;
     }
+  delete fPMDutil;
 }
 //--------------------------------------------------------------------//
 void AliPMDtracker::LoadClusters(TTree *treein)
@@ -99,7 +130,7 @@ void AliPMDtracker::LoadClusters(TTree *treein)
   fTreeR = treein;
 }
 //--------------------------------------------------------------------//
-void AliPMDtracker::Clusters2Tracks(AliESD *event)
+void AliPMDtracker::Clusters2Tracks(AliESDEvent *event)
 {
   // Converts digits to recpoints after running clustering
   // algorithm on CPV plane and PREshower plane
@@ -147,12 +178,11 @@ void AliPMDtracker::Clusters2Tracks(AliESD *event)
   pmddiscriminator->Discrimination(fPMDcontin,fPMDcontout);
 
   const Float_t kzpos = 361.5;    // middle of the PMD
-  Int_t   ism =0, ium=0;
+
   Int_t   det,smn;
   Float_t xpos,ypos;
-  Float_t xpad = 0, ypad = 0;
   Float_t adc, ncell, rad;
-  Float_t xglobal, yglobal, zglobal = 0;
+  Float_t xglobal = 0., yglobal = 0., zglobal = 0;
   Float_t pid;
 
 
@@ -172,15 +202,10 @@ void AliPMDtracker::Clusters2Tracks(AliESD *event)
       rad   = fPMDclout->GetClusRadius();
       pid   = fPMDclout->GetClusPID();
       
-      //
-      // Now change the xpos and ypos to its original values
-      // for the unit modules which are earlier changed.
-      // xpad and ypad are the real positions.
       //
       /**********************************************************************
        *    det   : Detector, 0: PRE & 1:CPV                                *
-       *    smn   : Serial Module Number from which Super Module Number     *
-       *            and Unit Module Numbers are extracted                   *
+       *    smn   : Serial Module Number 0 to 23 for each plane             *
        *    xpos  : x-position of the cluster                               *
        *    ypos  : y-position of the cluster                               *
        *            THESE xpos & ypos are not the true xpos and ypos        *
@@ -188,31 +213,10 @@ void AliPMDtracker::Clusters2Tracks(AliESD *event)
        *    adc   : ADC contained in the cluster                            *
        *    ncell : Number of cells contained in the cluster                *
        *    rad   : radius of the cluster (1d fit)                          *
-       *    ism   : Supermodule number extracted from smn                   *
-       *    ium   : Unit module number extracted from smn                   *
-       *    xpad  : TRUE x-position of the cluster                          *
-       *    ypad  : TRUE y-position of the cluster                          *
        **********************************************************************/
       //
-      if(det == 0 || det == 1)
-       {
-         if(smn < 12)
-           {
-             ism  = smn/6;
-             ium  = smn - ism*6;
-             xpad = ypos;
-             ypad = xpos;
-           }
-         else if( smn >= 12 && smn < 24)
-           {
-             ism  = smn/6;
-             ium  = smn - ism*6;
-             xpad = xpos;
-             ypad = ypos;
-           }
-       }
-     
-      fPMDutil->RectGeomCellPos(ism,ium,xpad,ypad,xglobal,yglobal);
+
+      fPMDutil->RectGeomCellPos(smn,xpos,ypos,xglobal,yglobal);
 
       if (det == 0)
        {
@@ -223,7 +227,6 @@ void AliPMDtracker::Clusters2Tracks(AliESD *event)
          zglobal = kzpos - 1.7; // CPV plane
        }
 
-
       // Fill ESD
 
       AliESDPmdTrack *esdpmdtr = new  AliESDPmdTrack();