| Line | |
|---|
| 1 | #ifndef MARS_MSrcPosCam
|
|---|
| 2 | #define MARS_MSrcPosCam
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MParContainer
|
|---|
| 5 | #include "MParContainer.h"
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | class TVector2;
|
|---|
| 9 |
|
|---|
| 10 | class MSrcPosCam : public MParContainer
|
|---|
| 11 | {
|
|---|
| 12 | private:
|
|---|
| 13 | Float_t fX; // [mm] x position of source in camera
|
|---|
| 14 | Float_t fY; // [mm] y position of source in camera
|
|---|
| 15 |
|
|---|
| 16 | public:
|
|---|
| 17 | MSrcPosCam(const char *name=NULL, const char *title=NULL);
|
|---|
| 18 | MSrcPosCam(const MSrcPosCam &p);
|
|---|
| 19 |
|
|---|
| 20 | void Clear(Option_t *) { fX = 0; fY = 0; }
|
|---|
| 21 |
|
|---|
| 22 | void SetX(Float_t x) { fX = x; }
|
|---|
| 23 | void SetY(Float_t y) { fY = y; }
|
|---|
| 24 | void SetXY(Float_t x, Float_t y) { fX = x; fY = y; }
|
|---|
| 25 | void SetXY(const TVector2 &v);
|
|---|
| 26 |
|
|---|
| 27 | void Add(const TVector2 &v);
|
|---|
| 28 |
|
|---|
| 29 | Float_t GetDist() const { return TMath::Hypot(fX, fY); }
|
|---|
| 30 |
|
|---|
| 31 | Float_t GetX() const { return fX; }
|
|---|
| 32 | Float_t GetY() const { return fY; }
|
|---|
| 33 | TVector2 GetXY() const;
|
|---|
| 34 |
|
|---|
| 35 | void Print(Option_t *opt=NULL) const;
|
|---|
| 36 |
|
|---|
| 37 | void StreamPrimitive(ostream &out) const;
|
|---|
| 38 |
|
|---|
| 39 | //void AsciiRead(ifstream &fin);
|
|---|
| 40 | //void AsciiWrite(ofstream &fout) const;
|
|---|
| 41 |
|
|---|
| 42 | ClassDef(MSrcPosCam, 1) // container to store source position in the camera plain
|
|---|
| 43 | };
|
|---|
| 44 |
|
|---|
| 45 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.