source: trunk/MagicSoft/Mars/macros/readMagic.C@ 1167

Last change on this file since 1167 was 1153, checked in by blanch, 23 years ago
Added MBlindPixelCalc to avoid bias results due to Star Field NSB while computing the Hillas parameters.
File size: 2.3 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 <mailto:tbretz@uni-sw.gwdg.de>
19!
20! Copyright: MAGIC Software Development, 2000-2001
21!
22!
23\* ======================================================================== */
24
25
26void readMagic()
27{
28 MParList plist;
29
30 MGeomCamMagic geomcam;
31 MPedestalCam pedest;
32 MHillas hillas;
33 MTaskList tlist;
34
35 plist.AddToList(&geomcam);
36 plist.AddToList(&pedest);
37 plist.AddToList(&hillas);
38 plist.AddToList(&tlist);
39
40 MReadMarsFile read("Events", "~/data/camera.root");
41
42 MMcPedestalCopy pcopy;
43 MMcPedestalNSBAdd pnsb;
44 MCerPhotCalc ncalc;
45 MClone clone("MCerPhotEvt");
46 MImgCleanStd clean;
47 MBlindPixelCalc blind;
48 MHillasCalc hcalc;
49
50
51 tlist.AddToList(&read);
52 tlist.AddToList(&pcopy);
53 tlist.AddToList(&pnsb);
54 tlist.AddToList(&ncalc);
55 tlist.AddToList(&clone);
56 tlist.AddToList(&clean);
57 tlist.AddToList(&blind);
58 tlist.AddToList(&hcalc);
59
60 MEvtLoop evtloop;
61 evtloop.SetParList(&plist);
62
63 if (!evtloop.PreProcess())
64 return;
65
66 MCamDisplay display(&geomcam);
67 display.Draw();
68
69 while (tlist.Process())
70 {
71 cout << "Event #" << read.GetEventNum() ":" << endl;
72
73 display.DrawPhotNum((MCerPhotEvt*)clone.GetClone());
74
75 gClient->HandleInput();
76 if(getchar()=='q')
77 break;
78
79 hillas.Print();
80 hillas.Draw();
81
82 display.DrawPhotNum((MCerPhotEvt*)plist.FindObject("MCerPhotEvt"));
83
84 gClient->HandleInput();
85 if(getchar()=='q')
86 break;
87 }
88
89 evtloop.PostProcess();
90
91}
92
93
94
95
Note: See TracBrowser for help on using the repository browser.