Line data Source code
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 :
26 172 : ClassImp(AliESDTrdTracklet)
27 :
28 : AliESDTrdTracklet::AliESDTrdTracklet() :
29 1011 : AliVTrdTracklet(),
30 1011 : fHCId(-1),
31 1011 : fTrackletWord(0),
32 1011 : fLabel(-1)
33 5055 : {
34 : // default ctor
35 :
36 2022 : }
37 :
38 : AliESDTrdTracklet::AliESDTrdTracklet(UInt_t trackletWord, Short_t hcid, Int_t label) :
39 719 : AliVTrdTracklet(),
40 719 : fHCId(hcid),
41 719 : fTrackletWord(trackletWord),
42 719 : fLabel(label)
43 3595 : {
44 : // ctor with given tracklet word (and label)
45 1438 : }
46 :
47 : AliESDTrdTracklet::~AliESDTrdTracklet()
48 6920 : {
49 : // dtor
50 6920 : }
51 :
52 : AliESDTrdTracklet::AliESDTrdTracklet(const AliESDTrdTracklet &trkl) :
53 0 : AliVTrdTracklet(trkl),
54 0 : fHCId(trkl.fHCId),
55 0 : fTrackletWord(trkl.fTrackletWord),
56 0 : fLabel(trkl.fLabel)
57 0 : {
58 : // copy ctor
59 :
60 0 : }
61 :
62 : AliESDTrdTracklet& AliESDTrdTracklet::operator=(const AliESDTrdTracklet &trkl)
63 : {
64 : // assignment operator
65 :
66 0 : if (this == &trkl)
67 0 : return *this;
68 :
69 0 : AliVTrdTracklet::operator=(trkl);
70 0 : fHCId = trkl.fHCId;
71 0 : fTrackletWord = trkl.fTrackletWord;
72 0 : fLabel = trkl.fLabel;
73 :
74 0 : return *this;
75 0 : }
76 :
77 : Int_t AliESDTrdTracklet::GetBinY() const
78 : {
79 : // returns (signed) value of Y
80 :
81 584 : if (fTrackletWord & 0x1000) {
82 207 : return -((~(fTrackletWord-1)) & 0x1fff);
83 : }
84 : else {
85 85 : return (fTrackletWord & 0x1fff);
86 : }
87 292 : }
88 :
89 : Int_t AliESDTrdTracklet::GetBinDy() const
90 : {
91 : // returns (signed) value of the deflection length
92 :
93 0 : if (fTrackletWord & (1 << 19)) {
94 0 : return -((~((fTrackletWord >> 13) - 1)) & 0x7f);
95 : }
96 : else {
97 0 : return ((fTrackletWord >> 13) & 0x7f);
98 : }
99 0 : }
|