]>
Commit | Line | Data |
---|---|---|
178dd351 | 1 | //-*- Mode: C++ -*- |
3800a654 | 2 | // $Id: AliHLTCALOMapper.h 34264 2009-08-14 18:29:23Z odjuvsla $ |
178dd351 | 3 | |
4 | #ifndef ALIHLTCALOMAPPER_H | |
5 | #define ALIHLTCALOMAPPER_H | |
6 | ||
7 | ||
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 * | |
12 | * * | |
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 * | |
16 | * * | |
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 | **************************************************************************/ | |
25 | ||
178dd351 | 26 | |
27 | #include "AliHLTCaloConstants.h" | |
178dd351 | 28 | #include "Rtypes.h" |
29 | #include "AliHLTLogging.h" | |
4f4b7ba4 | 30 | #include "AliHLTCaloConstantsHandler.h" |
178dd351 | 31 | |
a57a9446 | 32 | #define FILEPATHMAXLENGTH 1024 |
33 | ||
178dd351 | 34 | class AliHLTCaloCoordinate; |
35 | ||
4f4b7ba4 | 36 | class AliHLTCaloMapper : public AliHLTCaloConstantsHandler, public AliHLTLogging |
178dd351 | 37 | { |
3800a654 | 38 | public: |
4f4b7ba4 | 39 | |
77f350f7 | 40 | AliHLTCaloMapper(const unsigned long specification, TString det); |
178dd351 | 41 | virtual ~AliHLTCaloMapper(); |
44175a17 | 42 | virtual Bool_t InitAltroMapping( const unsigned long specification ) = 0; |
178dd351 | 43 | virtual void InitDDLSpecificationMapping() = 0; |
178dd351 | 44 | bool GetIsInitializedMapping(); |
44175a17 | 45 | virtual char* GetFilePath(); |
77f350f7 | 46 | |
f137c3c5 | 47 | virtual int GetChannelID(const AliHLTUInt32_t spec, const Int_t hadd); |
44175a17 | 48 | static void GetChannelCoord(const UShort_t channelId, UShort_t* channelCoord); |
b850c417 | 49 | static void ChannelId2Coordinate(const int channelId, AliHLTCaloCoordinate &channelCoord); |
77f350f7 | 50 | virtual void GetLocalCoord(const int channelId, Float_t* localCoord) const; |
51 | int GetDDLFromSpec( const AliHLTUInt32_t spec ); | |
4d2d113d | 52 | int GetModuleFromSpec(UInt_t specification); |
77f350f7 | 53 | static unsigned long GetSpecFromDDLIndex( const int ddlindex ); |
3800a654 | 54 | |
178dd351 | 55 | |
b850c417 | 56 | struct fAltromap{ |
57 | char fZRow; // Coordinate in Z direction (beam direction) relatve to one Module | |
58 | char fXCol; // Coordinate in X direction (perpendicular too beam direction an parallell to ground) relatve to one Module | |
59 | char fGain; // Gain (high gain = 1, low gain = 0) | |
178dd351 | 60 | }; |
178dd351 | 61 | struct fDDLSpecificationMap{ |
f137c3c5 | 62 | UInt_t fRcuX; // Coordinate in Z direction (beam direction) relatve too one RCU |
63 | UInt_t fRcuZ; // Coordinate in X direction (perpendicular too beam direction an parallell to ground) relatve too one RCU | |
64 | UInt_t fRcuXOffset; | |
65 | UInt_t fRcuZOffset; | |
66 | int fModId; | |
178dd351 | 67 | }; |
b850c417 | 68 | |
f137c3c5 | 69 | // struct fDDLSpecificationMap{ |
70 | // char fModId; | |
71 | // }; | |
72 | ||
178dd351 | 73 | |
74 | fAltromap *fHw2geomapPtr; //pointer to structure holding information about geometrical address | |
75 | ||
a57a9446 | 76 | char fFilepath[FILEPATHMAXLENGTH]; |
178dd351 | 77 | |
78 | protected: | |
b850c417 | 79 | float fCellSize; |
3800a654 | 80 | int fSpecification; |
178dd351 | 81 | bool fIsInitializedMapping; |
82 | fDDLSpecificationMap* fSpecificationMapPtr; | |
4d2d113d | 83 | TString fCaloDet; |
4f4b7ba4 | 84 | |
178dd351 | 85 | private: |
3800a654 | 86 | AliHLTCaloMapper(); |
178dd351 | 87 | AliHLTCaloMapper(const AliHLTCaloMapper & ); |
88 | AliHLTCaloMapper & operator = (const AliHLTCaloMapper &); | |
3800a654 | 89 | |
4f4b7ba4 | 90 | |
91 | ClassDef(AliHLTCaloMapper, 1); | |
92 | ||
178dd351 | 93 | }; |
94 | ||
95 | #endif |