Changeset 2746
- Timestamp:
- 12/23/03 07:25:11 (21 years ago)
- Location:
- trunk/MagicSoft
- Files:
-
- 3 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2744 r2746 4 4 5 5 -*-*- END OF LINE -*-*- 6 7 2003/12/23: Wolfgang Wittek 8 9 * macros/ONAnalysis.C 10 - new macro for the MAGIC analysis, corresponding to CT1Analysis.C 11 12 * macros/AnalyseCT1.C 13 - deleted because outdated 14 15 * manalysis/MPadOn.[h,cc] 16 - new class for the MAGIC analysis, corresponding to MCT1PadSchweizer 17 18 * manalysis/MPadOnOFF.[h,cc] 19 - minor changes (printouts) 20 21 * manalysis/MPedestalWorkaround.[h,cc] 22 - put zenith angle into MMcEvt 23 24 * manalysis/Makefile 25 AnalysisLinkDef.h 26 - added MPadON 27 28 * mmc/MMcEvt.hxx 29 - add member function SetTelescopeTheta(), SetTelescopePhi() 30 31 32 6 33 2003/12/22: Thomas Bretz 7 34 … … 451 478 0.7 in which the array containing pixel ratios was not 452 479 initialized. 480 481 453 482 454 483 -
trunk/MagicSoft/Mars/manalysis/AnalysisLinkDef.h
r2734 r2746 48 48 #pragma link C++ class MCT1PadSchweizer+; 49 49 #pragma link C++ class MCT1PadONOFF+; 50 #pragma link C++ class MPadON+; 50 51 #pragma link C++ class MPadONOFF+; 51 52 -
trunk/MagicSoft/Mars/manalysis/MPadONOFF.cc
r2663 r2746 110 110 111 111 fPadFlag = 1; 112 *fLog << all << " fPadFlag = " << fPadFlag << endl;112 *fLog << all << "MadONOFF : fPadFlag = " << fPadFlag << endl; 113 113 114 114 fType = ""; … … 175 175 TH2D *blindnthon, TH2D *blindnthoff) 176 176 { 177 *fLog << "----------------------------------------------------------------------------------" << endl;178 *fLog << all << "M erge the ON and OFF histograms to obtain the target distributions for the padding"177 *fLog << all << "----------------------------------------------------------------------------------" << endl; 178 *fLog << all << "MPadONOFF::MergeHistograms(); Merge the ON and OFF histograms to obtain the target distributions for the padding" 179 179 << endl; 180 180 … … 242 242 // at the end, it should be zero 243 243 244 *fLog << all << "M ergeHistograms; bins of Theta, Sigmabarold, Sigmabarnew, fraction of events to be padded" << endl;244 *fLog << all << "MPadONOFF::MergeHistograms(); bins of Theta, Sigmabarold, Sigmabarnew, fraction of events to be padded" << endl; 245 245 for (Int_t l=1; l<=nbinstheta; l++) 246 246 { … … 417 417 418 418 if( fabs(a-b)>3.0*eps || fabs(c)>3.0*eps ) 419 *fLog << err << " Read; inconsistency in results; a, b, c = "419 *fLog << err << "MPadONOFF::MergeHistograms(); inconsistency in results; a, b, c = " 420 420 << a << ", " << b << ", " << c << endl; 421 421 } … … 642 642 643 643 644 *fLog << all << "The target distributions for the padding have been created" 644 *fLog << all 645 << "MPadONOFF::MergeHistograms(); The target distributions for the padding have been created" 645 646 << endl; 646 647 *fLog << all << "----------------------------------------------------------" … … 679 680 Bool_t MPadONOFF::ReadTargetDist(const char* namefilein) 680 681 { 681 *fLog << all << "Read padding histograms from file " << namefilein << endl; 682 *fLog << all << "MPadONOFF : Read padding histograms from file " 683 << namefilein << endl; 682 684 683 685 fInfile = new TFile(namefilein); … … 690 692 if (!fHSigmaTheta) 691 693 { 692 *fLog << all << "Object '2D-ThetaSigmabar' not found on root file" 694 *fLog << all 695 << "MPadONOFF : Object '2D-ThetaSigmabar' not found on root file" 693 696 << endl; 694 697 return kFALSE; 695 698 } 696 *fLog << all << "Object '2D-ThetaSigmabar' was read in" << endl; 699 *fLog << all 700 << "MPadONOFF : Object '2D-ThetaSigmabar' was read in" << endl; 697 701 698 702 fHSigmaThetaON = … … 700 704 if (!fHSigmaThetaON) 701 705 { 702 *fLog << all << "Object '2D-ThetaSigmabarON' not found on root file" 706 *fLog << all 707 << "MPadONOFF : Object '2D-ThetaSigmabarON' not found on root file" 703 708 << endl; 704 709 return kFALSE; 705 710 } 706 *fLog << all << "Object '2D-ThetaSigmabarON' was read in" << endl; 711 *fLog << all 712 << "MPadONOFF : Object '2D-ThetaSigmabarON' was read in" << endl; 707 713 708 714 fHSigmaThetaOFF = … … 710 716 if (!fHSigmaThetaOFF) 711 717 { 712 *fLog << "Object '2D-ThetaSigmabarOFF' not found on root file" 718 *fLog << all 719 << "MPadONOFF : Object '2D-ThetaSigmabarOFF' not found on root file" 713 720 << endl; 714 721 return kFALSE; 715 722 } 716 *fLog << all << "Object '2D-ThetaSigmabarOFF' was read in" << endl; 723 *fLog << all 724 << "MPadONOFF :Object '2D-ThetaSigmabarOFF' was read in" << endl; 717 725 718 726 fHSigmaPixTheta = … … 720 728 if (!fHSigmaPixTheta) 721 729 { 722 *fLog << all << "Object '3D-ThetaPixSigma' not found on root file" 730 *fLog << all 731 << "MPadONOFF : Object '3D-ThetaPixSigma' not found on root file" 723 732 << endl; 724 733 return kFALSE; 725 734 } 726 *fLog << all << "Object '3D-ThetaPixSigma' was read in" << endl; 735 *fLog << all 736 << "MPadONOFF : Object '3D-ThetaPixSigma' was read in" << endl; 727 737 728 738 fHSigmaPixThetaON = … … 730 740 if (!fHSigmaPixThetaON) 731 741 { 732 *fLog << all << "Object '3D-ThetaPixSigmaON' not found on root file" 742 *fLog << all 743 << "MPadONOFF : Object '3D-ThetaPixSigmaON' not found on root file" 733 744 << endl; 734 745 return kFALSE; 735 746 } 736 *fLog << all << "Object '3D-ThetaPixSigmaON' was read in" << endl; 747 *fLog << all 748 << "MPadONOFF : Object '3D-ThetaPixSigmaON' was read in" << endl; 737 749 738 750 fHSigmaPixThetaOFF = … … 740 752 if (!fHSigmaPixThetaOFF) 741 753 { 742 *fLog << all << "Object '3D-ThetaPixSigmaOFF' not found on root file" 754 *fLog << all 755 << "MPadONOFF : Object '3D-ThetaPixSigmaOFF' not found on root file" 743 756 << endl; 744 757 return kFALSE; 745 758 } 746 *fLog << "Object '3D-ThetaPixSigmaOFF' was read in" << endl; 759 *fLog << all 760 << "MPadONOFF : Object '3D-ThetaPixSigmaOFF' was read in" << endl; 747 761 748 762 fHDiffPixTheta = … … 750 764 if (!fHDiffPixTheta) 751 765 { 752 *fLog << all << "Object '3D-ThetaPixDiff' not found on root file" 766 *fLog << all 767 << "MPadONOFF : Object '3D-ThetaPixDiff' not found on root file" 753 768 << endl; 754 769 return kFALSE; 755 770 } 756 *fLog << all << "Object '3D-ThetaPixDiff' was read in" << endl; 771 *fLog << all 772 << "MPadONOFF : Object '3D-ThetaPixDiff' was read in" << endl; 757 773 758 774 fHDiffPixThetaON = … … 760 776 if (!fHDiffPixThetaON) 761 777 { 762 *fLog << all << "Object '3D-ThetaPixDiffON' not found on root file" 778 *fLog << all 779 << "MPadONOFF : Object '3D-ThetaPixDiffON' not found on root file" 763 780 << endl; 764 781 return kFALSE; 765 782 } 766 *fLog << "Object '3D-ThetaPixDiffON' was read in" << endl; 783 *fLog << all 784 << "MPadONOFF : Object '3D-ThetaPixDiffON' was read in" << endl; 767 785 768 786 fHDiffPixThetaOFF = … … 770 788 if (!fHDiffPixThetaOFF) 771 789 { 772 *fLog << all << "Object '3D-ThetaPixDiffOFF' not found on root file" 790 *fLog << all 791 << "MPadONOFF : Object '3D-ThetaPixDiffOFF' not found on root file" 773 792 << endl; 774 793 return kFALSE; 775 794 } 776 *fLog << all << "Object '3D-ThetaPixDiffOFF' was read in" << endl; 795 *fLog << all 796 << "MPadONOFF : Object '3D-ThetaPixDiffOFF' was read in" << endl; 777 797 778 798 fHgON = … … 780 800 if (!fHgON) 781 801 { 782 *fLog << all << "Object '3D-PaddingMatrixON' not found on root file" 802 *fLog << all 803 << "MPadONOFF : Object '3D-PaddingMatrixON' not found on root file" 783 804 << endl; 784 805 return kFALSE; 785 806 } 786 *fLog << all << "Object '3D-PaddingMatrixON' was read in" << endl; 807 *fLog << all 808 << "MPadONOFF : Object '3D-PaddingMatrixON' was read in" << endl; 787 809 788 810 fHgOFF = … … 790 812 if (!fHgOFF) 791 813 { 792 *fLog << all << "Object '3D-PaddingMatrixOFF' not found on root file" 814 *fLog << all 815 << "MPadONOFF : Object '3D-PaddingMatrixOFF' not found on root file" 793 816 << endl; 794 817 return kFALSE; 795 818 } 796 *fLog << all << "Object '3D-PaddingMatrixOFF' was read in" << endl; 819 *fLog << all 820 << "MPadONOFF : Object '3D-PaddingMatrixOFF' was read in" << endl; 797 821 798 822 … … 801 825 if (!fHBlindPixIdTheta) 802 826 { 803 *fLog << all << "Object '2D-ThetaBlindId' not found on root file" 827 *fLog << all 828 << "MPadONOFF : Object '2D-ThetaBlindId' not found on root file" 804 829 << endl; 805 830 return kFALSE; 806 831 } 807 *fLog << all << "Object '2D-ThetaBlindId' was read in" << endl; 832 *fLog << all 833 << "MPadONOFF : Object '2D-ThetaBlindId' was read in" << endl; 808 834 809 835 fHBlindPixNTheta = … … 811 837 if (!fHBlindPixNTheta) 812 838 { 813 *fLog << all << "Object '2D-ThetaBlindN' not found on root file" 839 *fLog << all 840 << "MPadONOFF : Object '2D-ThetaBlindN' not found on root file" 814 841 << endl; 815 842 return kFALSE; 816 843 } 817 *fLog << all << "Object '2D-ThetaBlindN' was read in" << endl; 844 *fLog << all 845 << "MPadONOFF : Object '2D-ThetaBlindN' was read in" << endl; 818 846 819 847 … … 831 859 Bool_t MPadONOFF::WriteTargetDist(const char* namefileout) 832 860 { 833 *fLog << all << "Write padding histograms onto file " << namefileout << endl; 861 *fLog << all << "MPadONOFF : Write padding histograms onto file " 862 << namefileout << endl; 834 863 835 864 TFile outfile(namefileout, "RECREATE"); … … 853 882 fHgOFF->Write(); 854 883 855 *fLog << all << "WriteTargetDist; target histograms written onto file " 884 *fLog << all 885 << "MPadONOFF::WriteTargetDist(); target histograms written onto file " 856 886 << namefileout << endl; 857 887 … … 870 900 { 871 901 fType = type; 872 *fLog << all << " SetDataType(); type of data to be padded : "902 *fLog << all << "MPadONOFF::SetDataType(); type of data to be padded : " 873 903 << fType << endl; 874 904 … … 900 930 { 901 931 fPadFlag = padflag; 902 *fLog << all << "SetPadFlag(); choose option " << fPadFlag << endl; 932 *fLog << all << "MPadONOFF::SetPadFlag(); choose option " << fPadFlag 933 << endl; 903 934 } 904 935 … … 915 946 !fHgON || !fHgOFF) 916 947 { 917 *fLog << err << "At least one of the histograms needed for the padding is not defined ... aborting." << endl; 948 *fLog << err 949 << "MPadONOFF : At least one of the histograms needed for the padding is not defined ... aborting." 950 << endl; 918 951 return kFALSE; 919 952 } … … 922 955 if (!fMcEvt) 923 956 { 924 *fLog << err << dbginf << "MMcEvt not found... aborting." << endl; 957 *fLog << err << dbginf << "MPadONOFF : MMcEvt not found... aborting." 958 << endl; 925 959 return kFALSE; 926 960 } … … 929 963 if (!fPed) 930 964 { 931 *fLog << err << "MPedestalCam not found... aborting." << endl; 965 *fLog << err << "MPadONOFF : MPedestalCam not found... aborting." 966 << endl; 932 967 return kFALSE; 933 968 } … … 936 971 if (!fCam) 937 972 { 938 *fLog << err << "MGeomCam not found (no geometry information available)... aborting." << endl; 973 *fLog << err 974 << "MPadONOFF : MGeomCam not found (no geometry information available)... aborting." 975 << endl; 939 976 return kFALSE; 940 977 } … … 943 980 if (!fEvt) 944 981 { 945 *fLog << err << "MCerPhotEvt not found... aborting." << endl; 982 *fLog << err << "MPadONOFF : MCerPhotEvt not found... aborting." 983 << endl; 946 984 return kFALSE; 947 985 } … … 950 988 if (!fSigmabar) 951 989 { 952 *fLog << err << "M Sigmabar not found... aborting." << endl;990 *fLog << err << "MPadONOFF : MSigmabar not found... aborting." << endl; 953 991 return kFALSE; 954 992 } … … 957 995 if (!fBlinds) 958 996 { 959 *fLog << err << "MBlindPixels not found... aborting." << endl; 997 *fLog << err << "MPadONOFF : MBlindPixels not found... aborting." 998 << endl; 960 999 return kFALSE; 961 1000 } … … 963 1002 if (fType !="ON" && fType !="OFF" && fType !="MC") 964 1003 { 965 *fLog << err << "Type of data to be padded not defined... aborting." << endl; 1004 *fLog << err 1005 << "MPadONOFF : Type of data to be padded not defined... aborting." 1006 << endl; 966 1007 return kFALSE; 967 1008 } … … 1005 1046 Int_t MPadONOFF::Process() 1006 1047 { 1007 *fLog << all << "Entry Process();" << endl;1048 *fLog << all << "Entry MPadONOFF::Process();" << endl; 1008 1049 1009 1050 // this is the conversion factor from the number of photons 1010 1051 // to the number of photo electrons 1011 1052 // later to be taken from MCalibration 1012 // fPEpe Photon = PW * LG * QE * 1D1053 // fPEperPhoton = PW * LG * QE * 1D 1013 1054 Double_t fPEperPhoton = 0.95 * 0.90 * 0.13 * 0.9; 1014 1055 … … 1069 1110 // 1070 1111 Double_t sigbarold_phot = fSigmabar->Calc(*fCam, *fPed, *fEvt); 1071 *fLog << all << " before padding : " << endl;1112 *fLog << all << "MPadONOFF::Process(); before padding : " << endl; 1072 1113 fSigmabar->Print(""); 1073 1114 Double_t sigbarold = sigbarold_phot * fPEperPhoton; … … 1082 1123 if (sigbarold_phot > 0) 1083 1124 { 1084 *fLog << warn << "Process(); sigmabar of event to be padded is > 0 : " 1125 *fLog << err 1126 << "MPadONOFF::Process(); sigmabar of event to be padded is > 0 : " 1085 1127 << sigbarold_phot << ". Stop event loop " << endl; 1086 1128 // input data should have sigmabar = 0; stop event loop … … 1088 1130 rc = 1; 1089 1131 fErrors[rc]++; 1090 return k CONTINUE;1132 return kERROR; 1091 1133 } 1092 1134 } … … 1098 1140 if ( binTheta < 1 || binTheta > fHBlindPixNTheta->GetNbinsX() ) 1099 1141 { 1100 *fLog << warn << "Process(); binNumber out of range : theta, binTheta = " 1142 *fLog << warn 1143 << "MPadONOFF::Process(); binNumber out of range : theta, binTheta = " 1101 1144 << theta << ", " << binTheta << "; Skip event " << endl; 1102 1145 // event cannot be padded; skip event … … 1170 1213 if ( nblind->Integral() == 0.0 ) 1171 1214 { 1172 *fLog << warn << " Process(); projection for Theta bin "1215 *fLog << warn << "MPadONOFF::Process(); projection for Theta bin " 1173 1216 << binTheta << " has no entries; Skip event " << endl; 1174 1217 // event cannot be padded; skip event … … 1319 1362 1320 1363 hsigma = fHSigmaTheta->ProjectionY("", binTheta, binTheta, ""); 1321 if ( hsigma-> Integral() == 0.0 )1364 if ( hsigma->GetEntries() == 0.0 ) 1322 1365 { 1323 *fLog << warn << " Process(); projection for Theta bin "1366 *fLog << warn << "MPadONOFF::Process(); projection for Theta bin " 1324 1367 << binTheta << " has no entries; Skip event " << endl; 1325 1368 // event cannot be padded; skip event … … 1345 1388 //------------------------------------------- 1346 1389 1347 *fLog << all << " Process(); sigbarold, sigmabar = "1390 *fLog << all << "MPadONOFF::Process(); sigbarold, sigmabar = " 1348 1391 << sigbarold << ", "<< sigmabar << endl; 1349 1392 … … 1351 1394 if (sigmabar <= sigbarold) 1352 1395 { 1353 *fLog << all << " Process(); target sigmabar is less than sigbarold : "1396 *fLog << all << "MPadONOFF::Process(); target sigmabar is less than sigbarold : " 1354 1397 << sigmabar << ", " << sigbarold << ", Skip event" << endl; 1355 1398 … … 1367 1410 // - using a fixed value (F2excess) for the excess noise factor 1368 1411 1369 Double_t elNoise2; // [photo ns]1412 Double_t elNoise2; // [photo electrons] 1370 1413 Double_t F2excess = 1.3; 1371 Double_t lambdabar; // [photo ns]1414 Double_t lambdabar; // [photo electrons] 1372 1415 1373 1416 … … 1376 1419 if (binTheta != bincheck) 1377 1420 { 1378 cout << "The binnings of the 2 histograms are not identical; aborting" 1379 << endl; 1421 *fLog << err 1422 << "MPadONOFF::Process(); The binnings of the 2 histograms are not identical; aborting" 1423 << endl; 1380 1424 return kERROR; 1381 1425 } … … 1395 1439 else 1396 1440 { 1397 *fLog << err << "Process; illegal data type... aborting" << endl; 1441 *fLog << err << "MPadONOFF::Process(); illegal data type... aborting" 1442 << endl; 1398 1443 return kERROR; 1399 1444 } … … 1406 1451 *fLog << all << "elNoise2 = " << elNoise2 << endl; 1407 1452 1408 lambdabar = (sigmabar2 - sigbarold2 - elNoise2) / F2excess; // [photo electrons]1453 lambdabar = (sigmabar2 - sigbarold2 - elNoise2) / F2excess; 1409 1454 1410 1455 // This value of lambdabar is the same for all pixels; … … 1438 1483 //if ( pix.GetNumPhotons() == 0.0) 1439 1484 //{ 1440 // *fLog << warn << "Process(); no.of photons is 0 for used pixel" 1485 // *fLog << warn 1486 // << "MPadONOFF::Process(); no.of photons is 0 for used pixel" 1441 1487 // << endl; 1442 1488 // continue; … … 1479 1525 binPixel, binPixel, ""); 1480 1526 1481 if ( hdiff-> Integral() == 0 )1527 if ( hdiff->GetEntries() == 0 ) 1482 1528 { 1483 *fLog << warn << " Process(); projection for Theta bin "1529 *fLog << warn << "MPadONOFF::Process(); projection for Theta bin " 1484 1530 << binTheta << " and pixel bin " << binPixel 1485 1531 << " has no entries; aborting " << endl; … … 1541 1587 binPixel, binPixel, ""); 1542 1588 1543 if ( hsig-> Integral() == 0 )1589 if ( hsig->GetEntries() == 0 ) 1544 1590 { 1545 *fLog << warn << " Process(); projection for Theta bin "1591 *fLog << warn << "MPadONOFF::Process(); projection for Theta bin " 1546 1592 << binTheta << " and pixel bin " << binPixel 1547 1593 << " has no entries; aborting " << endl; … … 1621 1667 if (arg < -1.e-10) 1622 1668 { 1623 *fLog << err << "Process(); argument of sqrt < 0 : "1669 *fLog << warn << "MPadONOFF::Process(); argument of sqrt < 0 : " 1624 1670 << arg << endl; 1625 1671 } … … 1640 1686 Double_t oldphotons = oldphotons_phot * fPEperPhoton; 1641 1687 Double_t newphotons = oldphotons + NSB; 1642 Double_t newphotons_phot = newphotons / fPEperPhoton; ;1688 Double_t newphotons_phot = newphotons / fPEperPhoton; 1643 1689 pix.SetNumPhotons( newphotons_phot ); 1644 1690 … … 1657 1703 1658 1704 Double_t newsigma = sqrt( oldsigma2 + addSig2 ); 1659 Double_t newsigma_phot = newsigma / fPEperPhoton; ;1705 Double_t newsigma_phot = newsigma / fPEperPhoton; 1660 1706 ppix.SetPedestalRms( newsigma_phot ); 1661 1707 … … 1667 1713 1668 1714 fSigmabar->Calc(*fCam, *fPed, *fEvt); 1669 *fLog << all << " after padding : " << endl;1715 *fLog << all << "MPadONOFF::Process(); after padding : " << endl; 1670 1716 fSigmabar->Print(""); 1717 1718 *fLog << all << "Exit MPadONOFF::Process();" << endl; 1671 1719 1672 1720 rc = 0; -
trunk/MagicSoft/Mars/manalysis/MPedestalWorkaround.cc
r2733 r2746 16 16 ! 17 17 ! 18 ! Author(s): Sabrina Stark 12/2003 <mailto:lstark@particle.phys.ethz.ch> 18 ! Author(s): Sabrina Stark 12/2003 <mailto:lstark@particle.phys.ethz.ch> 19 ! Wolfgang Wittek 12/2003 <mailto:wittek@mppmu.mpg.de> 19 20 ! 20 21 ! Copyright: MAGIC Software Development, 2000-2003 … … 27 28 // MPedestalWorkaround // 28 29 // // 29 // This class contains the function to store the pedestal value and the // 30 // RMS of the pedestal in units of photons. // 30 // copies the pedestal value and the pedestal RMS // 31 // from the container MPedPhotCam // 32 // into the contaier MPedestalCam // 33 // // 34 // put the zenith angle into MMcEvt; // 35 // the zenith angle is taken from the runbooks // 36 // (1 fixed zenith angle for a given run) // 37 // // 38 // this workaround is necessary // 39 // - as long as the analysis classes // 40 // take the pedestals from MPedestalCam; in the long run they have to // 41 // be taken from MPedPhotCam // 42 // - and as long as the container for the zenith angle is not defined // 31 43 // // 32 44 ///////////////////////////////////////////////////////////////////////////// … … 42 54 #include "MPedestalPix.h" 43 55 #include "MPedPhotCam.h" 56 #include "MMcEvt.hxx" 57 #include "MRawRunHeader.h" 44 58 45 59 using namespace std; … … 65 79 return kFALSE; 66 80 } 81 67 82 fPedPhot = (MPedPhotCam*)pList->FindObject("MPedPhotCam"); 68 83 if (!fPedPhot) … … 71 86 return kFALSE; 72 87 } 88 73 89 fCam = (MGeomCam*)pList->FindObject("MGeomCam"); 74 90 if (!fCam) … … 78 94 } 79 95 80 return kTRUE; 96 fRun = (MRawRunHeader*)pList->FindObject("MRawRunHeader"); 97 if (!fRun) 98 { 99 *fLog << err << "MRawRunHeader not found... aborting." << endl; 100 return kFALSE; 101 } 102 103 fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt"); 104 if (!fMcEvt) 105 { 106 *fLog << err << "MMcEvt not found... aborting." << endl; 107 return kFALSE; 108 } 109 110 return kTRUE; 81 111 } 82 112 … … 85 115 Int_t MPedestalWorkaround::Process() 86 116 { 87 88 UInt_t imaxnumpix = fCam->GetNumPixels(); 117 //------------------------------------------------------------------- 118 // copy the pedestal and the pedestal RMS 119 // from MPedPhotCam into MPedestalCam 120 121 UInt_t imaxnumpix = fCam->GetNumPixels(); 89 122 90 123 for (UInt_t i=0; i<imaxnumpix; i++) … … 101 134 valout = (*fPed)[i].GetPedestalRms(); 102 135 (*fPed)[i].SetPedestalRms(val); 103 *fLog << "RMS : i, val, valout : " << i <<", "<< val<<", " << valout << endl; 136 *fLog << "RMS : i, val, valout : " << i <<", "<< val<<", " << valout 137 << endl; 104 138 } 105 139 106 140 107 return kTRUE; 141 //------------------------------------------------------------------- 142 // put the zenith angle into MMcEvt 143 144 Int_t run = fRun->GetRunNumber(); 145 Double_t thetadeg; 146 Double_t thetarad; 147 148 if (run == 3127) thetadeg = 27.2; // Crab 149 else if (run == 3128) thetadeg = 25.6; 150 else if (run == 3129) thetadeg = 24.3; 151 else if (run == 3130) thetadeg = 23.9; 152 153 154 else if (run == 3132) thetadeg = 22.9; 155 else if (run == 3133) thetadeg = 22.8; 156 else if (run == 3134) thetadeg = 22.3; 157 else if (run == 3135) thetadeg = 21.9; 158 else if (run == 3136) thetadeg = 21.5; 159 else if (run == 3137) thetadeg = 21.1; 160 else if (run == 3138) thetadeg = 20.8; 161 else if (run == 3139) thetadeg = 20.4; 162 163 else if (run == 3140) thetadeg = 19.5; 164 else if (run == 3141) thetadeg = 19.4; 165 else if (run == 3142) thetadeg = 19.0; 166 else if (run == 3143) thetadeg = 18.6; 167 else if (run == 3144) thetadeg = 13.0; 168 else if (run == 3145) thetadeg = 12.4; 169 else if (run == 3146) thetadeg = 12.1; 170 else if (run == 3147) thetadeg = 11.7; 171 else if (run == 3148) thetadeg = 11.3; 172 else if (run == 3149) thetadeg = 11.9; 173 174 else if (run == 3150) thetadeg = 10.6; 175 else if (run == 3151) thetadeg = 10.3; 176 else if (run == 3152) thetadeg = 10.0; 177 else if (run == 3153) thetadeg = 9.6; 178 else if (run == 3154) thetadeg = 9.3; 179 else if (run == 3155) thetadeg = 9.0; 180 else if (run == 3156) thetadeg = 8.7; 181 else if (run == 3157) thetadeg = 8.4; 182 else if (run == 3158) thetadeg = 8.1; 183 else if (run == 3159) thetadeg = 7.9; 184 185 else if (run == 3160) thetadeg = 7.7; 186 else if (run == 3161) thetadeg = 7.3; 187 else if (run == 3162) thetadeg = 7.2; 188 else if (run == 3163) thetadeg = 7.0; 189 else if (run == 3164) thetadeg = 6.8; 190 else if (run == 3165) thetadeg = 6.7; 191 else if (run == 3166) thetadeg = 6.6; 192 else if (run == 3167) thetadeg = 6.5; 193 else if (run == 3168) thetadeg = 6.4; 194 else if (run == 3169) thetadeg = 6.4; 195 196 else if (run == 3170) thetadeg = 6.4; 197 else if (run == 3171) thetadeg = 6.4; 198 else if (run == 3172) thetadeg = 6.5; 199 else if (run == 3173) thetadeg = 6.6; 200 else if (run == 3174) thetadeg = 6.7; 201 202 else if (run == 3176) thetadeg = 7.1; 203 else if (run == 3177) thetadeg = 7.4; 204 else if (run == 3178) thetadeg = 7.6; 205 else if (run == 3179) thetadeg = 7.9; 206 207 208 else if (run == 3182) thetadeg = 8.4; 209 else if (run == 3183) thetadeg = 8.9; 210 else if (run == 3184) thetadeg = 9.2; 211 else if (run == 3185) thetadeg = 9.5; 212 else if (run == 3186) thetadeg = 9.8; 213 else if (run == 3187) thetadeg = 10.5; 214 else if (run == 3188) thetadeg = 10.9; 215 else if (run == 3189) thetadeg = 11.2; 216 217 else if (run == 3190) thetadeg = 11.6; 218 else if (run == 3191) thetadeg = 11.6; 219 else if (run == 3192) thetadeg = 12.4; 220 else if (run == 3193) thetadeg = 12.7; 221 else if (run == 3194) thetadeg = 13.1; 222 else if (run == 3195) thetadeg = 13.5; 223 else if (run == 3196) thetadeg = 13.9; 224 else if (run == 3197) thetadeg = 14.3; 225 else if (run == 3198) thetadeg = 14.7; 226 else if (run == 3199) thetadeg = 15.1; 227 228 else if (run == 3200) thetadeg = 15.6; 229 else if (run == 3201) thetadeg = 16.0; 230 else if (run == 3202) thetadeg = 16.5; 231 else if (run == 3203) thetadeg = 16.9; 232 else if (run == 3204) thetadeg = 17.3; 233 else if (run == 3205) thetadeg = 17.7; 234 else if (run == 3206) thetadeg = 18.2; 235 else if (run == 3207) thetadeg = 18.6; 236 else if (run == 3208) thetadeg = 19.0; 237 else if (run == 3209) thetadeg = 19.4; 238 239 else if (run == 3210) thetadeg = 19.9; 240 else if (run == 3211) thetadeg = 20.4; 241 else if (run == 3212) thetadeg = 20.8; 242 else if (run == 3213) thetadeg = 21.2; 243 else if (run == 3214) thetadeg = 21.7; 244 else if (run == 3215) thetadeg = 22.2; 245 else if (run == 3216) thetadeg = 25.6; // Off Crab1 246 else if (run == 3217) thetadeg = 25.0; 247 else if (run == 3218) thetadeg = 24.5; 248 else if (run == 3219) thetadeg = 24.0; 249 250 else if (run == 3220) thetadeg = 23.5; 251 else if (run == 3221) thetadeg = 22.5; 252 else if (run == 3222) thetadeg = 22.1; 253 254 else if (run == 3225) thetadeg = 15.1; 255 else if (run == 3226) thetadeg = 15.0; 256 else if (run == 3227) thetadeg = 14.5; 257 else if (run == 3228) thetadeg = 14.1; 258 else if (run == 3229) thetadeg = 13.8; 259 260 else if (run == 3230) thetadeg = 13.3; 261 else if (run == 3231) thetadeg = 13.0; 262 else if (run == 3232) thetadeg = 12.6; 263 else if (run == 3233) thetadeg = 12.3; 264 else if (run == 3234) thetadeg = 12.0; 265 else if (run == 3235) thetadeg = 11.6; 266 else if (run == 3236) thetadeg = 11.3; 267 else if (run == 3237) thetadeg = 11.0; 268 else if (run == 3238) thetadeg = 10.8; 269 else if (run == 3239) thetadeg = 10.4; 270 271 else if (run == 3240) thetadeg = 10.1; 272 else if (run == 3241) thetadeg = 9.9; 273 else if (run == 3242) thetadeg = 9.6; 274 else if (run == 3243) thetadeg = 9.4; 275 else if (run == 3244) thetadeg = 9.2; 276 else if (run == 3245) thetadeg = 9.0; 277 else if (run == 3246) thetadeg = 8.9; 278 else if (run == 3247) thetadeg = 8.8; 279 else if (run == 3248) thetadeg = 8.7; 280 else if (run == 3249) thetadeg = 8.6; 281 282 else if (run == 3250) thetadeg = 8.6; 283 else if (run == 3251) thetadeg = 8.6; 284 else if (run == 3252) thetadeg = 8.6; 285 else if (run == 3253) thetadeg = 8.7; 286 else if (run == 3254) thetadeg = 8.8; 287 else if (run == 3255) thetadeg = 8.9; 288 else if (run == 3256) thetadeg = 9.1; 289 else if (run == 3257) thetadeg = 9.3; 290 else if (run == 3258) thetadeg = 9.5; 291 else if (run == 3259) thetadeg = 9.7; 292 else if (run == 3260) thetadeg = 9.9; 293 294 else if (run == 3261) thetadeg = 10.2; 295 else if (run == 3262) thetadeg = 10.5; 296 else if (run == 3263) thetadeg = 10.8; 297 else if (run == 3264) thetadeg = 11.1; 298 else if (run == 3265) thetadeg = 11.4; 299 else if (run == 3266) thetadeg = 11.8; 300 else if (run == 3267) thetadeg = 12.1; 301 else if (run == 3268) thetadeg = 12.5; 302 else if (run == 3269) thetadeg = 12.8; 303 304 else if (run == 3270) thetadeg = 13.2; 305 else if (run == 3271) thetadeg = 13.5; 306 else if (run == 3272) thetadeg = 13.9; 307 else if (run == 3273) thetadeg = 14.0; 308 else if (run == 3274) thetadeg = 14.4; 309 310 else if (run == 3284) thetadeg = 7.0; // Crab 311 else if (run == 3285) thetadeg = 7.2; 312 else if (run == 3286) thetadeg = 7.4; 313 else if (run == 3287) thetadeg = 7.5; 314 else if (run == 3288) thetadeg = 8.4; 315 else if (run == 3289) thetadeg = 9.0; 316 317 else if (run == 3290) thetadeg = 9.4; 318 else if (run == 3291) thetadeg = 9.8; 319 else if (run == 3292) thetadeg = 10.2; 320 else if (run == 3293) thetadeg = 10.5; 321 else if (run == 3294) thetadeg = 10.9; 322 else if (run == 3295) thetadeg = 11.3; 323 else if (run == 3296) thetadeg = 11.8; 324 else if (run == 3297) thetadeg = 12.2; 325 else if (run == 3298) thetadeg = 12.6; 326 else if (run == 3299) thetadeg = 13.0; 327 328 else if (run == 3300) thetadeg = 13.5; 329 else if (run == 3301) thetadeg = 13.9; 330 else if (run == 3302) thetadeg = 14.3; 331 else if (run == 3303) thetadeg = 14.8; 332 else if (run == 3304) thetadeg = 15.2; 333 else if (run == 3305) thetadeg = 15.7; 334 else if (run == 3306) thetadeg = 16.2; 335 else if (run == 3307) thetadeg = 16.6; 336 else if (run == 3308) thetadeg = 17.1; 337 else if (run == 3309) thetadeg = 17.6; 338 339 else if (run == 3310) thetadeg = 17.9; 340 else if (run == 3311) thetadeg = 18.4; 341 else if (run == 3312) thetadeg = 18.9; 342 else if (run == 3313) thetadeg = 19.3; 343 else if (run == 3314) thetadeg = 19.8; 344 else if (run == 3315) thetadeg = 20.1; 345 else if (run == 3316) thetadeg = 20.7; 346 else if (run == 3317) thetadeg = 21.2; 347 else if (run == 3318) thetadeg = 21.7; 348 else if (run == 3319) thetadeg = 22.1; 349 350 else if (run == 3320) thetadeg = 22.5; 351 else if (run == 3321) thetadeg = 23.1; 352 else if (run == 3322) thetadeg = 23.6; 353 else if (run == 3323) thetadeg = 24.1; 354 else if (run == 3324) thetadeg = 24.6; 355 else if (run == 3325) thetadeg = 24.9; 356 else if (run == 3326) thetadeg = 25.5; 357 else if (run == 3327) thetadeg = 26.0; 358 else if (run == 3328) thetadeg = 26.0; 359 else if (run == 3329) thetadeg = 26.6; 360 361 else if (run == 3330) thetadeg = 26.6; 362 else if (run == 3331) thetadeg = 27.1; 363 else if (run == 3332) thetadeg = 27.7; 364 else if (run == 3333) thetadeg = 28.2; 365 else if (run == 3334) thetadeg = 28.5; 366 367 else if (run == 3340) thetadeg = 10.5; 368 else if (run == 3341) thetadeg = 10.3; 369 else if (run == 3342) thetadeg = 9.6; 370 else if (run == 3343) thetadeg = 9.2; 371 else if (run == 3344) thetadeg = 8.9; 372 else if (run == 3345) thetadeg = 8.6; 373 else if (run == 3346) thetadeg = 8.3; 374 else if (run == 3347) thetadeg = 8.0; 375 else if (run == 3348) thetadeg = 7.7; 376 else if (run == 3349) thetadeg = 7.5; 377 378 else if (run == 3350) thetadeg = 7.2; 379 else if (run == 3351) thetadeg = 7.0; 380 else if (run == 3352) thetadeg = 6.8; 381 else if (run == 3353) thetadeg = 6.7; 382 else if (run == 3354) thetadeg = 6.6; 383 else if (run == 3355) thetadeg = 6.5; 384 else if (run == 3356) thetadeg = 6.4; 385 else if (run == 3357) thetadeg = 6.4; 386 else if (run == 3358) thetadeg = 6.4; 387 else if (run == 3359) thetadeg = 6.5; 388 389 else if (run == 3360) thetadeg = 6.6; 390 391 else if (run == 3362) thetadeg = 6.7; 392 else if (run == 3363) thetadeg = 6.8; 393 else if (run == 3364) thetadeg = 7.0; 394 else if (run == 3365) thetadeg = 7.2; 395 else if (run == 3366) thetadeg = 7.5; 396 else if (run == 3367) thetadeg = 7.7; 397 else if (run == 3368) thetadeg = 8.0; 398 else if (run == 3369) thetadeg = 8.3; 399 400 else if (run == 3370) thetadeg = 8.6; 401 else if (run == 3371) thetadeg = 9.0; 402 else if (run == 3372) thetadeg = 9.3; 403 else if (run == 3373) thetadeg = 9.6; 404 else if (run == 3374) thetadeg = 10.0; 405 else if (run == 3375) thetadeg = 10.4; 406 else if (run == 3376) thetadeg = 10.7; 407 else if (run == 3377) thetadeg = 11.1; 408 else if (run == 3378) thetadeg = 11.5; 409 else if (run == 3379) thetadeg = 11.9; 410 411 else if (run == 3380) thetadeg = 12.3; 412 else if (run == 3381) thetadeg = 12.7; 413 else if (run == 3382) thetadeg = 13.1; 414 else if (run == 3383) thetadeg = 13.5; 415 else if (run == 3384) thetadeg = 13.9; 416 else if (run == 3385) thetadeg = 14.3; 417 else if (run == 3386) thetadeg = 14.7; 418 else if (run == 3387) thetadeg = 15.2; 419 else if (run == 3388) thetadeg = 15.6; 420 else if (run == 3389) thetadeg = 16.0; 421 422 else if (run == 3390) thetadeg = 16.4; 423 else if (run == 3391) thetadeg = 16.7; 424 else if (run == 3392) thetadeg = 17.9; 425 else if (run == 3393) thetadeg = 18.3; 426 else if (run == 3394) thetadeg = 18.7; 427 else if (run == 3395) thetadeg = 19.2; 428 else if (run == 3396) thetadeg = 19.6; 429 else if (run == 3397) thetadeg = 20.0; 430 else if (run == 3398) thetadeg = 20.5; 431 else if (run == 3399) thetadeg = 20.9; 432 433 else if (run == 3400) thetadeg = 21.4; 434 else if (run == 3401) thetadeg = 21.8; 435 else if (run == 3402) thetadeg = 22.1; 436 else if (run == 3403) thetadeg = 22.6; 437 else if (run == 3404) thetadeg = 23.1; 438 else if (run == 3405) thetadeg = 23.4; 439 else if (run == 3406) thetadeg = 23.9; 440 else if (run == 3407) thetadeg = 24.3; 441 else if (run == 3408) thetadeg = 24.7; 442 else if (run == 3409) thetadeg = 26.9; 443 444 else if (run == 3410) thetadeg = 27.3; 445 else if (run == 3411) thetadeg = 27.7; 446 else if (run == 3412) thetadeg = 28.2; 447 else if (run == 3413) thetadeg = 28.7; 448 else if (run == 3414) thetadeg = 29.1; 449 else if (run == 3415) thetadeg = 29.2; 450 else if (run == 3416) thetadeg = 30.0; 451 else if (run == 3417) thetadeg = 18.5; // Off Crab1 452 else if (run == 3418) thetadeg = 18.4; 453 else if (run == 3419) thetadeg = 17.5; 454 455 else if (run == 3420) thetadeg = 17.2; 456 else if (run == 3421) thetadeg = 16.8; 457 else if (run == 3422) thetadeg = 16.4; 458 else if (run == 3423) thetadeg = 16.0; 459 else if (run == 3424) thetadeg = 15.6; 460 else if (run == 3425) thetadeg = 15.3; 461 else if (run == 3426) thetadeg = 14.9; 462 else if (run == 3427) thetadeg = 14.5; 463 else if (run == 3428) thetadeg = 14.1; 464 else if (run == 3429) thetadeg = 13.7; 465 466 else if (run == 3430) thetadeg = 13.4; 467 else if (run == 3431) thetadeg = 13.0; 468 else if (run == 3432) thetadeg = 12.7; 469 else if (run == 3433) thetadeg = 12.3; 470 else if (run == 3434) thetadeg = 12.0; 471 else if (run == 3435) thetadeg = 12.0; 472 else if (run == 3436) thetadeg = 11.6; 473 else if (run == 3437) thetadeg = 11.3; 474 else if (run == 3438) thetadeg = 11.0; 475 else if (run == 3439) thetadeg = 10.7; 476 477 else if (run == 3440) thetadeg = 10.4; 478 else if (run == 3441) thetadeg = 10.1; 479 else if (run == 3442) thetadeg = 9.9; 480 else if (run == 3443) thetadeg = 9.8; 481 else if (run == 3444) thetadeg = 30.8; // Mkn 421 482 else if (run == 3445) thetadeg = 30.6; 483 else if (run == 3446) thetadeg = 29.7; 484 else if (run == 3447) thetadeg = 29.3; 485 else if (run == 3448) thetadeg = 28.9; 486 else if (run == 3449) thetadeg = 28.5; 487 488 else if (run == 3450) thetadeg = 28.1; 489 else if (run == 3451) thetadeg = 27.7; 490 else if (run == 3452) thetadeg = 27.3; 491 else if (run == 3453) thetadeg = 26.9; 492 else if (run == 3454) thetadeg = 26.5; 493 else if (run == 3455) thetadeg = 26.1; 494 else if (run == 3456) thetadeg = 25.7; 495 else if (run == 3457) thetadeg = 25.3; 496 else if (run == 3458) thetadeg = 24.9; 497 else if (run == 3459) thetadeg = 24.5; 498 499 else if (run == 3460) thetadeg = 24.1; 500 501 else if (run == 3463) thetadeg = 23.2; 502 else if (run == 3464) thetadeg = 22.8; 503 else if (run == 3465) thetadeg = 22.4; 504 else if (run == 3466) thetadeg = 22.0; 505 else if (run == 3467) thetadeg = 21.6; 506 else if (run == 3468) thetadeg = 21.2; 507 else if (run == 3469) thetadeg = 20.8; 508 509 else if (run == 3470) thetadeg = 20.4; 510 else if (run == 3471) thetadeg = 20.1; 511 else if (run == 3472) thetadeg = 19.7; 512 else if (run == 3473) thetadeg = 19.3; 513 else if (run == 3474) thetadeg = 18.9; 514 else if (run == 3475) thetadeg = 18.5; 515 else if (run == 3476) thetadeg = 18.2; 516 else if (run == 3477) thetadeg = 18.1; 517 else if (run == 3478) thetadeg = 17.7; 518 519 520 else if (run == 3480) thetadeg = 17.5; 521 else if (run == 3481) thetadeg = 17.1; 522 else if (run == 3482) thetadeg = 16.7; 523 else if (run == 3483) thetadeg = 16.3; 524 else if (run == 3484) thetadeg = 16.0; 525 else if (run == 3485) thetadeg = 15.6; 526 else if (run == 3486) thetadeg = 15.3; 527 else if (run == 3487) thetadeg = 15.0; 528 else if (run == 3488) thetadeg = 14.8; 529 else if (run == 3489) thetadeg = 14.8; 530 531 else 532 { 533 *fLog << warn << "MPedestalWorkaround : no zenith angle for run number = " 534 << run << endl; 535 thetadeg = 90.0; 536 } 537 538 thetarad = thetadeg / kRad2Deg; 539 fMcEvt->SetTelescopeTheta(thetarad); 540 541 return kTRUE; 108 542 } 109 543 … … 113 547 } 114 548 549 550 551 552 553 554 -
trunk/MagicSoft/Mars/manalysis/MPedestalWorkaround.h
r2733 r2746 19 19 class MGeomCam; 20 20 class MParList; 21 21 class MMcEvt; 22 class MRawRunHeader; 22 23 23 24 class MPedestalWorkaround : public MTask … … 25 26 private: 26 27 27 MPedestalCam *fPed; // 28 MPedPhotCam *fPedPhot; // 29 MGeomCam *fCam; // 28 MPedestalCam *fPed; 29 MPedPhotCam *fPedPhot; 30 MGeomCam *fCam; 31 MMcEvt *fMcEvt; 32 MRawRunHeader *fRun; 30 33 31 34 Int_t PreProcess(MParList *pList); -
trunk/MagicSoft/Mars/manalysis/Makefile
r2739 r2746 74 74 MFiltercutsCalc.cc \ 75 75 MCT1PadONOFF.cc \ 76 MPadON.cc \ 76 77 MPadONOFF.cc \ 77 78 MPedestalWorkaround.cc \ -
trunk/MagicSoft/include-Classes/MMcFormat/MMcEvt.hxx
r2271 r2746 142 142 void SetImpact(Float_t Impact) 143 143 { fImpact=Impact;} //Set impact parameter 144 145 void SetTelescopeTheta(Float_t Theta) { fTelescopeTheta=Theta; } 146 void SetTelescopePhi(Float_t Phi) { fTelescopePhi=Phi; } 147 144 148 145 149 /* void SetPhotIni(Short_t PhotIni) */
Note:
See TracChangeset
for help on using the changeset viewer.