1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 /* $Id: AliTRDtrackletMCM.cxx 28397 2008-09-02 09:33:00Z cblume $ */
18 ////////////////////////////////////////////////////////////////////////////
22 // Author: J. Klein (Jochen.Klein@cern.ch) //
24 ////////////////////////////////////////////////////////////////////////////
26 #include "AliTRDtrackletMCM.h"
29 ClassImp(AliTRDtrackletMCM)
31 AliTRDtrackletMCM::AliTRDtrackletMCM(UInt_t trackletWord) :
35 fTrackletWord(trackletWord),
45 fGeo = new AliTRDgeometry();
48 AliTRDtrackletMCM::AliTRDtrackletMCM(UInt_t trackletWord, Int_t hcid) :
52 fTrackletWord(trackletWord),
62 fGeo = new AliTRDgeometry();
65 AliTRDtrackletMCM::AliTRDtrackletMCM(UInt_t trackletWord, Int_t hcid, Int_t rob, Int_t mcm) :
69 fTrackletWord(trackletWord),
79 fGeo = new AliTRDgeometry();
82 AliTRDtrackletMCM::AliTRDtrackletMCM(const AliTRDtrackletMCM &rhs) :
83 AliTRDtrackletBase(rhs),
86 fTrackletWord(rhs.fTrackletWord),
96 fGeo = new AliTRDgeometry();
99 AliTRDtrackletMCM::~AliTRDtrackletMCM()
104 Int_t AliTRDtrackletMCM::GetYbin() const {
105 // returns (signed) value of Y
106 if (fTrackletWord & 0x1000) {
107 return -((~(fTrackletWord-1)) & 0x1fff);
110 return (fTrackletWord & 0x1fff);
114 Int_t AliTRDtrackletMCM::GetdY() const
116 // returns (signed) value of the deflection length
117 if (fTrackletWord & (1 << 19)) {
118 return -((~((fTrackletWord >> 13) - 1)) & 0x7f);
121 return ((fTrackletWord >> 13) & 0x7f);