method GetCellXY is added
authorbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Feb 2007 08:21:13 +0000 (08:21 +0000)
committerbnandi <bnandi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 13 Feb 2007 08:21:13 +0000 (08:21 +0000)
PMD/AliPMDcludata.cxx
PMD/AliPMDcludata.h

index c243f9e..cba0349 100644 (file)
@@ -22,34 +22,36 @@ ClassImp(AliPMDcludata)
 AliPMDcludata::AliPMDcludata()
 {
   // Default constructor
-  for (Int_t i = 0; i < 6; i++)
+  for (Int_t i = 0; i < 15; i++)
     {
-      fClusData[i] = 0.;
+      if(i < 6) fClusData[i] = 0.;
+      fClXY[i] = 0;
+
     }
 }
 // --------------------------------------------------------------------- //
-AliPMDcludata::AliPMDcludata(Float_t *clusdata)
+AliPMDcludata::AliPMDcludata(Float_t *clusdata, Int_t *clxy)
 {
   // Constructor
   for (Int_t i = 0; i < 6; i++)
     {
       fClusData[i] = clusdata[i];
     }
+  for (Int_t i = 0; i < 15; i++)
+    {
+      fClXY[i] = clxy[i];
+    }
+  
 }
 // --------------------------------------------------------------------- //
-AliPMDcludata::AliPMDcludata(AliPMDcludata *pmdcludata)
-{
-  *this = *pmdcludata;
-}
-// --------------------------------------------------------------------- //
-
 AliPMDcludata::AliPMDcludata(const AliPMDcludata &pmdcludata):
   TObject(pmdcludata)
 {
   //Copy Constructor 
-  for(Int_t i=0; i<6; i++)
+  for(Int_t i=0; i<15; i++)
     {
-      this->fClusData[i] = pmdcludata.fClusData[i];
+      if (i < 6) this->fClusData[i] = pmdcludata.fClusData[i];
+      this->fClXY[i] = pmdcludata.fClXY[i];
     }
 }
 // --------------------------------------------------------------------- //
@@ -59,9 +61,10 @@ AliPMDcludata & AliPMDcludata::operator=(const AliPMDcludata &pmdcludata)
   // Assignment operator 
   if(this != &pmdcludata)
     {
-      for(Int_t i=0; i<6; i++)
+      for(Int_t i=0; i<15; i++)
        {
-         this->fClusData[i] = pmdcludata.fClusData[i];
+         if (i < 6) this->fClusData[i] = pmdcludata.fClusData[i];
+         this->fClXY[i] = pmdcludata.fClXY[i];
        }
     }
   return *this;
@@ -103,3 +106,8 @@ Float_t AliPMDcludata::GetClusSigmaY() const
   return fClusData[5];
 }
 // --------------------------------------------------------------------- //
+Int_t AliPMDcludata::GetCellXY(Int_t i) const
+{
+  return fClXY[i];
+}
+// --------------------------------------------------------------------- //
index 51cb14e..05f0ec8 100644 (file)
@@ -21,10 +21,9 @@ class AliPMDcludata : public TObject
 {
  public:
   AliPMDcludata();
-  AliPMDcludata( Float_t *clusdata);
-  AliPMDcludata(AliPMDcludata *pmdcludata);
-  AliPMDcludata (const AliPMDcludata &pmdcludata);  // copy constructor
-  AliPMDcludata &operator=(const AliPMDcludata &pmdcludata); // assignment op
+  AliPMDcludata( Float_t *clusdata, Int_t *clxy);
+  AliPMDcludata (const AliPMDcludata &pmdcludata);  //copy constructor
+  AliPMDcludata &operator=(const AliPMDcludata &pmdcludata); //assignment op
   
   virtual ~AliPMDcludata();
 
@@ -34,18 +33,14 @@ class AliPMDcludata : public TObject
   Float_t GetClusCells() const;
   Float_t GetClusSigmaX() const;
   Float_t GetClusSigmaY() const;
-
+  Int_t   GetCellXY(Int_t i) const;
+  
  protected:
 
 
   Float_t fClusData[6];       // Array containing cluster information
-  /*
-    fClusData[0] : Cluster x         , fClusData[1] : Cluster y
-    fClusData[2] : Cluster adc       , fClusData[3] : Cluster Cells
-    fClusData[4] : Cluster SigmaX    , fClusData[5] : Cluster SigmaY
-  */
+  Int_t   fClXY[15];          // Array containing cell information 
   
-  ClassDef(AliPMDcludata,1) // Keep Cluster information
+  ClassDef(AliPMDcludata,2) // Keep Cluster information
 };
-
 #endif