2 // $Id: AliHLTCALOMapper.h 34264 2009-08-14 18:29:23Z odjuvsla $
4 #ifndef ALIHLTCALOMAPPER_H
5 #define ALIHLTCALOMAPPER_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 **************************************************************************/
27 #include "AliHLTCaloConstants.h"
29 #include "AliHLTLogging.h"
30 #include "AliHLTCaloConstantsHandler.h"
32 class AliHLTCaloCoordinate;
34 class AliHLTCaloMapper : public AliHLTCaloConstantsHandler, public AliHLTLogging
38 AliHLTCaloMapper(const unsigned long specification, TString det);
39 virtual ~AliHLTCaloMapper();
40 virtual Bool_t InitAltroMapping( const unsigned long specification ) = 0;
41 virtual void InitDDLSpecificationMapping() = 0;
42 bool GetIsInitializedMapping();
43 virtual char* GetFilePath();
45 virtual int GetChannelID(const AliHLTUInt32_t spec, const Int_t hadd);
46 static void GetChannelCoord(const UShort_t channelId, UShort_t* channelCoord);
47 static void ChannelId2Coordinate(const int channelId, AliHLTCaloCoordinate &channelCoord);
48 virtual void GetLocalCoord(const int channelId, Float_t* localCoord) const;
49 int GetDDLFromSpec( const AliHLTUInt32_t spec );
50 int GetModuleFromSpec(Int_t specification);
51 static unsigned long GetSpecFromDDLIndex( const int ddlindex );
55 char fZRow; // Coordinate in Z direction (beam direction) relatve to one Module
56 char fXCol; // Coordinate in X direction (perpendicular too beam direction an parallell to ground) relatve to one Module
57 char fGain; // Gain (high gain = 1, low gain = 0)
59 struct fDDLSpecificationMap{
60 UInt_t fRcuX; // Coordinate in Z direction (beam direction) relatve too one RCU
61 UInt_t fRcuZ; // Coordinate in X direction (perpendicular too beam direction an parallell to ground) relatve too one RCU
67 // struct fDDLSpecificationMap{
72 fAltromap *fHw2geomapPtr; //pointer to structure holding information about geometrical address
79 bool fIsInitializedMapping;
80 fDDLSpecificationMap* fSpecificationMapPtr;
84 AliHLTCaloMapper(const AliHLTCaloMapper & );
85 AliHLTCaloMapper & operator = (const AliHLTCaloMapper &);
88 ClassDef(AliHLTCaloMapper, 1);