source: tags/Mars-V0.8.6/mtemp/meth/MDCA.h

Last change on this file was 4096, checked in by commichau, 21 years ago
*** empty log message ***
File size: 3.1 KB
Line 
1#ifndef MARS_MDCA
2#define MARS_MDCA
3
4
5#include <TArrayF.h>
6#include <TEllipse.h>
7#include <TLine.h>
8#include <TCanvas.h>
9#include <TROOT.h>
10#include <TStyle.h>
11#include <TMath.h>
12#include <math.h>
13#include <TPad.h>
14#include <TRandom.h>
15#include <TRandom2.h>
16#include <fstream>
17#include <iostream>
18
19#include "MLog.h"
20#include "MLogManip.h"
21#include "MGeomCam.h"
22#include "MGeomPix.h"
23#include "MCerPhotPix.h"
24#include "MCerPhotEvt.h"
25#include "MHillas.h"
26
27// Add offsets to the Width and Length to draw nice lines
28#define OffsetW 20.0
29#define OffsetL 440.0
30
31#define kmm2Deg 0.00317460317
32#define TwoPi 6.28318530717958623
33
34class TArrayF;
35class TEllipse;
36class MGeoCam;
37class MCerPhotEvt;
38class MHillas;
39
40class MDCA : public MParContainer
41{
42 private:
43
44 Float_t fLength; // [mm] major axis of ellipse
45 Float_t fWidth; // [mm] minor axis of ellipse
46 Float_t fDelta0; // [rad] angle of major axis with x-axis (-Pi/2 .. Pi/2)
47 Float_t fDelta1; // [rad] my angle of major axis with x-axis (0 .. 2*Pi)
48 Float_t fMeanX; // [mm] x-coordinate of center of ellipse
49 Float_t fMeanY; // [mm] y-coordinate of center of ellipse
50 Float_t fX1W; // [mm] x-coordinate of 1st point of Lline
51 Float_t fY1W; // [mm] y-coordinate of 1st point of Lline
52 Float_t fX2W; // [mm] x-coordinate of 2nd point of Lline
53 Float_t fY2W; // [mm] y-coordinate of 2nd point of Lline
54 Float_t fX1L; // [mm] x-coordinate of 1st point of Wline
55 Float_t fY1L; // [mm] y-coordinate of 1st point of Wline
56 Float_t fX2L; // [mm] x-coordinate of 2nd point of Wline
57 Float_t fY2L; // [mm] y-coordinate of 2nd point of Wline
58 Double_t fDCA; // [mm] Distance of Cloasest Approach
59 Float_t fXDCA; // [mm] x-coordinate of 2nd point of the DCA-line
60 Float_t fYDCA; // [mm] y-coordinate of 2nd point of the DCA-line
61 Float_t fXRef; // [mm] x-coordinate of reference point
62 Float_t fYRef; // [mm] y-coordinate of reference point
63 Float_t fmu;
64 Float_t flambda;
65 Float_t fr1, fr2; // [mm] Coordinates of the orientation vector of the shower axis
66 Float_t fd1, fd2; // [mm] Coordinates of the DCA vector
67 Float_t gx, gy;
68
69 TEllipse *fEllipse; // Graphical object to draw the ellipse, ROOT!
70 TEllipse *fRefCircle; // To draw reference point
71
72 TLine *fLineL; // Shower axis
73 TLine *fLineW; // Line perpendicular to the shower axis
74 TLine *fLineX; // x-axis of the coordinate system
75 TLine *fLineY; // y-axis of the coordinate system
76 TLine *fLineDCA; // DCA line
77 TLine *fLineMean; // Line to COG of the shower
78
79 public:
80 MDCA(const char *name=NULL, const char *title=NULL);
81
82 ~MDCA();
83
84 void Reset();
85
86 Int_t Calc(const MGeomCam &geom, const MCerPhotEvt &pix, const MHillas &hil);
87
88 void Print(Option_t *opt=NULL) const;
89
90 void Paint(Option_t *opt=NULL);
91
92 void Clear(Option_t *opt=NULL);
93
94 void SetRefPoint(const Float_t fXRef0, const Float_t fYRef0);
95
96 Float_t GetDCA() const { return fDCA; }
97
98 Float_t GetDelta() const { return fDelta1; }
99
100 ClassDef(MDCA, 1)
101
102};
103
104#endif
105
106
107
108
109
Note: See TracBrowser for help on using the repository browser.