e9831a1f4699ec55008b8f7663ebef27837fca84
[u/mrichter/AliRoot.git] / FMD / AliFMDEdepMap.h
1 #ifndef ALIFMDEDEPMAP_H
2 #define ALIFMDEDEPMAP_H
3 /* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights
4  * reserved. 
5  *
6  * See cxx source for full Copyright notice                               
7  */
8 #ifndef ALIFMDMAP_H
9 # include "AliFMDMap.h"
10 #endif 
11 //____________________________________________________________________
12 //
13 // Cache of Energy deposited, hit information per strip.
14 // Contains a pair of fEdep and fN
15 // fEdep is the summed energy deposition, and fN is the number of hits
16 //
17
18 //____________________________________________________________________
19 class AliFMDEdepHitPair 
20 {
21 public:
22   Float_t  fEdep; // summed energy deposition
23   UShort_t fN;    // Number of hits
24   AliFMDEdepHitPair() : fEdep(0), fN(0) {}
25   AliFMDEdepHitPair& operator=(const AliFMDEdepHitPair& o) 
26   { fEdep = o.fEdep; fN    = o.fN; return *this; }
27   AliFMDEdepHitPair(const AliFMDEdepHitPair& o) : fEdep(o.fEdep), fN(o.fN) {}
28 };
29
30 //____________________________________________________________________
31 class AliFMDEdepMap : public AliFMDMap
32 {
33 public:
34   AliFMDEdepMap(const AliFMDEdepMap& other);
35   AliFMDEdepMap(size_t maxDet = kMaxDetectors, 
36                 size_t maxRing= kMaxRings, 
37                 size_t maxSec = kMaxSectors, 
38                 size_t maxStr = kMaxStrips);
39   virtual ~AliFMDEdepMap() { delete [] fData; }
40   AliFMDEdepMap& operator=(const AliFMDEdepMap& other);
41   virtual void Reset();
42   virtual void Reset(const AliFMDEdepHitPair& val);
43   virtual AliFMDEdepHitPair& operator()(UShort_t detector, 
44                                      Char_t   ring, 
45                                      UShort_t sector, 
46                                      UShort_t strip);
47   virtual const AliFMDEdepHitPair& operator()(UShort_t detector, 
48                                            Char_t   ring, 
49                                            UShort_t sector, 
50                                            UShort_t strip) const;
51 protected:
52   AliFMDEdepHitPair* fData;  // The data 
53   ClassDef(AliFMDEdepMap, 1) // Cache of edep,hit information per strip
54 };
55
56 #endif 
57 //____________________________________________________________________
58 //
59 // Local Variables:
60 //   mode: C++
61 // End:
62 //
63 // EOF
64 //
65
66