Changeset 3355


Ignore:
Timestamp:
02/28/04 20:20:39 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc

    r3352 r3355  
    140140    SetNumHiGainSaturationLimit();
    141141    SetNumLoGainSaturationLimit();
     142
     143    fNumInnerPixels = 0;
     144    fNumOuterPixels = 0;
    142145}
    143146
     
    367370  Int_t   sumhioutersat = 0;
    368371  Int_t   sumlooutersat = 0;
    369   Int_t   numinner = 0;
    370   Int_t   numouter = 0;
    371372
    372373  for (int i=0; i<n; i++)
     
    393394          sumhiinnersat += sathi;
    394395          sumloinnersat += satlo;
    395           numinner++;
     396          fNumInnerPixels++;
    396397      }
    397398      else
     
    401402          sumhioutersat += sathi;
    402403          sumlooutersat += satlo;
    403           numouter++;
     404          fNumOuterPixels++;
    404405      }
    405406
    406407    }
    407408
    408   fAverageHiGainInnerPix->FillHistAndArray(sumhiinnertot/numinner);
    409   fAverageLoGainInnerPix->FillHistAndArray(sumloinnertot/numinner);
    410   fAverageHiGainOuterPix->FillHistAndArray(sumhioutertot/numouter);
    411   fAverageLoGainOuterPix->FillHistAndArray(sumlooutertot/numouter);
    412 
    413   fAverageHiGainInnerPix->SetSaturated(sumhiinnersat/numinner);
    414   fAverageLoGainInnerPix->SetSaturated(sumloinnersat/numinner);
    415   fAverageHiGainOuterPix->SetSaturated(sumhioutersat/numouter);
    416   fAverageLoGainOuterPix->SetSaturated(sumlooutersat/numouter);
     409  fAverageHiGainInnerPix->FillHistAndArray(sumhiinnertot/fNumInnerPixels);
     410  fAverageLoGainInnerPix->FillHistAndArray(sumloinnertot/fNumInnerPixels);
     411  fAverageHiGainOuterPix->FillHistAndArray(sumhioutertot/fNumOuterPixels);
     412  fAverageLoGainOuterPix->FillHistAndArray(sumlooutertot/fNumOuterPixels);
     413
     414  fAverageHiGainInnerPix->SetSaturated(sumhiinnersat/fNumInnerPixels);
     415  fAverageLoGainInnerPix->SetSaturated(sumloinnersat/fNumInnerPixels);
     416  fAverageHiGainOuterPix->SetSaturated(sumhioutersat/fNumOuterPixels);
     417  fAverageLoGainOuterPix->SetSaturated(sumlooutersat/fNumOuterPixels);
    417418
    418419  //
     
    420421  //
    421422  sumhiinnertot = sumloinnertot = sumhioutertot = sumlooutertot = 0.;
    422   numinner = numouter = 0;
     423  fNumInnerPixels = fNumOuterPixels = 0;
    423424  MRawEvtPixelIter pixel(fRawEvt);
    424425  while (pixel.Next())
     
    445446    }
    446447
    447   fAverageHiGainInnerPix-> FillAbsTime(sumhiinnertot/numinner);
    448   fAverageLoGainInnerPix-> FillAbsTime(sumloinnertot/numinner);
    449   fAverageHiGainOuterPix-> FillAbsTime(sumhioutertot/numouter);
    450   fAverageLoGainOuterPix-> FillAbsTime(sumlooutertot/numouter);
     448  fAverageHiGainInnerPix-> FillAbsTime(sumhiinnertot/fNumInnerPixels);
     449  fAverageLoGainInnerPix-> FillAbsTime(sumloinnertot/fNumInnerPixels);
     450  fAverageHiGainOuterPix-> FillAbsTime(sumhioutertot/fNumOuterPixels);
     451  fAverageLoGainOuterPix-> FillAbsTime(sumlooutertot/fNumOuterPixels);
    451452
    452453  return kTRUE;
     
    488489    FinalizeHiGainHists(*fAverageHiGainOuterPix,*fCam->GetAverageOuterPix());
    489490    FinalizeLoGainHists(*fAverageLoGainOuterPix,*fCam->GetAverageOuterPix());
     491
     492    fCam->GetAverageInnerPix()->SetSigmaCharge   (fCam->GetAverageInnerPix()->GetSigmaCharge()   *TMath::Sqrt((Float_t)fNumInnerPixels));
     493    fCam->GetAverageOuterPix()->SetSigmaCharge   (fCam->GetAverageOuterPix()->GetSigmaCharge()   *TMath::Sqrt((Float_t)fNumOuterPixels));
     494    fCam->GetAverageInnerPix()->SetSigmaChargeErr(fCam->GetAverageInnerPix()->GetSigmaChargeErr()*TMath::Sqrt((Float_t)fNumInnerPixels));
     495    fCam->GetAverageOuterPix()->SetSigmaChargeErr(fCam->GetAverageOuterPix()->GetSigmaChargeErr()*TMath::Sqrt((Float_t)fNumOuterPixels));
    490496
    491497    return kTRUE;
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeHiGainPix.cc

    r3346 r3355  
    8888  Int_t win = 1;
    8989
    90   TVirtualPad *pad = gPad ? gPad : MH::MakeDefCanvas(this,600, 600);
     90  TVirtualPad *oldpad = gPad ? gPad : MH::MakeDefCanvas(this,600, 600);
     91  TVirtualPad *pad    = NULL;
     92
     93  oldpad->SetBorderMode(0); 
    9194
    9295  pad->SetTicks();
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeHiGainPix.h

    r3354 r3355  
    3434  void SetAbsTimeLast (const Axis_t last =fgAbsTimeLast)         { fAbsTimeLast  = last;    }
    3535
    36   // Draw
    37   void Draw(Option_t *opt="");
    38 
    3936  ClassDef(MHCalibrationChargeHiGainPix, 1)  // Histogram class for a Calibration Pixel with extracted Hi Gain
    4037};
Note: See TracChangeset for help on using the changeset viewer.