]>
Commit | Line | Data |
---|---|---|
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 AliTOFGeometry; | |
25 | ||
26 | class AliTOFDigitMap : public TObject | |
27 | { | |
28 | public: | |
29 | AliTOFDigitMap(); | |
30 | AliTOFDigitMap(const AliTOFDigitMap & digitMap); | |
31 | ||
32 | virtual ~AliTOFDigitMap(); | |
33 | ||
34 | // Clear the digit map | |
35 | virtual void Clear(const Option_t* opt = ""); | |
36 | // Add a single digit | |
37 | void AddDigit(Int_t *vol, Int_t idigit); | |
38 | ||
39 | // Get index of digit in the cell labelled by vol | |
40 | Int_t GetDigitIndex(Int_t *vol, Int_t index) const; | |
41 | // Get indices of digits in the cell labelled by vol | |
42 | void GetDigitIndex(Int_t *vol, Int_t *index) const; | |
43 | ||
44 | // Test digit status | |
45 | virtual FlagType TestDigit(Int_t *vol) const; | |
46 | ||
47 | // Assignment operator | |
48 | AliTOFDigitMap& operator = (const AliTOFDigitMap& rhs); | |
49 | ||
50 | Int_t GetFilledCellNumber() const; | |
51 | ||
52 | private: | |
53 | // Check index | |
54 | Int_t CheckedIndex(Int_t *vol) const; | |
55 | private: | |
56 | enum { | |
57 | kMaxDigitsPerPad = 3 | |
58 | }; | |
59 | ||
60 | Int_t fNSector; // Number of sectors | |
61 | Int_t fNplate; // Number of plates | |
62 | Int_t fNstrip; // Maximum number of strips | |
63 | Int_t fNpx; // Number of pads in x | |
64 | Int_t fNpz; // Number of pads in z | |
65 | ||
66 | Int_t fMaxIndex; // maximum index in hit map | |
67 | Int_t **fDigitMap; // ! [fMaxIndex][kMaxDigitsPerPad] | |
68 | ||
69 | AliTOFGeometry *fTOFGeometry; // Pointer to the TOF geometry | |
70 | ||
71 | ClassDef(AliTOFDigitMap,1) // Implements DigitMap as a 1-dim array | |
72 | }; | |
73 | #endif |