Changeset 2642 for trunk/MagicSoft/Mars/manalysis
- Timestamp:
- 12/11/03 14:10:12 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MCalibrationBlindPix.cc
r2603 r2642 78 78 Bool_t MCalibrationBlindPix::FitCharge() 79 79 { 80 80 81 if (!fHist->FitSinglePhe()) 81 82 return kFALSE; -
trunk/MagicSoft/Mars/manalysis/MCalibrationBlindPix.h
r2627 r2642 55 55 Bool_t FillRChargevsTime(Float_t rq, Int_t t) { return fHist->FillBlindPixelChargevsN(rq,t); } 56 56 57 Bool_t Is Valid() { return fLambda > 0. || fErrLambda > 0.; }57 Bool_t IsFitOK() { return fHist->IsFitOK(); } 58 58 59 59 Bool_t FitCharge(); -
trunk/MagicSoft/Mars/manalysis/MCalibrationCalc.cc
r2634 r2642 220 220 } 221 221 222 fNumHiGainSamples = fRunHeader->GetNumSamplesHiGain(); 223 fNumLoGainSamples = fRunHeader->GetNumSamplesLoGain(); 222 // fNumHiGainSamples = fRunHeader->GetNumSamplesHiGain(); 223 // fNumLoGainSamples = fRunHeader->GetNumSamplesLoGain(); 224 fNumHiGainSamples = 6; 225 fNumLoGainSamples = 6; 224 226 225 227 // … … 281 283 Float_t pedrms = ped.GetPedestalRms(); 282 284 283 if ((float)sum < ((pedes*fNumHiGainSamples)+( 30.*pedrms)) )285 if ((float)sum < ((pedes*fNumHiGainSamples)+(2.*fNumHiGainSamples*pedrms)) ) 284 286 cosmicpix++; 285 287 } … … 305 307 MExtractedSignalPix &sig = (*fSignals)[pixid]; 306 308 307 Float_t sum = sig.GetExtractedSignal(); 309 Float_t sumhi = sig.GetExtractedSignalHiGain(); 310 Float_t sumlo = sig.GetExtractedSignalLoGain(); 308 311 Bool_t logain = sig.IsLoGainUsed(); 309 312 … … 322 325 case gkCalibrationBlindPixelId: 323 326 324 if (!blindpixel.FillCharge(sum ))327 if (!blindpixel.FillCharge(sumhi)) 325 328 *fLog << warn << 326 "Overflow or Underflow occurred filling Blind Pixel sum = " << sum << endl;329 "Overflow or Underflow occurred filling Blind Pixel sum = " << sumhi << endl; 327 330 328 331 if (!blindpixel.FillTime((int)mid)) … … 330 333 "Overflow or Underflow occurred filling Blind Pixel time = " << (int)mid << endl; 331 334 332 if (!blindpixel.FillRChargevsTime(sum ,fEvents))335 if (!blindpixel.FillRChargevsTime(sumhi,fEvents)) 333 336 *fLog << warn << 334 337 "Overflow or Underflow occurred filling Blind Pixel eventnr = " << fEvents << endl; 335 338 336 339 case gkCalibrationPINDiodeId: 337 if (!pindiode.FillCharge(sum ))340 if (!pindiode.FillCharge(sumhi)) 338 341 *fLog << warn << 339 "Overflow or Underflow occurred filling HCharge: means = " << sum << endl;342 "Overflow or Underflow occurred filling HCharge: means = " << sumhi << endl; 340 343 if (!pindiode.FillTime((int)mid)) 341 344 *fLog << warn << 342 345 "Overflow or Underflow occurred filling HTime: time = " << (int)mid << endl; 343 if (!pindiode.FillRChargevsTime(sum ,fEvents))346 if (!pindiode.FillRChargevsTime(sumhi,fEvents)) 344 347 *fLog << warn << 345 348 "Overflow or Underflow occurred filling HChargevsN: eventnr = " << fEvents << endl; 346 349 347 350 default: 351 352 pix.SetChargesInGraph(sumhi,sumlo); 348 353 349 354 if (logain) 350 355 { 351 356 352 if (!pix.FillChargeLoGain(sum ))357 if (!pix.FillChargeLoGain(sumlo)) 353 358 *fLog << warn << "Could not fill Lo Gain Charge of pixel: " << pixid 354 << " signal = " << sum << endl;359 << " signal = " << sumlo << endl; 355 360 356 361 if (!pix.FillTimeLoGain((int)mid)) … … 361 366 // Fill the reduced charge into the control histo for better visibility 362 367 // 363 if (!pix.FillRChargevsTimeLoGain(sum ,fEvents))368 if (!pix.FillRChargevsTimeLoGain(sumlo,fEvents)) 364 369 *fLog << warn << "Could not fill Lo Gain Charge vs. EvtNr of pixel: " 365 << pixid << " signal = " << sum << " event Nr: " << fEvents << endl;370 << pixid << " signal = " << sumlo << " event Nr: " << fEvents << endl; 366 371 367 372 } 368 373 else 369 374 { 370 if (!pix.FillChargeHiGain(sum ))375 if (!pix.FillChargeHiGain(sumhi)) 371 376 *fLog << warn << "Could not fill Hi Gain Charge of pixel: " << pixid 372 << " signal = " << sum << endl;377 << " signal = " << sumhi << endl; 373 378 374 379 if (!pix.FillTimeHiGain((int)mid)) … … 376 381 << pixid << " time = " << (int)mid << endl; 377 382 378 if (!pix.FillRChargevsTimeHiGain(sum ,fEvents))383 if (!pix.FillRChargevsTimeHiGain(sumhi,fEvents)) 379 384 *fLog << warn << "Could not fill Hi Gain Charge vs. EvtNr of pixel: " 380 << pixid << " signal = " << sum << " event Nr: " << fEvents << endl;385 << pixid << " signal = " << sumhi << " event Nr: " << fEvents << endl; 381 386 } 382 387 -
trunk/MagicSoft/Mars/manalysis/MCalibrationCam.cc
r2631 r2642 13 13 ! * in supporting documentation. It is provided "as is" without express 14 14 ! * or implied warranty. 15 15 16 ! * 16 17 ! … … 372 373 *fLog << pix->GetPixId() << " Pedestals: " << pix->GetPed() << " +- " << pix->GetPedRms() 373 374 << " Reduced Charge: " << pix->GetCharge() << " +- " 374 << pix->GetSigmaCharge() << " Reduced Sigma: " << pix->GetRSigma() << endl;375 << pix->GetSigmaCharge() << " Reduced Sigma: " << TMath::Sqrt(pix->GetRSigmaSquare()) << endl; 375 376 id++; 376 377 } … … 392 393 *fLog << pix->GetPixId() << " Pedestals: " << pix->GetPed() << " +- " << pix->GetPedRms() 393 394 << " Reduced Charge: " << pix->GetCharge() << " +- " 394 << pix->GetSigmaCharge() << " Reduced Sigma: " << pix->GetRSigma() << endl;395 << pix->GetSigmaCharge() << " Reduced Sigma: " << TMath::Sqrt(pix->GetRSigmaSquare()) << endl; 395 396 id++; 396 397 } … … 437 438 break; 438 439 case 10: 439 val = (*this)[idx].GetRSigma();440 val = TMath::Sqrt((*this)[idx].GetRSigmaSquare()); 440 441 break; 441 442 case 15: 442 val = (*this)[idx].GetSigmaCharge()/(*this)[idx].GetCharge(); 443 val = ((*this)[idx].GetSigmaCharge()/(*this)[idx].GetCharge())* 444 ((*this)[idx].GetSigmaCharge()/(*this)[idx].GetCharge()); 443 445 break; 444 446 case 11: … … 482 484 Bool_t MCalibrationCam::CalcNrPhotInnerPixel() 483 485 { 484 if (!fBlindPixel->Is Valid())486 if (!fBlindPixel->IsFitOK()) 485 487 return kFALSE; 486 488 … … 561 563 return kTRUE; 562 564 } 565 566 567 Bool_t MCalibrationCam::GetConversionFactorPINDiode(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma) 568 { 569 570 return kTRUE; 571 572 } 573 574 Bool_t MCalibrationCam::GetConversionFactorCombined(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma) 575 { 576 577 return kTRUE; 578 579 } -
trunk/MagicSoft/Mars/manalysis/MCalibrationCam.h
r2627 r2642 91 91 Bool_t GetConversionFactorFFactor(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma); 92 92 Bool_t GetConversionFactorBlindPixel(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma); 93 Bool_t GetConversionFactorPINDiode(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma); 94 Bool_t GetConversionFactorCombined(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma); 93 95 94 96 ClassDef(MCalibrationCam, 1) // Storage Container for all calibration information of the camera -
trunk/MagicSoft/Mars/manalysis/MCalibrationPix.cc
r2634 r2642 50 50 fSigmaCharge(-1.), 51 51 fErrSigmaCharge(-1.), 52 fRSigma (-1.),52 fRSigmaSquare(-1.), 53 53 fChargeProb(-1.), 54 54 fPed(-1.), … … 61 61 fConversionFFactorMethod(-1.), 62 62 fHiGainSaturation(kFALSE), 63 f LoGainPedRms(4.)63 fElectronicPedRms(3.67) 64 64 { 65 65 … … 140 140 141 141 if (fHiGainSaturation) 142 fRSigma = (fSigmaCharge*fSigmaCharge) - (fLoGainPedRms*fLoGainPedRms); 142 { 143 144 Float_t logainrms = fElectronicPedRms + (TMath::Sqrt(fPedRms*fPedRms - fElectronicPedRms*fElectronicPedRms)); 145 if (logainrms > 0.) 146 fRSigmaSquare = (fSigmaCharge*fSigmaCharge) - (logainrms*logainrms); 147 else 148 fRSigmaSquare = fSigmaCharge*fSigmaCharge; 149 150 } 143 151 else 144 fRSigma = (fSigmaCharge*fSigmaCharge) - (fPedRms*fPedRms);145 146 if (fRSigma > 0. )152 fRSigmaSquare = (fSigmaCharge*fSigmaCharge) - (fPedRms*fPedRms); 153 154 if (fRSigmaSquare > 0. ) 147 155 { 148 fPheFFactorMethod = fFactor * fCharge*fCharge / fRSigma;149 fConversionFFactorMethod =fPheFFactorMethod / fCharge ;156 fPheFFactorMethod = fFactor * fCharge*fCharge / fRSigmaSquare; 157 fConversionFFactorMethod = fPheFFactorMethod / fCharge ; 150 158 } 151 159 else -
trunk/MagicSoft/Mars/manalysis/MCalibrationPix.h
r2631 r2642 18 18 Float_t fSigmaCharge; // The sigma of the mean charge after the fit 19 19 Float_t fErrSigmaCharge; // The error of the sigma of the mean charge after the fit 20 Float_t fRSigma ;// The reduced squares of sigmas after the fit20 Float_t fRSigmaSquare; // The reduced squares of sigmas after the fit 21 21 Float_t fChargeProb; // The probability of the fit function 22 22 … … 34 34 Bool_t fHiGainSaturation; // Is Lo-Gain used at all? 35 35 36 Float_t f LoGainPedRms;36 Float_t fElectronicPedRms; 37 37 38 38 MHCalibrationPixel *fHist; //! Pointer to the histograms performing the fits, etc. … … 46 46 47 47 Float_t GetCharge() const { return fCharge; } 48 Float_t GetRSigma () const { return fRSigma;}48 Float_t GetRSigmaSquare() const { return fRSigmaSquare; } 49 49 50 50 Float_t GetErrCharge() const { return fErrCharge; } … … 62 62 void SetPedestal(Float_t ped, Float_t pedrms); 63 63 void SetHiGainSaturation() { fHiGainSaturation = kTRUE; fHist->SetUseLoGain(); } 64 65 void SetChargesInGraph(Float_t qhi,Float_t qlo) { fHist->SetPointInGraph(qhi,qlo); } 64 66 65 67 Bool_t FillChargeHiGain(Float_t q) { return fHist->FillChargeHiGain(q); } -
trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc
r2640 r2642 246 246 247 247 248 fSignals->SetNumUsedFADCSlices(fNumHiGainSamples );248 fSignals->SetNumUsedFADCSlices(fNumHiGainSamples,fNumLoGainSamples); 249 249 fSignals->SetReadyToSave(); 250 250 -
trunk/MagicSoft/Mars/manalysis/MExtractedSignalCam.h
r2640 r2642 32 32 Byte_t GetNumUsedHiGainFADCSlices() { return fNumUsedHiGainFADCSlices; } 33 33 Byte_t GetNumUsedLoGainFADCSlices() { return fNumUsedLoGainFADCSlices; } 34 SetNumUsedHiGainFADCSlices(Byte_t numh, Byte_t numl)34 void SetNumUsedHiGainFADCSlices(Byte_t numh, Byte_t numl) 35 35 { 36 36 fNumUsedHiGainFADCSlices = numh;
Note:
See TracChangeset
for help on using the changeset viewer.