1 | /* ======================================================================== *\
|
---|
2 | !
|
---|
3 | ! *
|
---|
4 | ! * This file is part of MARS, the MAGIC Analysis and Reconstruction
|
---|
5 | ! * Software. It is distributed to you in the hope that it can be a useful
|
---|
6 | ! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
|
---|
7 | ! * It is distributed WITHOUT ANY WARRANTY.
|
---|
8 | ! *
|
---|
9 | ! * Permission to use, copy, modify and distribute this software and its
|
---|
10 | ! * documentation for any purpose is hereby granted without fee,
|
---|
11 | ! * provided that the above copyright notice appear in all copies and
|
---|
12 | ! * that both that copyright notice and this permission notice appear
|
---|
13 | ! * in supporting documentation. It is provided "as is" without express
|
---|
14 | ! * or implied warranty.
|
---|
15 | ! *
|
---|
16 | !
|
---|
17 | !
|
---|
18 | ! Author(s): Keiichi Mase 10/2004 <mailto:mase@mppmu.mpg.de>
|
---|
19 | ! Markus Meyer 10/2004 <mailto:meyer@astro.uni-wuerzburg.de>
|
---|
20 | !
|
---|
21 | ! Copyright: MAGIC Software Development, 2000-2004
|
---|
22 | !
|
---|
23 | !
|
---|
24 | \* ======================================================================== */
|
---|
25 |
|
---|
26 | /////////////////////////////////////////////////////////////////////////////
|
---|
27 | //
|
---|
28 | // MMuonCalibPar
|
---|
29 | //
|
---|
30 | // Storage Container for muon
|
---|
31 | //
|
---|
32 | // This class holds some information for a calibraion using muons. Muons
|
---|
33 | // are identified by using the class of the MMuonSearchParCalc. You can fill
|
---|
34 | // these information by using the MMuonCalibParCalc. See also these class
|
---|
35 | // manuals.
|
---|
36 | //
|
---|
37 | //
|
---|
38 | // Input Containers:
|
---|
39 | // [MGeomCam]
|
---|
40 | // [MCerPhotEvt]
|
---|
41 | // [MMuonSearchPar]
|
---|
42 | //
|
---|
43 | /////////////////////////////////////////////////////////////////////////////
|
---|
44 | #include "MMuonCalibPar.h"
|
---|
45 |
|
---|
46 | #include <fstream>
|
---|
47 |
|
---|
48 | #include "MLog.h"
|
---|
49 | #include "MLogManip.h"
|
---|
50 | #include "MCerPhotEvt.h"
|
---|
51 | #include "MCerPhotPix.h"
|
---|
52 | #include "MMuonSearchPar.h"
|
---|
53 | #include "MBinning.h"
|
---|
54 |
|
---|
55 | using namespace std;
|
---|
56 |
|
---|
57 | ClassImp(MMuonCalibPar);
|
---|
58 |
|
---|
59 | // --------------------------------------------------------------------------
|
---|
60 | //
|
---|
61 | // Default constructor.
|
---|
62 | //
|
---|
63 | MMuonCalibPar::MMuonCalibPar(const char *name, const char *title)
|
---|
64 | {
|
---|
65 | fName = name ? name : "MMuonCalibPar";
|
---|
66 | fTitle = title ? title : "Muon calibration parameters";
|
---|
67 |
|
---|
68 | fHistPhi = new TH1F;
|
---|
69 | fHistWidth = new TH1F;
|
---|
70 |
|
---|
71 | fHistPhi->SetName("HistPhi");
|
---|
72 | fHistPhi->SetTitle("HistPhi");
|
---|
73 | fHistPhi->SetXTitle("phi [deg.]");
|
---|
74 | fHistPhi->SetYTitle("sum of ADC");
|
---|
75 | fHistPhi->SetDirectory(NULL);
|
---|
76 | fHistPhi->SetFillStyle(4000);
|
---|
77 | fHistPhi->UseCurrentStyle();
|
---|
78 |
|
---|
79 | fHistWidth->SetName("HistWidth");
|
---|
80 | fHistWidth->SetTitle("HistWidth");
|
---|
81 | fHistWidth->SetXTitle("distance from the ring center [deg.]");
|
---|
82 | fHistWidth->SetYTitle("sum of ADC");
|
---|
83 | fHistWidth->SetDirectory(NULL);
|
---|
84 | fHistWidth->SetFillStyle(4000);
|
---|
85 | fHistWidth->UseCurrentStyle();
|
---|
86 |
|
---|
87 | fMargin = 60.; // in mm
|
---|
88 | fArcPhiThres = 100.;
|
---|
89 | fArcWidthThres = 100.;
|
---|
90 | fArcPhiBinNum = 20;
|
---|
91 | fArcPhiHistStartVal = -180.; // deg.
|
---|
92 | fArcPhiHistEndVal = 180.; // deg.
|
---|
93 | fArcWidthBinNum = 28;
|
---|
94 | fArcWidthHistStartVal = 0.3; // deg.
|
---|
95 | fArcWidthHistEndVal = 1.7; // deg.
|
---|
96 | }
|
---|
97 |
|
---|
98 | // --------------------------------------------------------------------------
|
---|
99 | //
|
---|
100 | MMuonCalibPar::~MMuonCalibPar()
|
---|
101 | {
|
---|
102 | delete fHistPhi;
|
---|
103 | delete fHistWidth;
|
---|
104 | }
|
---|
105 |
|
---|
106 | // --------------------------------------------------------------------------
|
---|
107 | //
|
---|
108 | void MMuonCalibPar::Reset()
|
---|
109 | {
|
---|
110 | fArcLength = -1.;
|
---|
111 | fArcPhi = 0.;
|
---|
112 | fArcWidth = -1.;
|
---|
113 | fChiArcPhi = -1.;
|
---|
114 | fChiArcWidth = -1.;
|
---|
115 | fMuonSize = 0.;
|
---|
116 | fEstImpact = -1.;
|
---|
117 | fUseUnmap = kFALSE;
|
---|
118 | fPeakPhi = 0.;
|
---|
119 |
|
---|
120 | fHistPhi->Reset();
|
---|
121 | fHistWidth->Reset();
|
---|
122 | }
|
---|
123 |
|
---|
124 | void MMuonCalibPar::Print(Option_t *) const
|
---|
125 | {
|
---|
126 | *fLog << all;
|
---|
127 | *fLog << "Muon Parameters (" << GetName() << ")" << endl;
|
---|
128 | *fLog << " - Arc Length [deg.] = " << fArcLength << endl;
|
---|
129 | *fLog << " - Arc Phi [deg.] = " << fArcPhi << endl;
|
---|
130 | *fLog << " - Arc Width [deg.] = " << fArcWidth << endl;
|
---|
131 | *fLog << " - Chi Arc Phi [x2/ndf]= " << fChiArcPhi << endl;
|
---|
132 | *fLog << " - Chi Arc Width [x2/ndf]= " << fChiArcWidth << endl;
|
---|
133 | *fLog << " - Est. I. P. [m] = " << fEstImpact << endl;
|
---|
134 | *fLog << " - Size of muon = " << fMuonSize << endl;
|
---|
135 | *fLog << " - Peak Phi [deg.] = " << fPeakPhi << endl;
|
---|
136 | *fLog << " - UseUnmap = " << fUseUnmap << endl;
|
---|
137 | }
|
---|
138 |
|
---|
139 |
|
---|
140 |
|
---|
141 |
|
---|