]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDtrackletWord.cxx
code violations fixed
[u/mrichter/AliRoot.git] / TRD / AliTRDtrackletWord.cxx
CommitLineData
52c19022 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16/* $Id: AliTRDtrackletWord.cxx 28397 2008-09-02 09:33:00Z cblume $ */
17
18////////////////////////////////////////////////////////////////////////////
19// //
20// A tracklet word as from FEE //
21// //
22// Author: J. Klein (Jochen.Klein@cern.ch) //
23// //
24////////////////////////////////////////////////////////////////////////////
25
26#include "AliTRDtrackletWord.h"
85c32c86 27#include "AliTRDgeometry.h"
52c19022 28#include "AliLog.h"
29
30ClassImp(AliTRDtrackletWord)
31
85c32c86 32AliTRDgeometry* AliTRDtrackletWord::fgGeo = new AliTRDgeometry;
33
52c19022 34AliTRDtrackletWord::AliTRDtrackletWord(UInt_t trackletWord) :
35 AliTRDtrackletBase(),
36 fHCId(-1),
37 fTrackletWord(trackletWord)
38{
39
40}
41
42AliTRDtrackletWord::AliTRDtrackletWord(UInt_t trackletWord, Int_t hcid) :
43 AliTRDtrackletBase(),
44 fHCId(hcid),
45 fTrackletWord(trackletWord)
46{
47
48}
49
50AliTRDtrackletWord::AliTRDtrackletWord(const AliTRDtrackletWord &rhs) :
51 AliTRDtrackletBase(rhs),
52 fHCId(rhs.fHCId),
53 fTrackletWord(rhs.fTrackletWord)
54{
55
56}
57
58AliTRDtrackletWord::~AliTRDtrackletWord()
59{
60
61}
62
63Int_t AliTRDtrackletWord::GetYbin() const {
64 // returns (signed) value of Y
65 if (fTrackletWord & 0x1000) {
66 return -((~(fTrackletWord-1)) & 0x1fff);
67 }
68 else {
69 return (fTrackletWord & 0x1fff);
70 }
71}
72
73Int_t AliTRDtrackletWord::GetdY() const
74{
75 // returns (signed) value of the deflection length
76 if (fTrackletWord & (1 << 19)) {
77 return -((~((fTrackletWord >> 13) - 1)) & 0x7f);
78 }
79 else {
80 return ((fTrackletWord >> 13) & 0x7f);
81 }
82}