Changeset 4605 for trunk/MagicSoft/Mars/mjobs
- Timestamp:
- 08/12/04 21:43:15 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r4451 r4605 109 109 #include "MCalibrationChargePINDiode.h" 110 110 #include "MCalibrationChargeBlindPix.h" 111 #include "MCalibrationChargeBlindCam.h" 112 #include "MCalibrationChargeBlindPix.h" 111 113 #include "MCalibrationChargeCalc.h" 112 114 … … 114 116 #include "MHCalibrationCam.h" 115 117 #include "MHCalibrationChargeCam.h" 116 #include "MHCalibrationChargeBlindPix.h" 118 #include "MHCalibrationChargeBlindCam.h" 119 #include "MHCalibrationChargePINDiode.h" 117 120 #include "MHCalibrationRelTimeCam.h" 118 121 #include "MCalibrationRelTimeCam.h" … … 142 145 using namespace std; 143 146 144 const Int_t MJCalibration::gkIFAEBoxInaugurationRun = 20113; 147 const Int_t MJCalibration::gkIFAEBoxInaugurationRun = 20113; 148 const Int_t MJCalibration::gkSecondBlindPixelInstallation = 31693; 149 const Int_t MJCalibration::gkThirdBlindPixelInstallation = 99999; 145 150 // -------------------------------------------------------------------------- 146 151 // … … 210 215 void MJCalibration::DisplayResult(MParList &plist) 211 216 { 217 212 218 if (!fDisplay) 213 219 return; … … 417 423 if (fDisplayType == kDataCheckDisplay) 418 424 { 425 419 426 TCanvas &c1 = fDisplay->AddTab("Fit.Charge"); 420 427 c1.Divide(3, 3); 421 428 422 disp1.CamDraw( c1, 1, 3, 5);423 disp4.CamDraw( c1, 2, 3, 5);429 disp1.CamDraw( c1, 1, 3, 5); 430 disp4.CamDraw( c1, 2, 3, 5); 424 431 disp28.CamDraw(c1, 3, 3, 5); 425 432 … … 456 463 disp31.CamDraw(c5, 2, 2, 2); 457 464 } 458 459 465 460 466 return; … … 684 690 // 685 691 // Here starts the list of runs where the shifters did not put 686 // a colour, but which have been found out by other means 692 // a colour, but which have been found out by other means. 693 // FIXME: This list has is only preliminary and has to move into the 694 // database!! 687 695 // 696 if (filenames.Contains("_30090_")) 697 if (fColor == MCalibrationCam::kNONE) 698 { 699 *fLog << "Found colour: kGREEN in " << filenames << endl; 700 fColor = MCalibrationCam::kGREEN; 701 } 702 else if (fColor != MCalibrationCam::kNONE) 703 { 704 *fLog << err << "Different colour found in " << filenames << "... abort" << endl; 705 return kFALSE; 706 } 707 688 708 if (filenames.Contains("_27474_")) 689 709 if (fColor == MCalibrationCam::kNONE) … … 801 821 // 802 822 // Here start the runs where the shifter put 803 // the colour 823 // the colour. 804 824 // 805 825 if (filenames.Contains("green")) … … 933 953 // 8) MContinue(MFCosmics) 934 954 // 9) MFillH("MHCalibrationChargePINDiode", "MExtractedSignalPINDiode") 935 // 10) MFillH("MHCalibrationChargeBlind Pix", "MExtractedSignalBlindPixel")955 // 10) MFillH("MHCalibrationChargeBlindCam", "MExtractedSignalBlindPixel") 936 956 // 11) MFillH("MHCalibrationChargeCam", "MExtractedSignalCam") 937 957 // 12) MFillH("MHCalibrationChargeCam", "MExtractedSignalCam") … … 987 1007 } 988 1008 989 MHCalibrationChargeCam chargecam; 1009 MHCalibrationChargeCam chargecam; 1010 MHCalibrationChargeBlindCam blindcam; 990 1011 991 1012 plist.AddToList(&pedcam); 992 plist.AddToList(&chargecam); 1013 plist.AddToList(&chargecam); 1014 plist.AddToList(&blindcam); 993 1015 plist.AddToList(&fBadPixels); 994 1016 plist.AddToList(&fQECam); 995 1017 plist.AddToList(&fCalibrationCam); 996 plist.AddToList(&fCalibrationBlind Pix);1018 plist.AddToList(&fCalibrationBlindCam); 997 1019 plist.AddToList(&fCalibrationPINDiode); 998 1020 plist.AddToList(&fRelTimeCam); 999 1021 1000 1022 MGeomApply apply; 1001 // MBadPixelsMerge merge(&fBadPixels);1002 1023 MExtractPINDiode pinext; 1003 1024 MExtractBlindPixel blindext; 1025 1026 // 1027 // Initialize the blind pixel. Unfortunately, there is a hardware difference 1028 // in the first blind pixel until run "gkSecondBlindPixelInstallation" and the 1029 // later setup. The first needs to use a filter because of the length of 1030 // spurious NSB photon signals. The latter get better along extracting the amplitude 1031 // from a small window. 1032 // 1033 TArrayI arr = fRuns->GetRuns(); 1034 if (arr[fRuns->GetNumRuns()-1] < gkSecondBlindPixelInstallation) 1035 { 1036 blindext.SetModified(kFALSE); 1037 blindext.SetExtractionType(MExtractBlindPixel::kIntegral); 1038 blindext.SetExtractionType(MExtractBlindPixel::kFilter); 1039 blindext.SetRange(10,19,0,2); 1040 blindcam.SetFitFunc( MHCalibrationChargeBlindPix::kEPoisson5 ); 1041 } 1042 else 1043 { 1044 blindext.SetModified(kTRUE); 1045 blindext.SetExtractionType(MExtractBlindPixel::kAmplitude); 1046 blindext.SetExtractionType(MExtractBlindPixel::kFilter); 1047 blindext.SetRange(5,8,0,2); 1048 blindext.SetNSBFilterLimit(38); 1049 if (arr[fRuns->GetNumRuns()-1] < gkThirdBlindPixelInstallation) 1050 blindext.SetNumBlindPixels(2); 1051 else 1052 blindext.SetNumBlindPixels(3); 1053 } 1054 1004 1055 MExtractSlidingWindow extract2; 1005 1056 MExtractTimeFastSpline timespline; … … 1024 1075 1025 1076 MFillH fillpin("MHCalibrationChargePINDiode", "MExtractedSignalPINDiode"); 1026 MFillH fillbnd("MHCalibrationChargeBlind Pix", "MExtractedSignalBlindPixel");1077 MFillH fillbnd("MHCalibrationChargeBlindCam", "MExtractedSignalBlindPixel"); 1027 1078 MFillH fillcam("MHCalibrationChargeCam", "MExtractedSignalCam"); 1028 1079 MFillH filltme("MHCalibrationRelTimeCam", "MArrivalTimeCam"); … … 1032 1083 filltme.SetNameTab("RelTimes"); 1033 1084 1085 TString drawoption; 1086 1034 1087 if (fDisplayType == kDataCheckDisplay) 1035 { 1036 fillcam.SetDrawOption("datacheck"); 1037 fillbnd.SetDrawOption("datacheck"); 1038 fillpin.SetDrawOption("datacheck"); 1039 filltme.SetDrawOption("datacheck"); 1040 } 1041 1088 drawoption += "datacheck"; 1042 1089 if (fDisplayType == kFullDisplay) 1043 {1044 fillcam.SetDrawOption("all");1045 filltme.SetDrawOption("all");1046 }1047 1048 1090 drawoption += " all"; 1091 1092 fillcam.SetDrawOption(drawoption.Data()); 1093 fillbnd.SetDrawOption(drawoption.Data()); 1094 fillpin.SetDrawOption(drawoption.Data()); 1095 filltme.SetDrawOption(drawoption.Data()); 1049 1096 // 1050 1097 // Apply a filter against cosmics … … 1067 1114 } 1068 1115 1069 1070 1116 tlist.AddToList(&pinext); 1071 1117 tlist.AddToList(&blindext); … … 1088 1134 tlist.AddToList(&fillcam); 1089 1135 1136 if (fRelTimes) 1137 { 1138 tlist.AddToList(&filltme); 1139 tlist.AddToList(&timecalc); 1140 } 1141 1142 if (IsUseBlindPixel()) 1143 tlist.AddToList(&fillbnd); 1090 1144 if (IsUsePINDiode()) 1091 1145 tlist.AddToList(&fillpin); 1092 if (IsUseBlindPixel())1093 tlist.AddToList(&fillbnd);1094 1146 1095 1147 tlist.AddToList(&calcalc); 1096 1097 if (fRelTimes)1098 {1099 tlist.AddToList(&filltme);1100 tlist.AddToList(&timecalc);1101 }1102 1103 1148 1104 1149 // Create and setup the eventloop … … 1117 1162 tlist.PrintStatistics(); 1118 1163 1164 // 1165 // The next lines are necessary in order to avoid that 1166 // the last entry drawn by MFillH gets deleted again from 1167 // the display. No idea where this comes from... 1168 // 1169 if (fDisplay) 1170 { 1171 if (IsUsePINDiode()) 1172 { 1173 MHCalibrationChargePINDiode *pin = 1174 (MHCalibrationChargePINDiode*)plist.FindObject("MHCalibrationChargePINDiode"); 1175 pin->DrawClone(Form("nonew %s",drawoption.Data())); 1176 } 1177 else if (IsUseBlindPixel()) 1178 { 1179 MHCalibrationChargeBlindCam *cam = 1180 (MHCalibrationChargeBlindCam*)plist.FindObject("MHCalibrationChargeBlindCam"); 1181 cam->DrawClone(Form("nonew %s",drawoption.Data())); 1182 } 1183 else if (fRelTimes) 1184 { 1185 MHCalibrationRelTimeCam *cam = 1186 (MHCalibrationRelTimeCam*)plist.FindObject("MHCalibrationRelTimeCam"); 1187 cam->DrawClone(Form("nonew %s",drawoption.Data())); 1188 } 1189 else 1190 { 1191 MHCalibrationChargeCam *cam = 1192 (MHCalibrationChargeCam*)plist.FindObject("MHCalibrationChargeCam"); 1193 cam->DrawClone(Form("nonew %s",drawoption.Data())); 1194 } 1195 } 1196 1119 1197 DisplayResult(plist); 1120 1198 … … 1249 1327 } 1250 1328 1251 if (fCalibrationBlind Pix.Write()<=0)1252 { 1253 *fLog << err << "Unable to write MCalibrationChargeBlind Pixto " << oname << endl;1329 if (fCalibrationBlindCam.Write()<=0) 1330 { 1331 *fLog << err << "Unable to write MCalibrationChargeBlindCam to " << oname << endl; 1254 1332 return kFALSE; 1255 1333 }
Note:
See TracChangeset
for help on using the changeset viewer.