Changeset 1209 for trunk/MagicSoft/Mars/macros
- Timestamp:
- 01/22/02 17:32:15 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/MagicHillas.C
r1152 r1209 24 24 25 25 26 void MagicHillas(const char *filename=" data/camera.root")26 void MagicHillas(const char *filename="~/data/Gamma*.root") 27 27 { 28 28 // … … 46 46 plist.AddToList(&geomcam); 47 47 48 MPedestalCam pedest; 49 plist.AddToList(&pedest); 48 // 49 // Craete the object which hlods the source positions in the camera 50 // plain in respect to which the image parameters will be calculated. 51 // For real data the containers will be filled by a task. 52 // 53 MSrcPosCam source("Source") 54 source.SetXY(0, 0); 55 56 MSrcPosCam antisrc("AntiSrc"); 57 antisrc.SetXY(240, 0); 58 59 plist.AddToList(&source); 60 plist.AddToList(&antisrc); 50 61 51 62 // 52 63 // Now setup the tasks and tasklist: 53 // 54 // 1) read in the data from a magic root file MReadTree 55 // 2) calculate number of cerenkov photons MCerPhotCalc 56 // 3) clean the image MImgCleanStd 57 // 4) calculate hillas MHillasCalc 58 // 5) fill the hillas into the histograms MFillH 59 // 60 64 // --------------------------------- 61 65 // 62 66 // The first argument is the tree you want to read. … … 65 69 // CalEvents: Calibration Events 66 70 // 67 MReadMarsFile read("Events", filename);71 MReadMarsFile read("Events", filename); 68 72 69 73 MMcPedestalCopy pcopy; … … 73 77 MBlindPixelCalc blind; 74 78 MHillasCalc hcalc; 75 M FillH hfill("MHillas", "MHHillas");76 M FillH sfill("MHillas", "MHStarMap");79 MHillasSrcCalc csrc1("Source", "HillasSource"); 80 MHillasSrcCalc csrc2("AntiSrc", "HillasAntiSrc"); 77 81 78 // 79 // Crete and setup Tasklist 80 // 82 MFillH hfill("MHHillas", "MHillas"); 83 MFillH sfill("MHStarMap", "MHillas"); 84 MFillH hfill2s("HistSource [MHHillasSrc]", "HillasSource"); 85 MFillH hfill2a("HistAntiSrc [MHHillasSrc]", "HillasAntiSrc"); 86 81 87 MWriteRootFile write("hillas.root"); 82 write.AddContainer("MHillas"); 88 write.AddContainer("MHillas", "Hillas"); 89 write.AddContainer("HillasSource", "Hillas"); 90 write.AddContainer("HillasAntiSrc", "Hillas"); 83 91 write.AddContainer("MHStarMap"); 84 92 … … 90 98 tlist.AddToList(&blind); 91 99 tlist.AddToList(&hcalc); 100 tlist.AddToList(&csrc1); 101 tlist.AddToList(&csrc2); 92 102 tlist.AddToList(&hfill); 93 103 tlist.AddToList(&sfill); 104 tlist.AddToList(&hfill2s); 105 tlist.AddToList(&hfill2a); 94 106 tlist.AddToList(&write); 95 107 … … 112 124 // 113 125 plist.FindObject("MHHillas")->DrawClone(); 126 plist.FindObject("HistSource")->DrawClone(); 127 plist.FindObject("HistAntiSrc")->DrawClone(); 114 128 plist.FindObject("MHStarMap")->DrawClone(); 115 129 }
Note:
See TracChangeset
for help on using the changeset viewer.