4 #ifndef ALIHLTPHOSMAPPER_H
5 #define ALIHLTPHOSMAPPER_H
8 /**************************************************************************
9 * This file is property of and copyright by the Experimental Nuclear *
10 * Physics Group, Dep. of Physics *
11 * University of Oslo, Norway, 2006 *
13 * Author: Per Thomas Hille perthi@fys.uio.no for the ALICE DCS Project. *
14 * Contributors are mentioned in the code where appropriate. *
15 * Please report bugs to perthi@fys.uio.no *
17 * Permission to use, copy, modify and distribute this software and its *
18 * documentation strictly for non-commercial purposes is hereby granted *
19 * without fee, provided that the above copyright notice appears in all *
20 * copies and that both the copyright notice and this permission notice *
21 * appear in the supporting documentation. The authors make no claims *
22 * about the suitability of this software for any purpose. It is *
23 * provided "as is" without express or implied warranty. *
24 **************************************************************************/
26 //#include "AliHLTPHOSBase.h"
28 //using namespace PhosHLTConst;
30 #include "AliHLTLogging.h"
32 #include "AliPHOSEMCAGeometry.h"
34 class AliHLTPHOSCoordinate;
36 class AliHLTPHOSMapper : public AliHLTLogging
37 //class AliHLTPHOSMapper
41 virtual ~AliHLTPHOSMapper();
42 void InitAltroMapping();
43 void InitDDLSpecificationMapping();
44 bool GetIsInitializedMapping();
47 UShort_t GetChannelID(Int_t specification, Int_t hwAddress);
48 static void GetChannelCoord(const UShort_t channelId, UShort_t* channelCoord);
49 static void ChannelId2Coordinate(const UShort_t channelId, AliHLTPHOSCoordinate &channelCoord );
50 static void GetLocalCoord(const UShort_t channelId, Float_t* localCoord);
51 int GetDDLFromSpec(Int_t specification);
52 int GetModuleFromSpec(Int_t specification);
55 int fZRow; // Coordinate in Z direction (beam direction) relatve too one RCU
56 int fXCol; // Coordinate in X direction (perpendicular too beam direction an parallell to ground) relatve too one RCU
57 int fGain; // Gain (high gain = 1, low gain = 0)
60 struct fDDLSpecificationMap{
61 UInt_t fRcuX; // Coordinate in Z direction (beam direction) relatve too one RCU
62 UInt_t fRcuZ; // Coordinate in X direction (perpendicular too beam direction an parallell to ground) relatve too one RCU
68 fAltromap *fHw2geomapPtr; //pointer to structure holding information about geometrical address
74 bool fIsInitializedMapping;
75 AliHLTPHOSMapper(const AliHLTPHOSMapper & );
76 AliHLTPHOSMapper & operator = (const AliHLTPHOSMapper &);
78 fDDLSpecificationMap* fSpecificationMapPtr;
79 //AliPHOSEMCAGeometry fPHOSGeometry;
80 static const Float_t fCellStep = 2.2;//2.*fPHOSGeometry.GetAirCellHalfSize()[0];