/*
$Log$
+Revision 1.11 2007/02/20 15:57:00 decaro
+Raw data update: to read the TOF raw data defined in UNPACKED mode
+
Revision 1.10 2006/12/15 14:01:38 cvetan
Memory leak fixed
volume[4] = iPadZ;
}
+//_____________________________________________________________________________
+
+Int_t AliTOFRawStream::GetIndex(Int_t *detId)
+{
+ //Retrieve calibration channel index
+ const Int_t nSectors = fTOFGeometry->NSectors();
+ const Int_t nPlates = fTOFGeometry->NPlates();
+ const Int_t nStripA = fTOFGeometry->NStripA();
+ const Int_t nStripB = fTOFGeometry->NStripB();
+ const Int_t nStripC = fTOFGeometry->NStripC();
+ const Int_t nPadX = fTOFGeometry->NpadX();
+ const Int_t nPadZ = fTOFGeometry->NpadZ();
+
+
+ Int_t isector = detId[0];
+ if (isector >= nSectors)
+ AliError(Form("Wrong sector number in TOF (%d) !",isector));
+ Int_t iplate = detId[1];
+ if (iplate >= nPlates)
+ AliError(Form("Wrong plate number in TOF (%d) !",iplate));
+ Int_t istrip = detId[2];
+ Int_t ipadz = detId[3];
+ Int_t ipadx = detId[4];
+ Int_t stripOffset = 0;
+ switch (iplate) {
+ case 0:
+ stripOffset = 0;
+ break;
+ case 1:
+ stripOffset = nStripC;
+ break;
+ case 2:
+ stripOffset = nStripC+nStripB;
+ break;
+ case 3:
+ stripOffset = nStripC+nStripB+nStripA;
+ break;
+ case 4:
+ stripOffset = nStripC+nStripB+nStripA+nStripB;
+ break;
+ default:
+ AliError(Form("Wrong plate number in TOF (%d) !",iplate));
+ break;
+ };
+
+ Int_t idet = ((2*(nStripC+nStripB)+nStripA)*nPadZ*nPadX)*isector +
+ (stripOffset*nPadZ*nPadX)+
+ (nPadZ*nPadX)*istrip+
+ (nPadX)*ipadz+
+ ipadx;
+ return idet;
+}
Int_t GetStrip() const {return fStrip;};
Int_t GetPadZ() const {return fPadZ;};
Int_t GetPadX() const {return fPadX;};
+ Int_t GetIndex(Int_t *detId); // Get channel index for Online Calibration
Int_t GetTofBin() const {return fTime;};
Int_t GetToTbin() const {return fToT;};