source: trunk/Mars/mimage/MHillasSrc.h@ 19344

Last change on this file since 19344 was 19131, checked in by tbretz, 6 years ago
Added a function to return the Sign of fCosDeltaAlpha as 1 or -1.
File size: 1.9 KB
Line 
1#ifndef MARS_MHillasSrc
2#define MARS_MHillasSrc
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8class TArrayF;
9
10class MHillas;
11class MGeomCam;
12class MSrcPosCam;
13
14class MHillasSrc : public MParContainer
15{
16private:
17 const MSrcPosCam *fSrcPos; //! Source position in the camere
18
19 Float_t fAlpha; // [deg] angle of major axis with vector to src
20 Float_t fDist; // [mm] distance between src and center of ellipse
21 Float_t fCosDeltaAlpha; // [1] cosine of angle between d and a
22
23 Float_t fDCA; // [mm] Distance to closest approach 'DCA'
24 Float_t fDCADelta; // [deg] Angle of the shower axis with respect to the x-axis
25
26public:
27 MHillasSrc(const char *name=NULL, const char *title=NULL);
28 MHillasSrc(const MHillasSrc &h) { h.Copy(*this); }
29
30 void Copy(TObject &o) const
31 {
32 MHillasSrc &src = static_cast<MHillasSrc&>(o);
33 src.fSrcPos = fSrcPos;
34 src.fAlpha = fAlpha;
35 src.fDist = fDist;
36 src.fCosDeltaAlpha = fCosDeltaAlpha;
37 src.fDCA = fDCA;
38 src.fDCADelta = fDCADelta;
39 }
40
41 void SetSrcPos(const MSrcPosCam *pos) { fSrcPos = pos; }
42 const MSrcPosCam *GetSrcPos() const { return fSrcPos; }
43
44 void Reset();
45
46 Float_t GetAlpha() const { return fAlpha; }
47 Float_t GetDist() const { return fDist; }
48 Float_t GetCosDeltaAlpha() const { return fCosDeltaAlpha; }
49 Int_t GetSign() const { return fCosDeltaAlpha>0 ? 1 : -1; }
50 Float_t GetDCA() const { return fDCA; }
51 Float_t GetDCADelta() const { return fDCADelta; }
52
53 void Print(Option_t *opt=NULL) const;
54 void Print(const MGeomCam &geom) const;
55 void Paint(Option_t *opt=NULL);
56
57 virtual Int_t Calc(const MHillas &hillas, double abberation=1);
58
59 void Set(const TArrayF &arr);
60
61 ClassDef(MHillasSrc, 5) // Container to hold source position dependant parameters
62};
63
64#endif
Note: See TracBrowser for help on using the repository browser.