// @(#) $Id: AliHLTTPCCAParam.cxx,v 1.3 2010/08/10 22:44:47 mzyzak Exp $ // ************************************************************************** // This file is property of and copyright by the ALICE HLT Project * // ALICE Experiment at CERN, All rights reserved. * // * // Primary Authors: Sergey Gorbunov * // Ivan Kisel * // for The ALICE HLT Project. * // * // Developed by: Igor Kulakov * // Maksym Zyzak * // * // 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. * // * //*************************************************************************** #include "AliHLTTPCCAParamArBB.h" #include "AliHLTTPCCATrackParamArBB.h" AliHLTTPCCAParamArBB::AliHLTTPCCAParamArBB() { fcBz = -5.f * 0.000299792458f; for(int i=0; i<6; i++) fParamS0Par[i] = fill(0.f, 2); } void AliHLTTPCCAParamArBB::SetS0Par( const int i, const float f0, const float f1 ) { fParamS0Par[i] = arbb::replace( fParamS0Par[i], 0, f0 ); fParamS0Par[i] = arbb::replace( fParamS0Par[i], 1, f1 ); } void AliHLTTPCCAParamArBB::GetClusterErrors2( dense iRow, const AliHLTTPCCATrackParamArBB &t, dense &Err2Y, dense &Err2Z ) { dense z = t.Z(); dense type; errorType( iRow, type ); z = (200.f - arbb::abs(z)) * 0.01f; z = select( z<0.f, 0.f, z ); dense sin2Phi = t.SinPhi()*t.SinPhi(); dense cos2Phi = (1.f - sin2Phi); cos2Phi = select( cos2Phi < 0.0001f, 0.0001f, cos2Phi ); dense tg2Phi = sin2Phi/cos2Phi; dense tg2Lambda = t.DzDs()*t.DzDs(); Err2Y = gather(fParamS0Par[0], type) + gather(fParamS0Par[1], type)*z/cos2Phi + gather(fParamS0Par[2], type)*tg2Phi; Err2Z = gather(fParamS0Par[3], type) + gather(fParamS0Par[4], type)*z*(1.f+tg2Lambda) + gather(fParamS0Par[5], type)*tg2Lambda; Err2Y = select( Err2Y<1e-6f, 1e-6f, Err2Y); Err2Z = select( Err2Z<1e-6f, 1e-6f, Err2Z); Err2Y = select( Err2Y>1.f, 1.f, Err2Y); Err2Z = select( Err2Z>1.f, 1.f, Err2Z); }