]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RICH/AliRICHHelix.cxx
Adding the binaliengui.pkg that will be used to build the aliengui executable.
[u/mrichter/AliRoot.git] / RICH / AliRICHHelix.cxx
CommitLineData
db910db9 1#include "AliRICHHelix.h" //class header
2#include <TPolyLine3D.h> //Draw()
998b831f 3
4ClassImp(AliRICHHelix)
db910db9 5//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
db910db9 6void AliRICHHelix::Print(Option_t *opt) const
7{
8// Debug printout
9 Printf("%s helix for Q=%i in B=(0,0,%.2f) tesla",opt,fQ,fBz);
10 Printf("Helix parametrised @ x0=(%6.2f,%6.2f,%6.2f) cm p0=(%6.2f,%6.2f,%6.2f) GeV P=%.2f GeV Theta=%.2f Phi=%.2f degrees",
11 fX0.X(),fX0.Y(),fX0.Z(), fP0.Px(),fP0.Py(),fP0.Pz(), fP0.Mag(),fP0.Theta()*TMath::RadToDeg(),fP0.Phi()*TMath::RadToDeg());
db910db9 12}
13//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14void AliRICHHelix::Draw(const Option_t *)
15{
16// Draw helix by a set of points seperated by 1 cm distance
e30ca504 17 TVector3 pos,mom;
db910db9 18 const Int_t kNpoints=500;
19 TPolyLine3D *pHelDraw = new TPolyLine3D(kNpoints); pHelDraw->SetLineColor(kGreen);
20 for(Int_t i=0;i<kNpoints;i++) {
e30ca504 21 Propagate(i,pos,mom);
22 pHelDraw->SetPoint(i,pos.X(),pos.Y(),pos.Z());
db910db9 23 }
24 pHelDraw->Draw();
d3eb6079 25}