AliRoot Core  edcc906 (edcc906)
AliESDTrdTracklet.cxx
Go to the documentation of this file.
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 
17 //
18 // ESD format for TRD tracklet from FEE used for triggering
19 //
20 // Author: Jochen Klein <jochen.klein@cern.ch>
21 //
23 
24 #include "AliESDTrdTracklet.h"
25 
26 ClassImp(AliESDTrdTracklet)
27 
30  fHCId(-1),
31  fTrackletWord(0)
32 {
33  // default ctor
34  for (int i=3;i--;) fLabel[i] = -1;
35 }
36 
37 AliESDTrdTracklet::AliESDTrdTracklet(UInt_t trackletWord, Short_t hcid, const Int_t* label) :
39  fHCId(hcid),
40  fTrackletWord(trackletWord)
41 {
42  // ctor with given tracklet word (and label)
43  if (label) {
44  for (int i=3;i--;) fLabel[i] = label[i];
45  }
46  else {
47  for (int i=3;i--;) fLabel[i] = -1;
48  }
49 }
50 
52 {
53  // dtor
54 }
55 
57  AliVTrdTracklet(trkl),
58  fHCId(trkl.fHCId),
60 {
61  // copy ctor
62  for (int i=3;i--;) fLabel[i] = trkl.fLabel[i];
63 }
64 
66 {
67  // assignment operator
68 
69  if (this == &trkl)
70  return *this;
71 
73  fHCId = trkl.fHCId;
75  for (int i=3;i--;) fLabel[i] = trkl.fLabel[i];
76 
77  return *this;
78 }
79 
81 {
82  // returns (signed) value of Y
83 
84  if (fTrackletWord & 0x1000) {
85  return -((~(fTrackletWord-1)) & 0x1fff);
86  }
87  else {
88  return (fTrackletWord & 0x1fff);
89  }
90 }
91 
93 {
94  // returns (signed) value of the deflection length
95 
96  if (fTrackletWord & (1 << 19)) {
97  return -((~((fTrackletWord >> 13) - 1)) & 0x7f);
98  }
99  else {
100  return ((fTrackletWord >> 13) & 0x7f);
101  }
102 }
virtual Int_t GetBinY() const
virtual Int_t GetBinDy() const
AliESDTrdTracklet & operator=(const AliESDTrdTracklet &trkl)
AliVTrdTracklet & operator=(const AliVTrdTracklet &track)