]>
Commit | Line | Data |
---|---|---|
bd3cd9c2 | 1 | #ifndef ALIEMCALGEOPARAMS_H |
2 | #define ALIEMCALGEOPARAMS_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id: AliEMCALGeoParams.h $ */ | |
7 | ||
8 | ////////////////////////////////////////////////////////// | |
9 | // class for holding various parameters; to be used by new | |
10 | // AliEMCALGeoUtils class // | |
11 | ////////////////////////////////////////////////////////// | |
12 | ||
13 | class AliEMCALGeoParams | |
14 | { | |
15 | public: | |
16 | ||
17 | // general geometry info | |
18 | static const int fgkEMCALModules = 12; // number of modules for EMCAL | |
19 | static const int fgkEMCALRows = 24; // number of rows per module for EMCAL | |
20 | static const int fgkEMCALCols = 48; // number of columns per module for EMCAL | |
21 | ||
22 | static const int fgkEMCALLEDRefs = 24; // number of LEDs (reference/monitors) per module for EMCAL; one per StripModule | |
23 | ||
24 | // also a few readout related variables: | |
25 | static const int fgkSampleMax = 1023; // highest possible sample value (10-bit = 0x3ff) | |
26 | static const int fgkSampleMin = 0; // lowest possible sample value | |
27 | ||
28 | // RAW/AliCaloAltroMapping provides the correspondence information between | |
29 | // an electronics HWAddress (Branch<<1 | FEC<<7 | ALTRO<<4 | Channel) | |
30 | // for the RCUs and which tower (Column and Row) that corresponds to. | |
31 | // For the cases when one doesn't have a Raw stream to decode the HW address | |
32 | // into the other FEE indices, we provide the needed simple methods here | |
33 | // with arguments (within an RCU) | |
34 | Int_t GetHWAddress(Int_t iBranch, Int_t iFEC, Int_t iALTRO, Int_t iChannel) const | |
35 | { return ( (iBranch<<11) | (iFEC<<7) | (iALTRO<<4) | iChannel ); }; // | |
36 | // and for converting back to the individual indices | |
37 | Int_t GetBranch(Int_t iHW) const { return ( (iHW>>11) & 0x1 ); }; // | |
38 | Int_t GetFEC(Int_t iHW) const { return ( (iHW>>7) & 0xf ); }; // | |
39 | Int_t GetAltro(Int_t iHW) const { return ( (iHW>>4) & 0x7 ); }; // | |
40 | Int_t GetChannel(Int_t iHW) const { return ( iHW & 0xf ); }; // | |
41 | ||
42 | // We can also encode a very similar CSP address | |
43 | Int_t GetCSPAddress(Int_t iBranch, Int_t iFEC, Int_t iCSP) const | |
44 | { return ( (iBranch<<11) | (iFEC<<7) | iCSP ); }; // | |
45 | // and for converting back to the individual indices | |
46 | // Branch and FEC methods would just be the same as above | |
47 | Int_t GetCSPFromAddress(Int_t i) const { return ( i & 0x1f ); }; // | |
48 | ||
49 | /* // Below is some placeholder info that can later be added | |
50 | // in AliEMCALGeoUtils, together with the Get methods just above | |
51 | ||
52 | // But which CSP (0..31) corresponds to which ALTRO and Channel is not | |
53 | // given anywhere (CSPs are used for APD biases etc). | |
54 | // So, we add a conversion method for that here also. | |
55 | // The order that the CSPs appear in the data is a bit funky so I include | |
56 | // a mapping array instead of some complicated function | |
57 | static const int fgkNCSP = 32; | |
58 | static const int fgkCspOrder[32] = | |
59 | { // just from ALTRO mapping of chips/channels to CSP | |
60 | 11, 27, 10, 26, 24, 8, 25, 9, // ALTRO 0 | |
61 | 3, 19, 2, 18, 16, 0, 17, 1, // ALTRO 2 | |
62 | 4, 20, 5, 21, 23, 7, 22, 6, // ALTRO 3 | |
63 | 12, 28, 13, 29, 31, 15, 30, 14 // ALTRO 4 | |
64 | }; | |
65 | // This method is not used for reconstruction or so, but just for cross- | |
66 | // checks with the DCS for the APD biases. | |
67 | int GetCSP(int iALTRO, int iChannel) const | |
68 | { | |
69 | int id = iChannel/2; // 2 channels per tower (low and high gain) | |
70 | int ichip = iALTRO; | |
71 | if (ichip>=2) { ichip--; } // there is no ALTRO 1; (0,2,3,4 -> 0,1,2,3) | |
72 | id += ichip*8; // 8 CSPs per ALTRO | |
73 | //return fgkCspOrder[id]; | |
74 | return id; | |
75 | } | |
76 | ||
77 | */ | |
78 | ||
79 | }; | |
80 | ||
81 | #endif |