]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONTrackParam.cxx
new trigger code set to default
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackParam.cxx
CommitLineData
a9e2aefa 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
88cb7938 16/* $Id$ */
a9e2aefa 17
3831f268 18///////////////////////////////////////////////////
19//
20// Track parameters
21// in
22// ALICE
23// dimuon
24// spectrometer
a9e2aefa 25//
3831f268 26///////////////////////////////////////////////////
a9e2aefa 27
58443fe3 28//#include <Riostream.h>
3831f268 29#include "AliMUON.h"
a9e2aefa 30#include "AliMUONTrackParam.h"
06c11448 31#include "AliMUONConstants.h"
211c52eb 32#include "AliESDMuonTrack.h"
a9e2aefa 33#include "AliRun.h"
94de3818 34#include "AliMagF.h"
8c343c7c 35#include "AliLog.h"
a9e2aefa 36
37ClassImp(AliMUONTrackParam) // Class implementation in ROOT context
38
61adb9bd 39 //_________________________________________________________________________
30178c30 40AliMUONTrackParam::AliMUONTrackParam()
54d7ba50 41 : TObject(),
42 fInverseBendingMomentum(0.),
43 fBendingSlope(0.),
44 fNonBendingSlope(0.),
45 fZ(0.),
46 fBendingCoor(0.),
47 fNonBendingCoor(0.)
30178c30 48{
49// Constructor
50
30178c30 51}
61adb9bd 52
30178c30 53 //_________________________________________________________________________
54AliMUONTrackParam&
55AliMUONTrackParam::operator=(const AliMUONTrackParam& theMUONTrackParam)
61adb9bd 56{
58443fe3 57 // Asignment operator
30178c30 58 if (this == &theMUONTrackParam)
61adb9bd 59 return *this;
60
30178c30 61 // base class assignement
62 TObject::operator=(theMUONTrackParam);
63
64 fInverseBendingMomentum = theMUONTrackParam.fInverseBendingMomentum;
65 fBendingSlope = theMUONTrackParam.fBendingSlope;
66 fNonBendingSlope = theMUONTrackParam.fNonBendingSlope;
67 fZ = theMUONTrackParam.fZ;
68 fBendingCoor = theMUONTrackParam.fBendingCoor;
69 fNonBendingCoor = theMUONTrackParam.fNonBendingCoor;
61adb9bd 70
71 return *this;
72}
73 //_________________________________________________________________________
30178c30 74AliMUONTrackParam::AliMUONTrackParam(const AliMUONTrackParam& theMUONTrackParam)
54d7ba50 75 : TObject(theMUONTrackParam),
76 fInverseBendingMomentum(theMUONTrackParam.fInverseBendingMomentum),
77 fBendingSlope(theMUONTrackParam.fBendingSlope),
78 fNonBendingSlope(theMUONTrackParam.fNonBendingSlope),
79 fZ(theMUONTrackParam.fZ),
80 fBendingCoor(theMUONTrackParam.fBendingCoor),
81 fNonBendingCoor(theMUONTrackParam.fNonBendingCoor)
61adb9bd 82{
58443fe3 83 // Copy constructor
54d7ba50 84
61adb9bd 85}
a9e2aefa 86
211c52eb 87 //_________________________________________________________________________
88void AliMUONTrackParam::GetParamFrom(const AliESDMuonTrack& esdMuonTrack)
89{
90 // assigned value form ESD track.
91 fInverseBendingMomentum = esdMuonTrack.GetInverseBendingMomentum();
92 fBendingSlope = TMath::Tan(esdMuonTrack.GetThetaY());
93 fNonBendingSlope = TMath::Tan(esdMuonTrack.GetThetaX());
94 fZ = esdMuonTrack.GetZ();
95 fBendingCoor = esdMuonTrack.GetBendingCoor();
96 fNonBendingCoor = esdMuonTrack.GetNonBendingCoor();
97}
98
99 //_________________________________________________________________________
100void AliMUONTrackParam::SetParamFor(AliESDMuonTrack& esdMuonTrack)
101{
102 // assigned value form ESD track.
103 esdMuonTrack.SetInverseBendingMomentum(fInverseBendingMomentum);
104 esdMuonTrack.SetThetaX(TMath::ATan(fNonBendingSlope));
105 esdMuonTrack.SetThetaY(TMath::ATan(fBendingSlope));
106 esdMuonTrack.SetZ(fZ);
107 esdMuonTrack.SetBendingCoor(fBendingCoor);
108 esdMuonTrack.SetNonBendingCoor(fNonBendingCoor);
109}
110
a9e2aefa 111 //__________________________________________________________________________
112void AliMUONTrackParam::ExtrapToZ(Double_t Z)
113{
114 // Track parameter extrapolation to the plane at "Z".
115 // On return, the track parameters resulting from the extrapolation
116 // replace the current track parameters.
a9e2aefa 117 if (this->fZ == Z) return; // nothing to be done if same Z
118 Double_t forwardBackward; // +1 if forward, -1 if backward
5b64e914 119 if (Z < this->fZ) forwardBackward = 1.0; // spectro. z<0
a9e2aefa 120 else forwardBackward = -1.0;
a6f03ddb 121 Double_t vGeant3[7], vGeant3New[7]; // 7 in parameter ????
a9e2aefa 122 Int_t iGeant3, stepNumber;
123 Int_t maxStepNumber = 5000; // in parameter ????
124 // For safety: return kTRUE or kFALSE ????
a6f03ddb 125 // Parameter vector for calling EXTRAP_ONESTEP
a9e2aefa 126 SetGeant3Parameters(vGeant3, forwardBackward);
956019b6 127 // sign of charge (sign of fInverseBendingMomentum if forward motion)
a6f03ddb 128 // must be changed if backward extrapolation
956019b6 129 Double_t chargeExtrap = forwardBackward *
130 TMath::Sign(Double_t(1.0), this->fInverseBendingMomentum);
a9e2aefa 131 Double_t stepLength = 6.0; // in parameter ????
132 // Extrapolation loop
133 stepNumber = 0;
5b64e914 134 while (((-forwardBackward * (vGeant3[2] - Z)) <= 0.0) && // spectro. z<0
a9e2aefa 135 (stepNumber < maxStepNumber)) {
136 stepNumber++;
a6f03ddb 137 // Option for switching between helix and Runge-Kutta ????
4d03a78e 138 //ExtrapOneStepRungekutta(chargeExtrap, stepLength, vGeant3, vGeant3New);
139 ExtrapOneStepHelix(chargeExtrap, stepLength, vGeant3, vGeant3New);
5b64e914 140 if ((-forwardBackward * (vGeant3New[2] - Z)) > 0.0) break; // one is beyond Z spectro. z<0
a9e2aefa 141 // better use TArray ????
142 for (iGeant3 = 0; iGeant3 < 7; iGeant3++)
143 {vGeant3[iGeant3] = vGeant3New[iGeant3];}
144 }
145 // check maxStepNumber ????
a9e2aefa 146 // Interpolation back to exact Z (2nd order)
147 // should be in function ???? using TArray ????
148 Double_t dZ12 = vGeant3New[2] - vGeant3[2]; // 1->2
1e2b8bb7 149 if (TMath::Abs(dZ12) > 0) {
150 Double_t dZ1i = Z - vGeant3[2]; // 1-i
151 Double_t dZi2 = vGeant3New[2] - Z; // i->2
152 Double_t xPrime = (vGeant3New[0] - vGeant3[0]) / dZ12;
153 Double_t xSecond =
154 ((vGeant3New[3] / vGeant3New[5]) - (vGeant3[3] / vGeant3[5])) / dZ12;
155 Double_t yPrime = (vGeant3New[1] - vGeant3[1]) / dZ12;
156 Double_t ySecond =
157 ((vGeant3New[4] / vGeant3New[5]) - (vGeant3[4] / vGeant3[5])) / dZ12;
158 vGeant3[0] = vGeant3[0] + xPrime * dZ1i - 0.5 * xSecond * dZ1i * dZi2; // X
159 vGeant3[1] = vGeant3[1] + yPrime * dZ1i - 0.5 * ySecond * dZ1i * dZi2; // Y
160 vGeant3[2] = Z; // Z
161 Double_t xPrimeI = xPrime - 0.5 * xSecond * (dZi2 - dZ1i);
162 Double_t yPrimeI = yPrime - 0.5 * ySecond * (dZi2 - dZ1i);
163 // (PX, PY, PZ)/PTOT assuming forward motion
164 vGeant3[5] =
165 1.0 / TMath::Sqrt(1.0 + xPrimeI * xPrimeI + yPrimeI * yPrimeI); // PZ/PTOT
166 vGeant3[3] = xPrimeI * vGeant3[5]; // PX/PTOT
167 vGeant3[4] = yPrimeI * vGeant3[5]; // PY/PTOT
168 } else {
169 AliWarning(Form("Extrap. to Z not reached, Z = %f",Z));
170 }
956019b6 171 // Track parameters from Geant3 parameters,
172 // with charge back for forward motion
173 GetFromGeant3Parameters(vGeant3, chargeExtrap * forwardBackward);
a9e2aefa 174}
175
176 //__________________________________________________________________________
177void AliMUONTrackParam::SetGeant3Parameters(Double_t *VGeant3, Double_t ForwardBackward)
178{
179 // Set vector of Geant3 parameters pointed to by "VGeant3"
180 // from track parameters in current AliMUONTrackParam.
181 // Since AliMUONTrackParam is only geometry, one uses "ForwardBackward"
182 // to know whether the particle is going forward (+1) or backward (-1).
183 VGeant3[0] = this->fNonBendingCoor; // X
184 VGeant3[1] = this->fBendingCoor; // Y
185 VGeant3[2] = this->fZ; // Z
186 Double_t pYZ = TMath::Abs(1.0 / this->fInverseBendingMomentum);
187 Double_t pZ =
188 pYZ / TMath::Sqrt(1.0 + this->fBendingSlope * this->fBendingSlope);
189 VGeant3[6] =
190 TMath::Sqrt(pYZ * pYZ +
191 pZ * pZ * this->fNonBendingSlope * this->fNonBendingSlope); // PTOT
5b64e914 192 VGeant3[5] = -ForwardBackward * pZ / VGeant3[6]; // PZ/PTOT spectro. z<0
a9e2aefa 193 VGeant3[3] = this->fNonBendingSlope * VGeant3[5]; // PX/PTOT
194 VGeant3[4] = this->fBendingSlope * VGeant3[5]; // PY/PTOT
195}
196
197 //__________________________________________________________________________
198void AliMUONTrackParam::GetFromGeant3Parameters(Double_t *VGeant3, Double_t Charge)
199{
200 // Get track parameters in current AliMUONTrackParam
956019b6 201 // from Geant3 parameters pointed to by "VGeant3",
202 // assumed to be calculated for forward motion in Z.
a9e2aefa 203 // "InverseBendingMomentum" is signed with "Charge".
204 this->fNonBendingCoor = VGeant3[0]; // X
205 this->fBendingCoor = VGeant3[1]; // Y
206 this->fZ = VGeant3[2]; // Z
207 Double_t pYZ = VGeant3[6] * TMath::Sqrt(1.0 - VGeant3[3] * VGeant3[3]);
208 this->fInverseBendingMomentum = Charge / pYZ;
209 this->fBendingSlope = VGeant3[4] / VGeant3[5];
210 this->fNonBendingSlope = VGeant3[3] / VGeant3[5];
211}
212
213 //__________________________________________________________________________
214void AliMUONTrackParam::ExtrapToStation(Int_t Station, AliMUONTrackParam *TrackParam)
215{
216 // Track parameters extrapolated from current track parameters ("this")
217 // to both chambers of the station(0..) "Station"
218 // are returned in the array (dimension 2) of track parameters
219 // pointed to by "TrackParam" (index 0 and 1 for first and second chambers).
220 Double_t extZ[2], z1, z2;
ecfa008b 221 Int_t i1 = -1, i2 = -1; // = -1 to avoid compilation warnings
a9e2aefa 222 // range of Station to be checked ????
06c11448 223 z1 = AliMUONConstants::DefaultChamberZ(2 * Station);
224 z2 = AliMUONConstants::DefaultChamberZ(2 * Station + 1);
a9e2aefa 225 // First and second Z to extrapolate at
226 if ((z1 > this->fZ) && (z2 > this->fZ)) {i1 = 0; i2 = 1;}
227 else if ((z1 < this->fZ) && (z2 < this->fZ)) {i1 = 1; i2 = 0;}
228 else {
8c343c7c 229 AliError(Form("Starting Z (%f) in between z1 (%f) and z2 (%f) of station(0..)%d",this->fZ,z1,z2,Station));
230// cout << "ERROR in AliMUONTrackParam::CreateExtrapSegmentInStation" << endl;
231// cout << "Starting Z (" << this->fZ << ") in between z1 (" << z1 <<
232// ") and z2 (" << z2 << ") of station(0..) " << Station << endl;
a9e2aefa 233 }
234 extZ[i1] = z1;
235 extZ[i2] = z2;
236 // copy of track parameters
237 TrackParam[i1] = *this;
238 // first extrapolation
239 (&(TrackParam[i1]))->ExtrapToZ(extZ[0]);
240 TrackParam[i2] = TrackParam[i1];
241 // second extrapolation
242 (&(TrackParam[i2]))->ExtrapToZ(extZ[1]);
243 return;
244}
245
04b5ea16 246 //__________________________________________________________________________
889a0215 247void AliMUONTrackParam::ExtrapToVertex(Double_t xVtx, Double_t yVtx, Double_t zVtx)
04b5ea16 248{
249 // Extrapolation to the vertex.
250 // Returns the track parameters resulting from the extrapolation,
251 // in the current TrackParam.
956019b6 252 // Changes parameters according to Branson correction through the absorber
04b5ea16 253
5b64e914 254 Double_t zAbsorber = -503.0; // to be coherent with the Geant absorber geometry !!!!
255 // spectro. (z<0)
04b5ea16 256 // Extrapolates track parameters upstream to the "Z" end of the front absorber
b45fd22b 257 ExtrapToZ(zAbsorber); // !!!
5b64e914 258 // Makes Branson correction (multiple scattering + energy loss)
889a0215 259 BransonCorrection(xVtx,yVtx,zVtx);
5b64e914 260 // Makes a simple magnetic field correction through the absorber
b45fd22b 261 FieldCorrection(zAbsorber);
04b5ea16 262}
263
43af2cb6 264
265// Keep this version for future developments
04b5ea16 266 //__________________________________________________________________________
43af2cb6 267// void AliMUONTrackParam::BransonCorrection()
268// {
269// // Branson correction of track parameters
270// // the entry parameters have to be calculated at the end of the absorber
271// Double_t zEndAbsorber, zBP, xBP, yBP;
272// Double_t pYZ, pX, pY, pZ, pTotal, xEndAbsorber, yEndAbsorber, radiusEndAbsorber2, pT, theta;
273// Int_t sign;
274// // Would it be possible to calculate all that from Geant configuration ????
275// // and to get the Branson parameters from a function in ABSO module ????
276// // with an eventual contribution from other detectors like START ????
277// // Radiation lengths outer part theta > 3 degres
278// static Double_t x01[9] = { 18.8, // C (cm)
279// 10.397, // Concrete (cm)
280// 0.56, // Plomb (cm)
281// 47.26, // Polyethylene (cm)
282// 0.56, // Plomb (cm)
283// 47.26, // Polyethylene (cm)
284// 0.56, // Plomb (cm)
285// 47.26, // Polyethylene (cm)
286// 0.56 }; // Plomb (cm)
287// // inner part theta < 3 degres
288// static Double_t x02[3] = { 18.8, // C (cm)
289// 10.397, // Concrete (cm)
290// 0.35 }; // W (cm)
291// // z positions of the materials inside the absober outer part theta > 3 degres
292// static Double_t z1[10] = { 90, 315, 467, 472, 477, 482, 487, 492, 497, 502 };
293// // inner part theta < 3 degres
294// static Double_t z2[4] = { 90, 315, 467, 503 };
295// static Bool_t first = kTRUE;
296// static Double_t zBP1, zBP2, rLimit;
297// // Calculates z positions of the Branson's planes: zBP1 for outer part and zBP2 for inner part (only at the first call)
298// if (first) {
299// first = kFALSE;
300// Double_t aNBP = 0.0;
301// Double_t aDBP = 0.0;
302// Int_t iBound;
303
304// for (iBound = 0; iBound < 9; iBound++) {
305// aNBP = aNBP +
306// (z1[iBound+1] * z1[iBound+1] * z1[iBound+1] -
307// z1[iBound] * z1[iBound] * z1[iBound] ) / x01[iBound];
308// aDBP = aDBP +
309// (z1[iBound+1] * z1[iBound+1] - z1[iBound] * z1[iBound] ) / x01[iBound];
310// }
311// zBP1 = (2.0 * aNBP) / (3.0 * aDBP);
312// aNBP = 0.0;
313// aDBP = 0.0;
314// for (iBound = 0; iBound < 3; iBound++) {
315// aNBP = aNBP +
316// (z2[iBound+1] * z2[iBound+1] * z2[iBound+1] -
317// z2[iBound] * z2[iBound ] * z2[iBound] ) / x02[iBound];
318// aDBP = aDBP +
319// (z2[iBound+1] * z2[iBound+1] - z2[iBound] * z2[iBound]) / x02[iBound];
320// }
321// zBP2 = (2.0 * aNBP) / (3.0 * aDBP);
322// rLimit = z2[3] * TMath::Tan(3.0 * (TMath::Pi()) / 180.);
323// }
324
325// pYZ = TMath::Abs(1.0 / fInverseBendingMomentum);
326// sign = 1;
327// if (fInverseBendingMomentum < 0) sign = -1;
328// pZ = pYZ / (TMath::Sqrt(1.0 + fBendingSlope * fBendingSlope));
329// pX = pZ * fNonBendingSlope;
330// pY = pZ * fBendingSlope;
331// pTotal = TMath::Sqrt(pYZ *pYZ + pX * pX);
332// xEndAbsorber = fNonBendingCoor;
333// yEndAbsorber = fBendingCoor;
334// radiusEndAbsorber2 = xEndAbsorber * xEndAbsorber + yEndAbsorber * yEndAbsorber;
335
336// if (radiusEndAbsorber2 > rLimit*rLimit) {
337// zEndAbsorber = z1[9];
338// zBP = zBP1;
339// } else {
340// zEndAbsorber = z2[3];
341// zBP = zBP2;
342// }
343
344// xBP = xEndAbsorber - (pX / pZ) * (zEndAbsorber - zBP);
345// yBP = yEndAbsorber - (pY / pZ) * (zEndAbsorber - zBP);
346
347// // new parameters after Branson and energy loss corrections
348// pZ = pTotal * zBP / TMath::Sqrt(xBP * xBP + yBP * yBP + zBP * zBP);
349// pX = pZ * xBP / zBP;
350// pY = pZ * yBP / zBP;
351// fBendingSlope = pY / pZ;
352// fNonBendingSlope = pX / pZ;
353
354// pT = TMath::Sqrt(pX * pX + pY * pY);
355// theta = TMath::ATan2(pT, pZ);
356// pTotal =
357// TotalMomentumEnergyLoss(rLimit, pTotal, theta, xEndAbsorber, yEndAbsorber);
358
359// fInverseBendingMomentum = (sign / pTotal) *
360// TMath::Sqrt(1.0 +
361// fBendingSlope * fBendingSlope +
362// fNonBendingSlope * fNonBendingSlope) /
363// TMath::Sqrt(1.0 + fBendingSlope * fBendingSlope);
364
365// // vertex position at (0,0,0)
366// // should be taken from vertex measurement ???
367// fBendingCoor = 0.0;
368// fNonBendingCoor = 0;
369// fZ= 0;
370// }
371
889a0215 372void AliMUONTrackParam::BransonCorrection(Double_t xVtx,Double_t yVtx,Double_t zVtx)
04b5ea16 373{
374 // Branson correction of track parameters
375 // the entry parameters have to be calculated at the end of the absorber
43af2cb6 376 // simplified version: the z positions of Branson's planes are no longer calculated
377 // but are given as inputs. One can use the macros MUONTestAbso.C and DrawTestAbso.C
378 // to test this correction.
04b5ea16 379 // Would it be possible to calculate all that from Geant configuration ????
956019b6 380 // and to get the Branson parameters from a function in ABSO module ????
381 // with an eventual contribution from other detectors like START ????
889a0215 382 //change to take into account the vertex postition (real, reconstruct,....)
383
43af2cb6 384 Double_t zBP, xBP, yBP;
385 Double_t pYZ, pX, pY, pZ, pTotal, xEndAbsorber, yEndAbsorber, radiusEndAbsorber2, pT, theta;
386 Int_t sign;
04b5ea16 387 static Bool_t first = kTRUE;
b45fd22b 388 static Double_t zBP1, zBP2, rLimit, thetaLimit, zEndAbsorber;
43af2cb6 389 // zBP1 for outer part and zBP2 for inner part (only at the first call)
04b5ea16 390 if (first) {
391 first = kFALSE;
43af2cb6 392
5b64e914 393 zEndAbsorber = -503; // spectro (z<0)
b45fd22b 394 thetaLimit = 3.0 * (TMath::Pi()) / 180.;
5b64e914 395 rLimit = TMath::Abs(zEndAbsorber) * TMath::Tan(thetaLimit);
396 zBP1 = -450; // values close to those calculated with EvalAbso.C
397 zBP2 = -480;
04b5ea16 398 }
399
400 pYZ = TMath::Abs(1.0 / fInverseBendingMomentum);
401 sign = 1;
b8dc484b 402 if (fInverseBendingMomentum < 0) sign = -1;
403 pZ = Pz();
404 pX = Px();
405 pY = Py();
04b5ea16 406 pTotal = TMath::Sqrt(pYZ *pYZ + pX * pX);
407 xEndAbsorber = fNonBendingCoor;
408 yEndAbsorber = fBendingCoor;
409 radiusEndAbsorber2 = xEndAbsorber * xEndAbsorber + yEndAbsorber * yEndAbsorber;
410
411 if (radiusEndAbsorber2 > rLimit*rLimit) {
04b5ea16 412 zBP = zBP1;
413 } else {
04b5ea16 414 zBP = zBP2;
415 }
416
417 xBP = xEndAbsorber - (pX / pZ) * (zEndAbsorber - zBP);
418 yBP = yEndAbsorber - (pY / pZ) * (zEndAbsorber - zBP);
419
420 // new parameters after Branson and energy loss corrections
b45fd22b 421// Float_t zSmear = zBP - gRandom->Gaus(0.,2.); // !!! possible smearing of Z vertex position
889a0215 422
423 Float_t zSmear = zBP ;
b45fd22b 424
889a0215 425 pZ = pTotal * (zSmear-zVtx) / TMath::Sqrt((xBP-xVtx) * (xBP-xVtx) + (yBP-yVtx) * (yBP-yVtx) +( zSmear-zVtx) * (zSmear-zVtx) );
426 pX = pZ * (xBP - xVtx)/ (zSmear-zVtx);
427 pY = pZ * (yBP - yVtx) / (zSmear-zVtx);
04b5ea16 428 fBendingSlope = pY / pZ;
429 fNonBendingSlope = pX / pZ;
5b64e914 430
04b5ea16 431
432 pT = TMath::Sqrt(pX * pX + pY * pY);
5b64e914 433 theta = TMath::ATan2(pT, TMath::Abs(pZ));
b45fd22b 434 pTotal = TotalMomentumEnergyLoss(thetaLimit, pTotal, theta);
04b5ea16 435
436 fInverseBendingMomentum = (sign / pTotal) *
437 TMath::Sqrt(1.0 +
438 fBendingSlope * fBendingSlope +
439 fNonBendingSlope * fNonBendingSlope) /
440 TMath::Sqrt(1.0 + fBendingSlope * fBendingSlope);
441
442 // vertex position at (0,0,0)
443 // should be taken from vertex measurement ???
889a0215 444
445 fBendingCoor = xVtx;
446 fNonBendingCoor = yVtx;
447 fZ= zVtx;
448
04b5ea16 449}
b45fd22b 450
04b5ea16 451 //__________________________________________________________________________
b45fd22b 452Double_t AliMUONTrackParam::TotalMomentumEnergyLoss(Double_t thetaLimit, Double_t pTotal, Double_t theta)
04b5ea16 453{
454 // Returns the total momentum corrected from energy loss in the front absorber
43af2cb6 455 // One can use the macros MUONTestAbso.C and DrawTestAbso.C
456 // to test this correction.
b45fd22b 457 // Momentum energy loss behaviour evaluated with the simulation of single muons (april 2002)
04b5ea16 458 Double_t deltaP, pTotalCorrected;
459
b45fd22b 460 // Parametrization to be redone according to change of absorber material ????
956019b6 461 // See remark in function BransonCorrection !!!!
04b5ea16 462 // The name is not so good, and there are many arguments !!!!
b45fd22b 463 if (theta < thetaLimit ) {
464 if (pTotal < 20) {
465 deltaP = 2.5938 + 0.0570 * pTotal - 0.001151 * pTotal * pTotal;
04b5ea16 466 } else {
b45fd22b 467 deltaP = 3.0714 + 0.011767 *pTotal;
04b5ea16 468 }
96a96c2b 469 deltaP *= 0.75; // AZ
04b5ea16 470 } else {
b45fd22b 471 if (pTotal < 20) {
472 deltaP = 2.1207 + 0.05478 * pTotal - 0.00145079 * pTotal * pTotal;
04b5ea16 473 } else {
b45fd22b 474 deltaP = 2.6069 + 0.0051705 * pTotal;
04b5ea16 475 }
96a96c2b 476 deltaP *= 0.9; // AZ
04b5ea16 477 }
478 pTotalCorrected = pTotal + deltaP / TMath::Cos(theta);
479 return pTotalCorrected;
480}
481
b45fd22b 482 //__________________________________________________________________________
483void AliMUONTrackParam::FieldCorrection(Double_t Z)
484{
485 //
486 // Correction of the effect of the magnetic field in the absorber
487 // Assume a constant field along Z axis.
488
489 Float_t b[3],x[3];
490 Double_t bZ;
491 Double_t pYZ,pX,pY,pZ,pT;
492 Double_t pXNew,pYNew;
493 Double_t c;
494
495 pYZ = TMath::Abs(1.0 / fInverseBendingMomentum);
496 c = TMath::Sign(1.0,fInverseBendingMomentum); // particle charge
497
b8dc484b 498 pZ = Pz();
499 pX = Px();
500 pY = Py();
b45fd22b 501 pT = TMath::Sqrt(pX*pX+pY*pY);
502
5b64e914 503 if (TMath::Abs(pZ) <= 0) return;
b45fd22b 504 x[2] = Z/2;
505 x[0] = x[2]*fNonBendingSlope;
506 x[1] = x[2]*fBendingSlope;
507
508 // Take magn. field value at position x.
509 gAlice->Field()->Field(x, b);
510 bZ = b[2];
511
512 // Transverse momentum rotation
513 // Parameterized with the study of DeltaPhi = phiReco - phiGen as a function of pZ.
5b64e914 514 Double_t phiShift = c*0.436*0.0003*bZ*Z/pZ;
b45fd22b 515 // Rotate momentum around Z axis.
516 pXNew = pX*TMath::Cos(phiShift) - pY*TMath::Sin(phiShift);
517 pYNew = pX*TMath::Sin(phiShift) + pY*TMath::Cos(phiShift);
518
519 fBendingSlope = pYNew / pZ;
520 fNonBendingSlope = pXNew / pZ;
521
522 fInverseBendingMomentum = c / TMath::Sqrt(pYNew*pYNew+pZ*pZ);
523
b8dc484b 524}
525 //__________________________________________________________________________
6464217e 526Double_t AliMUONTrackParam::Px() const
b8dc484b 527{
528 // return px from track paramaters
529 Double_t pYZ, pZ, pX;
530 pYZ = 0;
531 if ( TMath::Abs(fInverseBendingMomentum) > 0 )
532 pYZ = TMath::Abs(1.0 / fInverseBendingMomentum);
533 pZ = -pYZ / (TMath::Sqrt(1.0 + fBendingSlope * fBendingSlope)); // spectro. (z<0)
534 pX = pZ * fNonBendingSlope;
535 return pX;
536}
537 //__________________________________________________________________________
6464217e 538Double_t AliMUONTrackParam::Py() const
b8dc484b 539{
540 // return px from track paramaters
541 Double_t pYZ, pZ, pY;
542 pYZ = 0;
543 if ( TMath::Abs(fInverseBendingMomentum) > 0 )
544 pYZ = TMath::Abs(1.0 / fInverseBendingMomentum);
545 pZ = -pYZ / (TMath::Sqrt(1.0 + fBendingSlope * fBendingSlope)); // spectro. (z<0)
546 pY = pZ * fBendingSlope;
547 return pY;
548}
549 //__________________________________________________________________________
6464217e 550Double_t AliMUONTrackParam::Pz() const
b8dc484b 551{
552 // return px from track paramaters
553 Double_t pYZ, pZ;
554 pYZ = 0;
555 if ( TMath::Abs(fInverseBendingMomentum) > 0 )
556 pYZ = TMath::Abs(1.0 / fInverseBendingMomentum);
557 pZ = -pYZ / (TMath::Sqrt(1.0 + fBendingSlope * fBendingSlope)); // spectro. (z<0)
558 return pZ;
559}
560 //__________________________________________________________________________
6464217e 561Double_t AliMUONTrackParam::P() const
b8dc484b 562{
563 // return p from track paramaters
564 Double_t pYZ, pZ, p;
565 pYZ = 0;
566 if ( TMath::Abs(fInverseBendingMomentum) > 0 )
567 pYZ = TMath::Abs(1.0 / fInverseBendingMomentum);
568 pZ = -pYZ / (TMath::Sqrt(1.0 + fBendingSlope * fBendingSlope)); // spectro. (z<0)
569 p = TMath::Abs(pZ) *
570 TMath::Sqrt(1.0 + fBendingSlope * fBendingSlope + fNonBendingSlope * fNonBendingSlope);
571 return p;
572
b45fd22b 573}
4d03a78e 574 //__________________________________________________________________________
575void AliMUONTrackParam::ExtrapOneStepHelix(Double_t charge, Double_t step,
f161a467 576 Double_t *vect, Double_t *vout) const
4d03a78e 577{
578// ******************************************************************
579// * *
580// * Performs the tracking of one step in a magnetic field *
581// * The trajectory is assumed to be a helix in a constant field *
582// * taken at the mid point of the step. *
583// * Parameters: *
584// * input *
585// * STEP =arc length of the step asked *
586// * VECT =input vector (position,direction cos and momentum) *
587// * CHARGE= electric charge of the particle *
588// * output *
589// * VOUT = same as VECT after completion of the step *
590// * *
591// * ==>Called by : <USER>, GUSWIM *
592// * Author m.hansroul ********* *
593// * modified s.egli, s.v.levonian *
594// * modified v.perevoztchikov
595// * *
596// ******************************************************************
597//
598
599// modif: everything in double precision
600
601 Double_t xyz[3], h[4], hxp[3];
602 Double_t h2xy, hp, rho, tet;
603 Double_t sint, sintt, tsint, cos1t;
604 Double_t f1, f2, f3, f4, f5, f6;
605
58443fe3 606 const Int_t kix = 0;
607 const Int_t kiy = 1;
608 const Int_t kiz = 2;
609 const Int_t kipx = 3;
610 const Int_t kipy = 4;
611 const Int_t kipz = 5;
612 const Int_t kipp = 6;
4d03a78e 613
58443fe3 614 const Double_t kec = 2.9979251e-4;
4d03a78e 615 //
616 // ------------------------------------------------------------------
617 //
618 // units are kgauss,centimeters,gev/c
619 //
58443fe3 620 vout[kipp] = vect[kipp];
4d03a78e 621 if (TMath::Abs(charge) < 0.00001) {
622 for (Int_t i = 0; i < 3; i++) {
623 vout[i] = vect[i] + step * vect[i+3];
624 vout[i+3] = vect[i+3];
625 }
626 return;
627 }
58443fe3 628 xyz[0] = vect[kix] + 0.5 * step * vect[kipx];
629 xyz[1] = vect[kiy] + 0.5 * step * vect[kipy];
630 xyz[2] = vect[kiz] + 0.5 * step * vect[kipz];
4d03a78e 631
632 //cmodif: call gufld (xyz, h) changed into:
633 GetField (xyz, h);
634
635 h2xy = h[0]*h[0] + h[1]*h[1];
636 h[3] = h[2]*h[2]+ h2xy;
637 if (h[3] < 1.e-12) {
638 for (Int_t i = 0; i < 3; i++) {
639 vout[i] = vect[i] + step * vect[i+3];
640 vout[i+3] = vect[i+3];
641 }
642 return;
643 }
644 if (h2xy < 1.e-12*h[3]) {
645 ExtrapOneStepHelix3(charge*h[2], step, vect, vout);
646 return;
647 }
648 h[3] = TMath::Sqrt(h[3]);
649 h[0] /= h[3];
650 h[1] /= h[3];
651 h[2] /= h[3];
58443fe3 652 h[3] *= kec;
4d03a78e 653
58443fe3 654 hxp[0] = h[1]*vect[kipz] - h[2]*vect[kipy];
655 hxp[1] = h[2]*vect[kipx] - h[0]*vect[kipz];
656 hxp[2] = h[0]*vect[kipy] - h[1]*vect[kipx];
4d03a78e 657
58443fe3 658 hp = h[0]*vect[kipx] + h[1]*vect[kipy] + h[2]*vect[kipz];
4d03a78e 659
58443fe3 660 rho = -charge*h[3]/vect[kipp];
4d03a78e 661 tet = rho * step;
662
663 if (TMath::Abs(tet) > 0.15) {
664 sint = TMath::Sin(tet);
665 sintt = (sint/tet);
666 tsint = (tet-sint)/tet;
667 cos1t = 2.*(TMath::Sin(0.5*tet))*(TMath::Sin(0.5*tet))/tet;
668 } else {
669 tsint = tet*tet/36.;
670 sintt = (1. - tsint);
671 sint = tet*sintt;
672 cos1t = 0.5*tet;
673 }
674
675 f1 = step * sintt;
676 f2 = step * cos1t;
677 f3 = step * tsint * hp;
678 f4 = -tet*cos1t;
679 f5 = sint;
680 f6 = tet * cos1t * hp;
681
58443fe3 682 vout[kix] = vect[kix] + f1*vect[kipx] + f2*hxp[0] + f3*h[0];
683 vout[kiy] = vect[kiy] + f1*vect[kipy] + f2*hxp[1] + f3*h[1];
684 vout[kiz] = vect[kiz] + f1*vect[kipz] + f2*hxp[2] + f3*h[2];
4d03a78e 685
58443fe3 686 vout[kipx] = vect[kipx] + f4*vect[kipx] + f5*hxp[0] + f6*h[0];
687 vout[kipy] = vect[kipy] + f4*vect[kipy] + f5*hxp[1] + f6*h[1];
688 vout[kipz] = vect[kipz] + f4*vect[kipz] + f5*hxp[2] + f6*h[2];
4d03a78e 689
690 return;
691}
692
693 //__________________________________________________________________________
694void AliMUONTrackParam::ExtrapOneStepHelix3(Double_t field, Double_t step,
f161a467 695 Double_t *vect, Double_t *vout) const
4d03a78e 696{
697//
698// ******************************************************************
699// * *
700// * Tracking routine in a constant field oriented *
701// * along axis 3 *
702// * Tracking is performed with a conventional *
703// * helix step method *
704// * *
705// * ==>Called by : <USER>, GUSWIM *
706// * Authors R.Brun, M.Hansroul ********* *
707// * Rewritten V.Perevoztchikov
708// * *
709// ******************************************************************
710//
711
712 Double_t hxp[3];
713 Double_t h4, hp, rho, tet;
714 Double_t sint, sintt, tsint, cos1t;
715 Double_t f1, f2, f3, f4, f5, f6;
716
58443fe3 717 const Int_t kix = 0;
718 const Int_t kiy = 1;
719 const Int_t kiz = 2;
720 const Int_t kipx = 3;
721 const Int_t kipy = 4;
722 const Int_t kipz = 5;
723 const Int_t kipp = 6;
4d03a78e 724
58443fe3 725 const Double_t kec = 2.9979251e-4;
4d03a78e 726
727//
728// ------------------------------------------------------------------
729//
730// units are kgauss,centimeters,gev/c
731//
58443fe3 732 vout[kipp] = vect[kipp];
733 h4 = field * kec;
4d03a78e 734
58443fe3 735 hxp[0] = - vect[kipy];
736 hxp[1] = + vect[kipx];
4d03a78e 737
58443fe3 738 hp = vect[kipz];
4d03a78e 739
58443fe3 740 rho = -h4/vect[kipp];
4d03a78e 741 tet = rho * step;
742 if (TMath::Abs(tet) > 0.15) {
743 sint = TMath::Sin(tet);
744 sintt = (sint/tet);
745 tsint = (tet-sint)/tet;
746 cos1t = 2.* TMath::Sin(0.5*tet) * TMath::Sin(0.5*tet)/tet;
747 } else {
748 tsint = tet*tet/36.;
749 sintt = (1. - tsint);
750 sint = tet*sintt;
751 cos1t = 0.5*tet;
752 }
753
754 f1 = step * sintt;
755 f2 = step * cos1t;
756 f3 = step * tsint * hp;
757 f4 = -tet*cos1t;
758 f5 = sint;
759 f6 = tet * cos1t * hp;
760
58443fe3 761 vout[kix] = vect[kix] + f1*vect[kipx] + f2*hxp[0];
762 vout[kiy] = vect[kiy] + f1*vect[kipy] + f2*hxp[1];
763 vout[kiz] = vect[kiz] + f1*vect[kipz] + f3;
4d03a78e 764
58443fe3 765 vout[kipx] = vect[kipx] + f4*vect[kipx] + f5*hxp[0];
766 vout[kipy] = vect[kipy] + f4*vect[kipy] + f5*hxp[1];
767 vout[kipz] = vect[kipz] + f4*vect[kipz] + f6;
4d03a78e 768
769 return;
770}
771 //__________________________________________________________________________
772void AliMUONTrackParam::ExtrapOneStepRungekutta(Double_t charge, Double_t step,
f161a467 773 Double_t* vect, Double_t* vout) const
4d03a78e 774{
775//
776// ******************************************************************
777// * *
778// * Runge-Kutta method for tracking a particle through a magnetic *
779// * field. Uses Nystroem algorithm (See Handbook Nat. Bur. of *
780// * Standards, procedure 25.5.20) *
781// * *
782// * Input parameters *
783// * CHARGE Particle charge *
784// * STEP Step size *
785// * VECT Initial co-ords,direction cosines,momentum *
786// * Output parameters *
787// * VOUT Output co-ords,direction cosines,momentum *
788// * User routine called *
789// * CALL GUFLD(X,F) *
790// * *
791// * ==>Called by : <USER>, GUSWIM *
792// * Authors R.Brun, M.Hansroul ********* *
793// * V.Perevoztchikov (CUT STEP implementation) *
794// * *
795// * *
796// ******************************************************************
797//
798
799 Double_t h2, h4, f[4];
800 Double_t xyzt[3], a, b, c, ph,ph2;
801 Double_t secxs[4],secys[4],seczs[4],hxp[3];
802 Double_t g1, g2, g3, g4, g5, g6, ang2, dxt, dyt, dzt;
803 Double_t est, at, bt, ct, cba;
804 Double_t f1, f2, f3, f4, rho, tet, hnorm, hp, rho1, sint, cost;
805
806 Double_t x;
807 Double_t y;
808 Double_t z;
809
810 Double_t xt;
811 Double_t yt;
812 Double_t zt;
813
814 Double_t maxit = 1992;
815 Double_t maxcut = 11;
816
58443fe3 817 const Double_t kdlt = 1e-4;
818 const Double_t kdlt32 = kdlt/32.;
819 const Double_t kthird = 1./3.;
820 const Double_t khalf = 0.5;
821 const Double_t kec = 2.9979251e-4;
822
823 const Double_t kpisqua = 9.86960440109;
824 const Int_t kix = 0;
825 const Int_t kiy = 1;
826 const Int_t kiz = 2;
827 const Int_t kipx = 3;
828 const Int_t kipy = 4;
829 const Int_t kipz = 5;
4d03a78e 830
831 // *.
832 // *. ------------------------------------------------------------------
833 // *.
834 // * this constant is for units cm,gev/c and kgauss
835 // *
836 Int_t iter = 0;
837 Int_t ncut = 0;
838 for(Int_t j = 0; j < 7; j++)
839 vout[j] = vect[j];
840
58443fe3 841 Double_t pinv = kec * charge / vect[6];
4d03a78e 842 Double_t tl = 0.;
843 Double_t h = step;
844 Double_t rest;
845
846
847 do {
848 rest = step - tl;
849 if (TMath::Abs(h) > TMath::Abs(rest)) h = rest;
850 //cmodif: call gufld(vout,f) changed into:
851
852 GetField(vout,f);
853
854 // *
855 // * start of integration
856 // *
857 x = vout[0];
858 y = vout[1];
859 z = vout[2];
860 a = vout[3];
861 b = vout[4];
862 c = vout[5];
863
58443fe3 864 h2 = khalf * h;
865 h4 = khalf * h2;
4d03a78e 866 ph = pinv * h;
58443fe3 867 ph2 = khalf * ph;
4d03a78e 868 secxs[0] = (b * f[2] - c * f[1]) * ph2;
869 secys[0] = (c * f[0] - a * f[2]) * ph2;
870 seczs[0] = (a * f[1] - b * f[0]) * ph2;
871 ang2 = (secxs[0]*secxs[0] + secys[0]*secys[0] + seczs[0]*seczs[0]);
58443fe3 872 if (ang2 > kpisqua) break;
4d03a78e 873
874 dxt = h2 * a + h4 * secxs[0];
875 dyt = h2 * b + h4 * secys[0];
876 dzt = h2 * c + h4 * seczs[0];
877 xt = x + dxt;
878 yt = y + dyt;
879 zt = z + dzt;
880 // *
881 // * second intermediate point
882 // *
883
884 est = TMath::Abs(dxt) + TMath::Abs(dyt) + TMath::Abs(dzt);
885 if (est > h) {
886 if (ncut++ > maxcut) break;
58443fe3 887 h *= khalf;
4d03a78e 888 continue;
889 }
890
891 xyzt[0] = xt;
892 xyzt[1] = yt;
893 xyzt[2] = zt;
894
895 //cmodif: call gufld(xyzt,f) changed into:
896 GetField(xyzt,f);
897
898 at = a + secxs[0];
899 bt = b + secys[0];
900 ct = c + seczs[0];
901
902 secxs[1] = (bt * f[2] - ct * f[1]) * ph2;
903 secys[1] = (ct * f[0] - at * f[2]) * ph2;
904 seczs[1] = (at * f[1] - bt * f[0]) * ph2;
905 at = a + secxs[1];
906 bt = b + secys[1];
907 ct = c + seczs[1];
908 secxs[2] = (bt * f[2] - ct * f[1]) * ph2;
909 secys[2] = (ct * f[0] - at * f[2]) * ph2;
910 seczs[2] = (at * f[1] - bt * f[0]) * ph2;
911 dxt = h * (a + secxs[2]);
912 dyt = h * (b + secys[2]);
913 dzt = h * (c + seczs[2]);
914 xt = x + dxt;
915 yt = y + dyt;
916 zt = z + dzt;
917 at = a + 2.*secxs[2];
918 bt = b + 2.*secys[2];
919 ct = c + 2.*seczs[2];
920
921 est = TMath::Abs(dxt)+TMath::Abs(dyt)+TMath::Abs(dzt);
922 if (est > 2.*TMath::Abs(h)) {
923 if (ncut++ > maxcut) break;
58443fe3 924 h *= khalf;
4d03a78e 925 continue;
926 }
927
928 xyzt[0] = xt;
929 xyzt[1] = yt;
930 xyzt[2] = zt;
931
932 //cmodif: call gufld(xyzt,f) changed into:
933 GetField(xyzt,f);
934
58443fe3 935 z = z + (c + (seczs[0] + seczs[1] + seczs[2]) * kthird) * h;
936 y = y + (b + (secys[0] + secys[1] + secys[2]) * kthird) * h;
937 x = x + (a + (secxs[0] + secxs[1] + secxs[2]) * kthird) * h;
4d03a78e 938
939 secxs[3] = (bt*f[2] - ct*f[1])* ph2;
940 secys[3] = (ct*f[0] - at*f[2])* ph2;
941 seczs[3] = (at*f[1] - bt*f[0])* ph2;
58443fe3 942 a = a+(secxs[0]+secxs[3]+2. * (secxs[1]+secxs[2])) * kthird;
943 b = b+(secys[0]+secys[3]+2. * (secys[1]+secys[2])) * kthird;
944 c = c+(seczs[0]+seczs[3]+2. * (seczs[1]+seczs[2])) * kthird;
4d03a78e 945
946 est = TMath::Abs(secxs[0]+secxs[3] - (secxs[1]+secxs[2]))
947 + TMath::Abs(secys[0]+secys[3] - (secys[1]+secys[2]))
948 + TMath::Abs(seczs[0]+seczs[3] - (seczs[1]+seczs[2]));
949
58443fe3 950 if (est > kdlt && TMath::Abs(h) > 1.e-4) {
4d03a78e 951 if (ncut++ > maxcut) break;
58443fe3 952 h *= khalf;
4d03a78e 953 continue;
954 }
955
956 ncut = 0;
957 // * if too many iterations, go to helix
958 if (iter++ > maxit) break;
959
960 tl += h;
58443fe3 961 if (est < kdlt32)
4d03a78e 962 h *= 2.;
963 cba = 1./ TMath::Sqrt(a*a + b*b + c*c);
964 vout[0] = x;
965 vout[1] = y;
966 vout[2] = z;
967 vout[3] = cba*a;
968 vout[4] = cba*b;
969 vout[5] = cba*c;
970 rest = step - tl;
971 if (step < 0.) rest = -rest;
972 if (rest < 1.e-5*TMath::Abs(step)) return;
973
974 } while(1);
975
976 // angle too big, use helix
977
978 f1 = f[0];
979 f2 = f[1];
980 f3 = f[2];
981 f4 = TMath::Sqrt(f1*f1+f2*f2+f3*f3);
982 rho = -f4*pinv;
983 tet = rho * step;
984
985 hnorm = 1./f4;
986 f1 = f1*hnorm;
987 f2 = f2*hnorm;
988 f3 = f3*hnorm;
989
58443fe3 990 hxp[0] = f2*vect[kipz] - f3*vect[kipy];
991 hxp[1] = f3*vect[kipx] - f1*vect[kipz];
992 hxp[2] = f1*vect[kipy] - f2*vect[kipx];
4d03a78e 993
58443fe3 994 hp = f1*vect[kipx] + f2*vect[kipy] + f3*vect[kipz];
4d03a78e 995
996 rho1 = 1./rho;
997 sint = TMath::Sin(tet);
58443fe3 998 cost = 2.*TMath::Sin(khalf*tet)*TMath::Sin(khalf*tet);
4d03a78e 999
1000 g1 = sint*rho1;
1001 g2 = cost*rho1;
1002 g3 = (tet-sint) * hp*rho1;
1003 g4 = -cost;
1004 g5 = sint;
1005 g6 = cost * hp;
1006
58443fe3 1007 vout[kix] = vect[kix] + g1*vect[kipx] + g2*hxp[0] + g3*f1;
1008 vout[kiy] = vect[kiy] + g1*vect[kipy] + g2*hxp[1] + g3*f2;
1009 vout[kiz] = vect[kiz] + g1*vect[kipz] + g2*hxp[2] + g3*f3;
4d03a78e 1010
58443fe3 1011 vout[kipx] = vect[kipx] + g4*vect[kipx] + g5*hxp[0] + g6*f1;
1012 vout[kipy] = vect[kipy] + g4*vect[kipy] + g5*hxp[1] + g6*f2;
1013 vout[kipz] = vect[kipz] + g4*vect[kipz] + g5*hxp[2] + g6*f3;
4d03a78e 1014
1015 return;
1016}
1017//___________________________________________________________
f161a467 1018 void AliMUONTrackParam::GetField(Double_t *Position, Double_t *Field) const
4d03a78e 1019{
1020 // interface to "gAlice->Field()->Field" for arguments in double precision
1021
1022 Float_t x[3], b[3];
1023
1024 x[0] = Position[0]; x[1] = Position[1]; x[2] = Position[2];
1025
1026 gAlice->Field()->Field(x, b);
1027 Field[0] = b[0]; Field[1] = b[1]; Field[2] = b[2];
1028
1029 return;
1030 }
6464217e 1031//_____________________________________________-
1032void AliMUONTrackParam::Print(Option_t* opt) const
1033{
1034//
1035 // Printing TrackParam information
1036 // "full" option for printing all the information about the TrackParam
1037 //
1038 TString sopt(opt);
1039 sopt.ToUpper();
1040
1041 if ( sopt.Contains("FULL") ) {
1042 cout << "<AliMUONTrackParam> Bending P=" << setw(5) << setprecision(3) << 1./GetInverseBendingMomentum() <<
1043 ", NonBendSlope=" << setw(5) << setprecision(3) << GetNonBendingSlope()*180./TMath::Pi() <<
1044 ", BendSlope=" << setw(5) << setprecision(3) << GetBendingSlope()*180./TMath::Pi() <<
1045 ", (x,y,z)_IP=(" << setw(5) << setprecision(3) << GetNonBendingCoor() <<
1046 "," << setw(5) << setprecision(3) << GetBendingCoor() <<
1047 "," << setw(5) << setprecision(3) << GetZ() <<
1048 ") cm, (px,py,pz)=(" << setw(5) << setprecision(3) << Px() <<
1049 "," << setw(5) << setprecision(3) << Py() <<
1050 "," << setw(5) << setprecision(3) << Pz() << ") GeV/c" << endl;
1051 }
1052 else {
1053 cout << "<AliMUONTrackParam>" << endl;
1054 }
1055
1056}