Line | |
---|
1 | void CT1Hillas()
|
---|
2 | {
|
---|
3 | //
|
---|
4 | // This is a demonstration program which calculates the Hillas
|
---|
5 | // parameter out of a CT1 dataset.
|
---|
6 |
|
---|
7 | //
|
---|
8 | // Create a empty Parameter List and an empty Task List
|
---|
9 | // The tasklist is identified in the eventloop by its name
|
---|
10 | //
|
---|
11 | MParList plist;
|
---|
12 |
|
---|
13 | MTaskList tlist;
|
---|
14 | plist.AddToList(&tlist);
|
---|
15 |
|
---|
16 | //
|
---|
17 | // The geometry container must be created by yourself to make sure
|
---|
18 | // that you don't choos a wrong geometry by chance
|
---|
19 | //
|
---|
20 | MGeomCamCT1 geomcam;
|
---|
21 | plist.AddToList(&geomcam);
|
---|
22 |
|
---|
23 | //
|
---|
24 | // The Hillas histograms (MHHillas) could be created automatically
|
---|
25 | // but to make sure, that they are not deleted when the macro is
|
---|
26 | // finished you must create them yourself and add it to the list
|
---|
27 | //
|
---|
28 | MHHillas *hists = new MHHillas;
|
---|
29 | plist.AddToList(hists);
|
---|
30 |
|
---|
31 | MHStarMap *smap = new MHStarMap;
|
---|
32 | plist.AddToList(smap);
|
---|
33 |
|
---|
34 | //
|
---|
35 | // Now setup the tasks and tasklist:
|
---|
36 | //
|
---|
37 | // 1) read in the data from a ct1 ascii file MCTReadAscii
|
---|
38 | // 2) clean the image MImgCleanStd
|
---|
39 | // 3) calculate hillas MHillasCalc
|
---|
40 | // 4) fill the hillas into the histograms MFillHHillas
|
---|
41 | //
|
---|
42 | MCT1ReadAscii read("data/MCCT1_97_ga45.dat");
|
---|
43 | // read.AddFile("data/MCCT1_97_ga20.dat");
|
---|
44 |
|
---|
45 | MImgCleanStd clean;
|
---|
46 | MHillasCalc hcalc;
|
---|
47 | MFillHHillas hfill;
|
---|
48 | MFillHStarMap sfill;
|
---|
49 |
|
---|
50 | tlist.AddToList(&read);
|
---|
51 | tlist.AddToList(&clean);
|
---|
52 | tlist.AddToList(&hcalc);
|
---|
53 | tlist.AddToList(&hfill);
|
---|
54 | tlist.AddToList(&sfill);
|
---|
55 |
|
---|
56 | //
|
---|
57 | // Create and setup the eventloop
|
---|
58 | //
|
---|
59 | MEvtLoop evtloop;
|
---|
60 | evtloop.SetParList(&plist);
|
---|
61 |
|
---|
62 | //
|
---|
63 | // Execute your analysis
|
---|
64 | //
|
---|
65 | evtloop.Eventloop();
|
---|
66 |
|
---|
67 | //
|
---|
68 | // After the analysis is finished we can display the histograms
|
---|
69 | //
|
---|
70 | hists->Draw();
|
---|
71 | smap->Draw();
|
---|
72 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.