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 ///////////////////////////////////////////////////////////////////////////////
19 // TRD chamber local track (LTU, tracklet) //
24 ///////////////////////////////////////////////////////////////////////////////
28 #include "AliTRDltuTracklet.h"
30 ClassImp(AliTRDltuTracklet)
32 //_____________________________________________________________________________
33 AliTRDltuTracklet::AliTRDltuTracklet()
46 // AliTRDltuTracklet default constructor
51 //_____________________________________________________________________________
52 AliTRDltuTracklet::AliTRDltuTracklet(Int_t det, Int_t row, Float_t rowz
53 , Float_t slope, Float_t offset, Float_t time
54 , Int_t ncl, Int_t label, Float_t q)
67 // AliTRDltuTracklet constructor
72 //_____________________________________________________________________________
73 AliTRDltuTracklet::~AliTRDltuTracklet()
81 //_____________________________________________________________________________
82 Float_t AliTRDltuTracklet::GetPt(Float_t field) const
85 // Transverse momentum calculation
86 // Curvature R = (fX*fX + fY*fY) / (2 * sin(alpha))
87 // alpha = angle deviation from "infinite momentum"
89 // Consistent with AliTRDmcmTracklet::GetPt(...)
92 Float_t infSlope = TMath::ATan(fY/fX) / TMath::Pi()*180.0;
93 Float_t alpha = fSlope - infSlope;
94 Float_t r = TMath::Sqrt(fX*fX + fY*fY)
95 / (2.0 * TMath::Sin(alpha/180.0*TMath::Pi()));
97 Float_t pt = 0.3 * field * 0.01 * r;
103 //_____________________________________________________________________________
104 Int_t AliTRDltuTracklet::Compare(const TObject *o) const
107 // compare two LTU tracklets according to the intercept point Y1
110 AliTRDltuTracklet *ltutrk = (AliTRDltuTracklet *) o;
112 if (fRow != ltutrk->fRow) {
115 if (fDetector != ltutrk->fDetector) {
119 if (fY < ltutrk->fY) {
122 if (fY == ltutrk->fY) {
130 //_____________________________________________________________________________
131 Float_t AliTRDltuTracklet::GetYproj(Float_t xpl) const
134 // y-projection (bending plane) onto the median plane
137 Float_t yproj = fY + TMath::Tan(fSlope/180.0*TMath::Pi()) * (xpl - fX);
143 //_____________________________________________________________________________
144 Float_t AliTRDltuTracklet::GetZproj(Float_t xpl) const
147 // z-projection (using pad row center) onto the median plane
150 Float_t zproj = fRowz * xpl / fX;