Changeset 2661 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 12/12/03 09:04:01 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHCalibrationPixel.cc
r2660 r2661 45 45 #include <TF1.h> 46 46 #include <TH2.h> 47 #include <TProfile.h> 47 48 #include <TCanvas.h> 48 49 #include <TPad.h> … … 85 86 fTimeProb(-1.), 86 87 fTimeNdf(-1), 87 fUseLoGain(kFALSE) 88 fUseLoGain(kFALSE), 89 fOffset(0.), 90 fSlope(0.) 88 91 { 89 92 … … 391 394 } 392 395 393 gStyle->SetOptFit(0); 394 gStyle->SetOptStat(1111111); 396 TProfile *hist = new TProfile("PePe","Shit is still moving",100,0.,1000.,0.,1000.); 397 398 for (Int_t i=0;i<fTotalEntries;i++) 399 hist->Fill(fHiGains->At(i),fLoGains->At(i),1); 400 401 gStyle->SetOptFit(0); 402 gStyle->SetOptStat(1111111); 395 403 396 404 TCanvas *c = MakeDefCanvas(this,600,900); … … 432 440 gROOT->SetSelectedPad(NULL); 433 441 gStyle->SetOptFit(); 434 fHiGainvsLoGain->DrawClone("Apq")->SetBit(kCanDelete); 435 fHiGainvsLoGain->Fit("p1","q"); 442 // fHiGainvsLoGain->DrawClone("Apq")->SetBit(kCanDelete); 443 // fHiGainvsLoGain->Fit("p1","q"); 444 hist->Draw("prof"); 445 hist->Fit("pol1","pepe","markus",hist->GetMean()-3.*hist->GetRMS(),hist->GetMean()+2.*hist->GetRMS()); 446 447 fOffset = hist->GetFunction("pepe")->GetParameter(0); 448 fSlope = hist->GetFunction("pepe")->GetParameter(1); 449 450 cout << "Pepe: " << fOffset << " Markus: " << fSlope << endl; 451 452 436 453 gPad->Modified(); 437 454 gPad->Update(); … … 467 484 gROOT->SetSelectedPad(NULL); 468 485 gStyle->SetOptFit(); 469 fHiGainvsLoGain->DrawClone("Apq")->SetBit(kCanDelete); 470 fHiGainvsLoGain->Fit("p1","q"); 486 hist->Draw("prof"); 487 hist->Fit("p1","pepe","markus",hist->GetMean()-3.*hist->GetRMS(),hist->GetMean()+3.*hist->GetRMS()); 488 // fHiGainvsLoGain->DrawClone("Apq")->SetBit(kCanDelete); 489 // fHiGainvsLoGain->Fit("p1","q"); 471 490 gPad->Modified(); 472 491 gPad->Update(); -
trunk/MagicSoft/Mars/mhist/MHCalibrationPixel.h
r2658 r2661 85 85 86 86 Bool_t fUseLoGain; 87 88 Double_t fOffset; 89 Double_t fSlope; 87 90 88 91 virtual void DrawLegend(); … … 137 140 const TH1I *GetHChargevsN() { return fHChargevsNHiGain; } 138 141 const TH1I *GetHChargevsN() const { return fHChargevsNHiGain; } 142 143 Double_t GetOffset() { return fOffset; } 144 Double_t GetSlope() { return fSlope; } 139 145 140 146 Bool_t FitChargeHiGain(Option_t *option="RQ0");
Note:
See TracChangeset
for help on using the changeset viewer.