/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ /* $Id$ */ ///////////////////////////////////////////////////////////////////////////// // // // AliTOFtrack class // // // // Authors: Bologna-CERN-ITEP-Salerno Group // // // // Description: class for handling ESD extracted tracks for TOF matching. // // // ///////////////////////////////////////////////////////////////////////////// #include "AliESDtrack.h" #include "AliTracker.h" #include "AliTOFGeometry.h" #include "AliTOFtrack.h" ClassImp(AliTOFtrack) //_____________________________________________________________________________ AliTOFtrack::AliTOFtrack() : AliKalmanTrack(), fSeedInd(-1), fSeedLab(-1) { // // Default constructor. // } //_____________________________________________________________________________ AliTOFtrack::AliTOFtrack(const AliTOFtrack& t) : AliKalmanTrack(t), fSeedInd(t.fSeedInd), fSeedLab(t.fSeedLab) { // // Copy constructor. // } //_____________________________________________________________________________ AliTOFtrack::AliTOFtrack(const AliESDtrack& t) : AliKalmanTrack(), fSeedInd(-1), fSeedLab(-1) { // // Constructor from AliESDtrack // SetLabel(t.GetLabel()); SetChi2(0.); SetMass(t.GetMass()); Set(t.GetX(),t.GetAlpha(),t.GetParameter(),t.GetCovariance()); if ((t.GetStatus()&AliESDtrack::kTIME) == 0) return; StartTimeIntegral(); Double_t times[10]; t.GetIntegratedTimes(times); SetIntegratedTimes(times); SetIntegratedLength(t.GetIntegratedLength()); } //____________________________________________________________________________ AliTOFtrack& AliTOFtrack::operator=(const AliTOFtrack &/*source*/) { // ass. op. return *this; } //_____________________________________________________________________________ Bool_t AliTOFtrack::PropagateTo(Double_t xk,Double_t x0,Double_t rho) { // // Propagates a track of particle with mass=pm to a reference plane // defined by x=xk through media of density=rho and radiationLength=x0 // if (xk == GetX()) return kTRUE; Double_t oldX=GetX(), oldY=GetY(), oldZ=GetZ(); Double_t b[3];GetBxByBz(b); if (!AliExternalTrackParam::PropagateToBxByBz(xk,b)) return kFALSE; // OLD used code //Double_t bz=GetBz(); //if (!AliExternalTrackParam::PropagateTo(xk,bz)) return kFALSE; Double_t d = TMath::Sqrt((GetX()-oldX)*(GetX()-oldX) + (GetY()-oldY)*(GetY()-oldY) + (GetZ()-oldZ)*(GetZ()-oldZ)); if (IsStartedTimeIntegral() && GetX()>oldX) AddTimeStep(d); if (!AliExternalTrackParam::CorrectForMaterial(d*rho/x0,x0,GetMass())) return kFALSE; /* //Energy losses************************ if((5940*beta2/(1-beta2+1e-10) - beta2) < 0){return 0;} Double_t dE=0.153e-3/beta2*(log(5940*beta2/(1-beta2+1e-10)) - beta2)*d*rho; // // suspicious part - think about it ? Double_t kinE = TMath::Sqrt(p2); if (dE>0.8*kinE) dE = 0.8*kinE; // if (dE<0) dE = 0.0; // not valid region for Bethe bloch */ return kTRUE; } //_____________________________________________________________________________ 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 Double_t ymax=AliTOFGeometry::RinTOF()*TMath::Tan(0.5*AliTOFGeometry::GetAlpha()); Bool_t skip = kFALSE; Double_t y=GetYat(AliTOFGeometry::RinTOF(),skip); if (skip) { return kFALSE; } if (y > ymax) { if (!Rotate(AliTOFGeometry::GetAlpha())) { return kFALSE; } } else if (y <-ymax) { if (!Rotate(-AliTOFGeometry::GetAlpha())) { return kFALSE; } } Double_t x = GetX(); Int_t nsteps=Int_t((AliTOFGeometry::Rmin()-x)/0.5); // 0.5 cm Steps for (Int_t istep=0;istepGetX(), c->GetY(), c->GetZ()}; Double_t covyz[3]={c->GetSigmaY2(), c->GetSigmaYZ(), c->GetSigmaZ2()}; Double_t covxyz[3]={c->GetSigmaX2(), c->GetSigmaXY(), c->GetSigmaXZ()}; return AliExternalTrackParam::GetPredictedChi2(p, covyz, covxyz); } //_________________________________________________________________________ Bool_t AliTOFtrack::PropagateTo(const AliCluster3D *c) { // // Propagates a track to the plane containing cluster 'c' // Double_t oldX=GetX(), oldY=GetY(), oldZ=GetZ(); Double_t p[3]={c->GetX(), c->GetY(), c->GetZ()}; Double_t covyz[3]={c->GetSigmaY2(), c->GetSigmaYZ(), c->GetSigmaZ2()}; Double_t covxyz[3]={c->GetSigmaX2(), c->GetSigmaXY(), c->GetSigmaXZ()}; Double_t bz=GetBz(); if (!AliExternalTrackParam::PropagateTo(p, covyz, covxyz, bz)) return kFALSE; if (IsStartedTimeIntegral()) { Double_t d = TMath::Sqrt((GetX()-oldX)*(GetX()-oldX) + (GetY()-oldY)*(GetY()-oldY) + (GetZ()-oldZ)*(GetZ()-oldZ)); if (GetX()GetSigmaY2()*t->GetSigmaZ2(); Double_t c =GetSigmaY2()*GetSigmaZ2(); if (c>co) return 1; else if (c=thetamin && thetatr<=thetamax){ x0TRD= x0Air; rhoTRD = rhoAir; } } if (isec == 11 || isec == 12 || isec == 13 || isec == 14 || isec == 15 ) { if( r[2]>=zmin && r[2]<=zmax){ x0TRD= x0Air; rhoTRD = rhoAir; } } } */ if(GetX() <= rTPC) {param[0]=x0TPC;param[1]=rhoTPC;} else if(GetX() > rTPC && GetX() < rTPCTRD) {param[0]=x0Air;param[1]=rhoAir;} else if(GetX() >= rTPCTRD && GetX() < rTRD) {param[0]=x0TRD;param[1]=rhoTRD;} else if(GetX() >= rTRD ) {param[0]=x0Air;param[1]=rhoAir;} }