Ignore:
Timestamp:
08/12/04 21:28:37 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationCam.h

    r4336 r4602  
    120120
    121121  // Clone
    122   virtual TObject *Clone(const char *) const;
     122  virtual TObject *Clone(const char *name="") const;
    123123
    124124  // Draw
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindCam.cc

    r4553 r4602  
    6262// Initializes and sets owner of:
    6363// - fBlindPixelsArray
     64//
     65// Sets fFitFunc to kEPoisson4
    6466//
    6567MHCalibrationChargeBlindCam::MHCalibrationChargeBlindCam(const char *name, const char *title)
     
    7274  fBlindPixelsArray = new TObjArray;
    7375  fBlindPixelsArray->SetOwner();
     76
     77  fFitFunc = MHCalibrationChargeBlindPix::kEPoisson4;
     78
    7479}
    7580
     
    212217          TH1F *h = (*this)[i].GetHGausHist();
    213218          h->SetTitle( Form("%s%s", h->GetTitle()," Runs: "));
     219          (*this)[i].ChangeFitFunc(fFitFunc);
    214220          (*this)[i].SetupFill(pList);
    215221          (*this)[i].SetCalibrationChargeBlindPix(&(*fCam)[i]);
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindCam.h

    r4553 r4602  
    1212#include "MCamEvent.h"
    1313#endif
    14 
    1514#ifndef MARS_MBadPixelsPix
    1615#include "MBadPixelsPix.h"
     16#endif
     17#ifndef MARS_MHCalibrationChargeBlindPix
     18#include "MHCalibrationChargeBlindPix.h"
    1719#endif
    1820
     
    3133  TObjArray *fBlindPixelsArray;            //-> Array of calibration pixels, one per pixel
    3234
     35  MHCalibrationChargeBlindPix::FitFunc_t fFitFunc;
     36 
    3337public:
    3438
     
    5155        MHCalibrationChargeBlindPix &operator[] (UInt_t i);
    5256  const MHCalibrationChargeBlindPix &operator[] (UInt_t i)  const;
     57
     58  void   SetFitFunc(const MHCalibrationChargeBlindPix::FitFunc_t func)  { fFitFunc = func;  } 
    5359 
    5460  ClassDef(MHCalibrationChargeBlindCam, 1)      // Histogram class for Blind Pixel Calibration
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.cc

    r4399 r4602  
    7474#include <TCanvas.h>
    7575#include <TPaveText.h>
     76#include <TPaveStats.h>
    7677
    7778#include <TVector.h>
    7879#include <TF1.h>
    7980#include <TH1.h>
     81#include <TH2D.h>
    8082#include <TRandom.h>
    8183
     
    99101const Float_t  MHCalibrationChargeBlindPix::gkSignalInitializer  = -9999.;
    100102
    101 const Int_t    MHCalibrationChargeBlindPix::fgChargeNbins        = 512;
     103const Int_t    MHCalibrationChargeBlindPix::fgChargeNbins        = 128;
    102104const Axis_t   MHCalibrationChargeBlindPix::fgChargeFirst        = -0.5;
    103 const Axis_t   MHCalibrationChargeBlindPix::fgChargeLast         = 255.5;
    104 const Float_t  MHCalibrationChargeBlindPix::fgSinglePheCut       =  30.;
     105const Axis_t   MHCalibrationChargeBlindPix::fgChargeLast         = 511.5;
     106const Float_t  MHCalibrationChargeBlindPix::fgSinglePheCut       =  20.;
    105107const Float_t  MHCalibrationChargeBlindPix::fgNumSinglePheLimit  =  50.;
    106108// --------------------------------------------------------------------------
     
    150152    SetNumSinglePheLimit();
    151153    SetProbLimit(0.001);
    152     SetBinsAfterStripping(64);
     154    SetBinsAfterStripping(0);
    153155
    154156    fHGausHist.SetName("HCalibrationChargeBlindPix");
    155157    fHGausHist.SetTitle("Distribution of Summed FADC slices Blind Pixel"); 
    156     fHGausHist.SetXTitle("Sum FADC Slices");
     158    fHGausHist.SetXTitle("Signal Amplitude");
    157159    fHGausHist.SetYTitle("Nr. of events");
    158160
     
    222224 
    223225  //  fFitFunc = kEMichele;
    224   fFitFunc = kEPoisson4;
     226  fFitFunc = kEPoisson5;
    225227
    226228  fNumSinglePhes    = 0;
     
    257259    fHPedestalFADCSlices = NULL;
    258260  }
    259 
    260261
    261262  MHGausEvents::Clear();
     
    504505    fBlindPix->SetValid(IsPedestalFitOK());
    505506
    506   fBlindPix->SetLambda      (    fLambdaCheck          );
    507   fBlindPix->SetLambdaVar   (    fLambdaCheckErr*fLambdaCheckErr );
     507  fBlindPix->SetLambda      (    fLambda               );
     508  fBlindPix->SetLambdaVar   (    fLambdaErr*fLambdaErr );
    508509  fBlindPix->SetMu0         (    fMu0                  );
    509510  fBlindPix->SetMu0Err      (    fMu0Err               );
     
    516517  fBlindPix->SetProb        (    fProb                 );
    517518
    518   fBlindPix->SetLambdaCheck    ( fLambda               );
    519   fBlindPix->SetLambdaCheckErr ( fLambdaErr            );
     519  fBlindPix->SetLambdaCheck    ( fLambdaCheck          );
     520  fBlindPix->SetLambdaCheckErr ( fLambdaCheckErr       );
    520521
    521522  return kTRUE;
     
    630631  //
    631632  const Stat_t   entries      = fHGausHist.Integral("width");
    632   const Double_t lambda_guess = 0.05;
     633  const Double_t lambda_guess = 0.5;
    633634  const Double_t maximum_bin  = fHGausHist.GetBinCenter(fHGausHist.GetMaximumBin());
    634635  const Double_t norm         = entries/TMath::Sqrt(TMath::TwoPi());
     
    641642    case kEPoisson4:
    642643      fSinglePheFit = new TF1("SinglePheFit",&fPoissonKto4,rmin,rmax,6);
     644      rmin += 6.5;
    643645      break;
    644646    case kEPoisson5:
     
    652654      break;
    653655    case kEMichele:
    654       fSinglePheFit = new TF1("SinglePheFit",&fFitFuncMichele,rmin,rmax,10);
     656      fSinglePheFit = new TF1("SinglePheFit",&fFitFuncMichele,rmin,rmax,9);
    655657      break;
    656658    default:
     
    666668  }
    667669 
    668   const Double_t mu_0_guess = maximum_bin;
    669   const Double_t si_0_guess = 40.;
    670   const Double_t mu_1_guess = mu_0_guess + 4000.;
     670  const Double_t mu_0_guess = 13.5;
     671  const Double_t si_0_guess = 2.5;
     672  const Double_t mu_1_guess = 30.;
    671673  const Double_t si_1_guess = si_0_guess + si_0_guess;
    672674  // Michele
    673   const Double_t lambda_1cat_guess = 0.05;
     675  const Double_t lambda_1cat_guess = 1.00;
    674676  const Double_t lambda_1dyn_guess = lambda_1cat_guess/10.;
    675   const Double_t mu_1cat_guess = 1000.;
    676   const Double_t mu_1dyn_guess = 2500.;
    677   const Double_t si_1cat_guess = si_0_guess+ 500.;
    678   const Double_t si_1dyn_guess = si_0_guess+ 1000.;
    679   const Double_t offset_guess  = 0.5;
     677  const Double_t mu_1cat_guess = 50.;
     678  const Double_t mu_1dyn_guess = 17.;
     679  const Double_t si_1cat_guess = si_0_guess + si_0_guess;
     680  const Double_t si_1dyn_guess = si_0_guess + si_0_guess/2.;
    680681  // Polya
    681682  const Double_t excessPoisson_guess = 0.5;
     
    693694    case kEPoisson4:
    694695        fSinglePheFit->SetParNames(  "#lambda",   "#mu_{0}",    "#mu_{1}", "#sigma_{0}",  "#sigma_{1}","Area");
    695         //        fSinglePheFit->SetParameters(lambda_guess,fMeanPedestal,mu_1_guess,fSigmaPedestal,si_1_guess,norm);
    696         fSinglePheFit->SetParameters(0.05,10.,75.,20.,70.,norm);
    697 
    698         fSinglePheFit->SetParLimits(0,0.,0.5);
    699         //        fSinglePheFit->SetParLimits(1,
    700         //                                    fMeanPedestal-5.*fMeanPedestalErr,
    701         //                                    fMeanPedestal+5.*fMeanPedestalErr);
    702         fSinglePheFit->SetParLimits(1,0.,30.);
    703         //      fSinglePheFit->SetParLimits(2,rmin,rmax);
    704         fSinglePheFit->SetParLimits(2,50.,150.);
    705         //        fSinglePheFit->SetParLimits(3,
    706         //                                    fSigmaPedestal-5.*fSigmaPedestalErr,
    707         //                                    fSigmaPedestal+5.*fSigmaPedestalErr);
    708         fSinglePheFit->SetParLimits(3,0.,50.);
    709         //      fSinglePheFit->SetParLimits(4,0.,(rmax-rmin));
    710         fSinglePheFit->SetParLimits(4,0.,100.);
    711         fSinglePheFit->SetParLimits(5,norm-(0.5*norm),norm+(0.5*norm));
     696        fSinglePheFit->SetParameters(lambda_guess,mu_0_guess,mu_1_guess,si_0_guess,si_1_guess,norm);
     697        fSinglePheFit->SetParLimits(0,0.,2.);
     698        fSinglePheFit->SetParLimits(1,10.,17.);
     699        fSinglePheFit->SetParLimits(2,17.,50.);
     700        fSinglePheFit->SetParLimits(3,1.,5.);
     701        fSinglePheFit->SetParLimits(4,5.,30.);
     702        fSinglePheFit->SetParLimits(5,norm-(0.5*norm),norm+(0.7*norm));
    712703        break;
    713704    case kEPoisson5:
    714705    case kEPoisson6:
    715       fSinglePheFit->SetParameters(lambda_guess,mu_0_guess,mu_1_guess,si_0_guess,si_1_guess,norm);
    716706      fSinglePheFit->SetParNames("#lambda","#mu_{0}","#mu_{1}","#sigma_{0}","#sigma_{1}","Area");
    717       fSinglePheFit->SetParLimits(0,0.,1.);
    718       fSinglePheFit->SetParLimits(1,rmin,(rmax-rmin)/1.5);
    719       fSinglePheFit->SetParLimits(2,(rmax-rmin)/2.,(rmax-0.05*(rmax-rmin)));
    720       fSinglePheFit->SetParLimits(3,1.0,(rmax-rmin)/2.0);
    721       fSinglePheFit->SetParLimits(4,1.0,(rmax-rmin)/2.5);
    722       fSinglePheFit->SetParLimits(5,norm-0.1,norm+0.1);
     707      fSinglePheFit->SetParameters(lambda_guess,mu_0_guess,800.,si_0_guess,500.,norm);
     708      fSinglePheFit->SetParLimits(0,0.,2.);
     709      fSinglePheFit->SetParLimits(1,0.,100.);
     710      fSinglePheFit->SetParLimits(2,200.,1500.);
     711      fSinglePheFit->SetParLimits(3,0.,250.);
     712      fSinglePheFit->SetParLimits(4,100.,1000.);
     713      fSinglePheFit->SetParLimits(5,norm/2.,norm+(0.7*norm));
    723714      break;
    724715
     
    749740      break;
    750741    case kEMichele:
    751       fSinglePheFit->SetParameters(lambda_1cat_guess, lambda_1dyn_guess,
    752                                    20., mu_1cat_guess,mu_1dyn_guess,
    753                                    si_0_guess, si_1cat_guess,si_1dyn_guess,
    754                                    norm, offset_guess);
    755742      fSinglePheFit->SetParNames("#lambda_{cat}","#lambda_{dyn}",
    756743                                 "#mu_{0}","#mu_{1cat}","#mu_{1dyn}",
    757744                                 "#sigma_{0}","#sigma_{1cat}","#sigma_{1dyn}",
    758                                  "Area","offset");
    759       fSinglePheFit->SetParLimits(0,0.,0.5);
    760       fSinglePheFit->SetParLimits(1,0.,0.05);
    761       fSinglePheFit->SetParLimits(2,0.,fSinglePheCut);   
    762       fSinglePheFit->SetParLimits(3,1500.,5500.);   
    763       fSinglePheFit->SetParLimits(4,fSinglePheCut,1500.);   
    764       fSinglePheFit->SetParLimits(5,0.1,fSinglePheCut/1.25);   
    765       fSinglePheFit->SetParLimits(6,fSinglePheCut/1.25,1000.);   
    766       fSinglePheFit->SetParLimits(7,1000.,1500.);   
    767       fSinglePheFit->SetParLimits(8,norm/1.1,norm*1.1);
    768       fSinglePheFit->SetParLimits(9,0.,1.);
     745                                 "Area");
     746      fSinglePheFit->SetParameters(lambda_1cat_guess, lambda_1dyn_guess,
     747                                   mu_0_guess, mu_1cat_guess,mu_1dyn_guess,
     748                                   si_0_guess, si_1cat_guess,si_1dyn_guess,
     749                                   norm);
     750      fSinglePheFit->SetParLimits(0,0.01,2.0);
     751      fSinglePheFit->SetParLimits(1,0.,0.5);
     752      fSinglePheFit->SetParLimits(2,10.,16.);   
     753      fSinglePheFit->SetParLimits(3,25.,50.);   
     754      fSinglePheFit->SetParLimits(4,16.,18.5);   
     755      fSinglePheFit->SetParLimits(5,1.,5.);   
     756      fSinglePheFit->SetParLimits(6,10.,50.);   
     757      fSinglePheFit->SetParLimits(7,5.,10.);   
     758      fSinglePheFit->SetParLimits(8,norm/2.,norm*2.5);
    769759      break;
    770760
     
    944934// Draw a legend with the fit results
    945935//
    946 void MHCalibrationChargeBlindPix::DrawLegend()
    947 {
     936void MHCalibrationChargeBlindPix::DrawLegend(Option_t *opt)
     937{
     938
     939  TString option(opt);
    948940
    949941  if (!fFitLegend)
     
    967959     
    968960  const TString line6 =
    969       Form("Mean #lambda (check) = %2.2f #pm %2.2f",fLambdaCheck,fLambdaCheckErr);
     961      Form("Mean #lambda_{check} = %2.2f #pm %2.2f",fLambdaCheck,fLambdaCheckErr);
    970962  TText *t2 = fFitLegend->AddText(line6.Data());
    971963  t2->SetBit(kCanDelete);
    972  
    973   const TString line2 =
    974       Form("Pedestal: #mu_{0} = %2.2f #pm %2.2f",fMu0,fMu0Err);
    975   TText *t3 = fFitLegend->AddText(line2.Data());
    976   t3->SetBit(kCanDelete);
    977  
    978   const TString line3 =
    979       Form("Width Pedestal: #sigma_{0} = %2.2f #pm %2.2f",fSigma0,fSigma0Err);
    980   TText *t4 = fFitLegend->AddText(line3.Data());
    981   t4->SetBit(kCanDelete);
    982  
    983   const TString line4 =
    984       Form("1^{st} Phe-peak: #mu_{1} = %2.2f #pm %2.2f",fMu1,fMu1Err);
    985   TText *t5 = fFitLegend->AddText(line4.Data());
    986   t5->SetBit(kCanDelete);
    987  
    988   const TString line5 =
    989       Form("Width 1^{st} Phe-peak: #sigma_{1} = %2.2f #pm %2.2f",fSigma1,fSigma1Err);
    990   TText *t6 = fFitLegend->AddText(line5.Data());
    991   t6->SetBit(kCanDelete);
     964
     965  if (option.Contains("datacheck"))
     966    {
     967      if (fLambda + 3.*fLambdaErr < fLambdaCheck - 3.*fLambdaCheckErr
     968          ||
     969          fLambda - 3.*fLambdaErr > fLambdaCheck + 3.*fLambdaCheckErr )
     970        {
     971          TText *t = fFitLegend->AddText("#lambda and #lambda_{check} more than 3#sigma apart!");
     972          t->SetBit(kCanDelete);
     973        }
     974    }
     975  else
     976    {
     977
     978      const TString line2 =
     979        Form("Pedestal: #mu_{0} = %2.2f #pm %2.2f",fMu0,fMu0Err);
     980      TText *t3 = fFitLegend->AddText(line2.Data());
     981      t3->SetBit(kCanDelete);
     982     
     983      const TString line3 =
     984        Form("Width Pedestal: #sigma_{0} = %2.2f #pm %2.2f",fSigma0,fSigma0Err);
     985      TText *t4 = fFitLegend->AddText(line3.Data());
     986      t4->SetBit(kCanDelete);
     987     
     988      const TString line4 =
     989        Form("1^{st} Phe-peak: #mu_{1} = %2.2f #pm %2.2f",fMu1,fMu1Err);
     990      TText *t5 = fFitLegend->AddText(line4.Data());
     991      t5->SetBit(kCanDelete);
     992     
     993      const TString line5 =
     994        Form("Width 1^{st} Phe-peak: #sigma_{1} = %2.2f #pm %2.2f",fSigma1,fSigma1Err);
     995      TText *t6 = fFitLegend->AddText(line5.Data());
     996      t6->SetBit(kCanDelete);
     997    }
    992998 
    993999  const TString line7 =
    994       Form("#chi^{2} / N_{dof}: %4.2f / %3i",fChisquare,fNDF);
     1000    Form("#chi^{2} / N_{dof}: %4.2f / %3i",fChisquare,fNDF);
    9951001  TText *t7 = fFitLegend->AddText(line7.Data());
    9961002  t7->SetBit(kCanDelete);
    9971003 
    9981004  const TString line8 =
    999       Form("Probability: %4.2f ",fProb);
     1005      Form("Probability: %6.4f ",fProb);
    10001006  TText *t8 = fFitLegend->AddText(line8.Data());
    10011007  t8->SetBit(kCanDelete);
     
    10031009  if (IsSinglePheFitOK())
    10041010  {
    1005       TText *t = fFitLegend->AddText(0.,0.,"Result of the Fit: OK");
     1011      TText *t = fFitLegend->AddText("Result of the Fit: OK");
    10061012      t->SetBit(kCanDelete);
    10071013  }
     
    10541060    {
    10551061      pad = oldpad;
    1056       pad->Divide(2,1);
     1062      pad->Divide(1,2);
    10571063      pad->cd(1);
     1064      fHGausHist.SetStats(0);
    10581065    }
    10591066  else
     
    10641071  }
    10651072
    1066   if (!IsEmpty())
     1073  if (!IsEmpty() && !IsOnlyOverflow())
    10671074    gPad->SetLogy();
    10681075
     
    10701077
    10711078  fHGausHist.Draw();
    1072   if (fFGausFit)
     1079  if (fFGausFit )
    10731080  {
    10741081      fFGausFit->SetLineColor(kBlue);
    10751082      fFGausFit->Draw("same");
    1076       TLine *line = new TLine(fSinglePheCut, 0., fSinglePheCut, 10.);
    1077       line->SetBit(kCanDelete);
    1078       line->SetLineColor(kBlue);
    1079       line->SetLineWidth(3);
    1080       line->DrawLine(fSinglePheCut, 0., fSinglePheCut, 2.);
    1081   }
     1083      if (!option.Contains("datacheck"))
     1084        {
     1085          TLine *line = new TLine(fSinglePheCut, 0., fSinglePheCut, 10.);
     1086          line->SetBit(kCanDelete);
     1087          line->SetLineColor(kBlue);
     1088          line->SetLineWidth(3);
     1089          line->DrawLine(fSinglePheCut, 0., fSinglePheCut, 2.);
     1090        }
     1091  }
     1092 
    10821093  if (fSinglePheFit)
    10831094  {   
    1084       fSinglePheFit->SetLineColor(IsSinglePheFitOK() ? kGreen : kRed);         
    1085       fSinglePheFit->Draw("same");
     1095    fSinglePheFit->SetFillStyle(0);
     1096    fSinglePheFit->SetLineWidth(3);
     1097    fSinglePheFit->SetLineColor(IsSinglePheFitOK() ? kGreen : kRed);         
     1098    fSinglePheFit->Draw("same");
    10861099  }
    10871100
    10881101  pad->cd(2);
    1089   DrawLegend();
     1102  DrawLegend(option.Data());
    10901103
    10911104  if (option.Contains("datacheck"))
     
    10981111      if (fHSinglePheFADCSlices)
    10991112        delete fHSinglePheFADCSlices;
     1113
    11001114      fHSinglePheFADCSlices = new TH1F(fASinglePheFADCSlices);
    11011115      fHSinglePheFADCSlices->SetName("SinglePheFADCSlices");
    1102       fHSinglePheFADCSlices->SetTitle(Form("%s%f","Assumed Single Phe FADC Slices, Sum > ",fSinglePheCut));
     1116      fHSinglePheFADCSlices->SetTitle(Form("%s%4.1f","Assumed Single Phe FADC Slices, Sum > ",fSinglePheCut));
    11031117      fHSinglePheFADCSlices->SetXTitle("FADC slice number");
    11041118      fHSinglePheFADCSlices->SetYTitle("FADC counts");
    1105       fHSinglePheFADCSlices->Draw();
     1119      const Int_t nbins = fHSinglePheFADCSlices->GetNbinsX();
     1120      TH2D *nulls = new TH2D("Nulls",fHSinglePheFADCSlices->GetTitle(),nbins,0.,
     1121                            fHSinglePheFADCSlices->GetXaxis()->GetBinCenter(nbins),
     1122                            100,0.,50.);
     1123      nulls->SetDirectory(NULL);
     1124      nulls->SetBit(kCanDelete);
     1125      nulls->GetXaxis()->SetTitle(fHSinglePheFADCSlices->GetXaxis()->GetTitle());
     1126      nulls->GetYaxis()->SetTitle(fHSinglePheFADCSlices->GetYaxis()->GetTitle()); 
     1127      nulls->GetXaxis()->CenterTitle();
     1128      nulls->GetYaxis()->CenterTitle();
     1129      nulls->SetStats(0);
     1130      nulls->Draw();
     1131      fHSinglePheFADCSlices->Draw("same");
    11061132    }
    11071133 
     
    11151141      fHPedestalFADCSlices = new TH1F(fAPedestalFADCSlices);
    11161142      fHPedestalFADCSlices->SetName("PedestalFADCSlices");
    1117       fHPedestalFADCSlices->SetTitle(Form("%s%f","Pedestal FADC Slices, Sum < ",fSinglePheCut));
     1143      fHPedestalFADCSlices->SetTitle(Form("%s%4.1f","Pedestal FADC Slices, Sum < ",fSinglePheCut));
    11181144      fHPedestalFADCSlices->SetXTitle("FADC slice number");
    11191145      fHPedestalFADCSlices->SetYTitle("FADC counts");
    1120       fHPedestalFADCSlices->Draw();
     1146      const Int_t nbins = fHPedestalFADCSlices->GetNbinsX();
     1147      TH2D *nullp = new TH2D("Nullp",fHPedestalFADCSlices->GetTitle(),nbins,0.,
     1148                            fHPedestalFADCSlices->GetXaxis()->GetBinCenter(nbins),
     1149                            100,0.,50.);
     1150      nullp->SetDirectory(NULL);
     1151      nullp->SetBit(kCanDelete);
     1152      nullp->GetXaxis()->SetTitle(fHPedestalFADCSlices->GetXaxis()->GetTitle());
     1153      nullp->GetYaxis()->SetTitle(fHPedestalFADCSlices->GetYaxis()->GetTitle()); 
     1154      nullp->GetXaxis()->CenterTitle();
     1155      nullp->GetYaxis()->CenterTitle();
     1156      nullp->SetStats(0);
     1157      nullp->Draw();
     1158      fHPedestalFADCSlices->Draw("same");
    11211159    }
    11221160 
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.h

    r4399 r4602  
    144144
    145145private:
    146   void DrawLegend();
     146  void DrawLegend(Option_t *opt="");
    147147 
    148148  // Fits
     
    177177      Double_t sigma1cat  = par[6];
    178178      Double_t sigma1dyn  = par[7];
    179       Double_t offset     = par[9];
    180179     
    181180      Double_t sumcat = 0.;
     
    222221      arg = (x[0] - mu0)/sigma0;
    223222      sumcat = TMath::Exp(-0.5*arg*arg)/sigma0;
    224       sumdyn =sumcat;
     223      sumdyn = sumcat;
    225224
    226225      // k=1cat:
     
    249248      sumdyn = TMath::Exp(-1.*lambda1dyn)*sumdyn;
    250249     
    251       return par[8]*(sumcat+sumdyn)/2. + offset;
     250      return par[8]*(sumcat+sumdyn)/2.;
    252251
    253252    }
     
    518517    }
    519518 
    520 
    521  
    522519  ClassDef(MHCalibrationChargeBlindPix, 1)  // Histogram class for Charge Blind Pixel Calibration
    523520};
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc

    r4537 r4602  
    606606{
    607607
     608  *fLog << endl;
     609
    608610  if (fHiGainOverFlow)
    609611    *fLog << warn << GetDescriptor()
    610           << ": WARNING: Histogram Overflow has occurred " << fHiGainOverFlow << " in the High-Gain! " << endl;
     612          << ": Histogram Overflow has occurred " << fHiGainOverFlow << " in the High-Gain! " << endl;
    611613  if (fLoGainOverFlow)
    612614    *fLog << warn << GetDescriptor()
    613           << ": WARNING: Histogram Overflow has occurred " << fLoGainOverFlow << " in the Low-Gain! " << endl;
     615          << ": Histogram Overflow has occurred " << fLoGainOverFlow << " in the Low-Gain! " << endl;
    614616
    615617  for (Int_t i=0; i<fHiGainArray->GetSize(); i++)
     
    902904// Creates new MHCalibrationCam
    903905//
    904 TObject *MHCalibrationChargeCam::Clone(const char *) const
     906TObject *MHCalibrationChargeCam::Clone(const char *name) const
    905907{
    906908
     
    958960 
    959961  gPad->SetTicks();
    960   if (!pix.IsEmpty())
     962  if (!pix.IsEmpty() && !pix.IsOnlyOverflow())
    961963    gPad->SetLogy();
    962964
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.h

    r4389 r4602  
    5555  ~MHCalibrationChargeCam() {}
    5656 
    57   TObject *Clone(const char *) const;
     57  TObject *Clone(const char *name="") const;
    5858
    5959  void SetTimeLowerLimit    ( const Float_t f=fgTimeLowerLimit         ) { fTimeLowerLimit    = f;   }
Note: See TracChangeset for help on using the changeset viewer.