]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/ESD/AliESDTrdTracklet.cxx
Fix in the last caall to CleanOwnPrimaryVertex
[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
28const Float_t AliESDTrdTracklet::fgkBinWidthY = 160e-4; // 160 um
29const Float_t AliESDTrdTracklet::fgkBinWidthDy = 140e-4; // 140 um
30const Float_t AliESDTrdTracklet::fgkX0 = 2.21;
31const Float_t AliESDTrdTracklet::fgkDriftLength = 3.;
32
33AliESDTrdTracklet::AliESDTrdTracklet() :
34 TObject(),
35 fHCId(-1),
36 fTrackletWord(0),
37 fLabel(-1)
38{
39 // default ctor
40
41}
42
43AliESDTrdTracklet::AliESDTrdTracklet(UInt_t trackletWord, Short_t hcid, Int_t label) :
44 TObject(),
45 fHCId(hcid),
46 fTrackletWord(trackletWord),
47 fLabel(label)
48{
49 // ctor with given tracklet word (and label)
50}
51
52AliESDTrdTracklet::~AliESDTrdTracklet()
53{
54 // dtor
55}
56
57AliESDTrdTracklet::AliESDTrdTracklet(const AliESDTrdTracklet &trkl) :
58 TObject(trkl),
59 fHCId(trkl.fHCId),
60 fTrackletWord(trkl.fTrackletWord),
61 fLabel(trkl.fLabel)
62{
63 // copy ctor
64
65}
66
67AliESDTrdTracklet& AliESDTrdTracklet::operator=(const AliESDTrdTracklet &trkl)
68{
69 // assignment operator
70
71 if (this == &trkl)
72 return *this;
73
74 TObject::operator=(trkl);
75 fHCId = trkl.fHCId;
76 fTrackletWord = trkl.fTrackletWord;
77 fLabel = trkl.fLabel;
78
79 return *this;
80}
81
82Int_t AliESDTrdTracklet::GetBinY() const
83{
84 // returns (signed) value of Y
85
86 if (fTrackletWord & 0x1000) {
87 return -((~(fTrackletWord-1)) & 0x1fff);
88 }
89 else {
90 return (fTrackletWord & 0x1fff);
91 }
92}
93
94Int_t AliESDTrdTracklet::GetBinDy() const
95{
96 // returns (signed) value of the deflection length
97
98 if (fTrackletWord & (1 << 19)) {
99 return -((~((fTrackletWord >> 13) - 1)) & 0x7f);
100 }
101 else {
102 return ((fTrackletWord >> 13) & 0x7f);
103 }
104}
105
106Float_t AliESDTrdTracklet::GetDyDx() const
107{
108 // returns the deflection over 3 cm drift length
109
110 return GetBinDy() * fgkBinWidthDy/fgkDriftLength;
111}