1 #ifndef ALIFMDEDEPMAP_H
2 #define ALIFMDEDEPMAP_H
3 /* Copyright(c) 1998-2000, ALICE Experiment at CERN, All rights
6 * See cxx source for full Copyright notice
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
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
19 # include "AliFMDMap.h"
21 #ifndef ALIFMDEDEPHITPAIR_H
22 # include <AliFMDEdepHitPair.h>
26 //____________________________________________________________________
27 /** @brief Map of Energy deposited, hit information per strip.
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
33 class AliFMDEdepMap : public AliFMDMap
37 @param other Object to copy from.
39 AliFMDEdepMap(const AliFMDEdepMap& other);
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) */
47 AliFMDEdepMap(UShort_t maxDet,
52 virtual ~AliFMDEdepMap() { delete [] fData; }
53 AliFMDEdepMap& operator=(const AliFMDEdepMap& other);
54 /** Reset to default */
57 @param val Value to reset from */
58 virtual void Reset(const AliFMDEdepHitPair& val);
60 @param detector Detector
64 @return reference value stored for the strip */
65 virtual AliFMDEdepHitPair& operator()(UShort_t detector,
70 @param detector Detector
74 @return value stored for the strip */
75 virtual const AliFMDEdepHitPair& operator()(UShort_t detector,
78 UShort_t strip) const;
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; }
91 Int_t fTotal; // Total number of entries
92 AliFMDEdepHitPair* fData; //[fTotal] The data
93 ClassDef(AliFMDEdepMap, 3) // Cache of edep,hit information per strip
97 //____________________________________________________________________