- Timestamp:
- 02/12/04 16:16:26 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3118 r3120 23 23 * mcalib/MCalibrationCalc.cc 24 24 - removed initialization of non-used nsamples 25 26 * mcalib/MHCalibrationPixel.[h,cc] 27 * mcalib/MCalibrationPix.[h,cc] 28 * mcalib/MCalibrationCalc.[h,cc] 29 - implemented new histograms: 30 HSinglePheFADCSlices and HPedestalFADCSlices 31 They are filled with the FADC slice values of either a s.phe. 32 event or a pedestal event. The decision is taken with the 33 variable: MCalibrationCalc::fBlindPixelSinglePheCut, to be set 34 with a setter 35 - as the blind pixel signal seems to be delayed a bit, the 36 extraction range is now by default: 10,20. The extractor takes 37 already care of the fact that part of the signal lies in the 38 LoGain Sample. 25 39 26 40 -
trunk/MagicSoft/Mars/mcalib/MCalibrationBlindPix.cc
r3076 r3120 57 57 *fLog << warn << dbginf << " Could not create MHCalibrationBlindPixel " << endl; 58 58 59 fHSinglePheFADCSlices = new TH1I("HSinglePheFADCSlices","Summed FADC slices single phe events",30,0.5,30.5);60 61 59 Clear(); 62 60 } … … 65 63 { 66 64 delete fHist; 67 delete fHSinglePheFADCSlices;68 65 } 69 66 … … 96 93 } 97 94 98 Bool_t MCalibrationBlindPix::FillCharge(const Float_t q)95 Bool_t MCalibrationBlindPix::FillCharge(const Int_t q) 99 96 { 100 97 return fHist->FillBlindPixelCharge(q); -
trunk/MagicSoft/Mars/mcalib/MCalibrationBlindPix.h
r3076 r3120 32 32 Float_t fErrTime; // The error of the mean arrival time after the fit 33 33 34 TH1I* fHSinglePheFADCSlices;35 36 34 37 35 public: … … 58 56 Float_t GetErrTime() const { return fErrTime; } 59 57 60 TH1I *GetSinglePheFADCSlices() { return fHSinglePheFADCSlices; }61 62 58 MHCalibrationBlindPixel *GetHist() const { return fHist; } 63 59 MHCalibrationBlindPixel *GetHist() { return fHist; } … … 66 62 67 63 // Fill histos 68 Bool_t FillCharge(const Float_t q);64 Bool_t FillCharge(const Int_t q); 69 65 Bool_t FillTime(const Float_t t); 70 Bool_t FillGraphs( Float_t qhi,Float_t qlo) const { return fHist->FillGraphs(qhi,qlo); }66 Bool_t FillGraphs(const Int_t qhi, const Int_t qlo) const { return fHist->FillGraphs(qhi,qlo); } 71 67 72 68 // Fits -
trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.cc
r3116 r3120 115 115 const UInt_t MCalibrationCalc::fPINDiodeId = 9999; 116 116 const Byte_t MCalibrationCalc::fgSaturationLimit = 254; 117 const Byte_t MCalibrationCalc::fgBlindPixelFirst = 3; 118 const Byte_t MCalibrationCalc::fgBlindPixelLast = 12; 117 const Byte_t MCalibrationCalc::fgBlindPixelFirst = 10; 118 const Byte_t MCalibrationCalc::fgBlindPixelLast = 20; 119 const Int_t MCalibrationCalc::fgBlindPixelSinglePheCut = 150; 119 120 120 121 // -------------------------------------------------------------------------- … … 460 461 Byte_t *ptr = pixel.GetHiGainSamples(); 461 462 462 Float_t blindpixelsumhi = 0.;463 Float_t blindpixelsumlo = 0.;463 Int_t blindpixelsumhi = 0; 464 Int_t blindpixelsumlo = 0; 464 465 // 465 466 // We need a dedicated signal extractor for the blind pixel … … 499 500 } 500 501 501 blindpixelsumhi = (Float_t)sum;502 blindpixelsumhi = sum; 502 503 503 504 ptr = pixel.GetLoGainSamples(); … … 513 514 sum += *ptr; 514 515 515 blindpixelsumlo = (Float_t)sum;516 blindpixelsumlo = sum; 516 517 517 518 // if (!CalcSignalBlindPixel(hiptr, blindpixelsumhi)) … … 527 528 blindpixel.FillGraphs(blindpixelsumhi,blindpixelsumlo); 528 529 529 TH1I *hist = blindpixel.GetSinglePheFADCSlices(); 530 531 if (blindpixelsumhi > 50.) 532 { 533 ptr = pixel.GetHiGainSamples(); 534 for (Int_t i=0;i<15;i++) 535 hist->Fill(i,*ptr++); 536 ptr = pixel.GetLoGainSamples(); 537 for (Int_t i=15;i<30;i++) 538 hist->Fill(i,*ptr++); 539 } 530 TH1I *hist; 531 532 if (blindpixelsumhi > fBlindPixelSinglePheCut) 533 hist = (blindpixel.GetHist())->GetHSinglePheFADCSlices(); 534 else 535 hist = (blindpixel.GetHist())->GetHPedestalFADCSlices(); 536 537 ptr = pixel.GetHiGainSamples(); 538 for (Int_t i=1;i<16;i++) 539 hist->Fill(i,*ptr++); 540 ptr = pixel.GetLoGainSamples(); 541 for (Int_t i=16;i<31;i++) 542 hist->Fill(i,*ptr++); 543 540 544 } /* if use blind pixel */ 541 545 -
trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.h
r3106 r3120 43 43 static const Byte_t fgBlindPixelFirst; // First FADC slice blind pixel 44 44 static const Byte_t fgBlindPixelLast; // Last FADC slice blind pixel 45 46 static const Int_t fgBlindPixelSinglePheCut; // FADC sum from which on an event is considered as a S.ph. one. 45 47 46 48 MPedestalCam *fPedestals; // Pedestals of all pixels in the camera … … 59 61 Byte_t fBlindPixelFirst; 60 62 Byte_t fBlindPixelLast; 63 64 Int_t fBlindPixelSinglePheCut; 61 65 62 66 Float_t fConversionHiLo; … … 107 111 108 112 void SetBlindPixelRange(Byte_t first=fgBlindPixelFirst, Byte_t last=fgBlindPixelLast); 109 113 void SetBlindPixelSinglePheCut(Int_t cut=fgBlindPixelSinglePheCut) { fBlindPixelSinglePheCut = cut; } 114 110 115 // Getters 111 116 MCalibrationBlindPix *GetBlindPixel() const; -
trunk/MagicSoft/Mars/mcalib/MHCalibrationBlindPixel.cc
r3112 r3120 116 116 fBlindPixelChargelast = 1600.; 117 117 118 fHBlindPixelCharge = new TH1 F("HBlindPixelCharge","Distribution of Summed FADC Slices",118 fHBlindPixelCharge = new TH1I("HBlindPixelCharge","Distribution of Summed FADC Slices", 119 119 fgBlindPixelChargeNbins,fBlindPixelChargefirst,fBlindPixelChargelast); 120 120 fHBlindPixelCharge->SetXTitle("Sum FADC Slices"); … … 133 133 fLoGains = new TArrayF(fCurrentSize); 134 134 135 fHSinglePheFADCSlices = new TH1I("HSinglePheFADCSlices","FADC slices Single Phe events",30,0.5,30.5); 136 fHSinglePheFADCSlices->SetXTitle("FADC slice"); 137 fHSinglePheFADCSlices->SetYTitle("Counts"); 138 fHSinglePheFADCSlices->SetDirectory(NULL); 139 140 fHPedestalFADCSlices = new TH1I("HPedestalFADCSlices", "FADC slices Pedestal events",30,0.5,30.5); 141 fHPedestalFADCSlices->SetXTitle("FADC slice"); 142 fHPedestalFADCSlices->SetYTitle("Counts"); 143 fHPedestalFADCSlices->SetDirectory(NULL); 144 135 145 Clear(); 136 146 } … … 147 157 delete fHiGains; 148 158 delete fLoGains; 159 160 delete fHSinglePheFADCSlices; 161 delete fHPedestalFADCSlices; 149 162 150 163 if (fHBlindPixelPSD) … … 247 260 fLoGains->Set(1024); 248 261 249 fHiGains->Reset(0 .);250 fLoGains->Reset(0 .);262 fHiGains->Reset(0); 263 fLoGains->Reset(0); 251 264 252 265 … … 337 350 } 338 351 339 void MHCalibrationBlindPixel::CutArrayBorder(TArrayF *array) 352 void MHCalibrationBlindPixel::CutArrayBorder(TArrayF *array) const 340 353 { 341 354 … … 350 363 } 351 364 365 void MHCalibrationBlindPixel::CutArrayBorder(TArrayI *array) const 366 { 367 368 Int_t i; 369 370 for (i=array->GetSize()-1;i>=0;i--) 371 if (array->At(i) != 0) 372 { 373 array->Set(i+1); 374 break; 375 } 376 } 377 352 378 const Bool_t MHCalibrationBlindPixel::IsFitOK() const 353 379 { … … 365 391 } 366 392 367 Bool_t MHCalibrationBlindPixel::FillGraphs( Float_t qhi,Float_t qlo)393 Bool_t MHCalibrationBlindPixel::FillGraphs(const Int_t qhi, const Int_t qlo) 368 394 { 369 395 … … 387 413 388 414 389 Bool_t MHCalibrationBlindPixel::FillBlindPixelCharge( Float_t q)415 Bool_t MHCalibrationBlindPixel::FillBlindPixelCharge(const Int_t q) 390 416 { 391 417 return fHBlindPixelCharge->Fill(q) > -1; 392 418 } 393 419 394 Bool_t MHCalibrationBlindPixel::FillBlindPixelTime( Float_t t)420 Bool_t MHCalibrationBlindPixel::FillBlindPixelTime(const Float_t t) 395 421 { 396 422 return fHBlindPixelTime->Fill(t) > -1; … … 529 555 c->cd(2); 530 556 DrawLegend(); 557 558 559 c->cd(3); 560 gPad->SetLogy(0); 561 gPad->SetBorderMode(0); 562 // fHBlindPixelTime->Draw(opt); 563 fHSinglePheFADCSlices->Draw(opt); 564 565 c->cd(4); 566 gPad->SetLogy(0); 567 gPad->SetBorderMode(0); 568 // fHBlindPixelTime->Draw(opt); 569 fHPedestalFADCSlices->Draw(opt); 570 531 571 c->Modified(); 532 572 c->Update(); 533 534 c->cd(3); 535 gPad->SetLogy(1); 536 gPad->SetBorderMode(0); 537 fHBlindPixelTime->Draw(opt); 538 573 539 574 CutArrayBorder(fHiGains); 540 575 CreateChargeXaxis(fHiGains->GetSize()); … … 623 658 c->Modified(); 624 659 c->Update(); 660 661 c->cd(10); 625 662 } 626 663 -
trunk/MagicSoft/Mars/mcalib/MHCalibrationBlindPixel.h
r3108 r3120 7 7 8 8 class TArrayF; 9 class TArrayI; 9 10 class TH1F; 10 11 class TH1I; … … 28 29 static const Int_t fPulserFrequency; 29 30 30 TH1 F* fHBlindPixelCharge; // Histogram with the single Phe spectrum31 TH1I* fHBlindPixelCharge; // Histogram with the single Phe spectrum 31 32 TH1F* fHBlindPixelTime; // Variance of summed FADC slices 32 33 TH1F* fHBlindPixelPSD; // Power spectrum density of fHBlindPixelChargevsN 34 35 TH1I* fHSinglePheFADCSlices; 36 TH1I* fHPedestalFADCSlices; 33 37 34 38 TF1 *fSinglePheFit; … … 58 62 void CreateChargeXaxis(Int_t n); 59 63 void CreatePSDXaxis(Int_t n); 60 void CutArrayBorder(TArrayF *array); 64 void CutArrayBorder(TArrayF *array) const; 65 void CutArrayBorder(TArrayI *array) const; 61 66 62 67 TPaveText *fFitLegend; … … 104 109 void Reset(); 105 110 106 Bool_t FillBlindPixelCharge( Float_t q);107 Bool_t FillBlindPixelTime( Float_t t);108 Bool_t FillGraphs( Float_t qhi, Float_t qlo);111 Bool_t FillBlindPixelCharge(const Int_t q); 112 Bool_t FillBlindPixelTime(const Float_t t); 113 Bool_t FillGraphs(const Int_t qhi, const Int_t qlo); 109 114 110 115 // Setters … … 138 143 const Double_t GetSigmaTimeErr() const { return fSigmaTimeErr; } 139 144 145 TH1I *GetHSinglePheFADCSlices() { return fHSinglePheFADCSlices; } 146 TH1I *GetHPedestalFADCSlices() { return fHPedestalFADCSlices; } 147 140 148 const Bool_t IsFitOK() const; 141 149 const Bool_t IsOscillating();
Note:
See TracChangeset
for help on using the changeset viewer.