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 09/2004 <mailto:mase@mppmu.mpg.de>
|
---|
19 | ! Author(s): Markus Meyer 09/2004 <mailto:meyer@astro.uni-wuerzburg.de>
|
---|
20 | !
|
---|
21 | ! Copyright: MAGIC Software Development, 2000-2005
|
---|
22 | !
|
---|
23 | !
|
---|
24 | \* ======================================================================== */
|
---|
25 |
|
---|
26 | //////////////////////////////////////////////////////////////////////////////
|
---|
27 | //
|
---|
28 | // MMuonSearchParCalc
|
---|
29 | //
|
---|
30 | // Task to calculate the muon parameters
|
---|
31 | //
|
---|
32 | // This class search for muons and store the information into the container
|
---|
33 | // of MMuonSearchPar. The actual calculation is done in the class of
|
---|
34 | // MMuonSearchPar. Please see the manual.
|
---|
35 | //
|
---|
36 | // In order to use further information of muons such as the width of arcs,
|
---|
37 | // the arc length along it, the muons size. Use the infomation stored in
|
---|
38 | // MMuonCalibPar. The information will be available by using the task of
|
---|
39 | // MMuonCalibParCalc.
|
---|
40 | //
|
---|
41 | //
|
---|
42 | // Input Containers:
|
---|
43 | // MGeomCam
|
---|
44 | // MHillas
|
---|
45 | // MSignalCam
|
---|
46 | //
|
---|
47 | // Output Containers:
|
---|
48 | // MMuonSearchPar
|
---|
49 | //
|
---|
50 | //////////////////////////////////////////////////////////////////////////////
|
---|
51 | #include "MMuonSearchParCalc.h"
|
---|
52 |
|
---|
53 | #include "MParList.h"
|
---|
54 |
|
---|
55 | #include "MLog.h"
|
---|
56 | #include "MLogManip.h"
|
---|
57 |
|
---|
58 | #include "MGeomCam.h"
|
---|
59 | #include "MSignalCam.h"
|
---|
60 | #include "MMuonSearchPar.h"
|
---|
61 |
|
---|
62 | using namespace std;
|
---|
63 |
|
---|
64 | ClassImp(MMuonSearchParCalc);
|
---|
65 |
|
---|
66 | static const TString gsDefName = "MMuonSearchParCalc";
|
---|
67 | static const TString gsDefTitle = "Calculate muon parameters";
|
---|
68 |
|
---|
69 | // -------------------------------------------------------------------------
|
---|
70 | //
|
---|
71 | // Default constructor.
|
---|
72 | //
|
---|
73 | MMuonSearchParCalc::MMuonSearchParCalc(const char *name, const char *title)
|
---|
74 | : fHillas(NULL), fMuonPar(NULL)
|
---|
75 | {
|
---|
76 | fName = name ? name : gsDefName.Data();
|
---|
77 | fTitle = title ? title : gsDefTitle.Data();
|
---|
78 | }
|
---|
79 |
|
---|
80 | // -------------------------------------------------------------------------
|
---|
81 | //
|
---|
82 | Int_t MMuonSearchParCalc::PreProcess(MParList *pList)
|
---|
83 | {
|
---|
84 | fHillas = (MHillas*)pList->FindObject("MHillas");
|
---|
85 | if (!fHillas)
|
---|
86 | {
|
---|
87 | *fLog << err << "MHillas not found... aborting." << endl;
|
---|
88 | return kFALSE;
|
---|
89 | }
|
---|
90 |
|
---|
91 | fSignalCam = (MSignalCam*)pList->FindObject("MSignalCam");
|
---|
92 | if (!fSignalCam)
|
---|
93 | {
|
---|
94 | *fLog << err << "MSignalCam not found... aborting." << endl;
|
---|
95 | return kFALSE;
|
---|
96 | }
|
---|
97 |
|
---|
98 | fGeomCam = (MGeomCam*)pList->FindObject("MGeomCam");
|
---|
99 | if (!fGeomCam)
|
---|
100 | {
|
---|
101 | *fLog << err << "MGeomCam not found... aborting." << endl;
|
---|
102 | return kFALSE;
|
---|
103 | }
|
---|
104 |
|
---|
105 | fMuonPar = (MMuonSearchPar*)pList->FindCreateObj("MMuonSearchPar");
|
---|
106 | if (!fMuonPar)
|
---|
107 | return kFALSE;
|
---|
108 |
|
---|
109 | return kTRUE;
|
---|
110 | }
|
---|
111 |
|
---|
112 | // -------------------------------------------------------------------------
|
---|
113 | //
|
---|
114 | Int_t MMuonSearchParCalc::Process()
|
---|
115 | {
|
---|
116 | fMuonPar->Calc(*fGeomCam, *fSignalCam, *fHillas);
|
---|
117 | return kTRUE;
|
---|
118 | }
|
---|