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