]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDtrackletWord.cxx
handle reference tracks correctly for background subtraction and randomized events
[u/mrichter/AliRoot.git] / TRD / AliTRDtrackletWord.cxx
index 8923f84f6f4063b971dc6c0195c33b277c52c4c8..8c2102fb9266d56a1d058225b41550d07aa40e9a 100644 (file)
 ////////////////////////////////////////////////////////////////////////////
 
 #include "AliTRDtrackletWord.h"
+#include "AliTRDgeometry.h"
+#include "AliTRDpadPlane.h"
 #include "AliLog.h"
 
 ClassImp(AliTRDtrackletWord)
 
+AliTRDgeometry* AliTRDtrackletWord::fgGeo = new AliTRDgeometry;
+
 AliTRDtrackletWord::AliTRDtrackletWord(UInt_t trackletWord) :
   AliTRDtrackletBase(),
   fHCId(-1),
@@ -77,3 +81,16 @@ Int_t AliTRDtrackletWord::GetdY() const
     return ((fTrackletWord >> 13) & 0x7f);
   }
 }
+
+Int_t AliTRDtrackletWord::GetROB() const
+{
+  return 2 * (GetZbin() / 4) + (GetY() > 0 ? 1 : 0);
+}
+
+Int_t AliTRDtrackletWord::GetMCM() const
+{
+  AliTRDpadPlane *pp = fgGeo->GetPadPlane(GetDetector());
+  return (((Int_t) ((GetY()) / pp->GetWidthIPad()) + 72) / 18) % 4
+    + 4 * (GetZbin() % 4);
+}
+