Changeset 4908 for trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
- Timestamp:
- 09/09/04 17:56:49 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r4882 r4908 194 194 #include "MParList.h" 195 195 196 #include "MRawRunHeader.h" 197 #include "MRawEvtPixelIter.h" 196 #include "MRawEvtHeader.h" 198 197 199 198 #include "MGeomCam.h" … … 203 202 #include "MPedestalCam.h" 204 203 #include "MPedestalPix.h" 204 205 #include "MCalibrationIntensityChargeCam.h" 205 206 206 207 #include "MCalibrationChargeCam.h" … … 260 261 // 261 262 MCalibrationChargeCalc::MCalibrationChargeCalc(const char *name, const char *title) 262 : fQECam(NULL), fGeom(NULL) 263 : fQECam(NULL), fGeom(NULL), fSignal(NULL), fHeader(NULL) 263 264 { 264 265 … … 307 308 fBadPixels = NULL; 308 309 fCam = NULL; 310 fIntensCam = NULL; 309 311 fBlindPixel = NULL; 310 312 fBlindCam = NULL; … … 312 314 fPedestals = NULL; 313 315 316 fPulserPattern = 0; 314 317 SetPulserColor ( MCalibrationCam::kNONE ); 315 318 … … 333 336 { 334 337 338 fHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader"); 339 if (!fHeader) 340 { 341 *fLog << err << "MRawEvtHeader not found... abort." << endl; 342 return kFALSE; 343 } 344 335 345 // 336 346 // Containers that have to be there. … … 343 353 } 344 354 355 fSignal = (MExtractedSignalCam*)pList->FindObject("MExtractedSignalCam"); 356 if (!fSignal) 357 { 358 *fLog << err << "MExtractedSignalCam not found... aborting" << endl; 359 return kFALSE; 360 } 361 345 362 // 346 363 // Containers that are created in case that they are not there. … … 360 377 } 361 378 362 363 // 364 // Check the pulser colour --> FIXME: this solution is only valid until the arrival of the DM's 365 // 366 if (fPulserColor == MCalibrationCam::kNONE) 367 { 368 *fLog << endl; 369 *fLog << err << GetDescriptor() 370 << ": No Pulser colour has been chosen. Since the installation of the IFAE pulser box," 371 << " you HAVE to provide the LEDs colour, otherwise there is no calibration. " << endl; 372 *fLog << "See e.g. the macro calibration.C " << endl; 379 fHeader = (MRawEvtHeader*)pList->FindObject("MRawEvtHeader"); 380 if (!fHeader) 381 { 382 *fLog << err << "MRawEvtHeader not found... abort." << endl; 373 383 return kFALSE; 374 384 } 375 385 386 376 387 return kTRUE; 377 388 } … … 395 406 // It defines the PixId of every pixel in: 396 407 // 408 // - MCalibrationIntensityChargeCam 397 409 // - MCalibrationChargeCam 398 410 // - MCalibrationQECam … … 419 431 } 420 432 421 fCam = (MCalibrationChargeCam*)pList->FindObject("MCalibrationChargeCam"); 422 if (!fCam) 423 { 424 *fLog << err << "Cannot find MCalibrationChargeCam... aborting" << endl; 425 *fLog << err << "Maybe you forget to call an MFillH for the MHCalibrationChargeCam before..." << endl; 426 return kFALSE; 427 } 428 433 fIntensCam = (MCalibrationIntensityChargeCam*)pList->FindObject(AddSerialNumber("MCalibrationIntensityChargeCam")); 434 if (fIntensCam) 435 *fLog << inf << "Found MCalibrationIntensityChargeCam ... " << endl; 436 else 437 { 438 fCam = (MCalibrationChargeCam*)pList->FindObject(AddSerialNumber("MCalibrationChargeCam")); 439 if (!fCam) 440 { 441 *fLog << err << "Cannot find MCalibrationChargeCam ... abort." << endl; 442 *fLog << err << "Maybe you forget to call an MFillH for the MHCalibrationChargeCam before..." << endl; 443 return kFALSE; 444 } 445 } 446 429 447 // 430 448 // Optional Containers … … 451 469 } 452 470 453 454 // 455 // Initialize the pulser colours 456 // 457 if (fCam->GetPulserColor() == MCalibrationCam::kNONE) 458 { 459 fCam->SetPulserColor( fPulserColor ); 460 461 if (fBlindPixel) 462 fBlindPixel->SetColor( fPulserColor ); 463 464 if (fBlindCam) 465 fBlindCam->SetColor( fPulserColor ); 466 467 if (fPINDiode) 468 fPINDiode->SetColor( fPulserColor ); 469 } 470 471 if (fPulserColor != fCam->GetPulserColor()) 472 { 473 *fLog << err << GetDescriptor() 474 << ": Pulser colour has changed w.r.t. last file in MCalibrationChargeCam" << endl; 475 *fLog << err << "This feature is not yet implemented, sorry ... aborting " << endl; 476 return kFALSE; 477 } 478 479 if (fBlindPixel) 480 if (fPulserColor != fBlindPixel->GetColor()) 481 { 482 *fLog << err << GetDescriptor() 483 << ": Pulser colour has changed w.r.t. last file in MCalibrationChargeBlindPix." << endl; 484 *fLog << err << "This feature is not yet implemented, sorry ... aborting " << endl; 485 return kFALSE; 486 } 487 488 if (fBlindCam) 489 if (fPulserColor != fBlindCam->GetColor()) 490 { 491 *fLog << err << GetDescriptor() 492 << ": Pulser colour has changed w.r.t. last file in MCalibrationChargeBlindCam." << endl; 493 *fLog << err << "This feature is not yet implemented, sorry ... aborting " << endl; 494 return kFALSE; 495 } 496 497 if (fPINDiode) 498 if (fPulserColor != fPINDiode->GetColor()) 499 { 500 *fLog << err << GetDescriptor() 501 << ": Pulser colour has changed w.r.t. last file in MCalibrationChargePINDiode." << endl; 502 *fLog << err << "This feature is not yet implemented, sorry ... aborting " << endl; 503 return kFALSE; 504 } 505 506 507 fNumHiGainSamples = fCam->GetNumHiGainFADCSlices(); 508 fNumLoGainSamples = fCam->GetNumLoGainFADCSlices(); 471 fNumHiGainSamples = fSignal->GetNumUsedHiGainFADCSlices(); 472 fNumLoGainSamples = fSignal->GetNumUsedLoGainFADCSlices(); 509 473 510 474 fSqrtHiGainSamples = TMath::Sqrt(fNumHiGainSamples); … … 516 480 { 517 481 518 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam) [i]; 482 MCalibrationChargePix &pix = fIntensCam 483 ? (MCalibrationChargePix&)(*fIntensCam)[i] 484 : (MCalibrationChargePix&)(*fCam) [i]; 519 485 MCalibrationQEPix &pqe = (MCalibrationQEPix&) (*fQECam)[i]; 520 486 MBadPixelsPix &bad = (*fBadPixels)[i]; … … 539 505 // ---------------------------------------------------------------------------------- 540 506 // 541 // Nothing to be done in Process, but have a look at MHCalibrationChargeCam, instead507 // Set the correct colour to the charge containers 542 508 // 543 509 Int_t MCalibrationChargeCalc::Process() 544 510 { 511 512 const UInt_t pattern = fHeader->GetCalibrationPattern(); 513 514 if (pattern == fPulserPattern) 515 return kTRUE; 516 517 enum ColorCode_t 518 { 519 kSlot1Green = BIT(0), 520 kSlot2Green = BIT(1), 521 kSlot3Blue = BIT(2), 522 kSlot4UV = BIT(3), 523 kSlot5UV = BIT(4), 524 kSlot6Blue = BIT(5), 525 kSlot7Blue = BIT(6), 526 kSlot8Blue = BIT(7), 527 kSlot9AttBlue = BIT(8), 528 kSlot10Blue = BIT(9), 529 kSlot11Blue = BIT(10), 530 kSlot12UV = BIT(11), 531 kSlot13UV = BIT(12), 532 kSlot14Blue = BIT(13), 533 kSlot15Green = BIT(14), 534 kSlot16AttGreen = BIT(15), 535 kCT1Pulser = BIT(16), 536 kAnyGreen = kSlot1Green | kSlot2Green | kSlot15Green | kSlot16AttGreen, 537 kAnyUV = kSlot4UV | kSlot5UV | kSlot12UV | kSlot13UV, 538 kAnyBlue = kSlot3Blue | kSlot6Blue | kSlot7Blue | kSlot8Blue 539 | kSlot9AttBlue| kSlot10Blue | kSlot11Blue | kSlot14Blue 540 }; 541 542 // 543 // The pattern has changed, we have to initialize everything new!!! 544 // 545 *fLog << inf << " New pulser pattern: " ; 546 for (Int_t i=16; i>= 0; i--) 547 *fLog << (pattern >> i & 1); 548 *fLog << endl; 549 fPulserPattern = pattern; 550 551 // 552 // Now retrieve the colour and check if not various colours have been used 553 // 554 fPulserColor = MCalibrationCam::kNONE; 555 556 if (fPulserPattern & kAnyGreen ) 557 fPulserColor = MCalibrationCam::kGREEN; 558 559 if (fPulserPattern & kAnyBlue ) 560 if (fPulserColor != MCalibrationCam::kNONE) 561 { 562 *fLog << err << GetDescriptor() 563 << "Multiple colours used simultaneously in calibration file. Will skip this part!" << endl; 564 return kCONTINUE; 565 } 566 else 567 fPulserColor = MCalibrationCam::kBLUE; 568 569 if (fPulserPattern & kAnyUV ) 570 if (fPulserColor != MCalibrationCam::kNONE) 571 { 572 *fLog << err << GetDescriptor() 573 << "Multiple colours used simultaneously in calibration file. Will skip this part!" << endl; 574 return kCONTINUE; 575 } 576 else 577 fPulserColor = MCalibrationCam::kUV; 578 579 if (fPulserPattern & kCT1Pulser ) 580 if (fPulserColor != MCalibrationCam::kNONE) 581 { 582 *fLog << err << GetDescriptor() 583 << "Multiple colours used simultaneously in calibration file. Will skip this part!" << endl; 584 return kCONTINUE; 585 } 586 else 587 fPulserColor = MCalibrationCam::kCT1; 588 589 *fLog << inf << GetDescriptor() << ": Found new colour ... " << endl; 590 591 switch (fPulserColor) 592 { 593 case MCalibrationCam::kGREEN: *fLog << "Green."; break; 594 case MCalibrationCam::kBLUE: *fLog << "Blue."; break; 595 case MCalibrationCam::kUV: *fLog << "UV."; break; 596 case MCalibrationCam::kCT1: *fLog << "CT1."; break; 597 } 598 *fLog << endl; 599 600 // 601 // Initialize the pulser colours 602 // 603 if (fIntensCam) 604 fIntensCam->SetPulserColor( fPulserColor ); 605 else 606 fCam->SetPulserColor( fPulserColor ); 607 608 if (fBlindPixel) 609 fBlindPixel->SetColor( fPulserColor ); 610 611 if (fBlindCam) 612 fBlindCam->SetColor( fPulserColor ); 613 614 if (fPINDiode) 615 fPINDiode->SetColor( fPulserColor ); 616 545 617 return kTRUE; 546 618 } … … 570 642 // Call FinalizeUnsuitablePixels() 571 643 // 572 // Call MParContainer::SetReadyToSave() for f Cam, fQECam, fBadPixels and644 // Call MParContainer::SetReadyToSave() for fIntensCam, fCam, fQECam, fBadPixels and 573 645 // fBlindPixel and fPINDiode if they exist 574 646 // … … 608 680 { 609 681 610 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam)[pixid]; 682 MCalibrationChargePix &pix = fIntensCam 683 ? (MCalibrationChargePix&)(*fIntensCam)[pixid] 684 : (MCalibrationChargePix&)(*fCam)[pixid]; 611 685 // 612 686 // Check if the pixel has been excluded from the fits … … 643 717 644 718 const MPedestalPix &ped = fPedestals->GetAverageArea(aidx); 645 MCalibrationChargePix &pix = (MCalibrationChargePix&)fCam->GetAverageArea(aidx); 719 MCalibrationChargePix &pix = fIntensCam 720 ? (MCalibrationChargePix&)fIntensCam->GetAverageArea(aidx) 721 : (MCalibrationChargePix&)fCam->GetAverageArea(aidx); 646 722 647 723 FinalizePedestals(ped,pix,aidx); 648 FinalizeCharges(pix, fCam->GetAverageBadArea(aidx),"area id"); 724 FinalizeCharges(pix, 725 fIntensCam ? fIntensCam->GetAverageBadArea(aidx) : fCam->GetAverageBadArea(aidx), 726 "area id"); 649 727 } 650 728 … … 656 734 const MPedestalPix &ped = fPedestals->GetAverageSector(sector); 657 735 658 MCalibrationChargePix &pix = (MCalibrationChargePix&)fCam->GetAverageSector(sector); 736 MCalibrationChargePix &pix = fIntensCam 737 ? (MCalibrationChargePix&)fIntensCam->GetAverageSector(sector) 738 : (MCalibrationChargePix&)fCam->GetAverageSector(sector); 659 739 FinalizePedestals(ped,pix, 0); 660 740 } … … 673 753 { 674 754 *fLog << warn << "Could not calculate the photons flux from the F-Factor method " << endl; 675 fCam->SetFFactorMethodValid(kFALSE); 755 if (fIntensCam) 756 fIntensCam->SetFFactorMethodValid(kFALSE); 757 else 758 fCam->SetFFactorMethodValid(kFALSE); 676 759 return kFALSE; 677 760 } 678 761 else 679 fCam->SetFFactorMethodValid(kTRUE); 762 if (fIntensCam) 763 fIntensCam->SetFFactorMethodValid(kTRUE); 764 else 765 fCam->SetFFactorMethodValid(kTRUE); 680 766 681 767 *fLog << endl; … … 721 807 FinalizeUnsuitablePixels(); 722 808 723 fCam ->SetReadyToSave(); 809 if (fIntensCam) 810 fIntensCam->SetReadyToSave(); 811 else 812 fCam ->SetReadyToSave(); 813 724 814 fQECam ->SetReadyToSave(); 725 815 fBadPixels->SetReadyToSave(); … … 923 1013 924 1014 MBadPixelsPix &bad = (*fBadPixels)[i]; 925 MCalibrationPix &pix = (*fCam)[i];1015 MCalibrationPix &pix = fIntensCam ? (*fIntensCam)[i] : (*fCam)[i]; 926 1016 927 1017 if (bad.IsUncalibrated( MBadPixelsPix::kChargeIsPedestal)) … … 990 1080 { 991 1081 992 const UInt_t npixels = fGeom->GetNumPixels();993 const UInt_t nareas = fGeom->GetNumAreas();994 const UInt_t nsectors = fGeom->GetNumSectors();1082 const Int_t npixels = fGeom->GetNumPixels(); 1083 const Int_t nareas = fGeom->GetNumAreas(); 1084 const Int_t nsectors = fGeom->GetNumSectors(); 995 1085 996 1086 TArrayF lowlim (nareas); … … 1010 1100 MHCamera camphes(*fGeom,"Camphes","Phes in Camera"); 1011 1101 1012 for (UInt_t i=0; i<npixels; i++) 1013 { 1014 1015 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam) [i]; 1102 for (Int_t i=0; i<npixels; i++) 1103 { 1104 1105 MCalibrationChargePix &pix = fIntensCam 1106 ? (MCalibrationChargePix&)(*fIntensCam)[i] 1107 : (MCalibrationChargePix&)(*fCam) [i]; 1016 1108 MBadPixelsPix &bad = (*fBadPixels)[i]; 1017 1109 … … 1039 1131 } 1040 1132 1041 for ( UInt_t i=0; i<nareas; i++)1133 for (Int_t i=0; i<nareas; i++) 1042 1134 { 1043 1135 if (numareavalid[i] == 0) … … 1071 1163 upplim [i] = areaphes[i] + fPheErrLimit*TMath::Sqrt(areavars[i]); 1072 1164 1073 TArrayI area(1); 1074 area[0] = i; 1075 1076 TH1D *hist = camphes.ProjectionS(TArrayI(),area,"_py",100); 1165 TH1D *hist = camphes.ProjectionS(TArrayI(),TArrayI(1,&i),"_py",100); 1077 1166 hist->Fit("gaus","Q"); 1078 1167 const Float_t mean = hist->GetFunction("gaus")->GetParameter(1); … … 1081 1170 1082 1171 if (IsDebug()) 1083 camphes.DrawClone();1172 hist->DrawClone(); 1084 1173 1085 1174 if (ndf < 2) … … 1126 1215 // Set the conversion factor FADC counts to photo-electrons 1127 1216 // 1128 for (UInt_t i=0; i<npixels; i++) 1129 { 1130 1131 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam)[i]; 1217 for (Int_t i=0; i<npixels; i++) 1218 { 1219 1220 MCalibrationChargePix &pix = fIntensCam 1221 ? (MCalibrationChargePix&)(*fIntensCam)[i] 1222 : (MCalibrationChargePix&)(*fCam)[i]; 1132 1223 1133 1224 if (!pix.IsFFactorMethodValid()) … … 1177 1268 *fLog << endl; 1178 1269 1179 for (UInt_t aidx=0; aidx<nareas; aidx++) 1180 { 1181 1182 MCalibrationChargePix &apix = (MCalibrationChargePix&)fCam->GetAverageArea(aidx); 1270 for (Int_t aidx=0; aidx<nareas; aidx++) 1271 { 1272 1273 MCalibrationChargePix &apix = fIntensCam 1274 ? (MCalibrationChargePix&)fIntensCam->GetAverageArea(aidx) 1275 : (MCalibrationChargePix&)fCam->GetAverageArea(aidx); 1183 1276 1184 1277 if (numareavalid[aidx] == 1) … … 1218 1311 *fLog << endl; 1219 1312 1220 for ( UInt_t sector=0; sector<nsectors; sector++)1313 for (Int_t sector=0; sector<nsectors; sector++) 1221 1314 { 1222 1315 … … 1237 1330 } 1238 1331 1239 MCalibrationChargePix &spix = (MCalibrationChargePix&)fCam->GetAverageSector(sector); 1332 MCalibrationChargePix &spix = fIntensCam 1333 ? (MCalibrationChargePix&)fIntensCam->GetAverageSector(sector) 1334 : (MCalibrationChargePix&)fCam->GetAverageSector(sector); 1240 1335 1241 1336 if (sectorweights[sector] < 0. || sectorphes[sector] <= 0.) … … 1264 1359 // only excluded as: MBadPixelsPix::kChargeSigmaNotValid 1265 1360 // 1266 for (UInt_t i=0; i<npixels; i++) 1267 { 1268 1269 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam)[i]; 1361 for (Int_t i=0; i<npixels; i++) 1362 { 1363 1364 MCalibrationChargePix &pix = fIntensCam 1365 ? (MCalibrationChargePix&)(*fIntensCam)[i] 1366 : (MCalibrationChargePix&)(*fCam)[i]; 1270 1367 MBadPixelsPix &bad = (*fBadPixels)[i]; 1271 1368 … … 1276 1373 { 1277 1374 const Int_t aidx = (*fGeom)[i].GetAidx(); 1278 MCalibrationChargePix &apix = (MCalibrationChargePix&)fCam->GetAverageArea(aidx); 1375 MCalibrationChargePix &apix = fIntensCam 1376 ? (MCalibrationChargePix&)fIntensCam->GetAverageArea(aidx) 1377 : (MCalibrationChargePix&)fCam->GetAverageArea(aidx); 1279 1378 pix.SetPheFFactorMethod ( apix.GetPheFFactorMethod() ); 1280 1379 pix.SetPheFFactorMethodVar( apix.GetPheFFactorMethodVar() ); … … 1417 1516 1418 1517 const Float_t photons = flux * (*fGeom)[0].GetA() / fQECam->GetPlexiglassQE(); 1419 fCam->SetNumPhotonsBlindPixelMethod(photons); 1518 if (fIntensCam) 1519 fIntensCam->SetNumPhotonsBlindPixelMethod(photons); 1520 else 1521 fCam->SetNumPhotonsBlindPixelMethod(photons); 1420 1522 1421 1523 const Float_t photrelvar = fluxvar / flux / flux + fQECam->GetPlexiglassQERelVar(); 1422 1524 if (photrelvar > 0.) 1423 fCam->SetNumPhotonsBlindPixelMethodErr(TMath::Sqrt( photrelvar * photons * photons)); 1525 if (fIntensCam) 1526 fIntensCam->SetNumPhotonsBlindPixelMethodErr(TMath::Sqrt( photrelvar * photons * photons)); 1527 else 1528 fCam->SetNumPhotonsBlindPixelMethodErr(TMath::Sqrt( photrelvar * photons * photons)); 1424 1529 1425 1530 return kTRUE; … … 1529 1634 } 1530 1635 1531 MCalibrationChargePix &avpix = (MCalibrationChargePix&)fCam->GetAverageArea(0); 1636 MCalibrationChargePix &avpix = fIntensCam 1637 ? (MCalibrationChargePix&)fIntensCam->GetAverageArea(0) 1638 : (MCalibrationChargePix&)fCam->GetAverageArea(0); 1532 1639 MCalibrationQEPix &qepix = (MCalibrationQEPix&) fQECam->GetAverageArea(0); 1533 1640 … … 1549 1656 // Set the results in the MCalibrationChargeCam 1550 1657 // 1551 fCam->SetNumPhotonsFFactorMethod (avphotons); 1658 if (fIntensCam) 1659 fIntensCam->SetNumPhotonsFFactorMethod (avphotons); 1660 else 1661 fCam->SetNumPhotonsFFactorMethod (avphotons); 1662 1552 1663 if (avphotrelvar > 0.) 1553 fCam->SetNumPhotonsFFactorMethodErr(TMath::Sqrt( avphotrelvar * avphotons * avphotons)); 1664 if (fIntensCam) 1665 fIntensCam->SetNumPhotonsFFactorMethodErr(TMath::Sqrt( avphotrelvar * avphotons * avphotons)); 1666 else 1667 fCam->SetNumPhotonsFFactorMethodErr(TMath::Sqrt( avphotrelvar * avphotons * avphotons)); 1554 1668 1555 1669 TArrayF lowlim (nareas); … … 1566 1680 { 1567 1681 1568 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam)[i]; 1682 MCalibrationChargePix &pix = fIntensCam 1683 ? (MCalibrationChargePix&)(*fIntensCam)[i] 1684 : (MCalibrationChargePix&)(*fCam)[i]; 1569 1685 MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*fQECam)[i]; 1570 1686 MBadPixelsPix &bad = (*fBadPixels)[i]; … … 1681 1797 { 1682 1798 1683 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam)[i]; 1799 MCalibrationChargePix &pix = fIntensCam 1800 ? (MCalibrationChargePix&)(*fIntensCam)[i] 1801 : (MCalibrationChargePix&)(*fCam)[i]; 1684 1802 MBadPixelsPix &bad = (*fBadPixels)[i]; 1685 1803 … … 1704 1822 { 1705 1823 1706 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam)[i]; 1824 MCalibrationChargePix &pix = fIntensCam 1825 ? (MCalibrationChargePix&)(*fIntensCam)[i] 1826 : (MCalibrationChargePix&)(*fCam)[i]; 1707 1827 MCalibrationQEPix &qepix = (MCalibrationQEPix&) (*fQECam)[i]; 1708 1828 MBadPixelsPix &bad = (*fBadPixels)[i]; … … 1752 1872 const Float_t photons = fBlindPixel->GetFluxInsidePlexiglass() * (*fGeom)[0].GetA() 1753 1873 / fQECam->GetPlexiglassQE(); 1754 fCam->SetNumPhotonsBlindPixelMethod(photons); 1874 if (fIntensCam) 1875 fCam->SetNumPhotonsBlindPixelMethod(photons); 1876 else 1877 fCam->SetNumPhotonsBlindPixelMethod(photons); 1755 1878 1756 1879 const Float_t photrelvar = fBlindPixel->GetFluxInsidePlexiglassRelVar() 1757 1880 + fQECam->GetPlexiglassQERelVar(); 1758 1881 if (photrelvar > 0.) 1759 fCam->SetNumPhotonsBlindPixelMethodErr(TMath::Sqrt( photrelvar * photons * photons)); 1882 if (fIntensCam) 1883 fIntensCam->SetNumPhotonsBlindPixelMethodErr(TMath::Sqrt( photrelvar * photons * photons)); 1884 else 1885 fCam->SetNumPhotonsBlindPixelMethodErr(TMath::Sqrt( photrelvar * photons * photons)); 1760 1886 } 1761 1887 } … … 1788 1914 } 1789 1915 1790 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam)[i]; 1916 MCalibrationChargePix &pix = fIntensCam 1917 ? (MCalibrationChargePix&)(*fIntensCam)[i] 1918 : (MCalibrationChargePix&)(*fCam)[i]; 1791 1919 MGeomPix &geo = (*fGeom)[i]; 1792 1920 … … 1861 1989 } 1862 1990 1863 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCam)[i]; 1991 MCalibrationChargePix &pix = fIntensCam 1992 ? (MCalibrationChargePix&)(*fIntensCam)[i] 1993 : (MCalibrationChargePix&)(*fCam)[i]; 1864 1994 MGeomPix &geo = (*fGeom)[i]; 1865 1995 … … 1910 2040 // 1911 2041 // - Print out statistics about BadPixels of type UnsuitableType_t 1912 // - store numbers of bad pixels of each type in fCam 2042 // - store numbers of bad pixels of each type in fCam or fIntensCam 1913 2043 // 1914 2044 void MCalibrationChargeCalc::FinalizeUnsuitablePixels() … … 1950 2080 1951 2081 for (Int_t aidx=0; aidx<nareas; aidx++) 1952 fCam->SetNumUnsuitable(counts[aidx], aidx); 2082 if (fIntensCam) 2083 fIntensCam->SetNumUnsuitable(counts[aidx], aidx); 2084 else 2085 fCam->SetNumUnsuitable(counts[aidx], aidx); 1953 2086 1954 2087 if (fGeom->InheritsFrom("MGeomCamMagic")) … … 1969 2102 1970 2103 for (Int_t aidx=0; aidx<nareas; aidx++) 1971 fCam->SetNumUnreliable(counts[aidx], aidx); 2104 if (fIntensCam) 2105 fIntensCam->SetNumUnreliable(counts[aidx], aidx); 2106 else 2107 fCam->SetNumUnreliable(counts[aidx], aidx); 1972 2108 1973 2109 *fLog << " " << setw(7) << "Unreliable Pixels: "
Note:
See TracChangeset
for help on using the changeset viewer.