//We'll just trust the enum to keep everything in line, so that if detectorType
//isn't kPhos then it is kEmCal. Note, however, that this is not necessarily the
//case, if someone intentionally gives another number
- fColumns = fgkEmCalCols;
- fRows = fgkEmCalRows;
- fModules = fgkEmCalModules;
+ fColumns = AliEMCALGeoParams::fgkEMCALCols;
+ fRows = AliEMCALGeoParams::fgkEMCALRows;
+ fModules = AliEMCALGeoParams::fgkEMCALModules;
fCaloString = "EMCAL";
fRowMin = 0;
fRowMax = fRows;
while (in->NextChannel()) {
// counters
- int max = fgkSampleMin, min = fgkSampleMax; // min and max sample values
+ int max = AliEMCALGeoParams::fgkSampleMin, min = AliEMCALGeoParams::fgkSampleMax; // min and max sample values
// for the pedestal calculation
int sampleSum = 0; // sum of samples
#include "TProfile2D.h"
#include "TH2.h"
#include "TObjArray.h"
+#include "AliEMCALGeoParams.h"
class AliCaloRawStreamV3;
class AliCaloAltroMapping;
class AliRawReader;
AliCaloCalibPedestal(const AliCaloCalibPedestal &ped);
AliCaloCalibPedestal& operator = (const AliCaloCalibPedestal &source);
- //Functions to ask for the constants (in case a GUI needs them, for an example
- int GetSampleMax() const {return fgkSampleMax;};
- int GetSampleMin() const {return fgkSampleMin;};
-
// Event processing methods:
Bool_t ProcessEvent(AliRawReader *rawReader);
Bool_t ProcessEvent(AliCaloRawStreamV3 *in);
int fFirstPedestalSample; // first sample to use
int fLastPedestalSample; // last sample to use
- //Constants needed by the class
- static const int fgkSampleMax = 1023; // highest possible sample value (10-bit = 0x3ff)
- static const int fgkSampleMin = 0; // lowest possible sample value
-
+ //Constants needed by the class: EMCAL ones are kept in AliEMCALGeoParams.h
static const int fgkPhosRows = 64; // number of rows per module for PHOS
static const int fgkPhosCols = 56; // number of columns per module for PHOS
static const int fgkPhosModules = 5; // number of modules for PHOS
- static const int fgkEmCalRows = 24; // number of rows per module for EMCAL
- static const int fgkEmCalCols = 48; // number of columns per module for EMCAL
- static const int fgkEmCalModules = 12; // number of modules for EMCAL
-
- ClassDef(AliCaloCalibPedestal,3)
+ ClassDef(AliCaloCalibPedestal, 4)
};
//We'll just trust the enum to keep everything in line, so that if detectorType
//isn't kPhos then it is kEmCal. Note, however, that this is not necessarily the
//case, if someone intentionally gives another number
- fColumns = fgkEmCalCols;
- fRows = fgkEmCalRows;
- fLEDRefs = fgkEmCalLEDRefs;
- fModules = fgkEmCalModules;
+ fColumns = AliEMCALGeoParams::fgkEMCALCols;
+ fRows = AliEMCALGeoParams::fgkEMCALRows;
+ fLEDRefs = AliEMCALGeoParams::fgkEMCALLEDRefs;
+ fModules = AliEMCALGeoParams::fgkEMCALModules;
fCaloString = "EMCAL";
}
while (in->NextChannel()) {
// counters
- int max = fgkSampleMin, min = fgkSampleMax; // min and max sample values
+ int max = AliEMCALGeoParams::fgkSampleMin, min = AliEMCALGeoParams::fgkSampleMax; // min and max sample values
while (in->NextBunch()) {
const UShort_t *sig = in->GetSignals();
#include "TString.h"
#include "TTree.h"
-
+#include "AliEMCALGeoParams.h"
class AliCaloRawStreamV3;
class AliCaloAltroMapping;
class AliRawReader;
int fNEvents; // # events processed
int fNAcceptedEvents; // # events accepted
- //Constants needed by the class
- static const int fgkSampleMax = 1023; // highest possible sample value (10-bit = 0x3ff)
- static const int fgkSampleMin = 0; // lowest possible sample value
-
+ //Constants needed by the class: EMCAL ones are kept in AliEMCALGeoParams.h
static const int fgkPhosRows = 64; // number of rows per module for PHOS
static const int fgkPhosCols = 56; // number of columns per module for PHOS
static const int fgkPhosLEDRefs = 0; // no LED monitor channels for PHOS
static const int fgkPhosModules = 5; // number of modules for PHOS
- static const int fgkEmCalRows = 24; // number of rows per module for EMCAL
- static const int fgkEmCalCols = 48; // number of columns per module for EMCAL
- static const int fgkEmCalLEDRefs = 24; // number of LEDs (reference/monitors) per module for EMCAL; one per StripModule
- static const int fgkEmCalModules = 12; // number of modules for EMCAL
-
// From numbers above: PHOS has more possible towers (17920) than EMCAL (13824)
// so use PHOS numbers to set max. array sizes
static const int fgkMaxTowers = 17920; // fgkPhosModules * fgkPhosCols * fgkPhosRows;
// for LED references; maximum from EMCAL
- static const int fgkMaxRefs = 288; // fgkEmCalModules * fgkEmCalLEDRefs
+ static const int fgkMaxRefs = 288; // AliEMCALGeoParams::fgkEMCALModules * AliEMCALGeoParams::fgkEMCALLEDRefs
static const int fgkNumSecInHr = 3600; // number of seconds in an hour, for the fractional hour conversion on the time graph
int fNLowGain[fgkMaxTowers]; // same, for low gain
int fNRef[fgkMaxRefs * 2]; // same, for LED refs; *2 for both gains
- ClassDef(AliCaloCalibSignal, 3) // don't forget to change version if you change class member list..
+ ClassDef(AliCaloCalibSignal, 4) // don't forget to change version if you change class member list..
};
--- /dev/null
+#ifndef ALIEMCALGEOPARAMS_H
+#define ALIEMCALGEOPARAMS_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id: AliEMCALGeoParams.h $ */
+
+//////////////////////////////////////////////////////////
+// class for holding various parameters; to be used by new
+// AliEMCALGeoUtils class //
+//////////////////////////////////////////////////////////
+
+class AliEMCALGeoParams
+{
+public:
+
+ // general geometry info
+ static const int fgkEMCALModules = 12; // number of modules for EMCAL
+ static const int fgkEMCALRows = 24; // number of rows per module for EMCAL
+ static const int fgkEMCALCols = 48; // number of columns per module for EMCAL
+
+ static const int fgkEMCALLEDRefs = 24; // number of LEDs (reference/monitors) per module for EMCAL; one per StripModule
+
+ // also a few readout related variables:
+ static const int fgkSampleMax = 1023; // highest possible sample value (10-bit = 0x3ff)
+ static const int fgkSampleMin = 0; // lowest possible sample value
+
+ // RAW/AliCaloAltroMapping provides the correspondence information between
+ // an electronics HWAddress (Branch<<1 | FEC<<7 | ALTRO<<4 | Channel)
+ // for the RCUs and which tower (Column and Row) that corresponds to.
+ // For the cases when one doesn't have a Raw stream to decode the HW address
+ // into the other FEE indices, we provide the needed simple methods here
+ // with arguments (within an RCU)
+ Int_t GetHWAddress(Int_t iBranch, Int_t iFEC, Int_t iALTRO, Int_t iChannel) const
+ { return ( (iBranch<<11) | (iFEC<<7) | (iALTRO<<4) | iChannel ); }; //
+ // and for converting back to the individual indices
+ Int_t GetBranch(Int_t iHW) const { return ( (iHW>>11) & 0x1 ); }; //
+ Int_t GetFEC(Int_t iHW) const { return ( (iHW>>7) & 0xf ); }; //
+ Int_t GetAltro(Int_t iHW) const { return ( (iHW>>4) & 0x7 ); }; //
+ Int_t GetChannel(Int_t iHW) const { return ( iHW & 0xf ); }; //
+
+ // We can also encode a very similar CSP address
+ Int_t GetCSPAddress(Int_t iBranch, Int_t iFEC, Int_t iCSP) const
+ { return ( (iBranch<<11) | (iFEC<<7) | iCSP ); }; //
+ // and for converting back to the individual indices
+ // Branch and FEC methods would just be the same as above
+ Int_t GetCSPFromAddress(Int_t i) const { return ( i & 0x1f ); }; //
+
+ /* // Below is some placeholder info that can later be added
+ // in AliEMCALGeoUtils, together with the Get methods just above
+
+ // But which CSP (0..31) corresponds to which ALTRO and Channel is not
+ // given anywhere (CSPs are used for APD biases etc).
+ // So, we add a conversion method for that here also.
+ // The order that the CSPs appear in the data is a bit funky so I include
+ // a mapping array instead of some complicated function
+ static const int fgkNCSP = 32;
+ static const int fgkCspOrder[32] =
+ { // just from ALTRO mapping of chips/channels to CSP
+ 11, 27, 10, 26, 24, 8, 25, 9, // ALTRO 0
+ 3, 19, 2, 18, 16, 0, 17, 1, // ALTRO 2
+ 4, 20, 5, 21, 23, 7, 22, 6, // ALTRO 3
+ 12, 28, 13, 29, 31, 15, 30, 14 // ALTRO 4
+ };
+ // This method is not used for reconstruction or so, but just for cross-
+ // checks with the DCS for the APD biases.
+ int GetCSP(int iALTRO, int iChannel) const
+ {
+ int id = iChannel/2; // 2 channels per tower (low and high gain)
+ int ichip = iALTRO;
+ if (ichip>=2) { ichip--; } // there is no ALTRO 1; (0,2,3,4 -> 0,1,2,3)
+ id += ichip*8; // 8 CSPs per ALTRO
+ //return fgkCspOrder[id];
+ return id;
+ }
+
+ */
+
+};
+
+#endif