Help with TVector

I have a C++ program in which I need to intialize a TVector, but there is an compiling error.

Here is the snippet of code:
TVector v3(1,1,1);
v3.SetMag(ThrustMagAll);
cout << v3 << endl;
v3.SetPhi(ThrustPhiAll);
cout << v3 << endl;
ThrustTheta = acos(ThrustCosThAll);
v3.SetTheta(ThrustTheta);
cout << v3 << endl;

Here is the compile error:

ntp100.cc:438: variable `TVector v3’ has initializer but incomplete type

Here is my compiler:

setenv ROOTSYS /beeraid1/babar/package/root/4.03-02
setenv LD_LIBRARY_PATH /beeraid1/babar/package/root/4.03-02/lib

/usr/bin/g++ -o ntp100 -O -Wno-deprecated -Wall -fPIC -I$ROOTSYS/include ntp100.cc
/barraid1/white/Babar/Research/pidstudy/bin/lib/Linux24/4.03-02/PidTables/*.o
-L$ROOTSYS/lib -lCore -lCint -lHist
-lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lMinuit -lPhysics -lm -ldl -lpthread -rdynamic

Is there a “.h” file that needs to be included as well? I’ve tried other ways to initialize as well, but no success. Any help is appreciated. Much thanks fellow Root Users.

Add

to you source file.

Philippe[/code]

Okay, I’ve included TVector.h

Now, I get these errors:
ntp100.cc:439: invalid conversion from int' toconst Float_t*‘
ntp100.cc:439: initializing argument 3 of `TVector::TVector(int, int, const
Float_t*)’

Any ideas?

Got it, seems like I needed TVector3

So, I included TVector3.h

now this code compiles:
TVector3 *v3 = new TVector3(1,1,1);
v3->SetMag(ThrustMagAll);
v3->SetPhi(ThrustPhiAll);
ThrustTheta = acos(ThrustCosThAll);
v3->SetTheta(ThrustTheta);

I guess I didn’t need the help after all, but this may be useful to others in the future.