]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/AliFMDEdepMap.h
Export some headers for AMORE
[u/mrichter/AliRoot.git] / FMD / AliFMDEdepMap.h
CommitLineData
e802be3e 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 */
c2fc1258 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
02a27b50 12 @ingroup FMD_sim
c2fc1258 13*/
02a27b50 14//
15// Contains a pair of energy deposited @c fEdep and number of hits @c
16// fN, @c fEdep is the summed energy deposition, and @c fN is the
17// number of hits
e802be3e 18#ifndef ALIFMDMAP_H
97961cbd 19# include "AliFMDMap.h"
e802be3e 20#endif
02a27b50 21#ifndef ALIFMDEDEPHITPAIR_H
22# include <AliFMDEdepHitPair.h>
23#endif
24
25
e802be3e 26//____________________________________________________________________
02a27b50 27/** @brief Map of Energy deposited, hit information per strip.
9f662337 28 Contains a pair of energy deposited @c fEdep and
29 number of hits @c fN, @c fEdep is the summed energy deposition,
30 and @c fN is the number of hits
31 @ingroup FMD_sim
32*/
e802be3e 33class AliFMDEdepMap : public AliFMDMap
34{
35public:
9f662337 36 /** Copy constructor
37 @param other Object to copy from.
38 @return */
e802be3e 39 AliFMDEdepMap(const AliFMDEdepMap& other);
021f1396 40 /** Constructor */
41 AliFMDEdepMap();
9f662337 42 /** Constructor
43 @param maxDet Number of detectors (3)
44 @param maxRing Number of rings (2)
45 @param maxSec Number of sectors (40)
46 @param maxStr Number of strips (20) */
021f1396 47 AliFMDEdepMap(UShort_t maxDet,
48 UShort_t maxRing= 0,
49 UShort_t maxSec = 0,
50 UShort_t maxStr = 0);
9f662337 51 /** DTOR */
e802be3e 52 virtual ~AliFMDEdepMap() { delete [] fData; }
53 AliFMDEdepMap& operator=(const AliFMDEdepMap& other);
9f662337 54 /** Reset to default */
088f8e79 55 virtual void Reset();
9f662337 56 /** Reset to value
f8616692 57 @param val Value to reset from */
088f8e79 58 virtual void Reset(const AliFMDEdepHitPair& val);
9f662337 59 /** Access operator
f8616692 60 @param detector Detector
61 @param ring Ring
62 @param sector Sector
63 @param strip Strip
9f662337 64 @return reference value stored for the strip */
e802be3e 65 virtual AliFMDEdepHitPair& operator()(UShort_t detector,
f8616692 66 Char_t ring,
67 UShort_t sector,
68 UShort_t strip);
9f662337 69 /** Access operator
f8616692 70 @param detector Detector
71 @param ring Ring
72 @param sector Sector
73 @param strip Strip
9f662337 74 @return value stored for the strip */
e802be3e 75 virtual const AliFMDEdepHitPair& operator()(UShort_t detector,
f8616692 76 Char_t ring,
77 UShort_t sector,
78 UShort_t strip) const;
e802be3e 79protected:
021f1396 80 Int_t MaxIndex() const { return fTotal; }
81 Int_t AtAsInt(Int_t idx) const { return fData[idx].fN; }
82 Int_t& AtAsInt(Int_t idx) { return AliFMDMap::AtAsInt(idx); }
83 Bool_t AtAsBool(Int_t idx) const { return fData[idx].fEdep > 0; }
84 Bool_t& AtAsBool(Int_t idx) { return AliFMDMap::AtAsBool(idx); }
85 Float_t AtAsFloat(Int_t idx) const { return fData[idx].fEdep; }
86 Float_t& AtAsFloat(Int_t idx) { return fData[idx].fEdep; }
87 UShort_t AtAsUShort(Int_t idx) const { return fData[idx].fN; }
88 UShort_t& AtAsUShort(Int_t idx) { return fData[idx].fN; }
89 Bool_t IsUShort() const { return kTRUE; }
90 Bool_t IsFloat() const { return kTRUE; }
408bf2b4 91 Int_t fTotal; // Total number of entries
bfdc7f5d 92 AliFMDEdepHitPair* fData; //[fTotal] The data
0ed9abeb 93 ClassDef(AliFMDEdepMap, 3) // Cache of edep,hit information per strip
e802be3e 94};
95
96#endif
97//____________________________________________________________________
98//
99// Local Variables:
100// mode: C++
101// End:
102//
103// EOF
104//
105
106