source: trunk/Mars/mmuon/MMuonSearchParCalc.cc@ 14064

Last change on this file since 14064 was 7009, checked in by meyer, 20 years ago
*** empty log message ***
File size: 3.1 KB
Line 
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. Please see the manual for more information.
34//
35//
36// Input Containers:
37// MGeomCam
38// MHillas
39// MSignalCam
40//
41// Output Containers:
42// MMuonSearchPar
43//
44//////////////////////////////////////////////////////////////////////////////
45#include "MMuonSearchParCalc.h"
46
47#include "MParList.h"
48
49#include "MLog.h"
50#include "MLogManip.h"
51
52#include "MGeomCam.h"
53#include "MSignalCam.h"
54#include "MMuonSearchPar.h"
55
56using namespace std;
57
58ClassImp(MMuonSearchParCalc);
59
60static const TString gsDefName = "MMuonSearchParCalc";
61static const TString gsDefTitle = "Calculate muon parameters";
62
63// -------------------------------------------------------------------------
64//
65// Default constructor.
66//
67MMuonSearchParCalc::MMuonSearchParCalc(const char *name, const char *title)
68 : fHillas(NULL), fMuonPar(NULL)
69{
70 fName = name ? name : gsDefName.Data();
71 fTitle = title ? title : gsDefTitle.Data();
72}
73
74// -------------------------------------------------------------------------
75//
76Int_t MMuonSearchParCalc::PreProcess(MParList *pList)
77{
78 fHillas = (MHillas*)pList->FindObject("MHillas");
79 if (!fHillas)
80 {
81 *fLog << err << "MHillas not found... aborting." << endl;
82 return kFALSE;
83 }
84
85 fSignalCam = (MSignalCam*)pList->FindObject("MSignalCam");
86 if (!fSignalCam)
87 {
88 *fLog << err << "MSignalCam not found... aborting." << endl;
89 return kFALSE;
90 }
91
92 fGeomCam = (MGeomCam*)pList->FindObject("MGeomCam");
93 if (!fGeomCam)
94 {
95 *fLog << err << "MGeomCam not found... aborting." << endl;
96 return kFALSE;
97 }
98
99 fMuonPar = (MMuonSearchPar*)pList->FindCreateObj("MMuonSearchPar");
100 if (!fMuonPar)
101 return kFALSE;
102
103 return kTRUE;
104}
105
106// -------------------------------------------------------------------------
107//
108Int_t MMuonSearchParCalc::Process()
109{
110 fMuonPar->Calc(*fGeomCam, *fSignalCam, *fHillas);
111 return kTRUE;
112}
Note: See TracBrowser for help on using the repository browser.