Ignore:
Timestamp:
02/20/03 15:32:13 (22 years ago)
Author:
wittek
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/manalysis
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MPadSchweizer.cc

    r1768 r1770  
    272272  //fSigmabar->Print("");
    273273
    274   if (SigbarOld > 0.0)
    275   {
    276     *fLog << "MPadSchweizer::Process(); Sigmabar of event to be padded is > 0 : "
    277           << SigbarOld << ". Stop event loop " << endl;
     274  //if (SigbarOld > 0.0)
     275  //{
     276    //*fLog << "MPadSchweizer::Process(); Sigmabar of event to be padded is > 0 : "
     277    //      << SigbarOld << ". Stop event loop " << endl;
    278278    // input data should have Sigmabar = 0; stop event loop
    279     return kFALSE;
    280   }
     279    // return kFALSE;
     280  //}
    281281
    282282  Double_t Theta  = kRad2Deg*fMcEvt->GetTelescopeTheta();
     
    307307            << binNumber << " has no entries; Skip event " << endl;
    308308      // event cannot be padded; skip event
     309      delete fHSigma;
    309310      return kCONTINUE;
    310311    }
     
    328329  if (Sigmabar <= SigbarOld)
    329330  {
     331    *fLog << "MPadSchweizer::Process(); target Sigmabar is less than SigbarOld : "
     332          << Sigmabar << ",  " << SigbarOld << ",   Skip event" << endl;
    330333    return kCONTINUE;     
    331334  }
     
    360363  Double_t RMS = fHNoise->GetRMS(1); 
    361364  delete fHNoise;
    362   elNoise2 = TMath::Min(2.0*RMS,  Sigmabar*Sigmabar - SigbarOld*SigbarOld);
     365  elNoise2 = TMath::Min(RMS,  Sigmabar*Sigmabar - SigbarOld*SigbarOld);
    363366  //*fLog << "elNoise2 = " << elNoise2 << endl;
    364367
     
    375378  //                   - and for which the no.of photons is != 0.0
    376379  //
    377   Double_t Sig         = 0.0;
    378   Double_t Sigma2      = 0.0;
    379   Double_t Diff        = 0.0;
    380   Double_t addSig2     = 0.0;
    381   Double_t elNoise2Pix = 0.0;
     380  Double_t Sig;
     381  Double_t Sigma2;
     382  Double_t Diff;
     383  Double_t addSig2;
     384  Double_t elNoise2Pix;
    382385
    383386
     
    504507    //       and its RMS (sigmaNSB)
    505508    Double_t NSB0 = fRnd->Poisson(lambdabar*Area);
    506     Double_t sigmaNSB0 = sqrt( NSB0*(F2excess-1.0) + elNoise2Pix );
     509    Double_t arg  = NSB0*(F2excess-1.0) + elNoise2Pix;
     510    Double_t sigmaNSB0;
     511
     512    if (arg >= 0.0)
     513    {
     514      sigmaNSB0 = sqrt( arg );
     515    }
     516    else
     517    {
     518      *fLog << "MPadSchweizer::Process(); argument of sqrt < 0.0 : "
     519            << arg << endl;
     520      sigmaNSB0 = 0.0000001;     
     521    }
     522
    507523
    508524    //---------------------------------
     
    578594Bool_t MPadSchweizer::PostProcess()
    579595{
    580     TCanvas &c = *(MH::MakeDefCanvas("PadSchweizer", "", 900, 900));
    581     c.Divide(3, 3);
     596    TCanvas &c = *(MH::MakeDefCanvas("PadSchweizer", "", 900, 1200));
     597    c.Divide(3, 4);
    582598    gROOT->SetSelectedPad(NULL);
    583599
    584600
    585601    c.cd(1);
    586     fHSigmaTheta->SetTitle("2D : Sigmabar, \\Theta (before padding)");
     602    fHSigmaTheta->SetTitle("2D : Sigmabar, \\Theta (reference sample)");
    587603    fHSigmaTheta->DrawClone();     
    588604    fHSigmaTheta->SetBit(kCanDelete);     
     
    596612    fHSigbarTheta->SetBit(kCanDelete);     
    597613
    598       //c.cd(3);
    599       //fHSigmaPedestal->DrawClone();
    600       //fHSigmaPedestal->SetBit(kCanDelete);   
    601 
    602       //c.cd(5);
    603       //fHPhotons->DrawClone();
    604       //fHPhotons->SetBit(kCanDelete);   
    605614
    606615    c.cd(7);
     
    614623    TH2D *l;
    615624
    616     *fLog << "before" << endl;
    617 
    618625    c.cd(2);
    619626    l = (TH2D*) ((TH3*)fHDiffPixTh)->Project3D("zx");
    620 
    621     *fLog << "after" << endl;
    622627
    623628    l->SetTitle("Sigma^2-Sigmabar^2 vs. \\Theta (all pixels)");
     
    671676    //--------------------------------------------------------------------
    672677
     678    c.cd(10);
     679    fHSigmaPedestal->DrawClone();
     680    fHSigmaPedestal->SetBit(kCanDelete);   
     681
     682    c.cd(11);
     683    fHPhotons->DrawClone();
     684    fHPhotons->SetBit(kCanDelete);   
     685
     686    //--------------------------------------------------------------------
     687
    673688  return kTRUE;
    674689}
  • trunk/MagicSoft/Mars/manalysis/MPadSchweizer.h

    r1768 r1770  
    2828{
    2929private:
    30     MGeomCam      *fCam;
     30    const MGeomCam *fCam;
    3131    MCerPhotEvt    *fEvt;
    3232    MSigmabar      *fSigmabar;
Note: See TracChangeset for help on using the changeset viewer.