Changeset 1961 for trunk


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

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r1958 r1961  
    11                                                 -*-*- END OF LINE -*-*-
     2
     3 2003/04/17: Wolfgang Wittek
     4
     5   * mfileio/MCT1ReadPreProc.cc
     6     - removed : if (theta > pi/2) continue;
     7       otherwise get inconsistency between no.of read events
     8       and no.of events after filter
     9     - write into MCerPhotEvt also pixels with zero no. of photons
     10
     11   * manalysis/MSigmabar.cc
     12     - correct wrong argument in call to memset
     13
     14   * manalysis/MPadSchweizer.cc
     15     - pad also pixels with zero no.of photons
     16
     17   * mhist/MHSigmaTheta.[h,cc]
     18     - add plot of no.of used pixels in MCerPhotEvt
     19     - add plot of Id of blind pixel
     20
     21   
     22
    223
    324 2003/04/14: Wolfgang Wittek
  • trunk/MagicSoft/Mars/manalysis/MPadSchweizer.cc

    r1955 r1961  
    267267  Double_t SigbarOld;
    268268
     269
     270  SigbarOld = fSigmabar->Calc(*fCam, *fPed, *fEvt);
    269271  //*fLog << "before padding : " << endl;
    270   //SigbarOld = fSigmabar->Calc(*fCam, *fPed, *fEvt);
    271272  //fSigmabar->Print("");
    272273
     
    407408  //
    408409  // pad only pixels   - which are used (before image cleaning)
    409   //                   - and for which the no.of photons is != 0.0
    410410  //
    411411  Double_t Sig         = 0.0;
     
    422422      continue;
    423423
    424     if ( pix.GetNumPhotons() == 0.0)
    425     {
    426       *fLog << "MPadSchweizer::Process(); no.of photons is 0 for used pixel"
    427             << endl;
    428       continue;
    429     }
     424    //if ( pix.GetNumPhotons() == 0.0)
     425    //{
     426    //  *fLog << "MPadSchweizer::Process(); no.of photons is 0 for used pixel"
     427    //        << endl;
     428    //  continue;
     429    //}
    430430
    431431    Int_t j = pix.GetPixId();
     
    572572
    573573    fHNSB->Fill( NSB/sqrt(Area) );
    574     fHPhotons->Fill( newphotons/sqrt(Area), oldphotons/sqrt(Area) );
     574    fHPhotons->Fill( oldphotons/sqrt(Area), newphotons/sqrt(Area) );
    575575
    576576
     
    604604      continue;
    605605
    606     if ( pix.GetNumPhotons() == 0.0)
    607     {
    608       *fLog << "MPadSchweizer::Process(); no.of photons is 0 for used pixel"
    609             << endl;
    610       continue;
    611     }
     606    //if ( pix.GetNumPhotons() == 0.0)
     607    //{
     608    //  *fLog << "MPadSchweizer::Process(); no.of photons is 0 for used pixel"
     609    //        << endl;
     610    //  continue;
     611    //}
    612612
    613613    Int_t j = pix.GetPixId();
  • trunk/MagicSoft/Mars/manalysis/MSigmabar.cc

    r1951 r1961  
    1616!
    1717!
    18 !   Author(s): Robert Wagner, 10/2002 <mailto:magicsoft@rwagner.de>
     18!   Author(s): Robert Wagner,   10/2002 <mailto:magicsoft@rwagner.de>
    1919!   Author(s): Wolfgang Wittek, 01/2003 <mailto:wittek@mppmu.mpg.de>
    20 !   Author(s): Thomas Bretz, 04/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
     20!   Author(s): Thomas Bretz,    04/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
    2121!
    2222!   Copyright: MAGIC Software Development, 2003
     
    103103    memset(innerPixels, 0, sizeof(innerPixels));
    104104    memset(outerPixels, 0, sizeof(outerPixels));
    105     memset(outerSquaredSum, 0, sizeof(outerSquaredSum));
     105    memset(innerSquaredSum, 0, sizeof(innerSquaredSum));
    106106    memset(outerSquaredSum, 0, sizeof(outerSquaredSum));
    107107
     
    115115
    116116    const UInt_t npix = evt.GetNumPixels();
     117
     118    //*fLog << "MSigmabar : npix = " << npix << endl;
    117119
    118120    for (UInt_t i=0; i<npix; i++)
     
    121123        if (!cerpix.IsPixelUsed())
    122124            continue;
    123         /*
     125
     126        /*
    124127         if ( cerpix.GetNumPhotons() == 0 )
    125128         {
     
    128131         continue;
    129132         }
    130          */
     133        */
     134
    131135        const Int_t id = cerpix.GetPixId();
    132136        const Double_t area = geom.GetPixRatio(id);
     137
     138        if (id == 0)
     139        {
     140          //*fLog << "MSigmabar : id = 0;  pixel '0' is used, ignore it"
     141          //      << endl;
     142          continue;
     143        }
    133144
    134145        const MGeomPix    &gpix = geom[id];
     
    226237
    227238}
     239
     240
     241
     242
     243
     244
  • trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc

    r1952 r1961  
    246246    *fLog << endl;
    247247
    248     *fLog << "Exclude: ";
     248    *fLog << "Exclude pixels: ";
    249249
    250250    // Boolean bexcludepix[iMAXNUMPIX];
     
    895895      //*fLog << event.spixsig_10thphot[i] << " ";
    896896
    897         if (event.spixsig_10thphot[i]==0)
    898             continue;
     897      // next 2 statements commented out by WW
     898      //if (event.spixsig_10thphot[i]==0)
     899      //      continue;
    899900
    900901        fNphot->AddPixel(i, 0.1*event.spixsig_10thphot[i],
     
    912913    fThetaOrig->SetVal(theta);
    913914
    914     if (theta>TMath::Pi()/2)
    915         return kCONTINUE;
     915    //if (theta>TMath::Pi()/2)
     916    //{
     917    //    *fLog << "MCT1ReadPreProc::ProcessEvent; theta out of range : "
     918    //          << theta << endl;
     919    //    return kCONTINUE;
     920    //}
    916921
    917922    // store hour angle
  • 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.