Changeset 2661 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 12/12/03 09:04:01 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MCalibrationCam.cc
r2660 r2661 45 45 #include "MLogManip.h" 46 46 47 #include "TCanvas.h" 48 47 49 #include "MGeomCam.h" 48 50 … … 59 61 : fMeanNrPhotAvailable(kFALSE), 60 62 fMeanNrPhotInnerPix(-1.), 61 fMeanNrPhotInnerPixErr(-1.) 63 fMeanNrPhotInnerPixErr(-1.), 64 fOffsets(NULL), 65 fSlopes(NULL) 62 66 { 63 67 fName = name ? name : "MCalibrationCam"; … … 83 87 delete fBlindPixel; 84 88 delete fPINDiode; 85 } 89 90 if (fOffsets) 91 delete fOffsets; 92 if (fSlopes) 93 delete fSlopes; 94 95 } 96 97 void MCalibrationCam::DrawHiLoFits() 98 { 99 100 fOffsets = new TH1D("pp","Offsets of the HiGain LoGain Fit",100,-300.,300.); 101 fSlopes = new TH1D("mm","Slopess of the HiGain LoGain Fit",100,-3.,3.); 102 103 TIter Next(fPixels); 104 MCalibrationPix *pix; 105 while ((pix=(MCalibrationPix*)Next())) 106 { 107 108 fOffsets->Fill(pix->GetHist()->GetOffset()); 109 fSlopes->Fill(pix->GetHist()->GetSlope()); 110 111 } 112 113 TCanvas *c1 = new TCanvas(); 114 c1->Divide(1,2); 115 c1->cd(1); 116 fOffsets->Draw(); 117 gPad->Modified(); 118 gPad->Update(); 119 120 c1->cd(2); 121 fSlopes->Draw(); 122 gPad->Modified(); 123 gPad->Update(); 124 } 125 86 126 87 127 // -------------------------------------------------------------------------- … … 490 530 Bool_t MCalibrationCam::CalcNrPhotInnerPixel() 491 531 { 532 492 533 if (!fBlindPixel->IsFitOK()) 493 534 return kFALSE; … … 522 563 523 564 fMeanNrPhotAvailable = kTRUE; 565 566 TIter Next(fPixels); 567 MCalibrationPix *pix; 568 while ((pix=(MCalibrationPix*)Next())) 569 { 570 571 if((pix->GetCharge() > 0.) && (fMeanNrPhotInnerPix > 0.)) 572 pix->SetConversionBlindPixelMethod(fMeanNrPhotInnerPix/pix->GetCharge(), 0., 0.); 573 } 524 574 return kTRUE; 525 575 } … … 536 586 return kFALSE; 537 587 538 mean = fMeanNrPhotInnerPix / (*this)[ipx].GetCharge(); 588 mean = (*this)[ipx].GetMeanConversionBlindPixelMethod(); 589 err = (*this)[ipx].GetErrorConversionBlindPixelMethod(); 590 sigma = (*this)[ipx].GetSigmaConversionBlindPixelMethod(); 591 592 return kTRUE; 593 } 594 595 596 Bool_t MCalibrationCam::GetConversionFactorFFactor(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma) 597 { 598 599 if (ipx < 0 || !IsPixelFitted(ipx)) 600 return kFALSE; 601 602 Float_t conv = (*this)[ipx].GetConversionFFactorMethod(); 603 604 if (conv < 0.) 605 return kFALSE; 606 607 mean = conv; 539 608 540 609 // … … 548 617 549 618 550 Bool_t MCalibrationCam::GetConversionFactorFFactor(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma) 551 { 552 553 if (ipx < 0 || !IsPixelFitted(ipx)) 554 return kFALSE; 555 556 Float_t conv = (*this)[ipx].GetConversionFFactorMethod(); 557 558 if (conv < 0.) 559 return kFALSE; 560 561 mean = conv; 562 563 // 564 // Not yet ready , sorry 565 // 566 err = -1.; 567 sigma = -1.; 619 Bool_t MCalibrationCam::GetConversionFactorPINDiode(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma) 620 { 568 621 569 622 return kTRUE; 570 } 571 572 573 Bool_t MCalibrationCam::GetConversionFactor PINDiode(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma)623 624 } 625 626 Bool_t MCalibrationCam::GetConversionFactorCombined(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma) 574 627 { 575 628 … … 577 630 578 631 } 579 580 Bool_t MCalibrationCam::GetConversionFactorCombined(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma)581 {582 583 return kTRUE;584 585 } -
trunk/MagicSoft/Mars/manalysis/MCalibrationCam.h
r2660 r2661 24 24 #ifndef ROOT_TH1F 25 25 #include <TH1F.h> 26 #endif 27 28 #ifndef ROOT_TH1D 29 #include <TH1D.h> 26 30 #endif 27 31 … … 62 66 TH1F* fHConvPhEperFADCAllPixels; 63 67 TH1F* fHConvPhperFADCAllPixels; 68 69 TH1D* fOffsets; 70 TH1D* fSlopes; 71 64 72 65 73 public: … … 115 123 Bool_t GetConversionFactorCombined(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma); 116 124 125 void DrawHiLoFits(); 126 117 127 ClassDef(MCalibrationCam, 1) // Storage Container for all calibration information of the camera 118 128 }; -
trunk/MagicSoft/Mars/manalysis/MCalibrationPix.cc
r2660 r2661 60 60 fPheFFactorMethod(-1.), 61 61 fConversionFFactorMethod(-1.), 62 fConversionBlindPixelMethod(-1.), 63 fConversionPINDiodeMethod(-1.), 64 fConversionErrorFFactorMethod(-1.), 65 fConversionErrorBlindPixelMethod(-1.), 66 fConversionErrorPINDiodeMethod(-1.), 67 fConversionSigmaFFactorMethod(-1.), 68 fConversionSigmaBlindPixelMethod(-1.), 69 fConversionSigmaPINDiodeMethod(-1.), 62 70 fHiGainSaturation(kFALSE), 63 71 fElectronicPedRms(3.67) -
trunk/MagicSoft/Mars/manalysis/MCalibrationPix.h
r2660 r2661 30 30 Float_t fFactor; // The laboratory F-factor 31 31 Float_t fPheFFactorMethod; // The number of Phe's calculated after the F-factor method 32 Float_t fConversionFFactorMethod; // The conversion factor to Phe's calculated after the F-factor method 32 33 Float_t fConversionFFactorMethod; // The conversion factor to Ph's calculated after the F-factor method 34 Float_t fConversionBlindPixelMethod; // The conversion factor to Ph's calculated after the Blind Pixel method 35 Float_t fConversionPINDiodeMethod; // The conversion factor to Ph's calculated after the PIN Diode method 36 37 Float_t fConversionErrorFFactorMethod; // The conversion factor to Phe's calculated after the F-factor method 38 Float_t fConversionErrorBlindPixelMethod; // The conversion factor to Phe's calculated after the Blind Pixel method 39 Float_t fConversionErrorPINDiodeMethod; // The conversion factor to Phe's calculated after the PIN Diode method 40 41 Float_t fConversionSigmaFFactorMethod; // The conversion factor to Ph's calculated after the F-factor method 42 Float_t fConversionSigmaBlindPixelMethod; // The conversion factor to Ph's calculated after the Blind Pixel method 43 Float_t fConversionSigmaPINDiodeMethod; // The conversion factor to Phd's calculated after the PIN Diode method 33 44 34 45 Bool_t fHiGainSaturation; // Is Lo-Gain used at all? … … 61 72 62 73 void SetPedestal(Float_t ped, Float_t pedrms); 63 void SetHiGainSaturation() { fHiGainSaturation = kTRUE; fHist->SetUseLoGain(); } 74 void SetHiGainSaturation() { fHiGainSaturation = kTRUE; fHist->SetUseLoGain(); } 75 76 void SetConversionFFactorMethod(Float_t c, Float_t err, Float_t sig) 77 { 78 fConversionFFactorMethod = c; 79 fConversionErrorFFactorMethod = err; 80 fConversionSigmaFFactorMethod = sig; 81 } 82 void SetConversionBlindPixelMethod(Float_t c, Float_t err, Float_t sig) 83 { 84 fConversionBlindPixelMethod = c; 85 fConversionErrorBlindPixelMethod = err; 86 fConversionSigmaBlindPixelMethod = sig; 87 } 88 89 void SetConversionPINDiodeMethod(Float_t c, Float_t err, Float_t sig) 90 { 91 fConversionPINDiodeMethod = c ; 92 fConversionErrorPINDiodeMethod = err; 93 fConversionSigmaPINDiodeMethod = sig; 94 } 95 96 Float_t GetMeanConversionBlindPixelMethod() { return fConversionBlindPixelMethod ; } 97 Float_t GetErrorConversionBlindPixelMethod() { return fConversionErrorBlindPixelMethod ; } 98 Float_t GetSigmaConversionBlindPixelMethod() { return fConversionSigmaBlindPixelMethod ; } 99 100 Float_t GetMeanConversionFFactorMethod() { return fConversionFFactorMethod ; } 101 Float_t GetErrorConversionFFactorMethod() { return fConversionErrorFFactorMethod ; } 102 Float_t GetSigmaConversionFFactorMethod() { return fConversionSigmaFFactorMethod ; } 103 104 Float_t GetMeanConversionPINDiodeMethod() { return fConversionPINDiodeMethod ; } 105 Float_t GetErrorConversionPINDiodeMethod() { return fConversionErrorPINDiodeMethod ; } 106 Float_t GetSigmaConversionPINDiodeMethod() { return fConversionSigmaPINDiodeMethod ; } 64 107 65 108 void SetChargesInGraph(Float_t qhi,Float_t qlo) { fHist->SetPointInGraph(qhi,qlo); } -
trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc
r2660 r2661 230 230 231 231 if (satHi) 232 pix.SetArrivalTimes((float)(midlo+3),0. );232 pix.SetArrivalTimes((float)(midlo+3),0.,0.); 233 233 else 234 pix.SetArrivalTimes((float)(midhi+3),0. );234 pix.SetArrivalTimes((float)(midhi+3),0.,0.); 235 235 236 236 } /* while (pixel.Next()) */ -
trunk/MagicSoft/Mars/manalysis/MExtractedSignalPix.h
r2658 r2661 20 20 Float_t fMeanArrivalTime; 21 21 Float_t fWidthArrivalTime; 22 Float_t fTailArrivalTime; 22 23 23 24 public: … … 35 36 Float_t GetMeanArrivalTime() const { return fMeanArrivalTime; } 36 37 Float_t GetWidthArrivalTime() const { return fWidthArrivalTime; } 38 Float_t GetTailArrivalTime() const { return fTailArrivalTime; } 37 39 38 40 void SetExtractedSignal(Float_t sig, Float_t sigerr) … … 55 57 fNumLoGainSaturated = logain; } 56 58 57 void SetArrivalTimes(Float_t mean, Float_t width )59 void SetArrivalTimes(Float_t mean, Float_t width, Float_t tail) 58 60 { fMeanArrivalTime = mean; 59 61 fWidthArrivalTime = width; 62 fTailArrivalTime = tail; 60 63 } 61 64
Note:
See TracChangeset
for help on using the changeset viewer.