//-*- Mode: C++ -*- // @(#) $Id: AliHLTTPCCAParam.h,v 1.4 2011/10/01 00:23:44 perev Exp $ // ************************************************************************ // This file is property of and copyright by the ALICE HLT Project * // ALICE Experiment at CERN, All rights reserved. * // See cxx source for full Copyright notice * // * //************************************************************************* #ifndef ALIHLTTPCCAPARAM_H #define ALIHLTTPCCAPARAM_H #include "AliHLTTPCCADef.h" #include "AliHLTVector.h" #include "AliHLTTPCCAMath.h" #include "AliHLTTPCCATrackParam.h" #include "AliHLTTPCCAParameters.h" #include "ITSCAStation.h" #include "CAFieldValue.h" #include namespace std { template struct char_traits; template class basic_istream; typedef basic_istream > istream; template class basic_ostream; typedef basic_ostream > ostream; } // namespace std /** * @class ALIHLTTPCCAParam * parameters of the AliHLTTPCCATracker, including geometry information * and some reconstructon constants. * * The class is under construction. * */ class AliHLTTPCCAParam { friend std::istream &operator>>( std::istream &, AliHLTTPCCAParam & ); friend std::ostream &operator<<( std::ostream &, const AliHLTTPCCAParam & ); public: AliHLTTPCCAParam(); ~AliHLTTPCCAParam(){ if(fStations) delete [] fStations; } int NStations() const { return fNStations;} const ITSCAStation& Station(int i ) const { return fStations[i];} float Bz() const { return fBz;} float cBz() const { return fBz*0.000299792458;} void SetBz( float v ) { fBz = v;} float GetBz() const { return fBz;} float GetBz( float x, float y, float z ) const; sfloat_v GetBz( sfloat_v x, sfloat_v y, sfloat_v z ) const; float GetBz( const AliHLTTPCCATrackParam &t ) const; sfloat_v GetBz( const AliHLTTPCCATrackParamVector &t ) const; float GetXOverX0(int iSt) const { return fStations[iSt].xOverX0; }; float GetXTimesRho(int iSt) const { return fStations[iSt].xTimesRho; }; sfloat_v GetXOverX0( short_v iSt, sfloat_m mask ) const { sfloat_v r; r.gather( fStations, &ITSCAStation::xOverX0, static_cast(iSt), mask ); return r; }; sfloat_v GetXTimesRho( short_v iSt, sfloat_m mask ) const { sfloat_v r; r.gather( fStations, &ITSCAStation::xTimesRho, static_cast(iSt), mask ); return r; }; void StoreToFile( FILE *f ) const; void RestoreFromFile( FILE *f ); const CAFieldValue &VtxFieldValue() const { return fVtxFieldValue; } protected: int fNStations; ITSCAStation *fStations; float fBz; CAFieldValue fVtxFieldValue; // field at the vertex position. }; std::istream &operator>>( std::istream &, AliHLTTPCCAParam & ); std::ostream &operator<<( std::ostream &, const AliHLTTPCCAParam & ); #endif