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 // Used for efficiency estimates and matching of reconstructed tracks //
22 ///////////////////////////////////////////////////////////////////////////////
24 #include "AliTRDmcTrack.h"
25 #include "AliTRDgeometry.h"
27 ClassImp(AliTRDmcTrack)
29 //_____________________________________________________________________________
30 AliTRDmcTrack::AliTRDmcTrack()
34 // Default constructor
43 for(Int_t i=0; i<200; i++) fIndex[i]=-1;
45 for(Int_t i=0; i<6; i++) {
46 for(Int_t j=0; j<3; j++) {
54 //_____________________________________________________________________________
55 AliTRDmcTrack::AliTRDmcTrack(Int_t label, Bool_t primary, Float_t mass
56 ,Int_t charge, Int_t pdg)
70 for(Int_t i=0; i<200; i++) fIndex[i]=-1;
72 for(Int_t i=0; i<6; i++) {
73 for(Int_t j=0; j<3; j++) {
81 //_____________________________________________________________________________
82 void AliTRDmcTrack::GetPxPyPz(Double_t& px, Double_t& py, Double_t& pz,
86 // Returns momentum components at the entrance (opt >= 0), or
87 // exit (opt < 0) of TRD.
93 for(i = 0; i < AliTRDgeometry::Nplan(); i++) {
94 if( fPin[i][0] * fPin[i][0]
95 + fPin[i][1] * fPin[i][1]
96 + fPin[i][2] * fPin[i][2] > 0.0005) break;
98 px = fPin[0][0]; py = fPin[0][1]; pz = fPin[0][2];
101 for(i = AliTRDgeometry::Nplan() - 1; i >= 0; i--) {
102 if( fPout[i][0] * fPout[i][0]
103 + fPout[i][1] * fPout[i][1]
104 + fPout[i][2] * fPout[i][2] > 0.0005) break;
106 px = fPout[i][0]; py = fPout[i][1]; pz = fPout[i][2];
113 //_____________________________________________________________________________
114 void AliTRDmcTrack::GetPlanePxPyPz(Double_t& px, Double_t& py, Double_t& pz,
115 Int_t plane, Int_t opt) const
118 // Returns momentum components at the entrance (opt >= 0), or
119 // exit (opt < 0) of TRD plane <plane>.
123 px = fPin[plane][0]; py = fPin[plane][1]; pz = fPin[plane][2];
126 px = fPout[plane][0]; py = fPout[plane][1]; pz = fPout[plane][2];