//*-- Author :    Ole Hansen   04-Apr-03

//////////////////////////////////////////////////////////////////////////
//
// THaTrackInfo
//
// Utility class/structure for holding track information.
//
//////////////////////////////////////////////////////////////////////////

#include "THaTrackInfo.h"
#include "THaTrack.h"
#include "THaSpectrometer.h"
#include "THaTrackingDetector.h"

using namespace std;

const Double_t THaTrackInfo::kBig = 1e38;

//_____________________________________________________________________________
THaTrackInfo& THaTrackInfo::operator=( const THaTrackInfo& rhs )
{
  // Assignment operator

  if( this != &rhs ) {
    fP     = rhs.fP;
    fDp    = rhs.fDp;
    fX     = rhs.fX;
    fY     = rhs.fY;
    fTheta = rhs.fTheta;
    fPhi   = rhs.fPhi;
    fPvect = rhs.fPvect;
    fOK    = rhs.fOK;
    fSpectro = rhs.fSpectro;
  }
  return *this;
}

//_____________________________________________________________________________
THaTrackInfo& THaTrackInfo::operator=( const THaTrack& track )
{
  // Assignment to a track

  fP     = track.GetP();
  fDp    = track.GetDp();
  fX     = track.GetTX();
  fY     = track.GetTY();
  fTheta = track.GetTTheta();
  fPhi   = track.GetTPhi();
  fPvect = const_cast<THaTrack&>(track).GetPvect();
  fOK    = 1;
  THaTrackingDetector* td = track.GetCreator();
  if( td )
    fSpectro = static_cast<THaSpectrometer*>(td->GetApparatus());

  return *this;
}

//_____________________________________________________________________________
ClassImp(THaTrackInfo)

Last change: Sat Nov 7 21:26:53 2009
Last generated: 2009-11-07 21:26

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.