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 #include "AliTRDmcTrack.h"
17 #include "AliTRDgeometry.h"
19 ClassImp(AliTRDmcTrack)
21 //_____________________________________________________________________________
22 AliTRDmcTrack::AliTRDmcTrack()
26 // Default constructor
35 for(Int_t i=0; i<200; i++) fIndex[i]=-1;
37 for(Int_t i=0; i<6; i++) {
38 for(Int_t j=0; j<3; j++) {
46 //_____________________________________________________________________________
47 AliTRDmcTrack::AliTRDmcTrack(Int_t label, Bool_t primary, Float_t mass
48 ,Int_t charge, Int_t pdg)
62 for(Int_t i=0; i<200; i++) fIndex[i]=-1;
64 for(Int_t i=0; i<6; i++) {
65 for(Int_t j=0; j<3; j++) {
73 //_____________________________________________________________________________
74 void AliTRDmcTrack::GetPxPyPz(Double_t& px, Double_t& py, Double_t& pz,
78 // Returns momentum components at the entrance (opt >= 0), or
79 // exit (opt < 0) of TRD.
85 for(i = 0; i < AliTRDgeometry::Nplan(); i++) {
86 if( Pin[i][0] * Pin[i][0]
87 + Pin[i][1] * Pin[i][1]
88 + Pin[i][2] * Pin[i][2] > 0.0005) break;
90 px = Pin[0][0]; py = Pin[0][1]; pz = Pin[0][2];
93 for(i = AliTRDgeometry::Nplan() - 1; i >= 0; i--) {
94 if( Pout[i][0] * Pout[i][0]
95 + Pout[i][1] * Pout[i][1]
96 + Pout[i][2] * Pout[i][2] > 0.0005) break;
98 px = Pout[i][0]; py = Pout[i][1]; pz = Pout[i][2];
105 //_____________________________________________________________________________
106 void AliTRDmcTrack::GetPlanePxPyPz(Double_t& px, Double_t& py, Double_t& pz,
107 Int_t plane, Int_t opt) const
110 // Returns momentum components at the entrance (opt >= 0), or
111 // exit (opt < 0) of TRD plane <plane>.
115 px = Pin[plane][0]; py = Pin[plane][1]; pz = Pin[plane][2];
118 px = Pout[plane][0]; py = Pout[plane][1]; pz = Pout[plane][2];