]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFDigitMap.h
Ignoring smell subdet
[u/mrichter/AliRoot.git] / TOF / AliTOFDigitMap.h
1 #ifndef ALITOFDIGITMAP_H
2 #define ALITOFDIGITMAP_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7
8 //////////////////////////////////////////////////////////////
9 //                                                          //
10 //   AliTOFDigitMap class                                   //
11 //                                                          //
12 //  digitmap enables fast check if the pad was already hit  //
13 //                                                          //
14 //   Author: F. Pierella | pierella@bo.infn.it              //
15 //                                                          //
16 // Modified by A. De Caro | decaro@sa.infn.it               //
17 //                                                          //
18 //////////////////////////////////////////////////////////////
19
20 #include "TObject.h"
21
22 #include "AliHitMap.h"
23
24 class AliTOFDigitMap : public TObject
25 {
26  public:
27     AliTOFDigitMap();
28     AliTOFDigitMap(const AliTOFDigitMap & digitMap);
29     
30     virtual ~AliTOFDigitMap();
31
32     // Clear the digit map
33     virtual void  Clear(const Option_t* opt = "");
34     // Add a single digit
35     void  AddDigit(Int_t *vol, Int_t idigit);
36
37     // Get index of digit in the cell labelled by vol
38     Int_t  GetDigitIndex(Int_t *vol, Int_t index) const;
39     // Get indices of digits in the cell labelled by vol
40     void   GetDigitIndex(Int_t *vol, Int_t *index) const;
41
42     // Test digit status
43     virtual FlagType TestDigit(Int_t *vol) const;
44
45     // Assignment operator
46     AliTOFDigitMap& operator = (const AliTOFDigitMap& rhs);
47     
48     Int_t GetFilledCellNumber() const;
49
50  private:
51     // Check index
52     Int_t CheckedIndex(Int_t *vol) const;
53  private:
54     enum {
55       kMaxDigitsPerPad = 3
56     };
57
58     Int_t fNSector;                       // Number of sectors
59     Int_t fNplate;                        // Number of plates
60     Int_t fNstrip;                        // Maximum number of strips
61     Int_t fNpx;                           // Number of pads in x
62     Int_t fNpz;                           // Number of pads in z
63
64     Int_t fMaxIndex;                      // maximum index in hit map
65     Int_t **fDigitMap;                    // ! [fMaxIndex][kMaxDigitsPerPad]
66
67     ClassDef(AliTOFDigitMap,2) // Implements DigitMap as a 1-dim array
68 };
69 #endif