esd variables modified
authorbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Mar 2006 15:04:53 +0000 (15:04 +0000)
committerbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Mar 2006 15:04:53 +0000 (15:04 +0000)
PMD/AliPMDtracker.cxx
PMD/AliPMDtracker.h

index 8e128b8..2539f45 100644 (file)
@@ -40,6 +40,7 @@
 #include "AliPMDrecpoint1.h"
 #include "AliPMDUtility.h"
 #include "AliPMDDiscriminator.h"
+#include "AliPMDEmpDiscriminator.h"
 #include "AliPMDtracker.h"
 
 #include "AliESDPmdTrack.h"
@@ -53,7 +54,6 @@ AliPMDtracker::AliPMDtracker():
   fRecpoints(new TClonesArray("AliPMDrecpoint1", 1000)),
   fPMDcontin(new TObjArray()),
   fPMDcontout(new TObjArray()),
-  fPMDdiscriminator(new AliPMDDiscriminator()),
   fPMDutil(new AliPMDUtility()),
   fPMDrecpoint(0),
   fPMDclin(0),
@@ -107,7 +107,7 @@ void AliPMDtracker::Clusters2Tracks(AliESD *event)
 
   Int_t   idet;
   Int_t   ismn;
-  Float_t clusdata[5];
+  Float_t clusdata[6];
 
   TBranch *branch = fTreeR->GetBranch("PMDRecpoint");
   if (!branch)
@@ -117,11 +117,12 @@ void AliPMDtracker::Clusters2Tracks(AliESD *event)
     }
   branch->SetAddress(&fRecpoints);  
   
-  Int_t   nmodules = (Int_t) fTreeR->GetEntries();
+  Int_t   nmodules = (Int_t) branch->GetEntries();
+  
   AliDebug(1,Form("Number of modules filled in treeR = %d",nmodules));
   for (Int_t imodule = 0; imodule < nmodules; imodule++)
     {
-      fTreeR->GetEntry(imodule); 
+      branch->GetEntry(imodule); 
       Int_t nentries = fRecpoints->GetLast();
       AliDebug(2,Form("Number of clusters per modules filled in treeR = %d"
                      ,nentries));
@@ -134,25 +135,27 @@ void AliPMDtracker::Clusters2Tracks(AliESD *event)
          clusdata[1] = fPMDrecpoint->GetClusY();
          clusdata[2] = fPMDrecpoint->GetClusADC();
          clusdata[3] = fPMDrecpoint->GetClusCells();
-         clusdata[4] = fPMDrecpoint->GetClusRadius();
-         
-         fPMDclin = new AliPMDcluster(idet,ismn,clusdata);
+         clusdata[4] = fPMDrecpoint->GetClusSigmaX();
+         clusdata[5] = fPMDrecpoint->GetClusSigmaY();
+
+         fPMDclin = new AliPMDrecpoint1(idet,ismn,clusdata);
          fPMDcontin->Add(fPMDclin);
        }
     }
 
-  fPMDdiscriminator->Discrimination(fPMDcontin,fPMDcontout);
+  AliPMDDiscriminator *pmddiscriminator = new AliPMDEmpDiscriminator();
+  pmddiscriminator->Discrimination(fPMDcontin,fPMDcontout);
 
-  const Float_t kzpos = 361.5;
+  const Float_t kzpos0 = 361.5;    // for PREshower plane BKN
+  const Float_t kzpos1 = 361.5;    // for CPV plane
   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;
+  Float_t xglobal, yglobal, zglobal;
   Float_t pid;
 
-  Float_t zglobal = kzpos + (Float_t) fZvertex;
 
   Int_t nentries2 = fPMDcontout->GetEntries();
   AliDebug(1,Form("Number of clusters coming after discrimination = %d"
@@ -211,19 +214,27 @@ void AliPMDtracker::Clusters2Tracks(AliESD *event)
        }
      
       fPMDutil->RectGeomCellPos(ism,ium,xpad,ypad,xglobal,yglobal);
-      fPMDutil->SetXYZ(xglobal,yglobal,zglobal);
-      fPMDutil->CalculateEtaPhi();
-      Float_t theta = fPMDutil->GetTheta();
-      Float_t phi   = fPMDutil->GetPhi();
+
+      if (det == 0)
+       {
+         zglobal = kzpos0 + 0.5; // to be found out
+       }
+      else if (det == 1)
+       {
+         zglobal = kzpos1 - 0.5; // to be found out BKN
+       }
+
 
       // Fill ESD
 
       AliESDPmdTrack *esdpmdtr = new  AliESDPmdTrack();
 
       esdpmdtr->SetDetector(det);
-      esdpmdtr->SetTheta(theta);
-      esdpmdtr->SetPhi(phi);
+      esdpmdtr->SetClusterX(xglobal);
+      esdpmdtr->SetClusterY(yglobal);
+      esdpmdtr->SetClusterZ(zglobal);
       esdpmdtr->SetClusterADC(adc);
+      esdpmdtr->SetClusterCells(ncell);
       esdpmdtr->SetClusterPID(pid);
 
       event->AddPmdTrack(esdpmdtr);
index 9e9eaf2..42b9724 100644 (file)
@@ -43,10 +43,9 @@ class AliPMDtracker:public TObject
   TObjArray    *fPMDcontin;
   TObjArray    *fPMDcontout;
 
-  AliPMDDiscriminator *fPMDdiscriminator;
   AliPMDUtility       *fPMDutil;
   AliPMDrecpoint1     *fPMDrecpoint;
-  AliPMDcluster       *fPMDclin;
+  AliPMDrecpoint1     *fPMDclin;
   AliPMDclupid        *fPMDclout;
 
   Double_t fXvertex;        // X-vertex position
@@ -56,7 +55,7 @@ class AliPMDtracker:public TObject
   Double_t fSigmaY;         // Y-vertex error
   Double_t fSigmaZ;         // Z-vertex error
 
-  ClassDef(AliPMDtracker,2) // To run PMD clustering
+  ClassDef(AliPMDtracker,3) // To run PMD clustering
 };
 #endif