Ignore:
Timestamp:
04/17/03 08:03:48 (22 years ago)
Author:
wittek
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhist
Files:
2 edited

Legend:

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

    r1956 r1961  
    2727//  MHSigmaTheta (extension of Robert's MHSigmabarTheta)                    //
    2828//                                                                          //
    29 //  calculates - the 2D-histogram   sigmabar vs. Theta, and                 //
     29//  calculates - the 1D-histogram   ID of blind pixels
     30//             - the 1D-histogram   no.of pixels in MCerPhotEvt, and        //
     31//             - the 2D-histogram   sigmabar vs. Theta, and                 //
    3032//             - the 3D-histogram   sigma, pixel no., Theta                 //
    3133//             - the 3D-histogram   (sigma^2-sigmabar^2), pixel no., Theta  //
     
    6870    fName  = name  ? name  : "MHSigmaTheta";
    6971    fTitle = title ? title : "2D histogram sigmabar vs. Theta";
     72
     73    fNpix.SetDirectory(NULL);
     74    fNpix.SetName("1D-Npix");
     75    fNpix.SetTitle("1D : no.of used pixels in MCerPhotEvt");
     76    fNpix.SetXTitle("no. of used pixels in MCerPhotEvt");
     77    fNpix.SetYTitle("Counts");
     78
     79    fBlindId.SetDirectory(NULL);
     80    fBlindId.SetName("1D-BlindId");
     81    fBlindId.SetTitle("1D : Id of blind pixel");
     82    fBlindId.SetXTitle("Id of blind pixel");
     83    fBlindId.SetYTitle("Counts");
    7084
    7185    fSigmaTheta.SetDirectory(NULL);
     
    164178
    165179   MBinning binspix("BinningPixel");
    166    binspix.SetEdges(npix, -0.5, -0.5+npix );
    167 
     180   binspix.SetEdges(npix+1, -0.5, 0.5+npix );
     181
     182   SetBinning(&fNpix,    &binspix);
     183   SetBinning(&fBlindId, &binspix);
    168184   SetBinning(&fSigmaPixTheta, binstheta, &binspix, binssigma);
    169185   SetBinning(&fDiffPixTheta,  binstheta, &binspix, binsdiff);
     
    183199    Double_t mySig = fSigmabar->Calc(*fCam, *fPed, *fEvt);
    184200
     201    //*fLog << "MHSigmaTheta::Fill; theta, mySig = " << theta << ",  "
     202    //      << mySig << endl;
     203
    185204    fSigmaTheta.Fill(theta, mySig);
    186205
    187206    const UInt_t npix = fEvt->GetNumPixels();
     207
     208    Int_t npixused=0;
    188209    for (UInt_t i=0; i<npix; i++)
    189210    {
    190211      MCerPhotPix cerpix = fEvt->operator[](i);
    191212      if (!cerpix.IsPixelUsed())
     213      {
     214        fBlindId.Fill( cerpix.GetPixId() );       
    192215        continue;
    193 
    194       /*
     216      }
     217      npixused++;
     218
     219      /*     
    195220      if (cerpix.GetNumPhotons() == 0)
    196221        continue;
    197         */
     222      */       
    198223
    199224      const Int_t id = cerpix.GetPixId();
     
    203228      const Double_t area  = fCam->GetPixRatio(id);
    204229
     230
    205231      fSigmaPixTheta.Fill(theta, (Double_t)id, sigma);
    206232
    207233      const Double_t diff = sigma*sigma/area - mySig*mySig;
    208234      fDiffPixTheta.Fill(theta, (Double_t)id, diff);
     235
     236      //*fLog << "theta, id, sigma, diff, area  = " << theta << ",  " << id
     237      //      << ",  "
     238      //      << sigma << ",  " << diff << ",  " << area << endl;
    209239    }
     240    fNpix.Fill(npixused);
    210241
    211242    return kTRUE;
     
    277308    l->SetBit(kCanDelete);;
    278309
     310    //c.cd(8);
     311    //((TH2*)&fDiffPixTheta)->DrawCopy(opt);
     312
    279313    c.cd(8);
    280     ((TH2*)&fDiffPixTheta)->DrawCopy(opt);
     314    ((TH1*)&fBlindId)->DrawCopy(opt);
    281315
    282316
     
    306340    k->SetBit(kCanDelete);;
    307341
     342    //c.cd(9);
     343    //((TH2*)&fSigmaPixTheta)->DrawCopy(opt);
     344
    308345    c.cd(9);
    309     ((TH2*)&fSigmaPixTheta)->DrawCopy(opt);
     346    ((TH1*)&fNpix)->DrawCopy(opt);
    310347
    311348    //--------------------------------------------------------------------
  • trunk/MagicSoft/Mars/mhist/MHSigmaTheta.h

    r1951 r1961  
    3232    MMcEvt         *fMcEvt;      //!
    3333 
    34     TH2D fSigmaTheta;    // 2D-distribution sigmabar versus Theta; sigmabar is the average pedestasl sigma in an event
     34    TH1D fNpix;          // 1D-distribution no.of pixels in MCerPhotEvt;
     35    TH1D fBlindId;       // 1D-distribution Id of blind pixel;
     36    TH2D fSigmaTheta;    // 2D-distribution sigmabar versus Theta;
     37                         // sigmabar is the average pedestasl sigma in an event
    3538    TH3D fSigmaPixTheta; // 3D-distr.:Theta, pixel, pedestal sigma
    3639    TH3D fDiffPixTheta;  // 3D-distr.:Theta, pixel, sigma^2-sigmabar^2
Note: See TracChangeset for help on using the changeset viewer.