Ignore:
Timestamp:
07/13/05 19:06:26 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mimage/MNewImagePar.cc

    r7176 r7188  
    141141    Float_t maxpix2 = 0;                                 // [#phot]
    142142
    143     /*
    144     MSignalPix *pix = 0;
    145     TIter Next(evt);
    146     while ((pix=(MSignalPix*)Next()))
    147     */
     143    const Bool_t ismagiclike =
     144        geom.GetNumPixels() == 577 &&
     145        geom.GetNumAreas()  == 2   &&
     146        geom.GetPixRatio(396) > geom.GetPixRatio(397);
     147
    148148    UInt_t npix = evt.GetNumPixels();
    149149    for (UInt_t i=0; i<npix; i++)
     
    182182           edgepix2 += nphot;
    183183
    184         //
    185         // Now we are working on absolute values of nphot, which
    186         // must take pixel size into account
    187         //
    188         nphot *= geom.GetPixRatio(i/*pixid*/);
    189 
    190         // count inner pixels: To dependent on MAGIC Camera --> FIXME
    191 
    192         if (i<397){
     184        const Double_t ratio = geom.GetPixRatio(i);
     185        if (TMath::Nint(ratio)==1) // Means this is a small (= inner pixel)
     186        {
    193187            fInnerSize += nphot;
    194             if(i>270){
    195                 edgepixin2 += nphot;
    196                 if(i>330)
    197                     edgepixin1 += nphot;
     188
     189            // Do calculation of "inner leakage" only for MAGIC-like geometry,
     190            // i.e., 577 pixels, pixels of 2 different areas, inner part
     191            // from pixel 0 to 396:
     192            if (ismagiclike)
     193            {
     194                if(i > 270) // last two "rings" of inner pixels
     195                {
     196                    edgepixin2 += nphot;
     197                    if(i > 330)  // last "ring" of inner pixels
     198                        edgepixin1 += nphot;
     199                }
    198200            }
    199201        }
    200202
    201         // Compute Concentration 1-2
     203        //
     204        // Now convert nphot from absolute number of photons or phe to signal
     205        // density (divide by pixel area), to find the pixel with highest signal
     206        // density:
     207        //
     208        nphot *= ratio;
     209
     210        // Look for signal density in two highest pixels:
    202211        if (nphot>maxpix1)
    203212        {
     
    213222    fInnerLeakage1 = edgepixin1 / fInnerSize;
    214223    fInnerLeakage2 = edgepixin2 / fInnerSize;
     224
    215225    fLeakage1 = edgepix1 / hillas.GetSize();
    216226    fLeakage2 = edgepix2 / hillas.GetSize();
    217227
     228    // FIXME?: in case the pixel with highest signal density is an outer pixel,
     229    // the value of fConc (ratio of signal in two highest pixels to SIZE) should
     230    // rather be 2*fConc1, under the simplest assumption that the light density
     231    // inside the outer (large) pixel is uniform.
    218232    fConc  = (maxpix1+maxpix2)/hillas.GetSize();         // [ratio]
    219233    fConc1 = maxpix1/hillas.GetSize();                   // [ratio]
Note: See TracChangeset for help on using the changeset viewer.