]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/ESD/AliESDTrdTracklet.cxx
Patches for the TRD on-line tracklets and tracks in the AODs.
[u/mrichter/AliRoot.git] / STEER / ESD / AliESDTrdTracklet.cxx
CommitLineData
52cd0cc0 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///////////////////////////////////////////////////////////////////////////////
17//
18// ESD format for TRD tracklet from FEE used for triggering
19//
20// Author: Jochen Klein <jochen.klein@cern.ch>
21//
22///////////////////////////////////////////////////////////////////////////////
23
24#include "AliESDTrdTracklet.h"
25
26ClassImp(AliESDTrdTracklet)
27
52cd0cc0 28AliESDTrdTracklet::AliESDTrdTracklet() :
9aa7ebff 29 AliVTrdTracklet(),
52cd0cc0 30 fHCId(-1),
31 fTrackletWord(0),
32 fLabel(-1)
33{
34 // default ctor
35
36}
37
38AliESDTrdTracklet::AliESDTrdTracklet(UInt_t trackletWord, Short_t hcid, Int_t label) :
9aa7ebff 39 AliVTrdTracklet(),
52cd0cc0 40 fHCId(hcid),
41 fTrackletWord(trackletWord),
42 fLabel(label)
43{
44 // ctor with given tracklet word (and label)
45}
46
47AliESDTrdTracklet::~AliESDTrdTracklet()
48{
49 // dtor
50}
51
52AliESDTrdTracklet::AliESDTrdTracklet(const AliESDTrdTracklet &trkl) :
9aa7ebff 53 AliVTrdTracklet(trkl),
52cd0cc0 54 fHCId(trkl.fHCId),
55 fTrackletWord(trkl.fTrackletWord),
56 fLabel(trkl.fLabel)
57{
58 // copy ctor
59
60}
61
62AliESDTrdTracklet& AliESDTrdTracklet::operator=(const AliESDTrdTracklet &trkl)
63{
64 // assignment operator
65
66 if (this == &trkl)
67 return *this;
68
9aa7ebff 69 AliVTrdTracklet::operator=(trkl);
52cd0cc0 70 fHCId = trkl.fHCId;
71 fTrackletWord = trkl.fTrackletWord;
72 fLabel = trkl.fLabel;
73
74 return *this;
75}
76
77Int_t AliESDTrdTracklet::GetBinY() const
78{
79 // returns (signed) value of Y
80
81 if (fTrackletWord & 0x1000) {
82 return -((~(fTrackletWord-1)) & 0x1fff);
83 }
84 else {
85 return (fTrackletWord & 0x1fff);
86 }
87}
88
89Int_t AliESDTrdTracklet::GetBinDy() const
90{
91 // returns (signed) value of the deflection length
92
93 if (fTrackletWord & (1 << 19)) {
94 return -((~((fTrackletWord >> 13) - 1)) & 0x7f);
95 }
96 else {
97 return ((fTrackletWord >> 13) & 0x7f);
98 }
99}