]>
Commit | Line | Data |
---|---|---|
d3da6dc4 | 1 | #include "AliHMPIDHelix.h" //class header |
2 | #include <TPolyLine3D.h> //Draw() | |
3 | ||
4 | ClassImp(AliHMPIDHelix) | |
5 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
6 | void AliHMPIDHelix::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()); | |
12 | } | |
13 | //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
14 | void AliHMPIDHelix::Draw(const Option_t *) | |
15 | { | |
16 | // Draw helix by a set of points seperated by 1 cm distance | |
17 | TVector3 pos,mom; | |
18 | const Int_t kNpoints=500; | |
19 | TPolyLine3D *pHelDraw = new TPolyLine3D(kNpoints); pHelDraw->SetLineColor(kGreen); | |
20 | for(Int_t i=0;i<kNpoints;i++) { | |
21 | Propagate(i,pos,mom); | |
22 | pHelDraw->SetPoint(i,pos.X(),pos.Y(),pos.Z()); | |
23 | } | |
24 | pHelDraw->Draw(); | |
25 | } |