Line | |
---|
1 | #include "Led.h"
|
---|
2 |
|
---|
3 | #include <iostream.h>
|
---|
4 |
|
---|
5 | #include <TROOT.h>
|
---|
6 | #include <TMath.h>
|
---|
7 |
|
---|
8 | #include "Ring.h"
|
---|
9 | #include "MString.h"
|
---|
10 |
|
---|
11 | ClassImp(Led);
|
---|
12 |
|
---|
13 | void Led::CalcPhi(const Ring &ring)
|
---|
14 | {
|
---|
15 | fPhi = TMath::ATan2(fY-ring.GetY(), fX-ring.GetX())*180/TMath::Pi();
|
---|
16 | }
|
---|
17 |
|
---|
18 | void Led::Print(Option_t *o=NULL) const
|
---|
19 | {
|
---|
20 | MString str;
|
---|
21 | cout << "Led: ";
|
---|
22 | cout << "x=" << str.Print("%5.1f", fX) << "+-" << fDx << ", ";
|
---|
23 | cout << "y=" << str.Print("%5.1f", fY) << "+-" << fDy << ", ";
|
---|
24 | cout << "phi=" << str.Print("%6.1f", fPhi) << "+-" << fDphi << ", ";
|
---|
25 | cout << "mag=" << fMag << endl;
|
---|
26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.