1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 ///////////////////////////////////////////////////////////////////////////////
18 // ESD format for TRD tracklet from FEE used for triggering
20 // Author: Jochen Klein <jochen.klein@cern.ch>
22 ///////////////////////////////////////////////////////////////////////////////
24 #include "AliESDTrdTracklet.h"
26 ClassImp(AliESDTrdTracklet)
28 const Float_t AliESDTrdTracklet::fgkBinWidthY = 160e-4; // 160 um
29 const Float_t AliESDTrdTracklet::fgkBinWidthDy = 140e-4; // 140 um
30 const Float_t AliESDTrdTracklet::fgkX0 = 2.21;
31 const Float_t AliESDTrdTracklet::fgkDriftLength = 3.;
33 AliESDTrdTracklet::AliESDTrdTracklet() :
43 AliESDTrdTracklet::AliESDTrdTracklet(UInt_t trackletWord, Short_t hcid, Int_t label) :
46 fTrackletWord(trackletWord),
49 // ctor with given tracklet word (and label)
52 AliESDTrdTracklet::~AliESDTrdTracklet()
57 AliESDTrdTracklet::AliESDTrdTracklet(const AliESDTrdTracklet &trkl) :
60 fTrackletWord(trkl.fTrackletWord),
67 AliESDTrdTracklet& AliESDTrdTracklet::operator=(const AliESDTrdTracklet &trkl)
69 // assignment operator
74 TObject::operator=(trkl);
76 fTrackletWord = trkl.fTrackletWord;
82 Int_t AliESDTrdTracklet::GetBinY() const
84 // returns (signed) value of Y
86 if (fTrackletWord & 0x1000) {
87 return -((~(fTrackletWord-1)) & 0x1fff);
90 return (fTrackletWord & 0x1fff);
94 Int_t AliESDTrdTracklet::GetBinDy() const
96 // returns (signed) value of the deflection length
98 if (fTrackletWord & (1 << 19)) {
99 return -((~((fTrackletWord >> 13) - 1)) & 0x7f);
102 return ((fTrackletWord >> 13) & 0x7f);
106 Float_t AliESDTrdTracklet::GetDyDx() const
108 // returns the deflection over 3 cm drift length
110 return GetBinDy() * fgkBinWidthDy/fgkDriftLength;