]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDEdepMap.h
Digits corresponded to new data format
[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 /** Cache of Energy deposited, hit information per strip.
13     Contains a pair of energy deposited @c fEdep and 
14     number of hits @c fN, @c fEdep is the summed energy deposition,
15     and @c fN is the number of hits 
16     @ingroup FMD_sim
17 */
18 class AliFMDEdepHitPair 
19 {
20 public:
21   Float_t  fEdep; // summed energy deposition
22   UShort_t fN;    // Number of hits
23   /** CTOR  */
24   AliFMDEdepHitPair() : fEdep(0), fN(0) {}
25   /** DTOR */
26   virtual ~AliFMDEdepHitPair() {}
27   /** Assignment operator 
28       @param o Object to assign from 
29       @return Reference to this object */
30   AliFMDEdepHitPair& operator=(const AliFMDEdepHitPair& o) 
31   { fEdep = o.fEdep; fN    = o.fN; return *this; }
32   /** Copy CTOR 
33       @param o Object to copy from */
34   AliFMDEdepHitPair(const AliFMDEdepHitPair& o) : fEdep(o.fEdep), fN(o.fN) {}
35   ClassDef(AliFMDEdepHitPair, 1)
36 };
37
38 //____________________________________________________________________
39 /** Map of Energy deposited, hit information per strip.
40     Contains a pair of energy deposited @c fEdep and 
41     number of hits @c fN, @c fEdep is the summed energy deposition,
42     and @c fN is the number of hits */
43 class AliFMDEdepMap : public AliFMDMap
44 {
45 public:
46   /** Copy constructor 
47       @param other Object to copy from. 
48       @return  */
49   AliFMDEdepMap(const AliFMDEdepMap& other);
50   /** Constructor 
51       @param maxDet  Number of detectors (3)
52       @param maxRing Number of rings (2)
53       @param maxSec  Number of sectors (40)
54       @param maxStr  Number of strips (20) */
55   AliFMDEdepMap(size_t maxDet = kMaxDetectors, 
56                 size_t maxRing= kMaxRings, 
57                 size_t maxSec = kMaxSectors, 
58                 size_t maxStr = kMaxStrips);
59   /** DTOR */
60   virtual ~AliFMDEdepMap() { delete [] fData; }
61   AliFMDEdepMap& operator=(const AliFMDEdepMap& other);
62   /** Reset to default */
63   virtual void Reset();
64   /** Reset to value 
65       @param val Value to reset from */
66   virtual void Reset(const AliFMDEdepHitPair& val);
67   /** Access operator 
68       @param detector Detector 
69       @param ring     Ring 
70       @param sector   Sector  
71       @param strip    Strip
72       @return  reference value stored for the strip */
73   virtual AliFMDEdepHitPair& operator()(UShort_t detector, 
74                                         Char_t   ring, 
75                                         UShort_t sector, 
76                                         UShort_t strip);
77   /** Access operator 
78       @param detector Detector 
79       @param ring     Ring 
80       @param sector   Sector  
81       @param strip    Strip
82       @return value stored for the strip */
83   virtual const AliFMDEdepHitPair& operator()(UShort_t detector, 
84                                               Char_t   ring, 
85                                               UShort_t sector, 
86                                               UShort_t strip) const;
87 protected:
88   size_t             fTotal; //  Total number of entries
89   AliFMDEdepHitPair* fData;  //[fTotal] The data 
90   ClassDef(AliFMDEdepMap, 2) // Cache of edep,hit information per strip
91 };
92
93 #endif 
94 //____________________________________________________________________
95 //
96 // Local Variables:
97 //   mode: C++
98 // End:
99 //
100 // EOF
101 //
102
103