]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONRawClusterV2.cxx
same modifications as in ppbench
[u/mrichter/AliRoot.git] / MUON / AliMUONRawClusterV2.cxx
index ccb0f050b2d80dd3ef298145b486ed1ab53dba4d..d87ecb7d6801a9dff629257876ce8cf5691dee48 100644 (file)
@@ -28,7 +28,8 @@
 
 #include "AliLog.h"
 
-#include "Riostream.h"
+#include <TClonesArray.h>
+#include <Riostream.h>
 
 /// \cond CLASSIMP
 ClassImp(AliMUONRawClusterV2)
@@ -41,8 +42,8 @@ AliMUONRawClusterV2::AliMUONRawClusterV2()
     fX(FLT_MAX),
     fY(FLT_MAX),
     fZ(FLT_MAX),
-    fErrX2(fgkDefaultNonBendingReso * fgkDefaultNonBendingReso),
-    fErrY2(fgkDefaultBendingReso * fgkDefaultBendingReso),
+    fErrX2(FLT_MAX),
+    fErrY2(FLT_MAX),
     fQ(0.),
     fChi2(0.),
     fNDigits(0),
@@ -57,8 +58,8 @@ AliMUONRawClusterV2::AliMUONRawClusterV2(Int_t chamberId, Int_t detElemId, Int_t
     fX(FLT_MAX),
     fY(FLT_MAX),
     fZ(FLT_MAX),
-    fErrX2(fgkDefaultNonBendingReso * fgkDefaultNonBendingReso),
-    fErrY2(fgkDefaultBendingReso * fgkDefaultBendingReso),
+    fErrX2(FLT_MAX),
+    fErrY2(FLT_MAX),
     fQ(0.),
     fChi2(0.),
     fNDigits(0),
@@ -123,18 +124,10 @@ AliMUONRawClusterV2 & AliMUONRawClusterV2::operator=(const AliMUONRawClusterV2&
 //____________________________________________________
 void AliMUONRawClusterV2::Clear(Option_t*)
 {
-  /// Reset this cluster, in particular the internal arrays are deleted.
-  
-  fX = FLT_MAX;
-  fY = FLT_MAX;
-  fZ = FLT_MAX;
-  fErrX2 = fgkDefaultNonBendingReso * fgkDefaultNonBendingReso;
-  fErrY2 = fgkDefaultBendingReso * fgkDefaultBendingReso;
-  fQ = 0.;
-  fChi2 = 0.;
-  fNDigits = 0;
+  /// clear memory
   delete [] fDigitsId;
   fDigitsId = 0x0;
+  fNDigits = 0;
 }
 
 //____________________________________________________
@@ -164,7 +157,7 @@ void AliMUONRawClusterV2::AddDigitId(UInt_t id)
   UInt_t *digitsIdNew = new UInt_t[fNDigits+1];
   memcpy(digitsIdNew,fDigitsId, fNDigits*sizeof(UInt_t));
   digitsIdNew[fNDigits++] = id;
-  delete fDigitsId;
+  delete[] fDigitsId;
   fDigitsId = digitsIdNew;
 }