Changeset 7013 for trunk/MagicSoft/Mars
- Timestamp:
- 05/11/05 19:06:48 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 1 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7010 r7013 21 21 22 22 -*-*- END OF LINE -*-*- 23 2005/05/11 Thomas Bretz 24 25 * mbase/MStatusDisplay.cc: 26 - fixed year of copyright 27 28 * mcalib/MCalibCalcFromPast.cc: 29 - undocumented change from BCN: a new resource has been implemented 30 in ReadEnv (NumEventsDump) 31 32 * mjobs/MJob.[h,cc]: 33 - added new static member function which can be used 34 to overwrite relative paths with a default 35 36 37 38 2005/05/11 Abelardo Moralejo (2005/05/11) 39 40 * mjobs/MJPedestal.cc 41 - Fixed use of MFTriggerPattern: first, added it to the tasklist 42 (was missing); second, added to tasklist MTriggerPatternDecode 43 before MFTriggerPattern. This was the reason for the problems 44 reported by T. Coarasa on May 9. I do not know why the behaviour 45 of the previous version depended on compiler, but this seemed to 46 be the case... 47 48 49 50 2005/05/11 Markus Gaug (2005/05/11) 51 52 * mjobs/MJCalibration.cc 53 - display in Tab "Conv" in the 3rd column the conversion to equiv. 54 phes instead of Cherenkov photons. 55 56 * mjobs/calibrationref.rc, mjobs/calibrationref_Nov04.rc, 57 mjobs/calibrationref_Dec04.rc: 58 - add reference lines for the conv. to equiv. phes. 59 60 * mcalib/MCalibrationChargeCam.cc, mcalib/MCalibrationChargeCalc.cc: 61 - make a distinction between newly excluded pixels (by calibration) 62 and previously excluded pixels in the displays and print-functions 63 64 * mcalib/MCalibrationChargeCalc.cc 65 - introduce the check for fluctuating arrival times. 66 - set charge limit to from 2.5 to 4.5 67 68 69 70 2005/05/10 Markus Gaug (2005/05/10) 71 72 * mhcalib/MHCalibrationHiLoCam.cc 73 - ask for averageing and do not fill the arrays per pixel any more. 74 This caused too much memory usage for the calculation of the 75 high-gain low-gain inter-calibration constants. 76 77 * mcalib/MCalibrationChargePix.[h,cc] 78 - store number of saturated events in the results container. 79 - set version number by one higher (due to new data member). 80 81 * mhcalib/MHCalibrationChargeCam.cc 82 - store number of saturated events in the results container. 83 - allow reading of NumHiGainSaturationLimit and 84 NumLoGainSaturationLimit in ReadEnv 85 - set saturation limit from 5% to 8.5% 86 87 * mbadpixels/MBadPixelsPix.h 88 - introduce new bits: kDeadPedestalRms, kPreviouslyExcluded, 89 kFluctuatingArrivalTimes 90 91 * mbadpixels/MBadPixelsCam.cc 92 - set bit kPreviouslyExcluded in the AsciiRead-Function 93 - include three new bits in the Print() function 94 95 * mjobs/MJCalibration.cc 96 - display excluded pixels from DeadPedestalRms in Defect-Tab. 97 - display correct error of the RMS/Mean charge diagramm. 98 99 * mcalib/MCalibrationChargeCam.cc 100 - calculate the error of RMS/Mean values in GetPixelContent Nr.33 101 102 103 104 2005/05/11 Hendrik Bartko (2005/05/09) 105 106 * msignal/MC_weights46.dat 107 - updated weights file for digital filter with dedicated MC weights 108 with 4 slices for the high gain and 6 slices for the low gain 109 110 23 111 24 112 2005/05/10 Daniela Dorner -
trunk/MagicSoft/Mars/NEWS
r7002 r7013 73 73 74 74 - The storage of the palette in MHCamera is now possible 75 76 - new bits describing unsuitable and unreliable pixels have been 77 introduced in MBadPixelsPix: kPreviouslyExcluded, kDeadPedestalRms, 78 kFluctuatingArrivalTimes 79 80 - the calibration now does a consistency check of the arrival time 81 82 - the charge timit in the calibration has been raised from 2.5 to 4.5 83 84 - callisto: new setup read from callisto.rc 85 + MCalibCalcFromPast.fNuMEventsDump 86 + MHCalibrationChargeCam.NumHiGainSaturationLimit 87 + MHCalibrationChargeCam.NumLoGainSaturationLimit 75 88 76 89 -
trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc
r7005 r7013 334 334 // Read the setup from a TEnv, eg: 335 335 // MCalibCalcFromPast.UpdateWithFFactorMethod: Off, On 336 // MCalibCalcFromPast.NumEventsDump: 500 336 337 // 337 338 Int_t MCalibCalcFromPast::ReadEnv(const TEnv &env, TString prefix, Bool_t print) … … 344 345 } 345 346 347 if (IsEnvDefined(env, prefix, "NumEventsDump", print)) 348 { 349 SetNumEventsDump(GetEnvValue(env, prefix, "NumEventsDump", (Int_t)fNumEventsDump)); 350 rc = kTRUE; 351 } 352 346 353 return rc; 347 354 } -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r6928 r7013 231 231 using namespace std; 232 232 233 const Float_t MCalibrationChargeCalc::fgChargeLimit = 2.5;233 const Float_t MCalibrationChargeCalc::fgChargeLimit = 4.5; 234 234 const Float_t MCalibrationChargeCalc::fgChargeErrLimit = 0.; 235 235 const Float_t MCalibrationChargeCalc::fgChargeRelErrLimit = 1.; … … 238 238 const Float_t MCalibrationChargeCalc::fgPheErrLimit = 4.5; 239 239 const Float_t MCalibrationChargeCalc::fgFFactorErrLimit = 4.5; 240 const Float_t MCalibrationChargeCalc::fgArrTimeRmsLimit = 3.5; 240 241 const TString MCalibrationChargeCalc::fgNamePedestalCam = "MPedestalCam"; 242 241 243 // -------------------------------------------------------------------------- 242 244 // … … 252 254 // 253 255 // Initializes: 256 // - fArrTimeRmsLimit to fgArrTimeRmsLimit 254 257 // - fChargeLimit to fgChargeLimit 255 258 // - fChargeErrLimit to fgChargeErrLimit … … 282 285 AddToBranchList("MRawEvtData.fLoGainFadcSamples"); 283 286 287 SetArrTimeRmsLimit (); 284 288 SetChargeLimit (); 285 289 SetChargeErrLimit (); … … 294 298 SetDebug ( kFALSE ); 295 299 300 SetCheckArrivalTimes (); 296 301 SetCheckDeadPixels (); 297 302 SetCheckDeviatingBehavior(); … … 732 737 if (FinalizeCharges(pix,bad,"pixel ")) 733 738 nvalid++; 739 740 FinalizeArrivalTimes(pix,bad,"pixel "); 734 741 } 735 742 … … 760 767 FinalizePedestals(ped,pix,aidx); 761 768 FinalizeCharges(pix, chargecam->GetAverageBadArea(aidx),"area id"); 769 FinalizeArrivalTimes(pix, chargecam->GetAverageBadArea(aidx), "area id"); 762 770 } 763 771 … … 855 863 PrintUncalibrated(MBadPixelsPix::kLoGainOverFlow, 856 864 "Pixels with Low Gain Overflow : "); 865 PrintUncalibrated(MBadPixelsPix::kFluctuatingArrivalTimes, 866 "Fluctuating Pulse Arrival Times: "); 867 PrintUncalibrated(MBadPixelsPix::kDeadPedestalRms, 868 "Presumably dead from Pedestal Rms: "); 869 PrintUncalibrated(MBadPixelsPix::kPreviouslyExcluded, 870 "Previously excluded: "); 857 871 858 872 *fLog << inf << endl; … … 1018 1032 } 1019 1033 1020 1034 // ----------------------------------------------------------------------------------- 1035 // 1036 // Test the arrival Times RMS of the pixel and set the bit 1037 // - MBadPixelsPix::kFluctuatingArrivalTimes 1038 // 1039 void MCalibrationChargeCalc::FinalizeArrivalTimes(MCalibrationChargePix &cal, MBadPixelsPix &bad, const char* what) 1040 { 1041 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) 1042 return; 1043 1044 if (cal.GetAbsTimeRms() > fArrTimeRmsLimit) 1045 { 1046 *fLog << warn; 1047 *fLog << "RMS of pulse arrival times: " << Form("%2.1f", cal.GetAbsTimeRms()); 1048 *fLog << " FADC sl. < " << Form("%2.1", fArrTimeRmsLimit); 1049 *fLog << " in " << what << Form("%3i", cal.GetPixId()) << endl; 1050 bad.SetUncalibrated( MBadPixelsPix::kFluctuatingArrivalTimes); 1051 } 1052 } 1021 1053 1022 1054 // ----------------------------------------------------------------------------------- … … 1039 1071 { 1040 1072 1041 MBadPixelsCam *badcam = fIntensBad 1042 ? (MBadPixelsCam*) fIntensBad->GetCam() : fBadPixels; 1043 MCalibrationChargeCam *chargecam = fIntensCam 1044 ? (MCalibrationChargeCam*)fIntensCam->GetCam() : fCam; 1073 MBadPixelsCam *badcam = fIntensBad ? (MBadPixelsCam*)fIntensBad->GetCam() : fBadPixels; 1045 1074 1046 1075 for (Int_t i=0; i<badcam->GetSize(); i++) 1047 1076 { 1048 1077 1049 MBadPixelsPix &bad = (*badcam) [i]; 1050 MCalibrationPix &pix = (*chargecam)[i]; 1078 MBadPixelsPix &bad = (*badcam)[i]; 1051 1079 1052 1080 if (IsCheckDeadPixels()) … … 1086 1114 } 1087 1115 1088 if (bad.IsUnsuitable( MBadPixelsPix::kUnsuitableRun )) 1089 pix.SetExcluded(); 1116 if (IsCheckArrivalTimes()) 1117 { 1118 if (bad.IsUncalibrated( MBadPixelsPix::kFluctuatingArrivalTimes )) 1119 bad.SetUnsuitable( MBadPixelsPix::kUnsuitableRun ); 1120 } 1090 1121 1091 1122 if (bad.IsUncalibrated( MBadPixelsPix::kChargeSigmaNotValid )) … … 1812 1843 qepix.SetFFactorMethodValid(kFALSE,fPulserColor); 1813 1844 pix.SetFFactorMethodValid(kFALSE); 1814 pix.SetExcluded();1815 1845 continue; 1816 1846 } … … 2200 2230 rc = kTRUE; 2201 2231 } 2232 if (IsEnvDefined(env, prefix, "ArrTimeRmsLimit", print)) 2233 { 2234 SetArrTimeRmsLimit(GetEnvValue(env, prefix, "ArrTimeRmsLimit", fArrTimeRmsLimit)); 2235 rc = kTRUE; 2236 } 2202 2237 if (IsEnvDefined(env, prefix, "FFactorErrLimit", print)) 2203 2238 { … … 2245 2280 rc = kTRUE; 2246 2281 } 2247 2282 if (IsEnvDefined(env, prefix, "CheckArrivalTimes", print)) 2283 { 2284 SetCheckArrivalTimes(GetEnvValue(env, prefix, "CheckArrivalTimes", IsCheckArrivalTimes())); 2285 rc = kTRUE; 2286 } 2287 2248 2288 return rc; 2249 2289 } -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h
r6153 r7013 56 56 static const Float_t fgPheErrLimit; //! Default for fPheErrLimit (now set to: 4.5) 57 57 static const Float_t fgFFactorErrLimit; //! Default for fFFactorErrLimit (now set to: 4.5) 58 static const Float_t fgArrTimeRmsLimit; //! Default for fArrTimeRmsLimit (now set to: 3.5) 58 59 59 60 static const TString fgNamePedestalCam; //! "MPedestalCam" … … 69 70 Float_t fPheErrLimit; // Limit acceptance nr. phe's w.r.t. area idx mean (in sigmas) 70 71 Float_t fFFactorErrLimit; // Limit acceptance F-Factor w.r.t. area idx mean 72 Float_t fArrTimeRmsLimit; // Limit acceptance RMS of absolute arrival times 71 73 Float_t fSqrtHiGainSamples; // Square root nr. High-Gain FADC slices used by extractor 72 74 Float_t fSqrtLoGainSamples; // Square root nr. Low -Gain FADC slices used by extractor … … 112 114 kCheckHistOverflow, 113 115 kCheckDeviatingBehavior, 114 kCheckOscillations 116 kCheckOscillations, 117 kCheckArrivalTimes 115 118 }; // Possible Checks 116 119 … … 122 125 // functions 123 126 void FinalizePedestals ( const MPedestalPix &ped, MCalibrationChargePix &cal, const Int_t aidx ); 127 void FinalizeArrivalTimes ( MCalibrationChargePix &cal, MBadPixelsPix &bad, const char* what); 124 128 Bool_t FinalizeCharges ( MCalibrationChargePix &cal, MBadPixelsPix &bad, const char* what); 125 129 Bool_t FinalizePINDiode (); … … 141 145 Bool_t IsCheckHistOverflow () const { return TESTBIT(fCheckFlags,kCheckHistOverflow); } 142 146 Bool_t IsCheckOscillations () const { return TESTBIT(fCheckFlags,kCheckOscillations); } 147 Bool_t IsCheckArrivalTimes () const { return TESTBIT(fCheckFlags,kCheckArrivalTimes); } 143 148 144 149 void PrintUncalibrated( MBadPixelsPix::UncalibratedType_t typ, const char *text) const; … … 182 187 183 188 // Checks 189 void SetCheckArrivalTimes( const Bool_t b=kTRUE ) { 190 b ? SETBIT(fCheckFlags,kCheckArrivalTimes) 191 : CLRBIT(fCheckFlags,kCheckArrivalTimes); } 184 192 void SetCheckDeadPixels( const Bool_t b=kTRUE ) { 185 193 b ? SETBIT(fCheckFlags,kCheckDeadPixels) … … 203 211 void SetPedestals(MPedestalCam *cam) { fPedestals=cam; } 204 212 213 void SetArrTimeRmsLimit ( const Float_t f=fgArrTimeRmsLimit ) { fArrTimeRmsLimit = f; } 205 214 void SetFFactorErrLimit ( const Float_t f=fgFFactorErrLimit ) { fFFactorErrLimit = f; } 206 215 void SetLambdaErrLimit ( const Float_t f=fgLambdaErrLimit ) { fLambdaErrLimit = f; } -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
r7005 r7013 289 289 { 290 290 291 if ( !pix->IsExcluded())291 if (pix->IsFFactorMethodValid()) 292 292 { 293 293 … … 311 311 312 312 *fLog << all << endl; 313 *fLog << all << " Excluded pixels:" << endl;313 *fLog << all << "Previously Excluded pixels:" << endl; 314 314 *fLog << all << endl; 315 315 … … 329 329 } 330 330 331 *fLog << all << endl; 332 *fLog << all << "New Excluded pixels:" << endl; 333 *fLog << all << endl; 334 335 TIter Next5(fPixels); 336 while ((pix=(MCalibrationChargePix*)Next5())) 337 { 338 if (!pix->IsFFactorMethodValid() && !pix->IsExcluded()) 339 { 340 *fLog << all << pix->GetPixId() << " "; 341 id++; 342 343 if (!(id % 25)) 344 *fLog << endl; 345 } 346 } 347 331 348 *fLog << endl; 332 349 *fLog << all << id << " Excluded pixels " << endl; … … 337 354 *fLog << all << endl; 338 355 339 TIter Next 5(fAverageAreas);340 while ((pix=(MCalibrationChargePix*)Next 5()))356 TIter Next6(fAverageAreas); 357 while ((pix=(MCalibrationChargePix*)Next6())) 341 358 { 342 359 *fLog << all << Form("%s%3i","Area Idx: ",pix->GetPixId()) … … 353 370 *fLog << all << endl; 354 371 355 TIter Next 6(fAverageSectors);356 while ((pix=(MCalibrationChargePix*)Next 6()))372 TIter Next7(fAverageSectors); 373 while ((pix=(MCalibrationChargePix*)Next7())) 357 374 { 358 375 *fLog << all << Form("%s%3i","Sector: ",pix->GetPixId()) … … 482 499 break; 483 500 case 5: 484 if ( pix.IsExcluded())501 if (!pix.IsFFactorMethodValid()) 485 502 return kFALSE; 486 503 if (pix.GetRSigma() == -1.) … … 489 506 break; 490 507 case 6: 491 if ( pix.IsExcluded())508 if (!pix.IsFFactorMethodValid()) 492 509 return kFALSE; 493 510 if (pix.GetRSigma() == -1.) … … 496 513 break; 497 514 case 7: 498 if ( pix.IsExcluded())515 if (!pix.IsFFactorMethodValid()) 499 516 return kFALSE; 500 517 val = pix.GetRSigmaPerCharge(); 501 518 break; 502 519 case 8: 503 if ( pix.IsExcluded())520 if (!pix.IsFFactorMethodValid()) 504 521 return kFALSE; 505 522 val = pix.GetRSigmaPerChargeErr(); 506 523 break; 507 524 case 9: 508 if ( pix.IsExcluded() ||!pix.IsFFactorMethodValid())525 if (!pix.IsFFactorMethodValid()) 509 526 return kFALSE; 510 527 val = pix.GetPheFFactorMethod(); 511 528 break; 512 529 case 10: 513 if ( pix.IsExcluded() ||!pix.IsFFactorMethodValid())530 if (!pix.IsFFactorMethodValid()) 514 531 return kFALSE; 515 532 val = pix.GetPheFFactorMethodErr(); 516 533 break; 517 534 case 11: 518 if ( pix.IsExcluded() ||!pix.IsFFactorMethodValid())535 if (!pix.IsFFactorMethodValid()) 519 536 return kFALSE; 520 537 val = pix.GetMeanConvFADC2Phe(); 521 538 break; 522 539 case 12: 523 if ( pix.IsExcluded() ||!pix.IsFFactorMethodValid())540 if (!pix.IsFFactorMethodValid()) 524 541 return kFALSE; 525 542 val = pix.GetMeanConvFADC2PheErr(); 526 543 break; 527 544 case 13: 528 if ( pix.IsExcluded() ||!pix.IsFFactorMethodValid())545 if (!pix.IsFFactorMethodValid()) 529 546 return kFALSE; 530 547 val = pix.GetMeanFFactorFADC2Phot(); 531 548 break; 532 549 case 14: 533 if ( pix.IsExcluded() ||!pix.IsFFactorMethodValid())550 if (!pix.IsFFactorMethodValid()) 534 551 return kFALSE; 535 552 val = pix.GetMeanFFactorFADC2PhotErr(); … … 625 642 break; 626 643 case 32: 644 if (pix.IsExcluded()) 645 return kFALSE; 627 646 val = pix.GetMean() == 0. ? 0. : pix.GetRms()/pix.GetMean(); 647 break; 648 case 33: 649 if (pix.IsExcluded()) 650 return kFALSE; 651 if (pix.GetMean() == 0.) 652 val = 0.; 653 else 654 val = pix.GetSigmaErr()/pix.GetMean() + pix.GetRms()/pix.GetMean()/pix.GetMean()*pix.GetMeanErr(); 628 655 break; 629 656 default: … … 633 660 return val!=-1.; 634 661 } 635 636 662 637 663 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc
r5200 r7013 69 69 // MHCalibrationChargeCam, MHCalibrationChargePix 70 70 // 71 // 72 // ClassVersion 3: 73 // + fNumSaturated 74 // 71 75 ///////////////////////////////////////////////////////////////////////////// 72 76 #include "MCalibrationChargePix.h" … … 90 94 const Float_t MCalibrationChargePix::fgPheFFactorMethodLimit = 1.; 91 95 const Float_t MCalibrationChargePix::fgConvFFactorRelErrLimit = 0.85; 96 92 97 // -------------------------------------------------------------------------- 93 98 // … … 105 110 // 106 111 MCalibrationChargePix::MCalibrationChargePix(const char *name, const char *title) 107 : fCalibFlags(0) 112 : fCalibFlags(0), fNumSaturated(0) 108 113 { 109 114 … … 158 163 fMeanFFactorFADC2Phot = -1.; 159 164 fMeanFFactorFADC2PhotVar = -1.; 165 166 fNumSaturated = 0; 160 167 161 168 MCalibrationPix::Clear(); -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h
r5197 r7013 41 41 Float_t fRSigmaSquare; // Square of Reduced sigma 42 42 Float_t fRSigmaSquareVar; // Variance Reduced sigma 43 44 Int_t fNumSaturated; // Number of (high-gain) saturated events 43 45 44 46 enum { kFFactorMethodValid }; // Possible bits to be set … … 71 73 void SetPheFFactorMethodVar ( const Float_t f) { fPheFFactorMethodVar = f; } 72 74 void SetPheFFactorMethodLimit ( const Float_t f=fgPheFFactorMethodLimit ) { fPheFFactorMethodLimit = f; } 75 void SetNumSaturated ( const Int_t i) { fNumSaturated = i; } 73 76 74 77 // Getters … … 90 93 Float_t GetMeanFFactorFADC2PhotErr () const; 91 94 Float_t GetMeanFFactorFADC2PhotVar () const { return fMeanFFactorFADC2PhotVar; } 95 Int_t GetNumSaturated () const { return fNumSaturated; } 92 96 Float_t GetPed () const { return fPed; } 93 97 Float_t GetPedErr () const { return TMath::Sqrt(fPedVar); } … … 113 117 Bool_t CalcMeanFFactor ( const Float_t nphotons, const Float_t nphotonsrelvar ); 114 118 115 ClassDef(MCalibrationChargePix, 2) // Container Charge Calibration Results Pixel119 ClassDef(MCalibrationChargePix, 3) // Container Charge Calibration Results Pixel 116 120 }; 117 121 -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc
r6919 r7013 171 171 const TString MHCalibrationChargeCam::gsAbsHistXTitle = "Time [FADC slices]"; 172 172 const TString MHCalibrationChargeCam::gsAbsHistYTitle = "Nr. events"; 173 const Float_t MHCalibrationChargeCam::fgNumHiGainSaturationLimit = 0.0 5;173 const Float_t MHCalibrationChargeCam::fgNumHiGainSaturationLimit = 0.085; 174 174 const Float_t MHCalibrationChargeCam::fgNumLoGainSaturationLimit = 0.005; 175 175 const Float_t MHCalibrationChargeCam::fgTimeLowerLimit = 1.; 176 176 const Float_t MHCalibrationChargeCam::fgTimeUpperLimit = 3.; 177 177 const TString MHCalibrationChargeCam::fgReferenceFile = "mjobs/calibrationref.rc"; 178 178 179 // -------------------------------------------------------------------------- 179 180 // … … 883 884 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i] ; 884 885 885 if (histhi.GetSaturated() > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries()) 886 const Int_t numsat = histhi.GetSaturated(); 887 888 pix.SetNumSaturated(numsat); 889 890 if (numsat > fNumHiGainSaturationLimit*histhi.GetHGausHist()->GetEntries()) 886 891 { 887 892 pix.SetHiGainSaturation(); … … 1418 1423 } 1419 1424 1425 if (IsEnvDefined(env, prefix, "NumHiGainSaturationLimit", print)) 1426 { 1427 SetNumHiGainSaturationLimit(GetEnvValue(env, prefix, "NumHiGainSaturationLimit", fNumHiGainSaturationLimit)); 1428 rc = kTRUE; 1429 } 1430 1431 if (IsEnvDefined(env, prefix, "NumLoGainSaturationLimit", print)) 1432 { 1433 SetNumLoGainSaturationLimit(GetEnvValue(env, prefix, "NumLoGainSaturationLimit", fNumLoGainSaturationLimit)); 1434 rc = kTRUE; 1435 } 1436 1420 1437 TEnv refenv(fReferenceFile); 1421 1438 -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.cc
r6773 r7013 342 342 MHCalibrationPix &histhi = (*this)[i]; 343 343 344 histhi.FillHist AndArray(ratio);344 histhi.FillHist(ratio); 345 345 fSumareahi [aidx] += ratio; 346 346 fNumareahi [aidx] ++; … … 355 355 const Float_t diff = tix.GetArrivalTimeLoGain() - tix.GetArrivalTimeHiGain(); 356 356 357 histlo.FillHist AndArray(diff);357 histlo.FillHist(diff); 358 358 fSumarealo [aidx] += diff; 359 359 fNumarealo [aidx] ++; … … 362 362 } 363 363 } 364 365 if (!IsAverageing()) 366 return kTRUE; 364 367 365 368 for (Int_t j=0; j<nareas; j++) … … 420 423 } 421 424 422 for (Int_t j=0; j<nareas; j++) 423 { 424 425 MHCalibrationPix &hist = GetAverageHiGainArea(j); 426 // 427 // Check histogram overflow 428 // 429 CheckOverflow(hist); 430 } 431 432 for (Int_t j=0; j<fAverageHiGainSectors->GetSize(); j++) 433 { 434 435 MHCalibrationPix &hist = GetAverageHiGainSector(j); 436 // 437 // Check histogram overflow 438 // 439 CheckOverflow(hist); 440 } 425 // 426 // Check histogram overflow 427 // 428 if (IsAverageing()) 429 { 430 for (Int_t j=0; j<nareas; j++) 431 GetAverageHiGainArea(j).CheckOverflow(hist); 432 433 for (Int_t j=0; j<fAverageHiGainSectors->GetSize(); j++) 434 GetAverageHiGainSector(j).CheckOverflow(hist); 435 } 436 441 437 442 438 FitHiGainArrays(*hilocam,*badcam, … … 458 454 } 459 455 460 for (Int_t j=0; j<nareas; j++) 461 { 462 463 MHCalibrationPix &hist = GetAverageLoGainArea(j); 464 CheckOverflow(hist); 465 } 466 467 for (Int_t j=0; j<nsectors; j++) 468 { 469 470 MHCalibrationPix &hist = GetAverageLoGainSector(j); 471 CheckOverflow(hist); 472 } 456 if (IsAverageing()) 457 { 458 for (Int_t j=0; j<nareas; j++) 459 GetAverageLoGainArea(j).CheckOverflow(hist); 460 461 for (Int_t j=0; j<nsectors; j++) 462 GetAverageLoGainSector(j).CheckOverflow(hist); 463 } 473 464 474 465 FitLoGainArrays(*hilocam,*badcam, -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationPix.h
r5575 r7013 27 27 28 28 // Getters 29 const Double_t GetBlackout () const;30 const Double_t GetPickup 31 const Float_t GetSaturated() const { return fSaturated; }29 const Double_t GetBlackout() const; 30 const Double_t GetPickup() const; 31 const Int_t GetSaturated() const { return fSaturated; } 32 32 33 33 // Fits -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r7005 r7013 222 222 fTimeResolutionMin = 0.; 223 223 fTimeResolutionMax = 1.; 224 225 fRef ConvFADC2PheInner = 0.14;226 fRef ConvFADC2PheOuter = 0.4;227 fRefConvFADC2Ph otInner = 0.8;228 fRefConvFADC2Ph otOuter = 3.8;224 225 fRefFADC2PheInner = 0.14; 226 fRefFADC2PheOuter = 0.4; 227 fRefConvFADC2PheInner = 0.14; 228 fRefConvFADC2PheOuter = 0.52; 229 229 fRefQEInner = 0.18; 230 230 fRefQEOuter = 0.12; … … 330 330 MHCamera disp4 (geomcam, "RSigmaPerCharge", "Reduced Sigma per Charge"); 331 331 MHCamera disp5 (geomcam, "NumPhes", "Number Photo-electrons"); 332 MHCamera disp6 (geomcam, "ConvFADC2Phes", "Phes per Charge ( before flat-field)");332 MHCamera disp6 (geomcam, "ConvFADC2Phes", "Phes per Charge (Before Flat-Field)"); 333 333 MHCamera disp7 (geomcam, "TotalFFactor", "Total F-Factor(F-Factor Method)"); 334 334 MHCamera disp8 (geomcam, "CascadesQEFFactor", "Cascades QE (F-Factor Method)"); … … 336 336 MHCamera disp10(geomcam, "CascadesQEPINDiode","Cascades QE (PIN Diode Method)"); 337 337 MHCamera disp11(geomcam, "CascadesQECombined","Cascades QE (Combined Method)"); 338 MHCamera disp12(geomcam, "FFactorValid", "Pixels with valid F-Factor calibration");339 MHCamera disp13(geomcam, "BlindPixelValid", "Pixels with valid BlindPixel calibration");340 MHCamera disp14(geomcam, "PINdiodeValid", "Pixels with valid PINDiode calibration");341 MHCamera disp15(geomcam, "CombinedValid", "Pixels with valid Combined calibration");342 MHCamera disp16(geomcam, "Saturation", "Pixels with saturated Hi Gain");338 MHCamera disp12(geomcam, "FFactorValid", "Pixels with Valid F-Factor Calibration"); 339 MHCamera disp13(geomcam, "BlindPixelValid", "Pixels with valid BlindPixel Calibration"); 340 MHCamera disp14(geomcam, "PINdiodeValid", "Pixels with Valid PINDiode Calibration"); 341 MHCamera disp15(geomcam, "CombinedValid", "Pixels with Valid Combined Calibration"); 342 MHCamera disp16(geomcam, "Saturation", "Pixels with Saturated Hi Gain"); 343 343 MHCamera disp17(geomcam, "ConversionMeans", "Conversion HiGain.vs.LoGain Means"); 344 344 MHCamera disp18(geomcam, "ConversionSigmas", "Conversion HiGain.vs.LoGain Sigmas"); 345 MHCamera disp19(geomcam, "HiGainPickup", "Number Pickup events Hi Gain");346 MHCamera disp20(geomcam, "LoGainPickup", "Number Pickup events Lo Gain");347 MHCamera disp21(geomcam, "HiGainBlackout", "Number Blackout events Hi Gain");348 MHCamera disp22(geomcam, "LoGainBlackout", "Number Blackout events Lo Gain");349 MHCamera disp23(geomcam, "Excluded", "Pixels previously excluded");350 MHCamera disp24(geomcam, "UnSuitable", "Pixels not suited for further analysis");351 MHCamera disp25(geomcam, "UnReliable", "Pixels suitable, but not reliable for further analysis");345 MHCamera disp19(geomcam, "HiGainPickup", "Number Pickup Events Hi Gain"); 346 MHCamera disp20(geomcam, "LoGainPickup", "Number Pickup Events Lo Gain"); 347 MHCamera disp21(geomcam, "HiGainBlackout", "Number Blackout Events Hi Gain"); 348 MHCamera disp22(geomcam, "LoGainBlackout", "Number Blackout Events Lo Gain"); 349 MHCamera disp23(geomcam, "Excluded", "Pixels Previously Excluded"); 350 MHCamera disp24(geomcam, "UnSuitable", "Pixels NOT Suited for Further Analysis"); 351 MHCamera disp25(geomcam, "UnReliable", "Pixels Suitable, but NOT Reliable for Further Analysis"); 352 352 MHCamera disp26(geomcam, "HiGainOscillating", "Oscillating Pixels High Gain"); 353 353 MHCamera disp27(geomcam, "LoGainOscillating", "Oscillating Pixels Low Gain"); … … 357 357 MHCamera disp31(geomcam, "SigmaTime", "Sigma Rel. Arrival Times"); 358 358 MHCamera disp32(geomcam, "TimeProb", "Probability of Time Fit"); 359 MHCamera disp33(geomcam, "TimeNotFitValid", "Pixels with not valid fit results");359 MHCamera disp33(geomcam, "TimeNotFitValid", "Pixels with not valid Fit Results"); 360 360 MHCamera disp34(geomcam, "TimeOscillating", "Oscillating Pixels"); 361 MHCamera disp35(geomcam, "TotalConv", "Conversion Factor to photons");361 MHCamera disp35(geomcam, "TotalConv", "Conversion Factor to Photons"); 362 362 MHCamera disp36(geomcam, "RMSperMean", "Charge histogram RMS per Mean"); 363 MHCamera disp37(geomcam, "TotalConvPhe", "Conversion Factor to equiv. Phe's"); 363 364 364 365 MCalibrationChargeCam *cam = NULL; … … 447 448 // RMS and Mean 448 449 disp36.SetCamContent(*cam,32); 450 disp36.SetCamError(*cam,33); 449 451 450 452 disp1.SetYTitle("Q [FADC cnts]"); … … 484 486 disp28.SetYTitle("Mean Abs. Time [FADC sl.]"); 485 487 disp29.SetYTitle("RMS Abs. Time [FADC sl.]"); 486 487 488 disp35.SetYTitle("Conv.Factor [Ph/FADC cnts]"); 488 489 489 disp36.SetYTitle("Charge RMS/<Q> [1]"); 490 disp37.SetYTitle("Conv.Factor [Phe/FADC cnts]"); 490 491 491 492 for (UInt_t i=0;i<geomcam.GetNumPixels();i++) … … 503 504 disp35.Fill(i,convphe/quaeff); 504 505 disp35.SetUsed(i); 506 507 disp37.Fill(i,convphe/quaeff*MCalibrationQEPix::gkDefaultAverageQE); 508 disp37.SetUsed(i); 505 509 } 506 510 … … 733 737 gPad->SetBorderMode(0); 734 738 gPad->SetTicks(); 735 MHCamera *obj7=(MHCamera*)disp3 5.DrawCopy("hist");739 MHCamera *obj7=(MHCamera*)disp37.DrawCopy("hist"); 736 740 // 737 741 // for the datacheck, fix the ranges!! 738 742 // 739 obj7->SetMinimum(fConvFADC2Ph otMin);740 obj7->SetMaximum(fConvFADC2Ph otMax);743 obj7->SetMinimum(fConvFADC2PheMin); 744 obj7->SetMaximum(fConvFADC2PheMax); 741 745 // 742 746 // Set the datacheck sizes: … … 855 859 pave->SetTextSize(0.05); 856 860 pave->AddText(" "); 857 TText *t1 = pave->AddText(Form("Signal smaller 3Pedestal RMS: %3i pixels",861 TText *t1 = pave->AddText(Form("Signal smaller 4.5 Pedestal RMS: %3i pixels", 858 862 CountBadPixels(&disp24,1))); 859 863 t1->SetTextColor(gStyle->GetColorPalette(Int_t(1./max*numcol + 1.))); … … 887 891 t11->SetTextColor(gStyle->GetColorPalette(Int_t(8./max*numcol + 1.))); 888 892 t11->SetTextAlign(12); 889 TText *t12= pave->AddText(Form("Pre viously Excluded:%3i pixels",890 CountBadPixels(&disp24,9 )));893 TText *t12= pave->AddText(Form("Presumably dead from Ped. Rms: %3i pixels", 894 CountBadPixels(&disp24,9 ))); 891 895 t12->SetTextColor(gStyle->GetColorPalette(Int_t(9./max*numcol + 1.))); 892 896 t12->SetTextAlign(12); 897 TText *t13= pave->AddText(Form("Fluctuating Pulse Arrival Times: %3i pixels", 898 CountBadPixels(&disp24,10))); 899 t13->SetTextColor(gStyle->GetColorPalette(Int_t(10./max*numcol + 1.))); 900 t13->SetTextAlign(12); 901 TText *t14= pave->AddText(Form("Previously Excluded: %3i pixels", 902 CountBadPixels(&disp24,11))); 903 t14->SetTextColor(gStyle->GetColorPalette(Int_t(11./max*numcol + 1.))); 904 t14->SetTextAlign(12); 893 905 pave->Draw(); 894 906 … … 909 921 // for the datacheck, fix the ranges!! 910 922 // 911 const Double_t max2 = 8.;923 const Double_t max2 = 9.; 912 924 obj9->SetMinimum(0.); 913 925 obj9->SetMaximum(max2); … … 927 939 TText *t3 = pave2->AddText(Form("Signal Sigma smaller Pedestal RMS: %3i pixels", 928 940 CountBadPixels(&disp25,1))); 929 t3->SetTextColor(gStyle->GetColorPalette(Int_t(1./max *numcol + 1.)));941 t3->SetTextColor(gStyle->GetColorPalette(Int_t(1./max2*numcol + 1.))); 930 942 t3->SetTextAlign(12); 931 943 … … 1250 1262 break; 1251 1263 case 1: 1252 l1 = line.DrawLine(0, fRefConvFADC2Ph otInner, x, fRefConvFADC2PhotInner);1264 l1 = line.DrawLine(0, fRefConvFADC2PheInner, x, fRefConvFADC2PheInner); 1253 1265 break; 1254 1266 case 2: 1255 l1 = line.DrawLine(0, fRef ConvFADC2PheInner, x, fRefConvFADC2PheInner );1267 l1 = line.DrawLine(0, fRefFADC2PheInner, x, fRefFADC2PheInner ); 1256 1268 break; 1257 1269 case 3: … … 1281 1293 break; 1282 1294 case 1: 1283 line.DrawLine(x2, fRefConvFADC2Ph otOuter, 398, fRefConvFADC2PhotOuter );1295 line.DrawLine(x2, fRefConvFADC2PheOuter, 398, fRefConvFADC2PheOuter ); 1284 1296 break; 1285 1297 case 2: 1286 line.DrawLine(x2, fRef ConvFADC2PheOuter, 398, fRefConvFADC2PheOuter);1298 line.DrawLine(x2, fRefFADC2PheOuter, 398, fRefFADC2PheOuter); 1287 1299 break; 1288 1300 case 3: … … 1437 1449 fTimeResolutionMax = refenv.GetValue("TimeResolutionMax",fTimeResolutionMax); 1438 1450 1451 fRefFADC2PheInner = refenv.GetValue("RefFADC2PheInner",fRefFADC2PheInner); 1452 fRefFADC2PheOuter = refenv.GetValue("RefFADC2PheOuter",fRefFADC2PheOuter); 1453 fRefConvFADC2PhotInner = refenv.GetValue("RefConvFADC2PhotInner",fRefConvFADC2PhotInner); 1454 fRefConvFADC2PhotOuter = refenv.GetValue("RefConvFADC2PhotOuter",fRefConvFADC2PhotOuter); 1439 1455 fRefConvFADC2PheInner = refenv.GetValue("RefConvFADC2PheInner",fRefConvFADC2PheInner); 1440 1456 fRefConvFADC2PheOuter = refenv.GetValue("RefConvFADC2PheOuter",fRefConvFADC2PheOuter); 1441 fRefConvFADC2PhotInner = refenv.GetValue("RefConvFADC2PhotInner",fRefConvFADC2PhotInner);1442 fRefConvFADC2PhotOuter = refenv.GetValue("RefConvFADC2PhotOuter",fRefConvFADC2PhotOuter);1443 1457 fRefQEInner = refenv.GetValue("RefQEInner",fRefQEInner); 1444 1458 fRefQEOuter = refenv.GetValue("RefQEOuter",fRefQEOuter); -
trunk/MagicSoft/Mars/mjobs/MJCalibration.h
r6979 r7013 79 79 Double_t fTimeResolutionMax; //! Histogram maximum for time resolutions 80 80 81 Float_t fRef ConvFADC2PheInner; //! Reference value for the conversion factor to phes- inner82 Float_t fRef ConvFADC2PheOuter; //! Reference value for the conversion factor to phes- outer81 Float_t fRefFADC2PheInner; //! Reference value for the ratio phes/charge - inner 82 Float_t fRefFADC2PheOuter; //! Reference value for the ratio phes/charge - outer 83 83 Float_t fRefConvFADC2PhotInner; //! Reference value for the conversion factor to phs - inner 84 84 Float_t fRefConvFADC2PhotOuter; //! Reference value for the conversion factor to phs - outer 85 Float_t fRefConvFADC2PheInner; //! Reference value for the conversion factor to phs - inner 86 Float_t fRefConvFADC2PheOuter; //! Reference value for the conversion factor to phs - outer 85 87 Float_t fRefQEInner; //! Reference value for the quantum eff. cascades - inner 86 88 Float_t fRefQEOuter; //! Reference value for the quantum eff. cascades - outer -
trunk/MagicSoft/Mars/mjobs/MJPedestal.cc
r7005 r7013 83 83 #include "MRawEvtData.h" 84 84 #include "MGeomApply.h" 85 #include "MTriggerPatternDecode.h" 85 86 #include "MBadPixelsMerge.h" 86 87 #include "MFillH.h" … … 944 945 // data file will be processed. In any case there are no interleaved 945 946 // calibration events in such data, so this is fine. 947 MTriggerPatternDecode decode; 946 948 MFTriggerPattern fcalib("CalibFilter"); 947 949 fcalib.SetDefault(kFALSE); … … 950 952 951 953 if (fIsPulsePosCheck) 952 954 { 953 955 fillpul.SetFilter(&fcalib); 956 tlist.AddToList(&decode); 957 tlist.AddToList(&fcalib); 954 958 tlist.AddToList(&fillpul); 955 959 } 956 960 957 961 // ---------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mjobs/MJob.cc
r6553 r7013 60 60 // 61 61 MJob::MJob(const char *name, const char *title) : fEnv(0), fEnvDebug(0), fOverwrite(kFALSE), fMaxEvents(0) 62 63 62 { 64 63 fName = name ? name : "MJob"; … … 300 299 return WriteContainer(cont); 301 300 } 301 302 TString MJob::ExpandPath(TString fname) 303 { 304 // empty 305 if (fname.IsNull()) 306 return fname; 307 308 // Expand path using environment 309 gSystem->ExpandPathName(fname); 310 311 // Absolute path 312 if (fname[0]=='/') 313 return fname; 314 315 // relative path to file and file could be found 316 if (!gSystem->AccessPathName(fname, kFileExists)) 317 return fname; 318 319 // Now check gEnv and MARSSYS. gEnv can overwrite MARSSYS 320 TString path(gEnv ? gEnv->GetValue("Mars.Path", "$MARSSYS") : "$MARSSYS"); 321 322 // Expand path using environment 323 gSystem->ExpandPathName(path); 324 325 // check if path ends with a slash 326 if (!path.EndsWith("/")) 327 path += "/"; 328 329 // compile full qualified path 330 path += fname; 331 332 // return new path 333 return path; 334 } -
trunk/MagicSoft/Mars/mjobs/MJob.h
r6553 r7013 75 75 MStatusDisplay *GetDisplay() { return fDisplay; } 76 76 77 static TString ExpandPath(TString fname); 78 77 79 ClassDef(MJob, 0) // Bas class for Jobs 78 80 }; -
trunk/MagicSoft/Mars/mjobs/calibrationref.rc
r6718 r7013 42 42 # Converstion factors: 43 43 # 44 Ref ConvFADC2PheInner:0.1445 Ref ConvFADC2PheOuter:0.444 RefFADC2PheInner: 0.14 45 RefFADC2PheOuter: 0.4 46 46 RefConvFADC2PhotInner: 0.8 47 47 RefConvFADC2PhotOuter: 3.8 48 RefConvFADC2PheInner: 0.14 49 RefConvFADC2PheOuter: 0.56 48 50 # 49 51 # Quantum Efficiencies: -
trunk/MagicSoft/Mars/mjobs/calibrationref_Dec04.rc
r6913 r7013 42 42 # Converstion factors: 43 43 # 44 Ref ConvFADC2PheInner:0.345 Ref ConvFADC2PheOuter:0.644 RefFADC2PheInner: 0.3 45 RefFADC2PheOuter: 0.6 46 46 RefConvFADC2PhotInner: 1.7 47 47 RefConvFADC2PhotOuter: 6.55 48 RefConvFADC2PheInner: 0.31 49 RefConvFADC2PheOuter: 1.26 48 50 # 49 51 # Quantum Efficiencies: -
trunk/MagicSoft/Mars/mjobs/calibrationref_Nov04.rc
r6718 r7013 42 42 # Converstion factors: 43 43 # 44 Ref ConvFADC2PheInner:0.1345 Ref ConvFADC2PheOuter:0.3344 RefFADC2PheInner: 0.13 45 RefFADC2PheOuter: 0.33 46 46 RefConvFADC2PhotInner: 0.71. 47 47 RefConvFADC2PhotOuter: 2.8 48 RefConvFADC2PheInner: 0.135 49 RefConvFADC2PheOuter: 0.53 48 50 # 49 51 # Quantum Efficiencies:
Note:
See TracChangeset
for help on using the changeset viewer.