source: trunk/MagicSoft/Mars/macros/CT1Hillas.C@ 1181

Last change on this file since 1181 was 1011, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 2.5 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): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)
19!
20! Copyright: MAGIC Software Development, 2000-2001
21!
22!
23\* ======================================================================== */
24
25
26void CT1Hillas()
27{
28 //
29 // This is a demonstration program which calculates the Hillas
30 // parameter out of a CT1 dataset.
31
32 //
33 // Create a empty Parameter List and an empty Task List
34 // The tasklist is identified in the eventloop by its name
35 //
36 MParList plist;
37
38 MTaskList tlist;
39 plist.AddToList(&tlist);
40
41 //
42 // The geometry container must be created by yourself to make sure
43 // that you don't choos a wrong geometry by chance
44 //
45 MGeomCamCT1 geomcam;
46 plist.AddToList(&geomcam);
47
48 //
49 // Now setup the tasks and tasklist:
50 //
51 // 1) read in the data from a ct1 ascii file MCTReadAscii
52 // 2) clean the image MImgCleanStd
53 // 3) calculate hillas MHillasCalc
54 // 4) fill the hillas into the histograms MFillHHillas
55 //
56 MCT1ReadAscii read("data/CT1_97_on1.dat");
57 read.AddFile("data/CT1_97_off1.dat");
58
59 MImgCleanStd clean;
60 MHillasCalc hcalc;
61 MFillH hfill("MHillas", "MHHillas");
62 MFillH sfill("MHillas", "MHStarMap");
63
64 tlist.AddToList(&read);
65 tlist.AddToList(&clean);
66 tlist.AddToList(&hcalc);
67 tlist.AddToList(&hfill);
68 tlist.AddToList(&sfill);
69
70 //
71 // Create and setup the eventloop
72 //
73 MEvtLoop evtloop;
74 evtloop.SetParList(&plist);
75
76 //
77 // Execute your analysis
78 //
79 if (!evtloop.Eventloop())
80 return;
81
82 //
83 // After the analysis is finished we can display the histograms
84 //
85 plist.FindObject("MHHillas")->DrawClone();
86 plist.FindObject("MHStarMap")->DrawClone();
87}
Note: See TracBrowser for help on using the repository browser.