]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PMD/AliPMDtracker.cxx
Warning removal
[u/mrichter/AliRoot.git] / PMD / AliPMDtracker.cxx
index 46cf2f9b1f02be327e9eb2f05929f890e6eacbc0..ca7c6ce100483db70fa2234a4e49dd290e43357f 100644 (file)
 
 #include <Riostream.h>
 #include <TMath.h>
-#include <TBRIK.h>
-#include <TNode.h>
 #include <TTree.h>
-#include <TGeometry.h>
 #include <TObjArray.h>
 #include <TClonesArray.h>
 #include <TFile.h>
 #include "AliPMDtracker.h"
 
 #include "AliESDPmdTrack.h"
-#include "AliESD.h"
+#include "AliESDEvent.h"
 #include "AliLog.h"
 
 ClassImp(AliPMDtracker)
 
 AliPMDtracker::AliPMDtracker():
   fTreeR(0),
-  fRecpoints(new TClonesArray("AliPMDrecpoint1", 1000)),
+  fRecpoints(new TClonesArray("AliPMDrecpoint1", 10)),
   fPMDcontin(new TObjArray()),
   fPMDcontout(new TObjArray()),
   fPMDutil(new AliPMDUtility()),
@@ -69,28 +66,59 @@ 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()
 {
   // Destructor
   if (fRecpoints)
     {
-      fRecpoints->Delete();
-      delete fRecpoints;
-      fRecpoints=0;
+      fRecpoints->Clear();
     }
   if (fPMDcontin)
     {
       fPMDcontin->Delete();
       delete fPMDcontin;
       fPMDcontin=0;
+      
     }
   if (fPMDcontout)
-    {
+  {
       fPMDcontout->Delete();
       delete fPMDcontout;
       fPMDcontout=0;
+
     }
+  delete fPMDutil;
 }
 //--------------------------------------------------------------------//
 void AliPMDtracker::LoadClusters(TTree *treein)
@@ -99,7 +127,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 +175,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 +199,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 +210,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 +224,6 @@ void AliPMDtracker::Clusters2Tracks(AliESD *event)
          zglobal = kzpos - 1.7; // CPV plane
        }
 
-
       // Fill ESD
 
       AliESDPmdTrack *esdpmdtr = new  AliESDPmdTrack();
@@ -238,6 +238,10 @@ void AliPMDtracker::Clusters2Tracks(AliESD *event)
 
       event->AddPmdTrack(esdpmdtr);
     }
+
+  fPMDcontin->Delete();
+  fPMDcontout->Delete();
+
 }
 //--------------------------------------------------------------------//
 void AliPMDtracker::SetVertex(Double_t vtx[3], Double_t evtx[3])