Added a static function to know the TOF sector [0,17] of membership for each TOF...
authordecaro <decaro@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 15 May 2010 21:06:08 +0000 (21:06 +0000)
committerdecaro <decaro@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 15 May 2010 21:06:08 +0000 (21:06 +0000)
TOF/AliTOFGeometry.cxx
TOF/AliTOFGeometry.h

index 2231fe4..308cb67 100644 (file)
@@ -2190,3 +2190,13 @@ void AliTOFGeometry::PadRF2TrackingRF(Float_t *ctrackPos, Float_t *differenceT)
   for (Int_t ii=0; ii<3; ii++) differenceT[ii] = (Float_t)(posT[ii]-padCentreT[ii]);
 
 }
+//-------------------------------------------------------------------------
+
+Int_t AliTOFGeometry::GetTOFsupermodule(const Int_t index)
+{
+  // Return the TOF supermodule where TOF channel index is located
+
+  if (index<0 || index>=NPadXSector()*NSectors()) return -1;
+  else return index/NpadXStrip()/NStripXSector();
+
+}
index e8dcfec..0046d75 100644 (file)
@@ -119,6 +119,7 @@ class AliTOFGeometry: public TObject{
   static void GetStripAndModule(Int_t iStripPerSM, Int_t &iplate, Int_t &istrip); // Return the module and strip per module corresponding to the strip number per SM
   void PadRF2TrackingRF(Float_t *ctrackPos, Float_t *differenceT); // Convert the track coordinates from pad RF to tracking RF
 
+  static Int_t GetTOFsupermodule(const Int_t index); // Return the TOF supermodule where TOF channel index is located
 
   private: