Hall A ROOT/C++ Analyzer (podd)
Loading...
Searching...
No Matches
THaTrackInfo.cxx
Go to the documentation of this file.
1//*-- Author : Ole Hansen 04-Apr-03
2
4//
5// THaTrackInfo
6//
7// Utility class/structure for holding track information.
8//
10
11#include "THaTrackInfo.h"
12#include "THaTrack.h"
13#include "THaSpectrometer.h"
14#include "THaTrackingDetector.h"
15
16using namespace std;
17
18//_____________________________________________________________________________
20{
21 // Assignment operator
22
23 if( this != &rhs ) {
24 fP = rhs.fP;
25 fDp = rhs.fDp;
26 fX = rhs.fX;
27 fY = rhs.fY;
28 fTheta = rhs.fTheta;
29 fPhi = rhs.fPhi;
30 fPvect = rhs.fPvect;
31 fOK = rhs.fOK;
32 fSpectro = rhs.fSpectro;
33 }
34 return *this;
35}
36
37//_____________________________________________________________________________
39{
40 // Assignment to a track
41
42 fP = track.GetP();
43 fDp = track.GetDp();
44 fX = track.GetTX();
45 fY = track.GetTY();
46 fTheta = track.GetTTheta();
47 fPhi = track.GetTPhi();
48 fPvect = const_cast<THaTrack&>(track).GetPvect();
49 fOK = 1;
50 THaTrackingDetector* td = track.GetCreator();
51 if( td )
52 fSpectro = static_cast<THaSpectrometer*>(td->GetApparatus());
53
54 return *this;
55}
56
57//_____________________________________________________________________________
THaApparatus * GetApparatus() const
Double_t fP
Double_t fPhi
Double_t fDp
THaTrackInfo & operator=(const THaTrackInfo &)
THaSpectrometer * fSpectro
const TVector3 & GetPvect() const
TVector3 fPvect
Double_t fY
Double_t fTheta
Double_t fX
THaTrackingDetector * GetCreator() const
Definition THaTrack.h:77
Double_t GetTY() const
Definition THaTrack.h:107
Double_t GetTPhi() const
Definition THaTrack.h:109
Double_t GetDp() const
Definition THaTrack.h:110
Double_t GetP() const
Definition THaTrack.h:86
Double_t GetTTheta() const
Definition THaTrack.h:108
Double_t GetTX() const
Definition THaTrack.h:106
STL namespace.
ClassImp(TPyArg)