/*
$Log$
+Revision 1.20.1 2007/05/19 decaro
+ Added the following methods:
+ GetVolumeIndices(Int_t index, Int_t *det), to get
+ the volume indices (sector, plate, strip, padz, padx,
+ stored respectively in det[0], det[1], det[2], det[3], det[4])
+ from the calibration channel index;
+ NStrip(Int_t nPlate), to get the strips number
+ per each kind of TOF module.
+
Revision 1.20 2007/10/08 17:52:55 decaro
hole region in front of PHOS detector: update of sectors' numbers
ipadx;
return idet;
}
+//_____________________________________________________________________________
+
+void AliTOFGeometry::GetVolumeIndices(Int_t index, Int_t *detId)
+{
+ //
+ // Retrieve volume indices from the calibration channel index
+ //
+
+ detId[0] = index/NpadXStrip()/NStripXSector();
+
+ Int_t dummyStripPerModule =
+ ( index - ( NStripXSector()*NpadXStrip()*detId[0]) ) / NpadXStrip();
+ if (dummyStripPerModule<kNStripC) {
+ detId[1] = 0;
+ detId[2] = dummyStripPerModule;
+ }
+ else if (dummyStripPerModule>=kNStripC && dummyStripPerModule<kNStripC+kNStripB) {
+ detId[1] = 1;
+ detId[2] = dummyStripPerModule-kNStripC;
+ }
+ else if (dummyStripPerModule>=kNStripC+kNStripB && dummyStripPerModule<kNStripC+kNStripB+kNStripA) {
+ detId[1] = 2;
+ detId[2] = dummyStripPerModule-kNStripC-kNStripB;
+ }
+ else if (dummyStripPerModule>=kNStripC+kNStripB+kNStripA && dummyStripPerModule<kNStripC+kNStripB+kNStripA+kNStripB) {
+ detId[1] = 3;
+ detId[2] = dummyStripPerModule-kNStripC-kNStripB-kNStripA;
+ }
+ else if (dummyStripPerModule>=kNStripC+kNStripB+kNStripA+kNStripB && dummyStripPerModule<NStripXSector()) {
+ detId[1] = 4;
+ detId[2] = dummyStripPerModule-kNStripC-kNStripB-kNStripA-kNStripB;
+ }
+
+ Int_t padPerStrip = ( index - ( NStripXSector()*NpadXStrip()*detId[0]) ) - dummyStripPerModule*NpadXStrip();
+
+ detId[3] = padPerStrip / kNpadX;
+ detId[4] = padPerStrip - detId[3]*kNpadX;
+
+}
+//_____________________________________________________________________________
+Int_t AliTOFGeometry::NStrip(Int_t nPlate)
+{
+ //
+ // Returns the strips number for the plate number 'nPlate'
+ //
+ Int_t nStrips = kNStripC;
+ switch(nPlate) {
+ case 2:
+ nStrips = kNStripA;
+ break;
+ case 1:
+ case 3:
+ nStrips = kNStripB;
+ break;
+ case 0:
+ case 4:
+ default:
+ nStrips = kNStripC;
+ break;
+ }
+
+ return nStrips;
+
+}
static Int_t NStripA() { return kNStripA;};
static Int_t NStripB() { return kNStripB;};
static Int_t NStripC() { return kNStripC;};
+ static Int_t NStrip(Int_t nPlate);
static Int_t NMaxNstrip() { return kMaxNstrip;};
static Int_t NpadX() { return kNpadX;};
static Int_t NpadZ() { return kNpadZ;};
static Int_t NpadXStrip() { return kNpadX*kNpadZ;};
static Int_t NSectors() { return kNSectors;};
static Int_t NPlates() { return kNPlates;};
- static Int_t NStripXSector() { return (kNStripA + 2*kNStripB +
+ static Int_t NStripXSector() { return (kNStripA + 2*kNStripB +
2*kNStripC);};
- static Int_t NPadXSector() { return (kNStripA + 2*kNStripB +
+ static Int_t NPadXSector() { return (kNStripA + 2*kNStripB +
2*kNStripC)*kNpadX*kNpadZ;};
- static Float_t RinTOF() { return fgkxTOF;};
- static Float_t Rmin() { return fgkRmin;};
- static Float_t Rmax() { return fgkRmax;};
+ static Float_t RinTOF() { return fgkxTOF;};
+ static Float_t Rmin() { return fgkRmin;};
+ static Float_t Rmax() { return fgkRmax;};
static Float_t XPad() { return fgkXPad;};
static Float_t ZPad() { return fgkZPad;};
static Float_t GetDistances(Int_t iplate, Int_t istrip) {return fgkDistances[iplate][istrip];};
static Int_t GetIndex(Int_t *detId); // Get channel index from det Id (for calibration mainly)
+ static void GetVolumeIndices(Int_t index, Int_t *detId); // Get volume index from channel index
private:
static const Float_t fgkTdcBin; // time-of-flight bin width [ps]
static const Float_t fgkToTBin; // time-over-threshold bin width [ps]
- ClassDef(AliTOFGeometry,5) // TOF Geometry base class
+ ClassDef(AliTOFGeometry,6) // TOF Geometry base class
};
#endif