]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONVCluster.h
Coverity fix for uninitialized variables and check for returned null value
[u/mrichter/AliRoot.git] / MUON / AliMUONVCluster.h
index 464ec393c84bc880bc6192fa5c8dbfd42ded8bec..6107810e6eb44896ecbd22b144f26c2b4fa2ce76 100644 (file)
@@ -23,7 +23,7 @@ class AliMUONVCluster : public TObject {
   
            /// Clear method (used by TClonesArray)
   virtual void Clear(Option_t*) = 0;
-  
+
            /// Set coordinates (cm)
   virtual void     SetXYZ(Double_t x, Double_t y, Double_t z) = 0;
            /// Return coordinate X (cm)
@@ -51,7 +51,7 @@ class AliMUONVCluster : public TObject {
   
            /// Build a single integer with id information
   static  UInt_t   BuildUniqueID(Int_t chamberId, Int_t detElemId, Int_t clusterIndex)
-                       {return ((chamberId << 28) | (detElemId << 17) | (clusterIndex));}
+                       {return (((chamberId & 0xF) << 28) | ((detElemId & 0x7FF) << 17) | (clusterIndex & 0x1FFFF));}
            /// Return chamber id (0..), part of the uniqueID
   static  Int_t    GetChamberId(UInt_t uniqueID)    {return (uniqueID & 0xF0000000) >> 28;}
            /// Return detection element id, part of the uniqueID
@@ -71,12 +71,19 @@ class AliMUONVCluster : public TObject {
   virtual Int_t    GetNDigits() const = 0;
            /// Return Id of digits i
   virtual UInt_t   GetDigitId(Int_t i) const = 0;
+           /// Return the array of digits'id
+  virtual const UInt_t* GetDigitsId() const {return 0x0;}
   
            /// Set chi2 of cluster
   virtual void     SetChi2(Double_t chi2) = 0;
            /// Return chi2 of cluster
   virtual Double_t GetChi2() const = 0;
   
+           /// Set the corresponding MC track number
+  virtual void     SetMCLabel(Int_t label) = 0;
+          /// Return the corresponding MC track number
+  virtual Int_t    GetMCLabel() const = 0;
+  
   virtual void     Print(Option_t *option = "") const;