Changeset 6926


Ignore:
Timestamp:
04/11/05 18:10:00 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r6925 r6926  
    3333   * mjobs/MJOptimize.[h,cc]:
    3434     - implemented option to divide sample into test/train
     35
     36   * mcalib/MCalibCalcFromPast.cc, mcalib/MCalibColorSteer.cc,
     37     mcalib/MCalibrationChargeCalc.cc, mhcalib/MHCalibrationCam.cc:
     38     - small updates to log-output
     39
     40   * mhflux/MAlphaFitter.cc:
     41     - output scale-factor
     42
     43   * mhist/MHCamera.cc:
     44     - as a workaround for a severe problem in gStyle->SetPalette
     45       when using the deep blue sea I have switched off this
     46       Platte for the moment
    3547
    3648
  • trunk/MagicSoft/Mars/NEWS

    r6922 r6926  
    5959     you'll get the correct units (arcmin) but a different result
    6060     than with old versions (wrong units))
     61
     62   - As a workaround made the pretty palette the default. The
     63     Depp Blue Sea has a bug which slows down long calibration runs a lot.
    6164
    6265
  • trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc

    r6254 r6926  
    218218// - Sets the latest MCalibrationChargeCam as update class into MCalibrateData
    219219// - Initialize new MCalibration*Cams into the intensity cams.
    220 // 
     220//
    221221Int_t MCalibCalcFromPast::Process()
    222222{
     
    229229  // Finalize Possible calibration histogram classes...
    230230  //
    231   *fLog << inf << GetDescriptor() << " : Finalize calibration histograms..." << endl;
    232   if (Finalize("MHCalibrationChargeCam"))      *fLog << "MHCalibrationChargeCam ready" << flush;
    233   if (Finalize("MHCalibrationChargeBlindCam")) *fLog << "MHCalibrationChargeBlindCam ready" << flush;
    234   if (Finalize("MHCalibrationRelTimeCam"))     *fLog << "MHCalibrationRelTimeCam ready" << flush; 
     231  *fLog << inf << GetDescriptor() << ": Finalize calibration histograms: " << flush;
     232
     233  if (Finalize("MHCalibrationChargeCam"))      *fLog << "MHCalibrationChargeCam..." << flush;
     234  if (Finalize("MHCalibrationChargeBlindCam")) *fLog << "MHCalibrationChargeBlindCam..." << flush;
     235  if (Finalize("MHCalibrationRelTimeCam"))     *fLog << "MHCalibrationRelTimeCam..." << flush;
    235236
    236237  //
     
    238239  //
    239240  *fLog << endl;
    240   *fLog << inf << GetDescriptor() << " : Finalize calibration calculations..." << endl;
     241  *fLog << inf << "Finalize calibration calculations..." << endl;
    241242  if (fChargeCalc)
    242243    fChargeCalc->Finalize();
     
    247248
    248249  ReInitialize();
    249 
    250250  return kTRUE;
    251251}
     
    281281Bool_t MCalibCalcFromPast::ReInitialize()
    282282{
     283  fNumCam++;
     284
     285  *fLog << inf << "MCalibCalcFromPast::ReInitialize #" << fNumCam << " ";
     286
     287  if (fIntensBad)
     288    {
     289      fIntensBad->AddToList(Form("MBadPixelsCam%04d",fNumCam),*fGeom);
     290      *fLog << "MBadPixelsCam...";
     291    }
     292
     293  if (fIntensCharge)
     294    {
     295      fIntensCharge->AddToList(Form("MCalibrationChargeCam%04d",fNumCam),*fGeom);
     296      *fLog << "MCalibrationChargeCam...";
     297    }
     298  if (fIntensQE)
     299    {
     300      fIntensQE->AddToList(Form("MCalibrationQECam%04d",fNumCam),*fGeom);
     301      *fLog << "MCalibrationQECam...";
     302    }
     303  if (fIntensBlind)
     304    {
     305      fIntensBlind->AddToList(Form("MCalibrationBlindCam%04d",fNumCam),*fGeom);
     306      *fLog << "MCalibrationBlindCam...";
     307    }
    283308
    284309  *fLog << endl;
    285  
    286   fNumCam++;
    287 
    288   if (fIntensBad)
    289     {
    290       fIntensBad->AddToList(Form("MBadPixelsCam%04d",fNumCam),*fGeom);
    291       *fLog << inf << "New MBadPixelsCam Nr. " << fNumCam << endl;
    292     }
    293 
    294   if (fIntensCharge)
    295     {
    296       fIntensCharge->AddToList(Form("MCalibrationChargeCam%04d",fNumCam),*fGeom);
    297       *fLog << inf << "New MCalibrationChargeCam Nr.  " << fNumCam << endl;
    298     }
    299   if (fIntensQE)
    300     {
    301       fIntensQE->AddToList(Form("MCalibrationQECam%04d",fNumCam),*fGeom);
    302       *fLog << inf << "New MCalibrationQECam Nr.  " << fNumCam << endl;
    303     }
    304   if (fIntensBlind)
    305     {
    306       fIntensBlind->AddToList(Form("MCalibrationBlindCam%04d",fNumCam),*fGeom);
    307       *fLog << inf << "New MCalibrationBlindCam Nr. " << fNumCam << endl;
    308     }
    309310
    310311  return kTRUE;
     
    314315Int_t MCalibCalcFromPast::PostProcess()
    315316{
    316   *fLog << inf << GetDescriptor()
    317         << ": Number of Calibration Cams: " << fNumCam << endl;
     317  *fLog << "Number of Calibration Cams: " << fNumCam << endl;
    318318  return kTRUE;
    319319 
  • trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.cc

    r6013 r6926  
    262262  //
    263263  *fLog << inf << GetDescriptor() << " : Finalize calibration histograms..." << flush;
    264   if (Finalize("MHCalibrationChargeCam"))      *fLog << "MHCalibrationChargeCam";
    265   if (Finalize("MHCalibrationChargeBlindCam")) *fLog << "MHCalibrationChargeBlindCam";
    266   if (Finalize("MHCalibrationRelTimeCam"))     *fLog << "MHCalibrationRelTimeCam"; 
    267   if (Finalize("MHCalibrationTestCam"))        *fLog << "MHCalibrationChargeCam"; 
    268   if (Finalize("MHCalibrationTestTimeCam"))    *fLog << "MHCalibrationChargeCam"; 
     264  if (Finalize("MHCalibrationChargeCam"))      *fLog << "MHCalibrationChargeCam...";
     265  if (Finalize("MHCalibrationChargeBlindCam")) *fLog << "MHCalibrationChargeBlindCam...";
     266  if (Finalize("MHCalibrationRelTimeCam"))     *fLog << "MHCalibrationRelTimeCam...";
     267  if (Finalize("MHCalibrationTestCam"))        *fLog << "MHCalibrationChargeCam...";
     268  if (Finalize("MHCalibrationTestTimeCam"))    *fLog << "MHCalibrationChargeCam...";
    269269
    270270  //
     
    294294
    295295  MHCalibrationCam *hist = (MHCalibrationCam*)fParList->FindObject(name);
    296   if (hist)
    297     {
    298       hist->Finalize();
    299       hist->ResetHists();
    300       hist->SetColor( fCalibPattern->GetPulserColor());
    301       return kTRUE;
    302     }
    303 
    304   return kFALSE;
    305  
     296  if (!hist)
     297      return kFALSE;
     298
     299  hist->Finalize();
     300  hist->ResetHists();
     301  hist->SetColor( fCalibPattern->GetPulserColor());
     302  return kTRUE;
    306303}
    307304
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r6855 r6926  
    448448  fIntensCam = (MCalibrationIntensityChargeCam*)pList->FindObject(AddSerialNumber("MCalibrationIntensityChargeCam"));
    449449  if (fIntensCam)
    450     *fLog << inf << "Found MCalibrationIntensityChargeCam ... " << endl;
     450    *fLog << inf << "Found MCalibrationIntensityChargeCam... " << flush;
    451451  else
    452452    {
     
    455455        {
    456456          *fLog << err << "Cannot find MCalibrationChargeCam ... abort." << endl;
    457           *fLog << err << "Maybe you forget to call an MFillH for the MHCalibrationChargeCam before..." << endl;
     457          *fLog << "Maybe you forget to call an MFillH for the MHCalibrationChargeCam before..." << endl;
    458458          return kFALSE;
    459459        }
     
    464464    {
    465465      *fLog << err << "Cannot find MHCalibrationChargeCam ... abort." << endl;
    466       *fLog << err << "Maybe you forget to call an MFillH for the MHCalibrationChargeCam before..." << endl;
     466      *fLog << "Maybe you forget to call an MFillH for the MHCalibrationChargeCam before..." << endl;
    467467      return kFALSE;
    468468    }
     
    470470  fIntensQE = (MCalibrationIntensityQECam*)pList->FindObject(AddSerialNumber("MCalibrationIntensityQECam"));
    471471  if (fIntensQE)
    472     *fLog << inf << "Found MCalibrationIntensityQECam ... " << endl;
     472    *fLog << inf << "Found MCalibrationIntensityQECam... " << flush;
    473473  else
    474474    {
     
    477477        {
    478478          *fLog << err << "Cannot find MCalibrationQECam ... abort." << endl;
    479           *fLog << err << "Maybe you forget to call an MFillH for the MHCalibrationQECam before..." << endl;
     479          *fLog << "Maybe you forget to call an MFillH for the MHCalibrationQECam before..." << endl;
    480480          return kFALSE;
    481481        }
     
    484484  fIntensBlind = (MCalibrationIntensityBlindCam*)pList->FindObject(AddSerialNumber("MCalibrationIntensityBlindCam"));
    485485  if (fIntensBlind)
    486     *fLog << inf << "Found MCalibrationIntensityBlindCam ... " << endl;
     486    *fLog << inf << "Found MCalibrationIntensityBlindCam... " << flush;
    487487  else
    488488    {
    489489      fBlindCam = (MCalibrationBlindCam*)pList->FindObject(AddSerialNumber("MCalibrationBlindCam"));
    490490      if (!fBlindCam)
    491         *fLog << warn << GetDescriptor()
    492               << ": No MCalibrationBlindCam found... no Blind Pixel method! " << endl;
     491        *fLog << "No MCalibrationBlindCam found... no Blind Pixel method!" << endl;
    493492    }
    494493 
    495494  fHBlindCam = (MHCalibrationChargeBlindCam*)pList->FindObject(AddSerialNumber("MHCalibrationChargeBlindCam")); 
    496495  if (!fHBlindCam)
    497     *fLog << warn << GetDescriptor()
    498           << ": No MHCalibrationChargeBlindCam found... no Blind Pixel method! " << endl;
     496    *fLog << "No MHCalibrationChargeBlindCam found... no Blind Pixel method!" << endl;
    499497
    500498  fIntensBad = (MBadPixelsIntensityCam*)pList->FindObject(AddSerialNumber("MBadPixelsIntensityCam"));
    501499  if (fIntensBad)
    502     *fLog << inf << "Found MBadPixelsIntensityCam ... " << endl;
     500    *fLog << inf << "Found MBadPixelsIntensityCam... " << flush;
    503501  else
    504502    {
     
    516514  fPINDiode = (MCalibrationChargePINDiode*)pList->FindObject("MCalibrationChargePINDiode");
    517515  if (!fPINDiode)
    518     *fLog << warn << GetDescriptor()
    519           << ": No MCalibrationChargePINDiode found... no PIN Diode method! " << endl;
     516    *fLog << "No MCalibrationChargePINDiode found... no PIN Diode method!" << endl;
    520517 
    521518  MCalibrationQECam     *qecam     = fIntensQE     
     
    688685Int_t MCalibrationChargeCalc::Finalize()
    689686{
    690  
    691687  fNumHiGainSamples  =  fSignal->GetNumUsedHiGainFADCSlices();
    692688  fNumLoGainSamples  =  fSignal->GetNumUsedLoGainFADCSlices();
     
    739735
    740736  *fLog << endl; 
     737
    741738  //
    742739  // The Michele check ...
     
    797794
    798795  *fLog << endl;
    799   //
     796
     797  //
    800798  // Finalize Blind Pixel
    801799  //
     
    11281126Bool_t MCalibrationChargeCalc::FinalizeFFactorMethod()
    11291127{
    1130 
    11311128  MBadPixelsCam         *badcam    = fIntensBad
    11321129    ? (MBadPixelsCam*)        fIntensBad->GetCam()  : fBadPixels;
     
    11561153  for (Int_t i=0; i<npixels; i++)
    11571154    {
    1158      
    11591155      MCalibrationChargePix &pix = (MCalibrationChargePix&)(*chargecam)[i];
    11601156      MBadPixelsPix         &bad =                         (*badcam)[i];
     
    11741170      const Float_t nphe  = pix.GetPheFFactorMethod();
    11751171      const Int_t   aidx  = (*fGeom)[i].GetAidx();
    1176 
    11771172      camphes.Fill(i,nphe);
    11781173      camphes.SetUsed(i);
    1179 
    11801174      areaphes    [aidx] += nphe;
    11811175      areavars    [aidx] += nphe*nphe;
     
    17521746          *fLog << warn << GetDescriptor() << ": Cannot use a Gauss fit to the F-Factor "
    17531747                << "in the camera with area index: " << i << endl;
    1754           *fLog << warn << GetDescriptor() << ": Number of dof.: " << ndf << " is smaller than 2 " << endl;
    1755           *fLog << warn << GetDescriptor() << ": Will use the simple mean and rms " << endl;
     1748          *fLog << "Number of dof.: " << ndf << " is smaller than 2 " << endl;
     1749          *fLog << "Will use the simple mean and rms." << endl;
    17561750          delete hist;
    17571751          continue;
     
    17641758          *fLog << warn << GetDescriptor() << ": Cannot use a Gauss fit to the F-Factor "
    17651759                << "in the camera with area index: " << i << endl;
    1766           *fLog << warn << GetDescriptor() << ": Fit probability " << prob
     1760          *fLog << "Fit probability " << prob
    17671761                << " is smaller than 0.001 " << endl;
    1768           *fLog << warn << GetDescriptor() << ": Will use the simple mean and rms " << endl;
     1762          *fLog << "Will use the simple mean and rms." << endl;
    17691763          delete hist;
    17701764          continue;
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationCam.cc

    r6828 r6926  
    923923    {
    924924      *fLog << err << GetDescriptor()
    925             << ": ERROR: Both (HiGain and LoGain) histogram arrays have not been initialized... abort." << endl;
     925            << ": ERROR - Both (HiGain and LoGain) histogram arrays have not been initialized... abort." << endl;
    926926      return kFALSE;
    927927    }
  • trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc

    r6891 r6926  
    354354        *fLog << " - Chi^2/ndf (Background) " << fChiSqBg << endl;
    355355        *fLog << " - Signal integrated      " << fIntegralMax << "°" << endl;
     356        *fLog << " - Scale Factor (Off)     " << fScaleFactor << endl;
    356357    }
    357358}
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r6855 r6926  
    110110    SetPalette(1, 0);
    111111#else
    112     SetInvDeepBlueSeaPalette();
     112    SetPrettyPalette();
     113    // WORAROUND - FIXME: Calling it many times becomes slower and slower
     114    //SetInvDeepBlueSeaPalette();
    113115#endif
    114116    gPad = save;
Note: See TracChangeset for help on using the changeset viewer.