]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONRawClusterV2.cxx
adding switches for 2011 data and so that PID doesnt crash for local testing
[u/mrichter/AliRoot.git] / MUON / AliMUONRawClusterV2.cxx
index ccb0f050b2d80dd3ef298145b486ed1ab53dba4d..0051884632f875ed005cbba77d772443916fcb2c 100644 (file)
@@ -28,7 +28,8 @@
 
 #include "AliLog.h"
 
-#include "Riostream.h"
+#include <TClonesArray.h>
+#include <Riostream.h>
 
 /// \cond CLASSIMP
 ClassImp(AliMUONRawClusterV2)
@@ -41,12 +42,13 @@ 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),
-    fDigitsId(0x0)
+    fDigitsId(0x0),
+    fMCLabel(-1)
 {
   /// Default Constructor
 }
@@ -57,12 +59,13 @@ 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),
-    fDigitsId(0x0)
+    fDigitsId(0x0),
+    fMCLabel(-1)
 {
   /// Constructor
 }
@@ -85,7 +88,8 @@ AliMUONRawClusterV2::AliMUONRawClusterV2(const AliMUONRawClusterV2& cluster)
     fQ(cluster.fQ),
     fChi2(cluster.fChi2),
     fNDigits(cluster.fNDigits),
-    fDigitsId(0x0)
+    fDigitsId(0x0),
+    fMCLabel(cluster.fMCLabel)
 
 {
   /// Copy constructor
@@ -116,6 +120,7 @@ AliMUONRawClusterV2 & AliMUONRawClusterV2::operator=(const AliMUONRawClusterV2&
   fQ = cluster.fQ;
   fChi2 = cluster.fChi2;
   SetDigitsId(cluster.fNDigits,cluster.fDigitsId);
+  fMCLabel = cluster.fMCLabel;
 
   return *this;
 }
@@ -123,18 +128,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 +161,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;
 }