AliRoot Core  ee782a0 (ee782a0)
AliEMCALGeoParams.h
Go to the documentation of this file.
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 
23 
25 {
26 
27 public:
28 
29  // General geometry info
30  static const int fgkEMCALModules = 22;
31  static const int fgkEMCALRows = 24;
32  static const int fgkEMCALCols = 48;
33 
34  static const int fgkEMCALLEDRefs = 24;
35  static const int fgkEMCALTempSensors = 8;
36 
37  // Strip 0 is the one closest to the FEE crates; different for A (iColumn/2) and C sides
38  Int_t GetStripModule(Int_t iSM, Int_t iCol) const
39  { return ( (iSM%2==0) ? iCol/2 : AliEMCALGeoParams::fgkEMCALLEDRefs - 1 - iCol/2 ); }
40 
41  // also a few readout related variables:
42  // static const int fgkLastAltroDDL = 39; ///< 0..23 (i.e. 24) for EMCAL; 24..39 (i.e. 16) allocated for DCAL
43  static const int fgkSampleMax = 1023;
44  static const int fgkOverflowCut = 950;
45  static const int fgkSampleMin = 0;
46 
47  // TRU numbers
48  static const int fgkEMCALTRUsPerSM = 3;
49  static const int fgkEMCAL2x2PerTRU = 96;
50  static const int fgkEMCALTRURows = 4;
51  static const int fgkEMCALTRUCols = 24;
52 
53  // STU numbers
54  static const int fgkEMCALSTUCols = 48;
55  static const int fgkEMCALSTURows = 64;
56 
57  // RAW/AliCaloAltroMapping provides the correspondence information between
58  // an electronics HWAddress (Branch<<1 | FEC<<7 | ALTRO<<4 | Channel)
59  // for the RCUs and which tower (Column and Row) that corresponds to.
60  // For the cases when one doesn't have a Raw stream to decode the HW address
61  // into the other FEE indices, we provide the needed simple methods here
62  // with arguments (within an RCU)
63  Int_t GetHWAddress(Int_t iBranch, Int_t iFEC, Int_t iALTRO, Int_t iChannel) const
64  { return ( (iBranch<<11) | (iFEC<<7) | (iALTRO<<4) | iChannel ); }
65  // and for converting back to the individual indices
66  Int_t GetBranch(Int_t iHW) const { return ( (iHW>>11) & 0x1 ) ; } //
67  Int_t GetFEC(Int_t iHW) const { return ( (iHW>>7) & 0xf ) ; } //
68  Int_t GetAltro(Int_t iHW) const { return ( (iHW>>4) & 0x7 ) ; } //
69  Int_t GetChannel(Int_t iHW) const { return ( iHW & 0xf ) ; } //
70 
71  // We can also encode a very similar CSP address
72  Int_t GetCSPAddress(Int_t iBranch, Int_t iFEC, Int_t iCSP) const
73  { return ( (iBranch<<11) | (iFEC<<7) | iCSP ); }; //
74  // and for converting back to the individual indices
75  // Branch and FEC methods would just be the same as above
76  Int_t GetCSPFromAddress(Int_t i) const { return ( i & 0x1f ) ; } //
77 
78  /* // Below is some placeholder info that can later be added
79  // in AliEMCALGeometry, together with the Get methods just above
80 
81  // But which CSP (0..31) corresponds to which ALTRO and Channel is not
82  // given anywhere (CSPs are used for APD biases etc).
83  // So, we add a conversion method for that here also.
84  // The order that the CSPs appear in the data is a bit funky so I include
85  // a mapping array instead of some complicated function
86  static const int fgkNCSP = 32;
87  static const int fgkCspOrder[32] =
88  { // just from ALTRO mapping of chips/channels to CSP
89  11, 27, 10, 26, 24, 8, 25, 9, // ALTRO 0
90  3, 19, 2, 18, 16, 0, 17, 1, // ALTRO 2
91  4, 20, 5, 21, 23, 7, 22, 6, // ALTRO 3
92  12, 28, 13, 29, 31, 15, 30, 14 // ALTRO 4
93  };
94  // This method is not used for reconstruction or so, but just for cross-
95  // checks with the DCS for the APD biases.
96  int GetCSP(int iALTRO, int iChannel) const
97  {
98  int id = iChannel/2; // 2 channels per tower (low and high gain)
99  int ichip = iALTRO;
100  if (ichip>=2) { ichip--; } // there is no ALTRO 1; (0,2,3,4 -> 0,1,2,3)
101  id += ichip*8; // 8 CSPs per ALTRO
102  //return fgkCspOrder[id];
103  return id;
104  }
105 
106  */
107 
108 };
109 
110 #endif //ALIEMCALGEOPARAMS_H
static const int fgkSampleMax
highest possible sample value (10-bit = 0x3ff)
static const int fgkEMCALRows
Number of rows per module for EMCAL.
static const int fgkEMCALSTURows
STU rows.
Int_t GetBranch(Int_t iHW) const
Int_t GetFEC(Int_t iHW) const
static const int fgkEMCALLEDRefs
Number of LEDs (reference/monitors) per module for EMCAL; one per StripModule.
static const int fgkOverflowCut
saturation starts around here; also exist as private constant in AliEMCALRawUtils, should probably be replaced
Class for holding various EMCAL basic parameters.
Int_t GetHWAddress(Int_t iBranch, Int_t iFEC, Int_t iALTRO, Int_t iChannel) const
static const int fgkEMCALSTUCols
STU columns.
Int_t GetAltro(Int_t iHW) const
static const int fgkEMCALTRUsPerSM
number of TRU&#39;s in a SuperModule
static const int fgkEMCALTRURows
number of TRU rows
static const int fgkSampleMin
lowest possible sample value
static const int fgkEMCALCols
Number of columns per module for EMCAL.
static const int fgkEMCALTRUCols
number of TRY cols
static const int fgkEMCALModules
Number of modules, 12 for EMCal + 8 for DCAL.
static const int fgkEMCAL2x2PerTRU
number of 2x2&#39;s in a TRU
static const int fgkEMCALTempSensors
Number Temperature sensors per module for EMCAL.
Int_t GetStripModule(Int_t iSM, Int_t iCol) const
Int_t GetCSPAddress(Int_t iBranch, Int_t iFEC, Int_t iCSP) const
Int_t GetCSPFromAddress(Int_t i) const
Int_t GetChannel(Int_t iHW) const