* See cxx source for full Copyright notice */
-////////////////////////////////////////////////////////////////////////
-//
-// AliTOFDigitMap class
-//
-// digitmap enables fast check if the pad was already hit
-//
-// Author: F. Pierella | pierella@bo.infn.it
-//
-////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////
+// //
+// AliTOFDigitMap class //
+// //
+// digitmap enables fast check if the pad was already hit //
+// //
+// Author: F. Pierella | pierella@bo.infn.it //
+// //
+// Modified by A. De Caro | decaro@sa.infn.it //
+// //
+//////////////////////////////////////////////////////////////
-#include "AliHitMap.h"
#include "TObject.h"
-class TClonesArray;
+
+#include "AliHitMap.h"
class AliTOFDigitMap : public TObject
{
public:
AliTOFDigitMap();
- AliTOFDigitMap(TClonesArray *dig);
AliTOFDigitMap(const AliTOFDigitMap & digitMap);
virtual ~AliTOFDigitMap();
- // Clear the hit map
- virtual void Clear(const char *opt = "");
- // Set a single hit
- virtual void SetHit(Int_t *vol, Int_t idigit);
- virtual void SetHit(Int_t *vol);
- // Get index of hit in the list of digits
- virtual Int_t GetHitIndex(Int_t *vol) const;
- // Get pointer to digit
- virtual TObject* GetHit(Int_t *vol) const;
- // Test hit status
- virtual FlagType TestHit(Int_t *vol) const;
+
+ // Clear the digit map
+ virtual void Clear(const Option_t* opt = "");
+ // Add a single digit
+ void AddDigit(Int_t *vol, Int_t idigit);
+
+ // Get index of digit in the cell labelled by vol
+ Int_t GetDigitIndex(Int_t *vol, Int_t index) const;
+ // Get indices of digits in the cell labelled by vol
+ void GetDigitIndex(Int_t *vol, Int_t *index) const;
+
+ // Test digit status
+ virtual FlagType TestDigit(Int_t *vol) const;
+
// Assignment operator
AliTOFDigitMap& operator = (const AliTOFDigitMap& rhs);
+ Int_t GetFilledCellNumber() const;
+ Bool_t StripDigitCheck(Int_t iSector, Int_t iPlate, Int_t iStrip) const;
+ Int_t DigitInStrip(Int_t iSector, Int_t iPlate, Int_t iStrip) const;
+ void ResetDigitNumber(Int_t *vol, Int_t dig);
+ void ResetDigit(Int_t *vol, Int_t dig);
+ void ResetDigit(Int_t *vol);
+ Int_t GetNumberOfDigits(Int_t *vol);
+
private:
// Check index
Int_t CheckedIndex(Int_t *vol) const;
private:
+ enum {
+ kMaxDigitsPerPad = 3
+ };
+
Int_t fNSector; // Number of sectors
Int_t fNplate; // Number of plates
Int_t fNstrip; // Maximum number of strips
Int_t fNpx; // Number of pads in x
- Int_t fNpy; // Number of pads in y
+ Int_t fNpz; // Number of pads in z
- TClonesArray *fDigits; // Pointer to sdigits
Int_t fMaxIndex; // maximum index in hit map
- Int_t *fDigitMap; // ! [fMaxIndex]
+ Int_t **fDigitMap; // ! [fMaxIndex][kMaxDigitsPerPad]
- ClassDef(AliTOFDigitMap,0) // Implements DigitMap as a 1-dim array
+ ClassDef(AliTOFDigitMap,2) // Implements DigitMap as a 1-dim array
};
#endif