Changeset 3059 for trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc
- Timestamp:
- 02/08/04 20:57:17 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc
r3029 r3059 35 35 // 3) It initializes a pointer to an MCalibrationPINDiode container 36 36 // 37 // 4)38 //39 37 ///////////////////////////////////////////////////////////////////////////// 40 38 #include "MCalibrationCam.h" … … 48 46 49 47 #include "MGeomCam.h" 48 #include "MGeomPix.h" 50 49 51 50 #include "MCalibrationPix.h" … … 62 61 const Int_t MCalibrationCam::gkBlindPixelId = 559; 63 62 const Int_t MCalibrationCam::gkPINDiodeId = 9999; 64 const Float_t MCalibrationCam::gkTimeSliceWidth = 3.3;65 63 66 64 // -------------------------------------------------------------------------- … … 383 381 return kFALSE; 384 382 385 if ( (!(*this)[idx].IsChargeFitValid()) || (*this)[idx].IsExcluded())386 return kFALSE;387 388 if (idx == gkBlindPixelId)389 return kFALSE;390 391 if (idx == gkPINDiodeId)392 return kFALSE;393 394 383 switch (type) 395 384 { 396 385 case 0: 386 if ((*this)[idx].IsExcluded()) 387 return kFALSE; 397 388 val = (*this)[idx].GetCharge(); 398 389 break; 399 390 case 1: 391 if ((*this)[idx].IsExcluded()) 392 return kFALSE; 400 393 val = (*this)[idx].GetErrCharge(); 401 394 break; 402 395 case 2: 396 if ((*this)[idx].IsExcluded()) 397 return kFALSE; 403 398 val = (*this)[idx].GetSigmaCharge(); 404 399 break; 405 400 case 3: 401 if ((*this)[idx].IsExcluded()) 402 return kFALSE; 406 403 val = (*this)[idx].GetErrSigmaCharge(); 407 404 break; 408 405 case 4: 406 if ((*this)[idx].IsExcluded()) 407 return kFALSE; 409 408 val = (*this)[idx].GetChargeProb(); 410 409 break; 411 410 case 5: 412 if ( !(*this)[idx].IsTimeFitValid())413 return kFALSE; 414 val = (*this)[idx].Get MeanTimeOffset() * gkTimeSliceWidth;411 if ((*this)[idx].IsExcluded()) 412 return kFALSE; 413 val = (*this)[idx].GetRSigmaCharge(); 415 414 break; 416 415 case 6: 417 if ( !(*this)[idx].IsTimeFitValid())418 return kFALSE; 419 val = (*this)[idx].Get TimingPrecision() * gkTimeSliceWidth;416 if ((*this)[idx].IsExcluded()) 417 return kFALSE; 418 val = (*this)[idx].GetErrRSigmaCharge(); 420 419 break; 421 420 case 7: 422 if ( !(*this)[idx].IsTimeFitValid())423 return kFALSE; 424 val = (*this)[idx].Get TimeProb();421 if ((*this)[idx].IsExcluded()) 422 return kFALSE; 423 val = (*this)[idx].GetRSigmaCharge() / (*this)[idx].GetCharge(); 425 424 break; 426 425 case 8: 426 if ((*this)[idx].IsExcluded()) 427 return kFALSE; 428 // relative error RsigmaCharge square 429 val = (*this)[idx].GetErrRSigmaCharge()* (*this)[idx].GetErrRSigmaCharge() 430 / ((*this)[idx].GetRSigmaCharge() * (*this)[idx].GetRSigmaCharge() ); 431 // relative error Charge square 432 val += (*this)[idx].GetErrCharge() * (*this)[idx].GetErrCharge() 433 / ((*this)[idx].GetCharge() * (*this)[idx].GetCharge() ); 434 // calculate relative error out of squares 435 val = TMath::Sqrt(val) ; 436 // multiply with value to get absolute error 437 val *= (*this)[idx].GetRSigmaCharge() / (*this)[idx].GetCharge(); 438 break; 439 case 9: 440 if ((*this)[idx].IsExcluded()) 441 return kFALSE; 442 val = (*this)[idx].GetPheFFactorMethod(); 443 break; 444 case 10: 445 if ((*this)[idx].IsExcluded()) 446 return kFALSE; 447 val = (*this)[idx].GetPheFFactorMethodError(); 448 break; 449 case 11: 450 if ((*this)[idx].IsExcluded()) 451 return kFALSE; 452 val = (*this)[idx].GetMeanConversionFFactorMethod(); 453 break; 454 case 12: 455 if ((*this)[idx].IsExcluded()) 456 return kFALSE; 457 val = (*this)[idx].GetErrorConversionFFactorMethod(); 458 break; 459 case 13: 460 if ((*this)[idx].IsExcluded()) 461 return kFALSE; 462 val = (*this)[idx].GetTotalFFactorFFactorMethod(); 463 break; 464 case 14: 465 if ((*this)[idx].IsExcluded()) 466 return kFALSE; 467 val = (*this)[idx].GetTotalFFactorErrorFFactorMethod(); 468 break; 469 case 15: 470 if ((*this)[idx].IsExcluded()) 471 return kFALSE; 472 if (cam[idx].IsInOuterRing()) 473 val = GetMeanPhotInsidePlexiglass()*gkCalibrationOutervsInnerPixelArea; 474 else 475 val = GetMeanPhotInsidePlexiglass(); 476 break; 477 case 16: 478 if ((*this)[idx].IsExcluded()) 479 return kFALSE; 480 if (cam[idx].IsInOuterRing()) 481 val = (double)fMeanPhotInsidePlexiglass*gkCalibrationOutervsInnerPixelArea; 482 else 483 val = (double)fMeanPhotInsidePlexiglass; 484 break; 485 case 17: 486 if ((*this)[idx].IsExcluded()) 487 return kFALSE; 488 if (cam[idx].IsInOuterRing()) 489 val = (*this)[idx].GetMeanConversionBlindPixelMethod()*gkCalibrationOutervsInnerPixelArea; 490 else 491 val = (*this)[idx].GetMeanConversionBlindPixelMethod(); 492 break; 493 case 18: 494 if ((*this)[idx].IsExcluded()) 495 return kFALSE; 496 if (cam[idx].IsInOuterRing()) 497 { 498 val = (*this)[idx].GetErrorConversionBlindPixelMethod()*(*this)[idx].GetErrorConversionBlindPixelMethod() 499 * gkCalibrationOutervsInnerPixelArea * gkCalibrationOutervsInnerPixelArea; 500 val += gkCalibrationOutervsInnerPixelAreaError * gkCalibrationOutervsInnerPixelAreaError 501 * (*this)[idx].GetMeanConversionBlindPixelMethod() *(*this)[idx].GetMeanConversionBlindPixelMethod(); 502 val = TMath::Sqrt(val); 503 } 504 else 505 val = (*this)[idx].GetErrorConversionBlindPixelMethod(); 506 break; 507 case 19: 508 if ((*this)[idx].IsExcluded()) 509 return kFALSE; 510 val = (*this)[idx].GetTotalFFactorBlindPixelMethod(); 511 break; 512 case 20: 513 if ((*this)[idx].IsExcluded()) 514 return kFALSE; 515 val = (*this)[idx].GetTotalFFactorErrorBlindPixelMethod(); 516 break; 517 case 21: 518 if ((*this)[idx].IsExcluded()) 519 return kFALSE; 520 if (cam[idx].IsInOuterRing()) 521 val = GetMeanPhotOutsidePlexiglass()*gkCalibrationOutervsInnerPixelArea; 522 else 523 val = GetMeanPhotOutsidePlexiglass(); 524 break; 525 case 22: 526 if ((*this)[idx].IsExcluded()) 527 return kFALSE; 528 if (cam[idx].IsInOuterRing()) 529 val = (double)fMeanPhotOutsidePlexiglass*gkCalibrationOutervsInnerPixelArea; 530 else 531 val = (double)fMeanPhotOutsidePlexiglass; 532 break; 533 case 23: 534 if ((*this)[idx].IsExcluded()) 535 return kFALSE; 536 if (cam[idx].IsInOuterRing()) 537 val = (*this)[idx].GetMeanConversionPINDiodeMethod()*gkCalibrationOutervsInnerPixelArea; 538 else 539 val = (*this)[idx].GetMeanConversionPINDiodeMethod(); 540 break; 541 case 24: 542 if ((*this)[idx].IsExcluded()) 543 return kFALSE; 544 if (cam[idx].IsInOuterRing()) 545 { 546 val = (*this)[idx].GetErrorConversionPINDiodeMethod()*(*this)[idx].GetErrorConversionPINDiodeMethod() 547 * gkCalibrationOutervsInnerPixelArea * gkCalibrationOutervsInnerPixelArea; 548 val += gkCalibrationOutervsInnerPixelAreaError * gkCalibrationOutervsInnerPixelAreaError 549 * (*this)[idx].GetMeanConversionPINDiodeMethod() *(*this)[idx].GetMeanConversionPINDiodeMethod(); 550 val = TMath::Sqrt(val); 551 } 552 else 553 val = (*this)[idx].GetErrorConversionPINDiodeMethod(); 554 break; 555 case 25: 556 if ((*this)[idx].IsExcluded()) 557 return kFALSE; 558 val = (*this)[idx].GetTotalFFactorBlindPixelMethod(); 559 break; 560 case 26: 561 if ((*this)[idx].IsExcluded()) 562 return kFALSE; 563 val = (*this)[idx].GetTotalFFactorErrorBlindPixelMethod(); 564 break; 565 case 27: 566 if ((*this)[idx].IsExcluded()) 567 val = 1.; 568 else 569 return kFALSE; 570 break; 571 case 28: 572 if ((*this)[idx].IsExcluded()) 573 return kFALSE; 574 if (!(*this)[idx].IsFitted()) 575 val = 1; 576 else 577 return kFALSE; 578 break; 579 case 29: 580 if ((*this)[idx].IsExcluded()) 581 return kFALSE; 582 if (!(*this)[idx].IsFitted()) 583 return kFALSE; 584 if (!(*this)[idx].IsChargeFitValid()) 585 val = 1; 586 else 587 return kFALSE; 588 break; 589 case 30: 590 if ((*this)[idx].IsExcluded()) 591 return kFALSE; 592 if ((*this)[idx].IsOscillating()) 593 val = 1; 594 else 595 return kFALSE; 596 break; 597 case 31: 598 if ((*this)[idx].IsExcluded()) 599 return kFALSE; 600 if ((*this)[idx].IsHiGainSaturation()) 601 val = 1; 602 else 603 return kFALSE; 604 break; 605 case 32: 606 if ((*this)[idx].IsExcluded()) 607 return kFALSE; 608 if ((*this)[idx].IsFFactorMethodValid()) 609 val = 1; 610 else 611 return kFALSE; 612 break; 613 case 33: 614 if ((*this)[idx].IsExcluded()) 615 return kFALSE; 616 if ((*this)[idx].IsBlindPixelMethodValid()) 617 val = 1; 618 else 619 return kFALSE; 620 break; 621 case 34: 622 if ((*this)[idx].IsExcluded()) 623 return kFALSE; 624 if ((*this)[idx].IsPINDiodeMethodValid()) 625 val = 1; 626 else 627 return kFALSE; 628 break; 629 case 35: 630 if ((*this)[idx].IsExcluded()) 631 return kFALSE; 427 632 val = (*this)[idx].GetPed(); 428 633 break; 429 case 9: 634 case 36: 635 if ((*this)[idx].IsExcluded()) 636 return kFALSE; 637 val = 1.; 638 // val = (*this)[idx].GetPedError(); 639 break; 640 case 37: 641 if ((*this)[idx].IsExcluded()) 642 return kFALSE; 430 643 val = (*this)[idx].GetPedRms(); 431 644 break; 432 case 10: 433 val = (*this)[idx].GetRSigmaCharge(); 434 break; 435 case 11: 436 val = (*this)[idx].GetPheFFactorMethod(); 437 break; 438 case 12: 439 val = (*this)[idx].GetPheFFactorMethodError(); 440 break; 441 case 13: 442 val = (*this)[idx].GetMeanConversionFFactorMethod(); 443 break; 444 case 14: 445 val = (*this)[idx].GetErrorConversionFFactorMethod(); 446 break; 447 case 15: 448 if (idx < 397) 449 val = (double)fMeanPhotInsidePlexiglass; 450 else 451 val = (double)fMeanPhotInsidePlexiglass*gkCalibrationOutervsInnerPixelArea; 452 break; 453 case 16: 454 if (idx < 397) 455 val = (*this)[idx].GetMeanConversionBlindPixelMethod(); 456 else 457 val = (*this)[idx].GetMeanConversionBlindPixelMethod()*gkCalibrationOutervsInnerPixelArea; 458 break; 459 case 17: 460 val = (*this)[idx].GetRSigmaCharge() / (*this)[idx].GetCharge(); 461 break; 462 case 18: 463 if (!(*this)[idx].IsTimeFitValid()) 645 case 38: 646 if ((*this)[idx].IsExcluded()) 647 return kFALSE; 648 val = 1.; 649 // val = (*this)[idx].GetPedRmsError(); 650 break; 651 case 39: 652 if ((*this)[idx].IsExcluded()) 464 653 return kFALSE; 465 654 val = (*this)[idx].GetAbsTimeMean(); 466 655 break; 467 case 19:468 if ( !(*this)[idx].IsTimeFitValid())656 case 40: 657 if ((*this)[idx].IsExcluded()) 469 658 return kFALSE; 470 659 val = (*this)[idx].GetAbsTimeMeanErr(); 471 660 break; 472 case 20:473 if ( !(*this)[idx].IsTimeFitValid())661 case 41: 662 if ((*this)[idx].IsExcluded()) 474 663 return kFALSE; 475 664 val = (*this)[idx].GetAbsTimeRms(); 476 665 break; 477 case 21:478 if ( !(*this)[idx].IsTimeFitValid())666 case 42: 667 if ((*this)[idx].IsExcluded()) 479 668 return kFALSE; 480 669 val = (*this)[idx].GetAbsTimeMeanErr()/TMath::Sqrt(2.);
Note:
See TracChangeset
for help on using the changeset viewer.