]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONRawCluster.cxx
Code revision:
[u/mrichter/AliRoot.git] / MUON / AliMUONRawCluster.cxx
index a1cba235bc73e0c81672a24f72ebbfcdd73c2d55..612f7e4ffa31552b708e5665e7836904b8ff027c 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.3  2001/02/05 14:49:29  hristov
-Compare() declared const (R.Brun)
+/* $Id$ */
 
-Revision 1.2  2000/06/15 07:58:48  morsch
-Code from MUON-dev joined
+// Class for the MUON RecPoint
+// It contains the properties of the physics cluters found in the tracking chambers
+// RawCluster contains also the information from the both cathode of the chambers.
+//
+//
 
-Revision 1.1.2.1  2000/06/09 22:04:50  morsch
-Was before in DataStructures.cxx
-
-*/
+#include <TArrayF.h>
 
 #include "AliMUONRawCluster.h"
-#include <TObjArray.h>
-#include <TArrayF.h>
 
 ClassImp(AliMUONRawCluster);
 
 
-AliMUONRawCluster::AliMUONRawCluster() {
+AliMUONRawCluster::AliMUONRawCluster() 
+  : TObject()
+{
 // Constructor
     fTracks[0]=fTracks[1]=fTracks[2]=-1; 
     for (int j=0;j<2;j++) {
@@ -54,7 +51,7 @@ AliMUONRawCluster::AliMUONRawCluster() {
     fNcluster[0]=fNcluster[1]=-1;
     fGhost=0;
 }
-
+//____________________________________________________
 Int_t AliMUONRawCluster::Compare(const TObject *obj) const
 {
   /*
@@ -73,9 +70,8 @@ Int_t AliMUONRawCluster::Compare(const TObject *obj) const
          else return 0;
 
 }
-
-Int_t AliMUONRawCluster::
-BinarySearch(Float_t y, TArrayF coord, Int_t from, Int_t upto)
+//____________________________________________________
+Int_t AliMUONRawCluster::BinarySearch(Float_t y, TArrayF coord, Int_t from, Int_t upto)
 {
    // Find object using a binary search. Array must first have been sorted.
    // Search can be limited by setting upto to desired index.
@@ -88,7 +84,7 @@ BinarySearch(Float_t y, TArrayF coord, Int_t from, Int_t upto)
    }
    return low;
 }
-
+//____________________________________________________
 void AliMUONRawCluster::SortMin(Int_t *idx,Float_t *xdarray,Float_t *xarray,Float_t *yarray,Float_t *qarray, Int_t ntr)
 {
   //
@@ -149,8 +145,8 @@ void AliMUONRawCluster::SortMin(Int_t *idx,Float_t *xdarray,Float_t *xarray,Floa
 
 }
 
-
-Int_t AliMUONRawCluster::PhysicsContribution()
+//____________________________________________________
+Int_t AliMUONRawCluster::PhysicsContribution() const
 {
 // Evaluate physics contribution to cluster
   Int_t iPhys=0;
@@ -169,10 +165,10 @@ Int_t AliMUONRawCluster::PhysicsContribution()
     return 0;
   }
 }
-
 //____________________________________________________
 void AliMUONRawCluster::DumpIndex(void)
 {
+  // Dumping IdexMap of the cluster
     printf ("-----\n");
     for (Int_t icat=0;icat<2;icat++) {
        printf ("Mult %d\n",fMultiplicity[icat]);
@@ -182,3 +178,222 @@ void AliMUONRawCluster::DumpIndex(void)
        printf("\n");
     }
 }
+//____________________________________________________
+Int_t AliMUONRawCluster::AddCharge(Int_t i, Int_t Q)
+{
+  // Adding Q to the fQ value
+  if (i==0 || i==1) {
+    fQ[i]+=Q;
+    return 1;
+  }
+  else  return 0;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::AddX(Int_t i, Float_t X)
+{
+  // Adding X to the fX value
+  if (i==0 || i==1) {
+    fX[i]+=X;
+    return 1;
+  }
+  else  return 0;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::AddY(Int_t i, Float_t Y)
+{
+  // Adding Y to the fY value 
+  if (i==0 || i==1) {
+    fY[i]+=Y;
+    return 1;
+  }
+  else return 0;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::AddZ(Int_t i, Float_t Z)
+{
+  // Adding Z to the fZ value
+  if (i==0 || i==1) {
+    fZ[i]+=Z;
+    return 1;
+  }
+  else return 0;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::GetCharge(Int_t i) const
+{
+  // Getting the charge of the cluster
+  if (i==0 || i==1) return fQ[i];
+  else  return 99999;
+}
+//____________________________________________________
+Float_t AliMUONRawCluster::GetX(Int_t i)  const
+{
+  // Getting X value of the cluster
+  if (i==0 || i==1) return fX[i];
+  else  return 99999.;
+}
+//____________________________________________________
+Float_t AliMUONRawCluster::GetY(Int_t i) const 
+{
+  // Getting Y value of the cluster
+  if (i==0 || i==1) return fY[i];
+  else  return 99999.;
+}
+//____________________________________________________
+Float_t AliMUONRawCluster::GetZ(Int_t i) const 
+{
+  // Getting Z value of the cluster
+  if (i==0 || i==1) return fZ[i];
+  else  return 99999.;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::GetTrack(Int_t i) const 
+{
+  // Getting track i contributing to the cluster
+  if (i==0 || i==1 || i==2) return fTracks[i];
+  else  return 99999;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::GetPeakSignal(Int_t i) const 
+{
+  // Getting cluster peaksignal
+  if (i==0 || i==1 ) return fPeakSignal[i];
+  else  return 99999;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::GetMultiplicity(Int_t i) const 
+{
+  // Getting cluster multiplicity
+  if (i==0 || i==1 ) return fMultiplicity[i];
+  else  return 99999;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::GetClusterType() const 
+{
+  // Getting Cluster Type
+  return fClusterType;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::GetGhost() const 
+{
+  // Getting Ghost
+  return fGhost;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::GetNcluster(Int_t i) const 
+{
+  // Getting number of clusters
+  if (i==0 || i==1 ) return fNcluster[i];
+  else  return 99999;
+}
+//____________________________________________________
+Float_t AliMUONRawCluster::GetChi2(Int_t i) const 
+{
+  // Getting chi2 value of the cluster
+  if (i==0 || i==1) return fChi2[i];
+  else  return 99999.;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::SetCharge(Int_t i, Int_t Q)
+{
+  // Setting Charge of the cluster
+  if (i==0 || i==1) {
+    fQ[i]=Q;
+    return 1;
+  }
+  else  return 0;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::SetX(Int_t i, Float_t X)
+{
+  // Setting X value of the cluster
+  if (i==0 || i==1) {
+    fX[i]=X;
+    return 1;
+  }
+  else  return 0;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::SetY(Int_t i, Float_t Y)
+{
+  // Setting Y value of the cluster
+  if (i==0 || i==1) {
+    fY[i]=Y;
+    return 1;
+  }
+  else return 0;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::SetZ(Int_t i, Float_t Z)
+{
+  // Setting Z value of the cluste
+  if (i==0 || i==1) {
+    fZ[i]=Z;
+    return 1;
+  }
+  else return 0;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::SetTrack(Int_t i, Int_t track)
+{
+  // Setting tracks contributing to the cluster
+  if (i==0 || i==1 || i==2) {
+    fTracks[i]=track;
+    return 1;
+  }
+  else return 0;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::SetPeakSignal(Int_t i, Int_t peaksignal)
+{
+  // Setting PeakSignal of the cluster
+  if (i==0 || i==1 ) {
+    fPeakSignal[i]=peaksignal;
+    return 1;
+  }
+  else return 0;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::SetMultiplicity(Int_t i, Int_t mul)
+{
+  // Setting multiplicity of the cluster
+  if (i==0 || i==1 ) {
+    fMultiplicity[i]=mul;
+    return 1;
+  }
+  else return 0;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::SetClusterType(Int_t type)
+{
+  // Setting the cluster type
+  fClusterType=type;
+  return 1;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::SetGhost(Int_t ghost)
+{
+  // Setting the ghost
+  fGhost=ghost;
+  return 1;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::SetNcluster(Int_t i, Int_t ncluster)
+{
+  // Setting number the cluster
+  if (i==0 || i==1 ) {
+    fNcluster[i]=ncluster;
+    return 1;
+  }
+  else return 0;
+}
+//____________________________________________________
+Int_t AliMUONRawCluster::SetChi2(Int_t i, Float_t chi2)
+{
+  // Setting chi2 of the cluster
+  if (i==0 || i==1) {
+    fChi2[i]=chi2;
+    return 1;
+  }
+  else return 0;
+}