| 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 |
|
|---|
| 10 | ClassImp(Led);
|
|---|
| 11 |
|
|---|
| 12 | void Led::CalcPhi(const Ring &ring)
|
|---|
| 13 | {
|
|---|
| 14 | fPhi = TMath::ATan2(fY-ring.GetY(), fX-ring.GetX())*180/TMath::Pi();
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | void Led::Print(Option_t *o=NULL) const
|
|---|
| 18 | {
|
|---|
| 19 | cout << "Led: ";
|
|---|
| 20 | cout << "x=" << Form("%5.1f", fX) << "+-" << fDx << ", ";
|
|---|
| 21 | cout << "y=" << Form("%5.1f", fY) << "+-" << fDy << ", ";
|
|---|
| 22 | cout << "phi=" << Form("%6.1f", fPhi) << "+-" << fDphi << ", ";
|
|---|
| 23 | cout << "mag=" << fMag << endl;
|
|---|
| 24 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.