Changeset 3435
- Timestamp:
- 03/07/04 20:48:16 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/calibration.C
r3416 r3435 30 30 // const char *inpath = "/remote/home/pc2/operator/NewCalBoxTest/"; 31 31 // const char *inpath = "/remote/home/pc2/operator/Crab20040214/"; 32 const char *inpath = "./";32 // const char *inpath = "./"; 33 33 //const TString inpath = "/mnt/Data/rootdata/CrabNebula/2004_02_10/"; 34 34 //const TString inpath = "/mnt/Data/rootdata/CrabNebula/2004_01_26/"; 35 const TString inpath = "/mnt/Data/rootdata/CrabNebula/2004_01_27/"; 35 36 //const TString inpath = "/mnt/Data/rootdata/Miscellaneous/2003_12_19/"; 36 37 … … 38 39 MRunIter cruns; 39 40 40 pruns.AddRun(14400,inpath); 41 cruns.AddRuns(14401,14409,inpath); 41 pruns.AddRun(12386,inpath); 42 cruns.AddRun(12525,inpath); 43 // pruns.AddRun(14400,inpath); 44 // cruns.AddRuns(14401,14409,inpath); 42 45 // pruns.AddRuns(15487,15494,inpath); 43 46 // cruns.AddRuns(15495,15508,inpath); … … 120 123 // plist.AddToList(&histpin); 121 124 plist.AddToList(&histblind); 125 plist.AddToList(&pedloop.GetBadPixels()); 122 126 123 127 // … … 133 137 MCalibrationChargeCalc calcalc; 134 138 MGeomApply geomapl; 135 139 136 140 MFillH filltime( "MHCalibrationRelTimeCam" , "MArrivalTimeCam"); 137 141 // MFillH fillpin ("MHCalibrationChargePINDiode", "MExtractedSignalPINDiode"); … … 198 202 // just one example how to get the plots of individual pixels 199 203 // 200 histblind.DrawClone("all");201 histcharge[5].DrawClone("all");202 histcharge(5).DrawClone("all");203 histtime[5].DrawClone("fourierevents");204 // histblind.DrawClone("all"); 205 // histcharge[5].DrawClone("all"); 206 // histcharge(5).DrawClone("all"); 207 // histtime[5].DrawClone("fourierevents"); 204 208 205 209 // Create histograms to display -
trunk/MagicSoft/Mars/mbadpixels/MBadPixelsPix.h
r3434 r3435 6 6 #endif 7 7 8 #ifndef ROOT_TArray C9 #include <TArray C.h>8 #ifndef ROOT_TArrayI 9 #include <TArrayI.h> 10 10 #endif 11 11 … … 13 13 { 14 14 private: 15 TArray CfInfo;15 TArrayI fInfo; 16 16 17 17 public: … … 108 108 109 109 Bool_t IsHiGainSaturation () const 110 { return !( fInfo[1] | ~kHiGainSaturation== ~kHiGainSaturation ); }110 { return !((fInfo[1] | ~kHiGainSaturation) == ~kHiGainSaturation ); } 111 111 Bool_t IsLoGainSaturation () const 112 { return !( fInfo[1] | ~kLoGainSaturation== ~kLoGainSaturation ); }112 { return !((fInfo[1] | ~kLoGainSaturation) == ~kLoGainSaturation ); } 113 113 Bool_t IsCombinedMethodNotValid () const 114 { return !( fInfo[1] | ~kCombinedMethodNotValid== ~kCombinedMethodNotValid ); }114 { return !((fInfo[1] | ~kCombinedMethodNotValid) == ~kCombinedMethodNotValid ); } 115 115 Bool_t IsPINDiodeMethodNotValid () const 116 { return !( fInfo[1] | ~kPINDiodeMethodNotValid== ~kPINDiodeMethodNotValid ); }116 { return !((fInfo[1] | ~kPINDiodeMethodNotValid) == ~kPINDiodeMethodNotValid ); } 117 117 Bool_t IsFFactorMethodNotValid () const 118 { return !( fInfo[1] | ~kFFactorMethodNotValid== ~kFFactorMethodNotValid ); }118 { return !((fInfo[1] | ~kFFactorMethodNotValid) == ~kFFactorMethodNotValid ); } 119 119 Bool_t IsBlindPixelMethodNotValid () const 120 { return !( fInfo[1] | ~kBlindPixelMethodNotValid== ~kBlindPixelMethodNotValid ); }120 { return !((fInfo[1] | ~kBlindPixelMethodNotValid) == ~kBlindPixelMethodNotValid ); } 121 121 Bool_t IsMeanTimeInLastBin () const 122 { return !( fInfo[1] | ~kMeanTimeInLastBin== ~kMeanTimeInLastBin ); }122 { return !((fInfo[1] | ~kMeanTimeInLastBin) == ~kMeanTimeInLastBin ); } 123 123 Bool_t IsMeanTimeInFirstBin () const 124 { return !( fInfo[1] | ~kMeanTimeInFirstBin== ~kMeanTimeInFirstBin ); }124 { return !((fInfo[1] | ~kMeanTimeInFirstBin) == ~kMeanTimeInFirstBin ); } 125 125 Bool_t IsLoGainOscillating () const 126 { return !( fInfo[1] | ~kLoGainOscillating== ~kLoGainOscillating ); }126 { return !((fInfo[1] | ~kLoGainOscillating) == ~kLoGainOscillating ); } 127 127 Bool_t IsHiGainOscillating () const 128 { return !( fInfo[1] | ~kHiGainOscillating== ~kHiGainOscillating ); }128 { return !((fInfo[1] | ~kHiGainOscillating) == ~kHiGainOscillating ); } 129 129 Bool_t IsConvHiLoNotValid () const 130 { return !( fInfo[1] | ~kConvHiLoNotValid== ~kConvHiLoNotValid ); }130 { return !((fInfo[1] | ~kConvHiLoNotValid) == ~kConvHiLoNotValid ); } 131 131 Bool_t IsChargeSigmaNotValid () const 132 { return !( fInfo[1] | ~kChargeSigmaNotValid== ~kChargeSigmaNotValid ); }132 { return !((fInfo[1] | ~kChargeSigmaNotValid) == ~kChargeSigmaNotValid ); } 133 133 Bool_t IsChargeRelErrNotValid () const 134 { return !( fInfo[1] | ~kChargeRelErrNotValid== ~kChargeRelErrNotValid ); }134 { return !((fInfo[1] | ~kChargeRelErrNotValid) == ~kChargeRelErrNotValid ); } 135 135 Bool_t IsChargeErrNotValid () const 136 { return !( fInfo[1] | ~kChargeErrNotValid== ~kChargeErrNotValid ); }136 { return !((fInfo[1] | ~kChargeErrNotValid) == ~kChargeErrNotValid ); } 137 137 Bool_t IsChargeIsPedestal () const 138 { return !( fInfo[1] | ~kChargeIsPedestal== ~kChargeIsPedestal ); }138 { return !((fInfo[1] | ~kChargeIsPedestal) == ~kChargeIsPedestal ); } 139 139 Bool_t IsLoGainNotFitted () const 140 { return !( fInfo[1] | ~kLoGainNotFitted== ~kLoGainNotFitted ); }140 { return !((fInfo[1] | ~kLoGainNotFitted) == ~kLoGainNotFitted ); } 141 141 Bool_t IsHiGainNotFitted () const 142 { return !( fInfo[1] | ~kHiGainNotFitted== ~kHiGainNotFitted ); }142 { return !((fInfo[1] | ~kHiGainNotFitted) == ~kHiGainNotFitted ); } 143 143 144 144 Bool_t IsLoGainBad() const { return IsLoGainSaturation() … … 155 155 Bool_t IsCalibrationFitOK() const { return !( (IsHiGainSaturation() && IsHiGainNotFitted()) 156 156 || ( IsLoGainSaturation() && IsLoGainNotFitted()) ); } 157 Bool_t IsCalibrationOscillating() const { return ( IsHiGainSaturation() && IsHiGainOscillating())158 || ( Is LoGainSaturation() && IsLoGainOscillating()) ; }157 Bool_t IsCalibrationOscillating() const { return ( !IsHiGainSaturation() && IsHiGainOscillating()) 158 || ( IsHiGainSaturation() && IsLoGainOscillating()) ; } 159 159 Bool_t IsCalibrationResultOK() const { return IsCalibrationSignalOK() 160 160 && !(IsCalibrationOscillating()) … … 173 173 void Merge(const MBadPixelsPix &pix); 174 174 175 const TArray C&GetInfo() const { return fInfo; }175 const TArrayI &GetInfo() const { return fInfo; } 176 176 177 177 ClassDef(MBadPixelsPix, 1) // Storage Container for bad pixel information of a single pixel -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r3429 r3435 439 439 pix.CheckTimeValidity(&bad); 440 440 441 if (!bad.IsCalibration ResultOK())441 if (!bad.IsCalibrationSignalOK()) 442 442 continue; 443 443 … … 497 497 avouterprms/avouternum * TMath::Sqrt((Float_t)fNumHiGainSamples/avouternum)); 498 498 } 499 500 MBadPixelsPix *bad = fCam->GetAverageInnerBadPix(); 499 501 500 if (!avinnerpix->CheckChargeValidity() || !avinnerpix->CheckTimeValidity()) 501 if (!avinnerpix->CalcReducedSigma()) 502 avinnerpix->CalcFFactorMethod(); 503 504 if (!avouterpix->CheckChargeValidity() || !avouterpix->CheckTimeValidity()) 505 if (!avouterpix->CalcReducedSigma()) 506 avouterpix->CalcFFactorMethod(); 507 502 avinnerpix->CheckChargeValidity(bad); 503 avinnerpix->CheckTimeValidity(bad); 504 505 if (bad->IsCalibrationSignalOK()) 506 if (!avinnerpix->CalcReducedSigma()) 507 avinnerpix->CalcFFactorMethod(); 508 509 bad = fCam->GetAverageInnerBadPix(); 510 511 avouterpix->CheckChargeValidity(bad); 512 avouterpix->CheckTimeValidity(bad); 513 514 if (bad->IsCalibrationSignalOK()) 515 if (!avouterpix->CalcReducedSigma()) 516 avouterpix->CalcFFactorMethod(); 508 517 509 518 if (!fBlindPixel->CheckChargeFitValidity()) -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.cc
r3434 r3435 504 504 // 4) Pixel has a charge sigma bigger than its Pedestal RMS 505 505 // 506 Bool_tMCalibrationChargePix::CheckChargeValidity(MBadPixelsPix *bad)506 void MCalibrationChargePix::CheckChargeValidity(MBadPixelsPix *bad) 507 507 { 508 508 … … 511 511 *fLog << warn << "WARNING: Fitted Charge is smaller than " 512 512 << fChargeLimit << " Pedestal RMS in Pixel " << fPixId << endl; 513 if (bad) 514 bad->SetChargeIsPedestal(); 515 else 516 return kFALSE; 513 bad->SetChargeIsPedestal(); 517 514 } 518 515 … … 521 518 *fLog << warn << "WARNING: Error of Fitted Charge is smaller than " 522 519 << fChargeErrLimit << " in Pixel " << fPixId << endl; 523 if (bad) 524 bad->SetChargeErrNotValid(); 525 else 526 return kFALSE; 520 bad->SetChargeErrNotValid(); 527 521 } 528 522 … … 531 525 *fLog << warn << "WARNING: Fitted Charge is smaller than " 532 526 << fChargeRelErrLimit << "* its error in Pixel " << fPixId << endl; 533 if (bad) 534 bad->SetChargeRelErrNotValid(); 535 else 536 return kFALSE; 527 bad->SetChargeRelErrNotValid(); 537 528 } 538 529 … … 541 532 *fLog << warn << "WARNING: Sigma of Fitted Charge smaller than Pedestal RMS in Pixel " 542 533 << fPixId << endl; 543 if (bad) 544 { 545 *fLog << err << "HERERERERE" << endl; 546 bad->SetChargeSigmaNotValid(); 547 } 548 else 549 return kFALSE; 534 bad->SetChargeSigmaNotValid(); 550 535 } 551 536 552 if (bad->IsChargeSigmaNotValid())553 *fLog << err << " HERE " << endl;554 555 return kTRUE;556 537 } 557 538 … … 561 542 // The mean arrival time is at least 1.0 slices from the used edge slices 562 543 // 563 Bool_tMCalibrationChargePix::CheckTimeValidity(MBadPixelsPix *bad)544 void MCalibrationChargePix::CheckTimeValidity(MBadPixelsPix *bad) 564 545 { 565 546 … … 570 551 { 571 552 *fLog << warn << "WARNING: Mean ArrivalTime in first extraction bin of the Pixel " << fPixId << endl; 572 if (bad) 573 bad->SetMeanTimeInFirstBin(); 574 else 575 return kFALSE; 553 bad->SetMeanTimeInFirstBin(); 576 554 } 577 555 … … 579 557 { 580 558 *fLog << warn << "WARNING: Mean ArrivalTime in last extraction bin of the Pixel " << fPixId << endl; 581 if (bad) 582 bad->SetMeanTimeInLastBin(); 583 else 584 return kFALSE; 559 bad->SetMeanTimeInLastBin(); 585 560 } 586 561 587 return kTRUE;588 562 } 589 563 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargePix.h
r3430 r3435 283 283 void ApplyLoGainConversion(); 284 284 285 Bool_t CheckChargeValidity ( MBadPixelsPix *bad=NULL);286 Bool_t CheckTimeValidity ( MBadPixelsPix *bad=NULL);285 void CheckChargeValidity ( MBadPixelsPix *bad ); 286 void CheckTimeValidity ( MBadPixelsPix *bad ); 287 287 Bool_t CalcReducedSigma(); 288 288 Bool_t CalcFFactorMethod();
Note:
See TracChangeset
for help on using the changeset viewer.