Changeset 2699 for trunk/MagicSoft/Mars
- Timestamp:
- 12/17/03 18:41:32 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2698 r2699 4 4 5 5 -*-*- END OF LINE -*-*- 6 2003/12/17: Abelardo Moralejo 7 8 * manalysis/MExtractSignal.cc 9 - put SetNumPixelUsedFADCSlices into the ReInit, otherwise they 10 are not accessible for MCalibrationCalc 11 12 * manalysis/MCalibration* 13 * mhist/MHCalibration* 14 - many small changes, mostly cosmetic 15 16 6 17 2003/12/17: Abelardo Moralejo 7 18 -
trunk/MagicSoft/Mars/manalysis/MCalibrationBlindPix.cc
r2642 r2699 45 45 // 46 46 MCalibrationBlindPix::MCalibrationBlindPix(const char *name, const char *title) 47 : fHist(NULL) 47 : fHist(NULL), 48 fLambda(-1.), 49 fMu0 (-1.), 50 fMu1 (-1.), 51 fSigma0(-1.), 52 fSigma1(-1.), 53 fErrLambda(-1.), 54 fErrMu0 (-1.), 55 fErrMu1 (-1.), 56 fErrSigma0(-1.), 57 fErrSigma1(-1.), 58 fTime (-1.), 59 fErrTime (-1.) 48 60 { 49 61 -
trunk/MagicSoft/Mars/manalysis/MCalibrationCalc.cc
r2679 r2699 1 /* ======================================================================== *\1 /* ======================================================================== *\ 2 2 ! 3 3 ! * … … 279 279 MExtractedSignalPix &sig = (*fSignals)[pixid]; 280 280 MPedestalPix &ped = (*fPedestals)[pixid]; 281 Float_t pedrms = ped.GetPedestalRms();282 Float_t sumhi = sig.GetExtractedSignalHiGain();281 Float_t pedrms = ped.GetPedestalRms(); 282 Float_t sumhi = sig.GetExtractedSignalHiGain(); 283 283 284 284 if (sumhi < 15.*pedrms ) // cut at 3.5 sigma … … 320 320 321 321 if (!blindpixel.FillCharge(sumhi)) 322 *fLog << warn<<322 *fLog << err << 323 323 "Overflow or Underflow occurred filling Blind Pixel sum = " << sumhi << endl; 324 324 325 325 if (!blindpixel.FillTime((int)mtime)) 326 *fLog << warn<<326 *fLog << err << 327 327 "Overflow or Underflow occurred filling Blind Pixel time = " << mtime << endl; 328 328 … … 412 412 if (TESTBIT(fFlags,kUseBlindPixelFit)) 413 413 { 414 if (blindpixel.FitCharge()) 415 *fLog << err << dbginf << "Could not fit the blind pixel " << endl; 416 else 417 *fLog << err << dbginf << "Could not fit the blind pixel " << endl; 418 419 if (!blindpixel.FitTime()) 420 *fLog << warn << "Could not the Times of the blind pixel " << endl; 414 415 if (!blindpixel.FitCharge()) 416 *fLog << err << dbginf << "Could not fit the blind pixel " << endl; 421 417 422 418 blindpixel.Draw(); -
trunk/MagicSoft/Mars/manalysis/MCalibrationCalc.h
r2628 r2699 47 47 48 48 49 enum 50 { 51 kUseTimeFits = 1, 52 kUseBlindPixelFit = 2, 53 kUsePinDiodeFit = 3 54 }; 49 enum { kUseTimeFits, kUseBlindPixelFit, kUsePinDiodeFit }; 55 50 56 51 public: -
trunk/MagicSoft/Mars/manalysis/MCalibrationCam.cc
r2679 r2699 232 232 void MCalibrationCam::Print(Option_t *o) const 233 233 { 234 234 235 *fLog << all << GetDescriptor() << ":" << endl; 235 236 int id = 0; … … 243 244 { 244 245 245 if (pix->GetCharge() >= 0.) 246 if (pix->GetCharge() >= 0.) 246 247 { 247 248 *fLog << pix->GetPixId() << " Pedestals: " << pix->GetPed() << " +- " << pix->GetPedRms() … … 321 322 break; 322 323 case 15: 323 val = ((*this)[idx].GetSigmaCharge()/(*this)[idx].GetCharge())* 324 ((*this)[idx].GetSigmaCharge()/(*this)[idx].GetCharge()); 324 if ((*this)[idx].GetCharge() != 0.) 325 val = ((*this)[idx].GetSigmaCharge()/(*this)[idx].GetCharge())* 326 ((*this)[idx].GetSigmaCharge()/(*this)[idx].GetCharge()); 327 else 328 val = -1.; 325 329 break; 326 330 case 11: … … 337 341 break; 338 342 case 14: 339 if ((fMeanPhotInsidePlexiglass > 0. ) && ((*this)[idx].GetCharge() != -1.)) 340 { 341 if (idx < 397) 342 val = fMeanPhotInsidePlexiglass / (*this)[idx].GetCharge(); 343 else 344 val = fMeanPhotInsidePlexiglass*gkCalibrationOutervsInnerPixelArea / (*this)[idx].GetCharge(); 345 } 346 else 347 { 348 val = -1.; 349 } 343 if (idx < 397) 344 val = (*this)[idx].GetMeanConversionBlindPixelMethod(); 345 else 346 val = (*this)[idx].GetMeanConversionBlindPixelMethod()*gkCalibrationOutervsInnerPixelArea; 350 347 break; 351 348 default: … … 398 395 fNumPhotInsidePlexiglassAvailable = kTRUE; 399 396 397 *fLog << endl; 398 *fLog << mean << " Mean number of Photons for an Inner Pixel: " << fMeanPhotInsidePlexiglass << endl; 399 *fLog << endl; 400 400 401 TIter Next(fPixels); 401 402 MCalibrationPix *pix; 402 403 while ((pix=(MCalibrationPix*)Next())) 403 404 { 404 405 405 if((pix->GetCharge() > 0.) && (fMeanPhotInsidePlexiglass > 0.)) 406 406 pix->SetConversionBlindPixelMethod(fMeanPhotInsidePlexiglass/pix->GetCharge(), 0., 0.); -
trunk/MagicSoft/Mars/manalysis/MCalibrationPix.cc
r2679 r2699 112 112 fHist->SetLowerFitRange(1.5*fPedRms); 113 113 else 114 *fLog << warn << "Cannot set lower fit range to suppress cosmics: Pedestals not available" << endl;114 *fLog << warn << "Cannot set lower fit range: Pedestals not available" << endl; 115 115 116 116 if (fHist->UseLoGain()) … … 145 145 if ((fPed > 0.) && (fPedRms > 0.)) 146 146 { 147 148 Float_t pedrmssquare = fPedRms*fPedRms; 149 Float_t sigmasquare = fSigmaCharge*fSigmaCharge; 147 150 148 151 if (fHiGainSaturation) 149 152 { 150 151 Float_t nsb = TMath::Sqrt(fPedRms*fPedRms - fElectronicPedRms*fElectronicPedRms); 153 154 Float_t logainrmssquare = fElectronicPedRms*fElectronicPedRms; 155 Float_t nsbsquare = pedrmssquare - logainrmssquare; 152 156 // Float_t logainrms = fElectronicPedRms + (TMath::Sqrt(fPedRms*fPedRms - fElectronicPedRms*fElectronicPedRms)); 153 157 154 if (nsb > 0.) 155 { 156 Float_t logainrms = (TMath::Sqrt(nsb*nsb + 100.*fElectronicPedRms*fElectronicPedRms)); 157 fRSigmaSquare = (fSigmaCharge*fSigmaCharge) - (logainrms*logainrms); 158 } 159 else 160 fRSigmaSquare = fSigmaCharge*fSigmaCharge - (100.*fElectronicPedRms*fElectronicPedRms); 161 } 162 else 163 fRSigmaSquare = (fSigmaCharge*fSigmaCharge) - (fPedRms*fPedRms); 164 165 if (fRSigmaSquare > 0. ) 166 { 167 fPheFFactorMethod = fFactor * fCharge*fCharge / fRSigmaSquare; 158 if (nsbsquare > 0.) 159 logainrmssquare = nsbsquare/100. + logainrmssquare; 160 161 fRSigmaSquare = sigmasquare - logainrmssquare; 162 163 if (fRSigmaSquare > 0.) 164 fPheFFactorMethod = fFactor*(fCharge*fCharge/100.) / fRSigmaSquare; 165 166 } 167 else /* if (fHiGainSaturation) */ 168 { 169 fRSigmaSquare = sigmasquare - pedrmssquare; 170 fPheFFactorMethod = fFactor * fCharge*fCharge / fRSigmaSquare; 171 } 172 173 174 if (fCharge > 0.) 168 175 fConversionFFactorMethod = fPheFFactorMethod / fCharge ; 169 } 170 else 171 { 176 177 else 172 178 *fLog << warn << "Cannot apply F-Factor method: Reduced Sigmas are smaller than 0 in pixel: " 173 179 << fPixId << endl; 174 } 175 176 } 180 181 } /* if ((fPed > 0.) && (fPedRms > 0.)) */ 177 182 178 183 return kTRUE; -
trunk/MagicSoft/Mars/manalysis/MCalibrationPix.h
r2679 r2699 68 68 Float_t GetTimeChiSquare() const { return fTimeChiSquare; } 69 69 70 Float_t GetPed() const { return fPed; }70 Float_t GetPed() const { return fPed; } 71 71 Float_t GetPedRms() const { return fPedRms; } 72 72 … … 109 109 void SetChargesInGraph(Float_t qhi,Float_t qlo) { fHist->SetPointInGraph(qhi,qlo); } 110 110 111 Bool_t FillChargeHiGain(Float_t q) { return fHist->FillChargeHiGain(q); }112 Bool_t FillTimeHiGain(Int_t t) { return fHist->FillTimeHiGain(t); }113 Bool_t FillRChargevsTimeHiGain(Float_t rq, Int_t t) { return fHist->FillChargevsNHiGain(rq,t); }111 Bool_t FillChargeHiGain(Float_t q) { return fHist->FillChargeHiGain(q); } 112 Bool_t FillTimeHiGain(Int_t t) { return fHist->FillTimeHiGain(t); } 113 Bool_t FillRChargevsTimeHiGain(Float_t rq, Int_t t) { return fHist->FillChargevsNHiGain(rq,t); } 114 114 115 Bool_t FillChargeLoGain(Float_t q) { return fHist->FillChargeLoGain(q); }116 Bool_t FillTimeLoGain(Int_t t) { return fHist->FillTimeLoGain(t); }117 Bool_t FillRChargevsTimeLoGain(Float_t rq, Int_t t) { return fHist->FillChargevsNLoGain(rq,t); }115 Bool_t FillChargeLoGain(Float_t q) { return fHist->FillChargeLoGain(q); } 116 Bool_t FillTimeLoGain(Int_t t) { return fHist->FillTimeLoGain(t); } 117 Bool_t FillRChargevsTimeLoGain(Float_t rq, Int_t t) { return fHist->FillChargevsNLoGain(rq,t); } 118 118 119 Bool_t IsValid() const { return fCharge >=0|| fErrCharge >= 0; }120 Int_t GetPixId() const{ return fPixId; }119 Bool_t IsValid() const { return fCharge >= 3.*GetPedRms() || fErrCharge >= 0; } 120 Int_t GetPixId() const { return fPixId; } 121 121 void DefinePixId(Int_t i); 122 122 -
trunk/MagicSoft/Mars/manalysis/MExtractSignal.cc
r2667 r2699 127 127 fSignals->InitSize(cam->GetNumPixels()); 128 128 129 130 fSignals->SetNumUsedFADCSlices(fNumHiGainSamples,fFirst,fFirst+fNumHiGainSamples-1, 131 fNumLoGainSamples,fFirst,fFirst+fNumLoGainSamples-1); 132 129 133 return kTRUE; 130 134 } … … 182 186 183 187 ptr = pixel.GetLoGainSamples(); 184 first = ptr + fFirst ;185 last = ptr + fFirst + fNumLoGainSamples ;188 first = ptr + fFirst + 1; 189 last = ptr + fFirst + fNumLoGainSamples +1; 186 190 Byte_t maxlo = 0; 187 191 Byte_t midlo = 0; … … 222 226 } /* while (pixel.Next()) */ 223 227 224 fSignals->SetNumUsedFADCSlices(fNumHiGainSamples,fFirst,fFirst+fNumHiGainSamples-1, 225 fNumLoGainSamples,fFirst,fFirst+fNumLoGainSamples-1); 228 226 229 fSignals->SetReadyToSave(); 227 230 -
trunk/MagicSoft/Mars/manalysis/MExtractedSignalCam.h
r2665 r2699 47 47 48 48 void SetNumUsedFADCSlices(Byte_t numh, Byte_t firsth, Byte_t lasth, 49 49 Byte_t numl, Byte_t firstl, Byte_t lastl) 50 50 { 51 51 fNumUsedHiGainFADCSlices = numh; -
trunk/MagicSoft/Mars/mhist/MHCalibrationBlindPixel.cc
r2641 r2699 82 82 fHBlindPixelCharge->SetXTitle("Sum FADC Slices"); 83 83 fHBlindPixelCharge->SetYTitle("Nr. of events"); 84 // fHBlindPixelCharge->Sumw2(); 85 86 fErrBlindPixelChargefirst = 0.; 87 fErrBlindPixelChargelast = gkStartBlindPixelBinNr; 88 fErrBlindPixelChargenbins = gkStartBlindPixelBinNr; 89 90 fHBlindPixelErrCharge = new TH1F("HBlindPixelErrCharge","Distribution of Variances of Summed FADC Slices", 91 fErrBlindPixelChargenbins,fErrBlindPixelChargefirst,fErrBlindPixelChargelast); 92 fHBlindPixelErrCharge->SetXTitle("Variance Summed FADC Slices"); 93 fHBlindPixelErrCharge->SetYTitle("Nr. of events"); 94 fHBlindPixelErrCharge->Sumw2(); 84 fHBlindPixelCharge->Sumw2(); 95 85 96 86 Axis_t tfirst = -0.5; … … 121 111 delete fHBlindPixelCharge; 122 112 delete fHBlindPixelTime; 123 delete fHBlindPixelErrCharge; 124 113 125 114 if (fSinglePheFit) 126 115 delete fSinglePheFit; … … 136 125 { 137 126 fHBlindPixelCharge->SetBinContent (i, 1.e-20); 138 fHBlindPixelErrCharge->SetBinContent (i, 1.e-20);139 127 fHBlindPixelTime->SetBinContent(i, 1.e-20); 140 128 } … … 279 267 gRandom->SetSeed(); 280 268 281 if (fHBlindPixelCharge->Get Entries() != 0)269 if (fHBlindPixelCharge->GetIntegral() != 0) 282 270 { 283 271 *fLog << err << "Histogram " << fHBlindPixelCharge->GetTitle() << " is already filled. " << endl; … … 329 317 // otherwise the fit goes gaga because of high number of dimensions ... 330 318 // 331 const Stat_t entries = fHBlindPixelCharge-> GetEntries();319 const Stat_t entries = fHBlindPixelCharge->Integral(); 332 320 const Double_t lambda_guess = 0.5; 333 321 const Double_t mu_0_guess = fHBlindPixelCharge->GetBinCenter(fHBlindPixelCharge->GetMaximumBin()); … … 439 427 Int_t nbins = 50; 440 428 441 *fLog << "New number of bins in HSinCharge: " << CutEdges(fHBlindPixelCharge,nbins) << endl;429 CutEdges(fHBlindPixelCharge,nbins); 442 430 443 431 fBlindPixelChargefirst = fHBlindPixelCharge->GetBinLowEdge(fHBlindPixelCharge->GetXaxis()->GetFirst()); … … 445 433 fBlindPixelChargenbins = nbins; 446 434 447 *fLog << "New number of bins in HErrCharge: " << CutEdges(fHBlindPixelErrCharge,30) << endl;448 fErrBlindPixelChargefirst = fHBlindPixelErrCharge->GetBinLowEdge(fHBlindPixelErrCharge->GetXaxis()->GetFirst());449 fErrBlindPixelChargelast = fHBlindPixelErrCharge->GetBinLowEdge(fHBlindPixelErrCharge->GetXaxis()->GetLast())+fHBlindPixelErrCharge->GetBinWidth(0);450 fErrBlindPixelChargenbins = nbins;451 452 435 CutEdges(fHBlindPixelChargevsN,0); 453 436 … … 463 446 rmax = (rmax != 0.) ? rmax : 9.; 464 447 465 const Stat_t entries = fHBlindPixelTime-> GetEntries();448 const Stat_t entries = fHBlindPixelTime->Integral(); 466 449 const Double_t mu_guess = fHBlindPixelTime->GetBinCenter(fHBlindPixelTime->GetMaximumBin()); 467 450 const Double_t sigma_guess = (rmax - rmin)/2.; -
trunk/MagicSoft/Mars/mhist/MHCalibrationBlindPixel.h
r2642 r2699 33 33 34 34 TH1F* fHBlindPixelCharge; //-> Histogram with the single Phe spectrum 35 TH1F* fHBlindPixelErrCharge; //-> Variance of summed FADC slices 36 TH1I* fHBlindPixelTime; //-> Variance of summed FADC slices 35 TH1I* fHBlindPixelTime; //-> Variance of summed FADC slices 37 36 TH1I* fHBlindPixelChargevsN; //-> Summed Charge vs. Event Nr. 38 37 … … 45 44 Int_t fBlindPixelChargenbins; 46 45 47 Axis_t fErrBlindPixelChargefirst;48 Axis_t fErrBlindPixelChargelast;49 Int_t fErrBlindPixelChargenbins;50 51 46 void ResetBin(Int_t i); 52 47 void DrawLegend(); … … 88 83 89 84 Bool_t FillBlindPixelCharge(Float_t q) { return fHBlindPixelCharge->Fill(q) > -1; } 90 Bool_t FillErrBlindPixelCharge(Float_t errq) { return fHBlindPixelErrCharge->Fill(errq) > -1; }91 85 Bool_t FillBlindPixelTime(Int_t t) { return fHBlindPixelTime->Fill(t) > -1; } 92 86 Bool_t FillBlindPixelChargevsN(Stat_t rq, Int_t t) { return fHBlindPixelChargevsN->Fill(t,rq) > -1; } … … 115 109 const Double_t GetSigmaTimeErr() const { return fSigmaTimeErr; } 116 110 117 const TH1F *GetHErrCharge() { return fHBlindPixelErrCharge; }118 const TH1F *GetHErrCharge() const { return fHBlindPixelErrCharge; }119 120 111 Bool_t SimulateSinglePhe(Double_t lambda, 121 112 Double_t mu0, -
trunk/MagicSoft/Mars/mhist/MHCalibrationPixel.cc
r2666 r2699 297 297 { 298 298 299 if (fHChargeHiGain-> GetEntries() > fHChargeLoGain->GetEntries())299 if (fHChargeHiGain->Integral() > fHChargeLoGain->Integral()) 300 300 { 301 301 fUseLoGain = kFALSE; … … 382 382 FitHiGainvsLoGain(); 383 383 384 385 384 gStyle->SetOptFit(0); 386 385 gStyle->SetOptStat(1111111); … … 390 389 gROOT->SetSelectedPad(NULL); 391 390 392 c->Divide(2,4); 393 394 c->cd(1); 395 gPad->SetBorderMode(0); 391 c->Divide(2,4); 392 393 c->cd(1); 394 gPad->SetBorderMode(0); 395 gPad->SetTicks(); 396 397 if (fHChargeHiGain->Integral() > 0) 396 398 gPad->SetLogy(1); 397 gPad->SetTicks(); 398 399 fHChargeHiGain->DrawCopy(opt); 400 401 c->Modified(); 402 c->Update(); 403 404 if (fUseLoGain) 399 else 400 gPad->SetLogy(0); 401 402 fHChargeHiGain->DrawCopy(opt); 403 404 c->Modified(); 405 c->Update(); 406 407 if (fUseLoGain) 408 { 409 410 c->cd(2); 411 gPad->SetTicks(); 412 413 if (fHChargeLoGain->Integral() > 0) 414 gPad->SetLogy(1); 415 else 416 gPad->SetLogy(0); 417 418 fHChargeLoGain->DrawCopy(opt); 419 420 if (fChargeGausFit) 421 { 422 if (fFitOK) 423 fChargeGausFit->SetLineColor(kGreen); 424 else 425 fChargeGausFit->SetLineColor(kRed); 426 427 fChargeGausFit->DrawCopy("same"); 428 } 429 c->Modified(); 430 c->Update(); 431 432 c->cd(3); 433 gROOT->SetSelectedPad(NULL); 434 gStyle->SetOptFit(); 435 fHivsLoGain->Draw("prof"); 436 437 gPad->Modified(); 438 gPad->Update(); 439 440 c->cd(4); 441 DrawLegend(); 442 443 } 444 else 445 { 446 if (fChargeGausFit) 447 { 448 if (fFitOK) 449 fChargeGausFit->SetLineColor(kGreen); 450 else 451 fChargeGausFit->SetLineColor(kRed); 452 453 fChargeGausFit->DrawCopy("same"); 454 } 455 456 c->cd(2); 457 gPad->SetTicks(); 458 459 if (fHChargeLoGain->Integral() > 0) 460 gPad->SetLogy(1); 461 else 462 gPad->SetLogy(0); 463 464 fHChargeLoGain->DrawCopy(opt); 465 c->Modified(); 466 c->Update(); 467 468 c->cd(3); 469 DrawLegend(); 470 471 c->cd(4); 472 473 gROOT->SetSelectedPad(NULL); 474 gStyle->SetOptFit(); 475 fHivsLoGain->Draw("prof"); 476 gPad->Modified(); 477 gPad->Update(); 478 } 479 480 c->Modified(); 481 c->Update(); 482 483 c->cd(5); 484 gStyle->SetOptStat(1111111); 485 486 gPad->SetTicks(); 487 gPad->SetLogy(0); 488 fHTimeHiGain->DrawCopy(opt); 489 c->Modified(); 490 c->Update(); 491 492 if (fUseLoGain) 405 493 { 406 c->cd(2); 407 gPad->SetLogy(1); 408 gPad->SetTicks(); 409 fHChargeLoGain->DrawCopy(opt); 410 411 if (fChargeGausFit) 412 { 413 if (fFitOK) 414 fChargeGausFit->SetLineColor(kGreen); 415 else 416 fChargeGausFit->SetLineColor(kRed); 417 418 fChargeGausFit->DrawCopy("same"); 419 } 420 c->Modified(); 421 c->Update(); 422 423 c->cd(3); 424 gROOT->SetSelectedPad(NULL); 425 gStyle->SetOptFit(); 426 fHivsLoGain->Draw("prof"); 427 428 429 gPad->Modified(); 430 gPad->Update(); 431 432 c->cd(4); 433 DrawLegend(); 434 435 } 436 else 437 { 438 if (fChargeGausFit) 439 { 440 if (fFitOK) 441 fChargeGausFit->SetLineColor(kGreen); 442 else 443 fChargeGausFit->SetLineColor(kRed); 444 445 fChargeGausFit->DrawCopy("same"); 446 } 447 c->cd(2); 448 gPad->SetLogy(1); 449 gPad->SetTicks(); 450 451 fHChargeLoGain->DrawCopy(opt); 452 c->Modified(); 453 c->Update(); 454 455 c->cd(3); 456 DrawLegend(); 457 458 c->cd(4); 459 460 gROOT->SetSelectedPad(NULL); 461 gStyle->SetOptFit(); 462 fHivsLoGain->Draw("prof"); 463 gPad->Modified(); 464 gPad->Update(); 465 466 467 } 468 469 c->Modified(); 470 c->Update(); 471 472 c->cd(5); 473 gStyle->SetOptStat(1111111); 474 475 gPad->SetLogy(1); 476 fHTimeHiGain->DrawCopy(opt); 477 c->Modified(); 478 c->Update(); 479 480 if (fUseLoGain) 481 { 482 494 483 495 c->cd(6); 484 gPad->SetLogy(1); 496 gPad->SetTicks(); 497 gPad->SetLogy(0); 485 498 fHTimeLoGain->DrawCopy(opt); 486 499 c->Modified(); … … 514 527 515 528 c->cd(6); 516 gPad->SetLogy(1); 529 gPad->SetTicks(); 530 gPad->SetLogy(0); 517 531 fHTimeLoGain->DrawCopy(opt); 518 532 c->Modified(); … … 524 538 525 539 c->cd(7); 540 gPad->SetTicks(); 526 541 fHChargevsNHiGain->DrawCopy(opt); 527 542 c->Modified(); … … 529 544 530 545 c->cd(8); 546 gPad->SetTicks(); 531 547 fHChargevsNLoGain->DrawCopy(opt); 532 548 c->Modified(); … … 573 589 rmax = (rmax != 0.) ? rmax : 9.; 574 590 575 const Stat_t entries = fHTimeHiGain->GetEntries();591 const Stat_t entries = fHTimeHiGain->Integral(); 576 592 const Double_t mu_guess = fHTimeHiGain->GetBinCenter(fHTimeHiGain->GetMaximumBin()); 577 593 const Double_t sigma_guess = (rmax - rmin)/2.; … … 629 645 rmax = (rmax != 0.) ? rmax : 9.; 630 646 631 const Stat_t entries = fHTimeLoGain-> GetEntries();647 const Stat_t entries = fHTimeLoGain->Integral(); 632 648 const Double_t mu_guess = fHTimeLoGain->GetBinCenter(fHTimeLoGain->GetMaximumBin()); 633 649 const Double_t sigma_guess = (rmax - rmin)/2.; … … 692 708 // otherwise the fit goes gaga because of high number of dimensions ... 693 709 // 694 const Stat_t entries = fHChargeHiGain-> GetEntries();710 const Stat_t entries = fHChargeHiGain->Integral(); 695 711 const Double_t area_guess = entries/gkSq2Pi; 696 712 const Double_t mu_guess = fHChargeHiGain->GetBinCenter(fHChargeHiGain->GetMaximumBin()); … … 766 782 // otherwise the fit goes gaga because of high number of dimensions ... 767 783 // 768 const Stat_t entries = fHChargeLoGain-> GetEntries();784 const Stat_t entries = fHChargeLoGain->Integral(); 769 785 const Double_t area_guess = entries/gkSq2Pi; 770 786 const Double_t mu_guess = fHChargeLoGain->GetBinCenter(fHChargeLoGain->GetMaximumBin()); -
trunk/MagicSoft/Mars/mhist/MHCalibrationPixel.h
r2662 r2699 156 156 virtual void Reset(); 157 157 158 void SetLowerFitRange(Axis_t min) {fLowerFitRange = min; }158 void SetLowerFitRange(Axis_t min) { fLowerFitRange = min; } 159 159 160 160 void PrintChargeFitResult(); 161 161 void PrintTimeFitResult(); 162 162 163 Bool_t IsFitOK() { return fFitOK;}163 Bool_t IsFitOK() { return fFitOK; } 164 164 165 165 ClassDef(MHCalibrationPixel, 1)
Note:
See TracChangeset
for help on using the changeset viewer.