1 #ifndef ALICALOALTROMAPPING_H
2 #define ALICALOALTROMAPPING_H
3 /* Copyright(c) 1998-2003, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 //////////////////////////////////////////////////////////
9 // Class used to setup the mapping of hardware adresses //
10 // in ALTRO to Calo cells (column and row index + //
12 // The mapping is defined in an external mapping files //
13 // separately. The class derives from the base altro //
14 // mapping class defined in the RAW package. //
15 //////////////////////////////////////////////////////////
17 /// Exported from PHOS to be used also by EMCAL
18 /// November 2006 Gustavo Conesa Balbastre
20 #include "AliAltroMapping.h"
22 class AliCaloAltroMapping: public AliAltroMapping {
24 AliCaloAltroMapping(const char *mappingFile);
25 virtual ~AliCaloAltroMapping();
27 AliCaloAltroMapping(const AliCaloAltroMapping& mapping);
28 AliCaloAltroMapping& operator = (const AliCaloAltroMapping& mapping);
30 // In case of PHOS/EMCAL the relevant segmentation is row-column-gain
32 virtual Int_t GetHWAddress(Int_t row, Int_t column, Int_t gain) const;
33 // Get Row (not pad-row as in the base class)
34 virtual Int_t GetPadRow(Int_t hwAddress) const;
35 // Get Column (not pad as in the base class)
36 virtual Int_t GetPad(Int_t hwAddress) const;
37 // Get Gain (0/1) (not sector as in the base class)
38 virtual Int_t GetSector(Int_t hwAddress) const;
41 virtual Bool_t ReadMapping();
42 virtual void DeleteMappingArrays();
44 Int_t fMinRow; // Minimum row index
45 Int_t fMaxRow; // Maximum row index
46 Int_t fMinCol; // Minimum column index
47 Int_t fMaxCol; // Maximum column index
48 Short_t **fMapping; // Array which connects hardware adresses to row and column indeces
49 Short_t **fInvMappingLow; // Inverse of fMapping (Low gain)
50 Short_t **fInvMappingHigh;// Inverse of fMapping (High gain)
52 ClassDef(AliCaloAltroMapping,1) // Altro mapping handler class