Ignore:
Timestamp:
12/01/03 18:58:01 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhist
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHCalibrationPixel.cc

    r2544 r2581  
    5555
    5656using namespace std;
     57
    5758// --------------------------------------------------------------------------
    5859//
     
    6061//
    6162MHCalibrationPixel::MHCalibrationPixel(Int_t pix, const char *name, const char *title)
    62     : fFitOK(kFALSE), fPixId(pix), fTGausFit(NULL), fQGausFit(NULL), fFitLegend(NULL)
    63 {
     63      : fPixId(pix),
     64        fQGausFit(NULL),
     65        fTGausFit(NULL),
     66        fFitLegend(NULL),
     67        fLowerFitRange(0.),
     68        fFitOK(kFALSE)
     69{
    6470
    6571    fName  = name  ? name  : "MHCalibrationPixel";
     
    328334}
    329335
    330 Bool_t MHCalibrationPixel::FitQ(Axis_t rmin, Axis_t rmax, Option_t *option)
     336Bool_t MHCalibrationPixel::FitQ(Option_t *option)
    331337{
    332338
     
    337343  // Get the fitting ranges
    338344  //
    339   rmin = (rmin != 0.) ? rmin : fQfirst;
    340   rmax = (rmax != 0.) ? rmax : fQlast;
     345  Axis_t rmin = (fLowerFitRange != 0.) ? fLowerFitRange : fQfirst;
    341346
    342347  //
     
    349354  const Double_t si_guess = mu_guess/500.;
    350355
    351   fQGausFit = new TF1("QGausFit","gaus",rmin,rmax);
     356  fQGausFit = new TF1("QGausFit","gaus",rmin,fQlast);
    352357
    353358  if (!fQGausFit)
     
    360365  fQGausFit->SetParNames("Area","#mu","#sigma");
    361366  fQGausFit->SetParLimits(0,0.,entries);
    362   fQGausFit->SetParLimits(1,rmin,rmax);
    363   fQGausFit->SetParLimits(2,0.,rmax-rmin);
     367  fQGausFit->SetParLimits(1,rmin,fQlast);
     368  fQGausFit->SetParLimits(2,0.,fQlast-rmin);
    364369
    365370  fHQ->Fit("QGausFit",option);
  • trunk/MagicSoft/Mars/mhist/MHCalibrationPixel.h

    r2538 r2581  
    4141  TPaveText *fFitLegend; 
    4242 
     43  Axis_t  fLowerFitRange;
    4344  Axis_t  fQfirst;
    4445  Axis_t  fQlast;
     
    104105  const TH1I *GetHQvsN() const { return fHQvsN; }
    105106 
    106   Bool_t FitQ(Axis_t rmin=0, Axis_t rmax=0, Option_t *option="RQ0+"); 
     107  Bool_t FitQ(Option_t *option="RQ0+"); 
    107108  Bool_t FitT(Axis_t rmin=0, Axis_t rmax=0, Option_t *option="RQ0+");   
    108109
     
    110111  virtual void CutAllEdges();
    111112  virtual void Reset();
     113
     114  void SetLowerFitRange(Axis_t min)  { fLowerFitRange = min; }
    112115
    113116  void PrintQFitResult();
Note: See TracChangeset for help on using the changeset viewer.