]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONRawCluster.cxx
temporary bugfix: the operator functions of the AliHLTReadoutList class did not work
[u/mrichter/AliRoot.git] / MUON / AliMUONRawCluster.cxx
index 0281476196e2227861454c8257d9f544bd5a635c..49feed2f4f7354b56eca1e53d94809e771f7096c 100644 (file)
 
 /* $Id$ */
 
-// -------------------------
+//-----------------------------------------------------------------------------
 // Class AliMUONRawCluster
 // -------------------------
 // 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.
+//-----------------------------------------------------------------------------
 
 
 #include "Riostream.h"
 ClassImp(AliMUONRawCluster)
 /// \endcond
 
+
 //____________________________________________________
 AliMUONRawCluster::AliMUONRawCluster() 
-  : TObject(),
+  : AliMUONVCluster(),
     fClusterType(0),
     fGhost(0),
     fDetElemId(0)   
@@ -59,8 +61,8 @@ AliMUONRawCluster::AliMUONRawCluster()
        }
     }
     fNcluster[0]=fNcluster[1]=-1;
-    fErrXY[0] = 0.144;
-    fErrXY[1] = 0.01;
+    fErrXY[0] = FLT_MAX;
+    fErrXY[1] = FLT_MAX;
 }
 
 //____________________________________________________
@@ -69,6 +71,21 @@ AliMUONRawCluster::~AliMUONRawCluster()
 /// Destructor
 }
 
+//____________________________________________________
+void AliMUONRawCluster::SetDigitsId(Int_t nDigits, const UInt_t *digitsId)
+{
+  /// Set the array of digit Id
+  /// if digitsId is not given the array is filled with id=0
+  
+  fMultiplicity[0] = (nDigits < 50) ? nDigits : 50;
+  
+  if (fMultiplicity[0] == 0) return;
+  if (digitsId == 0)
+    for (Int_t i=0; i<fMultiplicity[0]; i++) fIndexMap[i][0] = 0;
+  else
+    for (Int_t i=0; i<fMultiplicity[0]; i++) fIndexMap[i][0] = (Int_t) digitsId[i];
+}
+
 //____________________________________________________
 Int_t AliMUONRawCluster::Compare(const TObject *obj) const
 {
@@ -92,11 +109,11 @@ Int_t AliMUONRawCluster::Compare(const TObject *obj) const
    */
   
   const AliMUONRawCluster* raw = static_cast<const AliMUONRawCluster*>(obj);
-  if ( GetCharge(0) > raw->GetCharge(0) ) 
+  if ( GetCharge() > raw->GetCharge() ) 
   {
     return 1;
   }
-  else if ( GetCharge(0) < raw->GetCharge(0) ) 
+  else if ( GetCharge() < raw->GetCharge() ) 
   {
     return -1;
   }
@@ -454,3 +471,4 @@ Int_t AliMUONRawCluster::SetChi2(Int_t i, Float_t chi2)
   else return 0;
 }
 
+