source: trunk/Cosy/caos/Led.cc@ 13311

Last change on this file since 13311 was 8998, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 603 bytes
Line 
1#include "Led.h"
2
3#include <iostream>
4
5#include <TROOT.h>
6#include <TMath.h>
7
8#include "Ring.h"
9#include "MString.h"
10
11ClassImp(Led);
12
13using namespace std;
14
15void Led::CalcPhi(const Ring &ring)
16{
17 fPhi = TMath::ATan2(fY-ring.GetY(), fX-ring.GetX())*180/TMath::Pi();
18}
19
20void Led::Print(Option_t *o) const
21{
22 cout << "Led: ";
23 cout << "x=" << MString::Format("%5.1f", fX) << "+-" << fDx << ", ";
24 cout << "y=" << MString::Format("%5.1f", fY) << "+-" << fDy << ", ";
25 cout << "phi=" << MString::Format("%6.1f", fPhi) << "+-" << fDphi << ", ";
26 cout << "mag=" << fMag << endl;
27}
Note: See TracBrowser for help on using the repository browser.