Changeset 8429
- Timestamp:
- 04/20/07 15:09:30 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h
r8428 r8429 19 19 #pragma link C++ class MCalibrationIntensityCam+; 20 20 #pragma link C++ class MCalibrationIntensityChargeCam+; 21 #pragma link C++ class MCalibrationIntensityTestCam+;22 21 23 22 #pragma link C++ class MCalibrationCam+; -
trunk/MagicSoft/Mars/mcalib/MCalibrationTestCalc.cc
r8417 r8429 64 64 #include "MHCalibrationPix.h" 65 65 66 #include "MCalibrationIntensityTestCam.h"67 66 #include "MCalibrationTestCam.h" 68 67 #include "MCalibrationTestPix.h" … … 80 79 // Default constructor. 81 80 // 82 // Sets the pointer to f TestCam and fGeom to NULL81 // Sets the pointer to fHTestCam and fGeom to NULL 83 82 // Sets outputpath to "." 84 83 // Sets outputfile to "TestCalibStat.txt" … … 89 88 // 90 89 MCalibrationTestCalc::MCalibrationTestCalc(const char *name, const char *title) 91 : fBadPixels(NULL), fTestCam(NULL), fIntensCam(NULL), fCam(NULL), 92 fGeom(NULL) 90 : fBadPixels(NULL), fHTestCam(NULL), fCam(NULL), fGeom(NULL) 93 91 { 94 92 … … 109 107 // - MGeomCam 110 108 // - MHCalibrationTestCam 111 // - MCalibration IntensityTestCam or MCalibrationTestCam109 // - MCalibrationTestCam 112 110 // - MBadPixelsCam 113 111 // … … 122 120 } 123 121 124 f TestCam = (MHCalibrationTestCam*)pList->FindObject("MHCalibrationTestCam");125 if (!f TestCam)122 fHTestCam = (MHCalibrationTestCam*)pList->FindObject("MHCalibrationTestCam"); 123 if (!fHTestCam) 126 124 { 127 125 *fLog << err << "Cannot find MHCalibrationTestCam... aborting" << endl; … … 130 128 } 131 129 132 fIntensCam = (MCalibrationIntensityTestCam*)pList->FindObject(AddSerialNumber("MCalibrationIntensityTestCam")); 133 if (fIntensCam) 134 *fLog << inf << "Found MCalibrationIntensityTestCam ... " << endl; 135 else 136 { 137 fCam = (MCalibrationTestCam*)pList->FindObject(AddSerialNumber("MCalibrationTestCam")); 138 if (!fCam) 139 { 140 *fLog << err << "Cannot find MCalibrationTestCam ... abort." << endl; 141 *fLog << err << "Maybe you forget to call an MFillH for the MHCalibrationTestCam before..." << endl; 142 return kFALSE; 143 } 144 } 130 fCam = (MCalibrationTestCam*)pList->FindObject(AddSerialNumber("MCalibrationTestCam")); 131 if (!fCam) 132 { 133 *fLog << err << "Cannot find MCalibrationTestCam ... abort." << endl; 134 return kFALSE; 135 } 145 136 146 137 fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam")); … … 166 157 return kTRUE; 167 158 168 MCalibrationTestCam *testcam = fIntensCam169 ? (MCalibrationTestCam*)fIntensCam->GetCam() : fCam;170 171 159 // 172 160 // Re-direct the output to an ascii-file from now on: … … 189 177 { 190 178 *fLog << " Not interpolateable Pixels:"; 191 *fLog << " Inner: " << Form("%3i", testcam->GetNumUninterpolated(0));192 *fLog << " Outer: " << Form("%3i", testcam->GetNumUninterpolated(1)) << endl;179 *fLog << " Inner: " << Form("%3i", fCam->GetNumUninterpolated(0)); 180 *fLog << " Outer: " << Form("%3i", fCam->GetNumUninterpolated(1)) << endl; 193 181 *fLog << " Biggest not-interpolateable cluster: " << maxbad << endl; 194 182 } 195 183 196 testcam->SetNumUninterpolatedInMaxCluster(maxbad);184 fCam->SetNumUninterpolatedInMaxCluster(maxbad); 197 185 198 186 *fLog << endl; … … 220 208 const UInt_t nareas = fGeom->GetNumAreas(); 221 209 const UInt_t nsectors = fGeom->GetNumSectors(); 222 223 MCalibrationTestCam *testcam = fIntensCam224 ? (MCalibrationTestCam*)fIntensCam->GetCam() : fCam;225 210 226 211 TArrayD lowlim (nareas); … … 244 229 { 245 230 246 MHCalibrationPix &hist = (*f TestCam)[i];247 MCalibrationTestPix &pix = (MCalibrationTestPix&)(* testcam)[i];231 MHCalibrationPix &hist = (*fHTestCam)[i]; 232 MCalibrationTestPix &pix = (MCalibrationTestPix&)(*fCam)[i]; 248 233 // 249 234 // We assume that the pixels have been interpolated so far. … … 304 289 const Float_t areaerr = TMath::Sqrt(areavars[aidx]); 305 290 306 MCalibrationTestPix &avpix = (MCalibrationTestPix&) testcam->GetAverageArea(aidx);291 MCalibrationTestPix &avpix = (MCalibrationTestPix&)fCam->GetAverageArea(aidx); 307 292 avpix.SetNumPhotons (areamean); 308 293 avpix.SetNumPhotonsErr(areaerr ); … … 372 357 { 373 358 374 MHCalibrationPix &hist = (*f TestCam)[i];375 MCalibrationTestPix &pix = (MCalibrationTestPix&) (* testcam)[i];359 MHCalibrationPix &hist = (*fHTestCam)[i]; 360 MCalibrationTestPix &pix = (MCalibrationTestPix&) (*fCam)[i]; 376 361 377 362 const Int_t aidx = (*fGeom)[i].GetAidx(); … … 424 409 425 410 426 MCalibrationTestPix &avpix = (MCalibrationTestPix&) testcam->GetAverageArea(aidx);411 MCalibrationTestPix &avpix = (MCalibrationTestPix&)fCam->GetAverageArea(aidx); 427 412 428 413 if (areavars[aidx] < 0. || areaphotons[aidx] <= 0.) … … 467 452 } 468 453 469 MCalibrationTestPix &avpix = (MCalibrationTestPix&) testcam->GetAverageSector(sector);454 MCalibrationTestPix &avpix = (MCalibrationTestPix&)fCam->GetAverageSector(sector); 470 455 471 456 if (sectorvars[sector] < 0. || sectorphotons[sector] <= 0.) … … 501 486 { 502 487 503 MCalibrationTestCam *testcam = fIntensCam504 ? (MCalibrationTestCam*)fIntensCam->GetCam() : fCam;505 506 488 const Int_t areas = fGeom->GetNumAreas(); 507 489 TArrayI *newarr[areas]; … … 510 492 newarr[aidx] = new TArrayI(0); 511 493 512 for (Int_t i=0; i< testcam->GetSize(); i++)494 for (Int_t i=0; i<fCam->GetSize(); i++) 513 495 { 514 496 const Int_t aidx = (*fGeom)[i].GetAidx(); 515 MCalibrationTestPix &pix = (MCalibrationTestPix&)(* testcam)[i];497 MCalibrationTestPix &pix = (MCalibrationTestPix&)(*fCam)[i]; 516 498 if (pix.IsExcluded()) 517 499 { … … 534 516 num++; 535 517 } 536 testcam->SetNumUninterpolated(newarr[aidx]->GetSize(),aidx);518 fCam->SetNumUninterpolated(newarr[aidx]->GetSize(),aidx); 537 519 *fLog << endl; 538 520 } … … 545 527 { 546 528 547 MCalibrationTestCam *testcam = fIntensCam548 ? (MCalibrationTestCam*)fIntensCam->GetCam() : fCam;549 550 529 TArrayI arr(0); 551 530 552 for (Int_t i=0; i< testcam->GetSize(); i++)553 { 554 MCalibrationTestPix &pix = (MCalibrationTestPix&)(* testcam)[i];531 for (Int_t i=0; i<fCam->GetSize(); i++) 532 { 533 MCalibrationTestPix &pix = (MCalibrationTestPix&)(*fCam)[i]; 555 534 if (pix.IsExcluded()) 556 535 { -
trunk/MagicSoft/Mars/mcalib/Makefile
r8428 r8429 41 41 MCalibrationIntensityCam.cc \ 42 42 MCalibrationIntensityChargeCam.cc \ 43 MCalibrationIntensityTestCam.cc \44 43 MCalibrationCam.cc \ 45 44 MCalibrationPix.cc \
Note:
See TracChangeset
for help on using the changeset viewer.