Changeset 4658 for trunk/MagicSoft/Mars/mjobs
- Timestamp:
- 08/17/04 16:26:31 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mjobs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJExtractCalibTest.cc
r4559 r4658 27 27 // MJExtractCalibTest 28 28 // 29 // If the flag SetDataCheckDisplay() is set, only the most important distributions 30 // are displayed. 31 // Otherwise, (default: SetNormalDisplay()), a good selection of plots is given 32 // 29 33 ///////////////////////////////////////////////////////////////////////////// 30 34 #include "MJExtractCalibTest.h" … … 53 57 #include "MCalibrationRelTimeCam.h" 54 58 #include "MCalibrationQECam.h" 59 #include "MCalibrationTestCam.h" 55 60 #include "MCalibrationTestCalc.h" 56 61 #include "MHCamEvent.h" 62 #include "MHCalibrationTestCam.h" 57 63 58 64 #include "MReadMarsFile.h" … … 79 85 // 80 86 // Sets fUseCosmicsFilter to kTRUE, fRuns to 0, fExtractor to NULL, fTimeExtractor to NULL 87 // fDisplay to kNormalDisplay 81 88 // 82 89 MJExtractCalibTest::MJExtractCalibTest(const char *name, const char *title) 83 : fUseCosmicsFilter(kTRUE), fRuns(NULL), fExtractor(NULL), fTimeExtractor(NULL) 90 : fUseCosmicsFilter(kTRUE), fRuns(NULL), fExtractor(NULL), fTimeExtractor(NULL), 91 fDisplayType(kNormalDisplay) 84 92 { 85 93 fName = name ? name : "MJExtractCalibTest"; … … 105 113 // Get container from list 106 114 // 107 MGeomCam &geomcam = *(MGeomCam*)plist.FindObject("MGeomCam"); 115 MGeomCam &geomcam = *(MGeomCam*) plist.FindObject("MGeomCam"); 116 MHCalibrationTestCam &testcam = *(MHCalibrationTestCam*)plist.FindObject("MHCalibrationTestCam"); 108 117 109 118 // Create histograms to display … … 112 121 MHCamera disp3 (geomcam, "Test;PhotonsPerArea", "Equiv. Cherenkov Photons per Area"); 113 122 MHCamera disp4 (geomcam, "Test;SigmaPhotPerArea", "Sigma equiv. Cher. Photons per Area"); 123 MHCamera disp5 (geomcam, "Test;Phot", "Calibrated Photons"); 124 MHCamera disp6 (geomcam, "Test;PhotPerArea", "Calibrated Photons per Area"); 125 MHCamera disp7 (geomcam, "Test;NotInterpolate", "Not interpolated pixels"); 126 MHCamera disp8 (geomcam, "Test;DeviatingPhots", "Deviating Number Photons"); 114 127 115 128 // Fitted charge means and sigmas 116 disp1.SetCamContent(fTestCam, 0); 117 disp1.SetCamError( fTestCam, 1); 118 disp2.SetCamContent(fTestCam, 2); 119 disp2.SetCamError( fTestCam, 3); 120 disp3.SetCamContent(fTestCam, 7); 121 disp3.SetCamError( fTestCam, 8); 122 disp4.SetCamContent(fTestCam, 9); 123 disp4.SetCamError( fTestCam, 10); 129 disp1.SetCamContent(testcam, 0); 130 disp1.SetCamError( testcam, 1); 131 disp2.SetCamContent(testcam, 2); 132 disp2.SetCamError( testcam, 3); 133 disp3.SetCamContent(testcam, 7); 134 disp3.SetCamError( testcam, 8); 135 disp4.SetCamContent(testcam, 9); 136 disp4.SetCamError( testcam, 10); 137 138 disp5.SetCamContent(fTestCam, 0); 139 disp5.SetCamError( fTestCam, 1); 140 disp6.SetCamContent(fTestCam, 2); 141 disp6.SetCamError( fTestCam, 3); 142 disp7.SetCamError( fTestCam, 4); 143 144 disp8.SetCamError( fBadPixels, 22); 145 124 146 125 147 disp1.SetYTitle("Photons"); … … 127 149 disp3.SetYTitle("Photons per Area [mm^{-2}]"); 128 150 disp4.SetYTitle("\\sigma_{phot} per Area [mm^{-2}]"); 151 152 disp5.SetYTitle("Photons"); 153 disp6.SetYTitle("Photons per Area [mm^{-2}]"); 154 disp7.SetYTitle("[1]"); 155 disp8.SetYTitle("[1]"); 129 156 130 157 gStyle->SetOptStat(1111); 131 158 gStyle->SetOptFit(); 132 159 133 TCanvas &c = fDisplay->AddTab("TestCharges"); 134 c.Divide(4,4); 135 136 disp1.CamDraw(c, 1, 4, 2, 1); 137 disp2.CamDraw(c, 2, 4, 2, 1); 138 disp3.CamDraw(c, 3, 4, 1, 1); 139 disp4.CamDraw(c, 4, 4, 2, 1); 160 if (fDisplayType == kNormalDisplay) 161 { 162 163 TCanvas &c = fDisplay->AddTab("TestCharges"); 164 c.Divide(4,4); 165 166 disp1.CamDraw(c, 1, 4, 2, 1); 167 disp2.CamDraw(c, 2, 4, 2, 1); 168 disp3.CamDraw(c, 3, 4, 1, 1); 169 disp4.CamDraw(c, 4, 4, 2, 1); 170 } 171 172 TCanvas &c2 = fDisplay->AddTab("TestResult"); 173 c2.Divide(2,4); 174 175 disp5.CamDraw(c2, 1, 2, 2, 1); 176 disp6.CamDraw(c2, 2, 2, 2, 1); 177 178 TCanvas &c3 = fDisplay->AddTab("TestDefects"); 179 c3.Divide(2,2); 180 181 disp7.CamDraw(c3, 1, 2, 0); 182 disp8.CamDraw(c3, 2, 2, 0); 140 183 141 184 return; … … 234 277 *fLog << endl; 235 278 236 MCerPhotEvt cerphot; 237 MPedPhotCam pedphot; 279 MCerPhotEvt cerphot; 280 MPedPhotCam pedphot; 281 MHCalibrationTestCam testcam; 238 282 239 283 // Setup Lists … … 244 288 plist.AddToList(&cerphot); 245 289 plist.AddToList(&pedphot); 290 plist.AddToList(&testcam); 246 291 plist.AddToList(&fTestCam); 247 292 plist.AddToList(&fBadPixels); … … 493 538 if (fTestCam.Write()<=0) 494 539 { 495 *fLog << err << "Unable to write M HCalibrationTestCam to " << oname << endl;540 *fLog << err << "Unable to write MCalibrationTestCam to " << oname << endl; 496 541 return kFALSE; 497 542 } -
trunk/MagicSoft/Mars/mjobs/MJExtractCalibTest.h
r4189 r4658 2 2 #define MARS_MJExtractCalibTest 3 3 4 #ifndef MARS_M HCalibrationTestCam5 #include "M HCalibrationTestCam.h"4 #ifndef MARS_MCalibrationTestCam 5 #include "MCalibrationTestCam.h" 6 6 #endif 7 7 #ifndef MARS_MHCalibrationTestTimeCam … … 35 35 36 36 MBadPixelsCam fBadPixels; 37 M HCalibrationTestCamfTestCam;37 MCalibrationTestCam fTestCam; 38 38 MHCalibrationTestTimeCam fTestTimeCam; 39 39 MPedPhotCam fPedPhotCam; 40 40 41 enum Display_t // Possible Display types 42 { 43 kDataCheckDisplay, 44 kNormalDisplay 45 }; 46 47 Display_t fDisplayType; // Chosen Display type 48 41 49 Bool_t ReadPedPhotCam(); 42 50 … … 58 66 const char* GetOutputFile() const; 59 67 60 M HCalibrationTestCam&GetTestCam() { return fTestCam; }68 MCalibrationTestCam &GetTestCam() { return fTestCam; } 61 69 MHCalibrationTestTimeCam &GetTestTimeCam() { return fTestTimeCam; } 62 70 MPedPhotCam &GetPedPhotCam() { return fPedPhotCam; } … … 67 75 void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); } 68 76 void SetUseCosmicsFilter( const Bool_t b ) { fUseCosmicsFilter = b; } 69 77 78 // Displays 79 void SetDataCheckDisplay() { fDisplayType = kDataCheckDisplay; } 80 void SetNormalDisplay() { fDisplayType = kNormalDisplay; } 81 70 82 Bool_t ProcessD(MPedestalCam &pedcam, MCalibrationChargeCam &calcam, MCalibrationQECam &qecam); 71 83 Bool_t ProcessT(MPedestalCam &pedcam, MCalibrationRelTimeCam &relcam);
Note:
See TracChangeset
for help on using the changeset viewer.