X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TOF%2FAliTOFtrack.cxx;h=dfca90b9d9082498219ee713cb999181401be774;hb=c50ee7ffd54bdadf52683585a599c50365450ba0;hp=0c04d5cf342f757c522cb1ffd2c75fb359f50a98;hpb=5a3884653d2c3dfb4a0b8b7b47f48ad50d0ab77b;p=u%2Fmrichter%2FAliRoot.git diff --git a/TOF/AliTOFtrack.cxx b/TOF/AliTOFtrack.cxx index 0c04d5cf342..dfca90b9d90 100644 --- a/TOF/AliTOFtrack.cxx +++ b/TOF/AliTOFtrack.cxx @@ -55,6 +55,30 @@ AliTOFtrack::AliTOFtrack(const AliTOFtrack& t) : // } +//____________________________________________________________________________ +AliTOFtrack& AliTOFtrack::operator=(const AliESDtrack& t) +{ + // ass. op. + SetLabel(t.GetLabel()); + SetChi2(0.); + SetMass(t.GetMassForTracking()); + + Set(t.GetX(),t.GetAlpha(),t.GetParameter(),t.GetCovariance()); + + if ((t.GetStatus()&AliESDtrack::kTIME) == 0) return *this; + StartTimeIntegral(); + Double_t times[10]; + for(Int_t isp=0;isp energy decreases) + } // CZ Double_t xOverX0 = mparam[1]; /* correct for mean material */ @@ -159,6 +192,77 @@ Bool_t AliTOFtrack::PropagateToInnerTOF() // Propagates a track of particle with mass=pm to a reference plane // defined by x=xk through media of density=rho and radiationLength=x0 + //const Double_t kAlphac = TMath::Pi()/9.0; // 20 degree + const Double_t kAlphac = AliTOFGeometry::GetAlpha(); // 20 degree + const Double_t kTalphac = TMath::Tan(kAlphac*0.5); + + //const Double_t kStepSize = 0.1; // [cm] Step size + const Double_t kStepSize = 0.5; // [cm] Step size + + Double_t x = GetX(); + //Double_t bz = GetBz(); + + //Double_t xyz0[3]; + //Double_t xyz1[3]; + //Double_t y; + //Double_t z; + + Int_t nsteps = (Int_t)((AliTOFGeometry::Rmin()-x)/kStepSize); + for (Int_t istep=0; istep AliTOFGeometry::Rmin()) ? -1.0 : 1.0; + + x = GetX()+dir*kStepSize; + if ( x GetX()*kTalphac) { + if (!(Rotate(kAlphac))) return kFALSE; + } else if (GetY() < -GetX()*kTalphac) { + if (!(Rotate(-kAlphac))) return kFALSE; + } + + } + + //Bool_t check = PropagateTo(AliTOFGeometry::RinTOF()); + Bool_t check = PropagateTo(AliTOFGeometry::RinTOF(),0.,0.); /* passing 0.,0. as arguments since now + this method queries TGeo for material budget + */ + + if (!check) return kFALSE; + + if (GetY() > GetX()*kTalphac) { + if (!(Rotate(kAlphac))) return kFALSE; + } else if (GetY() < -GetX()*kTalphac) { + if (!(Rotate(-kAlphac))) return kFALSE; + } + + return kTRUE; + +} + +//_____________________________________________________________________________ +Bool_t AliTOFtrack::PropagateToInnerTOFold() +{ + // Propagates a track of particle with mass=pm to a reference plane + // defined by x=xk through media of density=rho and radiationLength=x0 + Double_t ymax=AliTOFGeometry::RinTOF()*TMath::Tan(0.5*AliTOFGeometry::GetAlpha()); Bool_t skip = kFALSE; @@ -167,13 +271,9 @@ Bool_t AliTOFtrack::PropagateToInnerTOF() return kFALSE; } if (y > ymax) { - if (!Rotate(AliTOFGeometry::GetAlpha())) { - return kFALSE; - } + if (!Rotate(AliTOFGeometry::GetAlpha())) return kFALSE; } else if (y <-ymax) { - if (!Rotate(-AliTOFGeometry::GetAlpha())) { - return kFALSE; - } + if (!Rotate(-AliTOFGeometry::GetAlpha())) return kFALSE; } Double_t x = GetX(); @@ -181,14 +281,16 @@ Bool_t AliTOFtrack::PropagateToInnerTOF() for (Int_t istep=0;istep GetX()*TMath::Tan(0.5*AliTOFGeometry::GetAlpha())) { + if (!(Rotate(AliTOFGeometry::GetAlpha()))) return kFALSE; + } else if (GetY() < -GetX()*TMath::Tan(0.5*AliTOFGeometry::GetAlpha())) { + if (!(Rotate(-AliTOFGeometry::GetAlpha()))) return kFALSE; + } + return kTRUE; } //_________________________________________________________________________