Ignore:
Timestamp:
04/06/04 13:41:56 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mimage
Files:
5 edited

Legend:

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

    r2624 r3666  
    4747// fConc1    removed
    4848//
     49// Version 3:
     50// ----------
     51// fMaxDist  added. Distance between center and most distant used pixel
     52//
    4953//
    5054// WARNING: Before you can use fAsym, fM3Long and fM3Trans you must
     
    96100    fM3Long  =  0;
    97101    fM3Trans =  0;
     102
     103    fMaxDist = -1;
    98104}
    99105
     
    109115    *fLog << " - 3.Moment Long  [mm]  = " << fM3Long  << endl;
    110116    *fLog << " - 3.Moment Trans [mm]  = " << fM3Trans << endl;
     117    *fLog << " - Max.Dist       [mm]  = " << fMaxDist << endl;
    111118}
    112119
     
    123130    *fLog << " - 3.Moment Long  [deg] = " << fM3Long *geom.GetConvMm2Deg() << endl;
    124131    *fLog << " - 3.Moment Trans [deg] = " << fM3Trans*geom.GetConvMm2Deg() << endl;
     132    *fLog << " - Max.Dist       [deg] = " << fMaxDist*geom.GetConvMm2Deg() << endl;
    125133}
    126134
     
    146154    const UInt_t npixevt = evt.GetNumPixels();
    147155
    148     Int_t maxpixid = 0;
    149     Float_t maxpix = 0;
     156    Int_t maxpixid  = 0;
     157    Float_t maxpix  = 0;
     158    Float_t maxdist = 0;
    150159
    151160    for (UInt_t i=0; i<npixevt; i++)
     
    160169        const Double_t dx = gpix.GetX() - hil.GetMeanX();      // [mm]
    161170        const Double_t dy = gpix.GetY() - hil.GetMeanY();      // [mm]
     171
     172        const Double_t dist = dx*dx+dy*dy;
     173        if (dist>maxdist)
     174            maxdist=dist;                                      // [mm^2]
    162175
    163176        Double_t nphot = pix.GetNumPhotons();                  // [1]
     
    197210    fM3Trans = m3y<0 ? -pow(-m3y, 1./3) : pow(m3y, 1./3);      // [mm]
    198211
     212    fMaxDist = TMath::Sqrt(maxdist);                           // [mm]
     213
    199214    SetReadyToSave();
    200215
  • trunk/MagicSoft/Mars/mimage/MHillasExt.h

    r2624 r3666  
    2020    Float_t fM3Trans; // [mm] 3rd moment (e-weighted) along minor axis
    2121
     22    Float_t fMaxDist; // Distance between center and most distant used pixel
     23
    2224public:
    2325    MHillasExt(const char *name=NULL, const char *title=NULL);
     
    2931    Float_t GetM3Trans() const { return fM3Trans; }
    3032
     33    Float_t GetMaxDist() const { return fMaxDist; }
     34
    3135    Int_t Calc(const MGeomCam &geom, const MCerPhotEvt &pix, const MHillas &hil);
    3236
     
    3640    void Set(const TArrayF &arr);
    3741
    38     ClassDef(MHillasExt, 2) // Storage Container for extended Hillas Parameter
     42    ClassDef(MHillasExt, 3) // Storage Container for extended Hillas Parameter
    3943};
    4044#endif
  • trunk/MagicSoft/Mars/mimage/MHillasSrcCalc.cc

    r2470 r3666  
    114114Int_t MHillasSrcCalc::Process()
    115115{
    116 
    117116    if (!fHillasSrc->Calc(fHillas))
    118117    {
  • trunk/MagicSoft/Mars/mimage/MNewImagePar.cc

    r3574 r3666  
    4444//  - added fInnerLeakage2
    4545//  - added fInnerSize
     46//  - added fUsedArea
     47//  - added fCoreArea
     48//
    4649//
    4750/////////////////////////////////////////////////////////////////////////////
     
    9295    fNumCorePixels = -1;
    9396
     97    fUsedArea = -1;
     98    fCoreArea = -1;
     99
    94100    fNumSaturatedPixels = -1;
    95101    fNumHGSaturatedPixels = -1;
     
    105111    fNumUsedPixels = 0;
    106112    fNumCorePixels = 0;
     113
     114    fUsedArea = 0;
     115    fCoreArea = 0;
    107116
    108117    fNumSaturatedPixels = 0;
     
    136145            continue;
    137146
     147        // Get geometry of pixel
     148        const Int_t pixid = pix.GetPixId();
     149        const MGeomPix &gpix = geom[pixid];
     150
    138151        // count used and core pixels
    139152        if (pix.IsPixelCore())
     153        {
    140154            fNumCorePixels++;
     155            fCoreArea += gpix.GetA();
     156        }
    141157
    142158        // count used pixels
    143159        fNumUsedPixels++;
    144 
    145         const Int_t pixid = pix.GetPixId();
    146 
    147         const MGeomPix &gpix = geom[pixid];
     160        fUsedArea += gpix.GetA();
    148161
    149162        Double_t nphot = pix.GetNumPhotons();
     
    165178        // count inner pixels: To dependent on MAGIC Camera --> FIXME
    166179
    167         if (pixid<397){
    168           fInnerSize += nphot;
    169           if(pixid>270){
    170             edgepixin2 += nphot;
    171             if(pixid>330)
    172               edgepixin1 += nphot;
    173           }
    174         }
     180        if (pixid<397){
     181            fInnerSize += nphot;
     182            if(pixid>270){
     183                edgepixin2 += nphot;
     184                if(pixid>330)
     185                    edgepixin1 += nphot;
     186            }
     187        }
    175188
    176189        // Compute Concetration 1 -2
    177190
    178191        if (nphot>maxpix1)
    179           {
     192        {
    180193            maxpix2  = maxpix1;
    181194            maxpix1  = nphot;                            // [1]
    182195            continue;                                    // [1]
    183           }
    184        
     196        }
     197
    185198        if (nphot>maxpix2)
    186           maxpix2 = nphot;                             // [1]
     199            maxpix2 = nphot;                             // [1]
    187200    }
    188201   
  • trunk/MagicSoft/Mars/mimage/MNewImagePar.h

    r3574 r3666  
    1313{
    1414private:
    15     Float_t fLeakage1;           // (photons in most outer ring of pixels) over fSize
    16     Float_t fLeakage2;           // (photons in the 2 outer rings of pixels) over fSize
    17     Float_t fInnerLeakage1;      // (photons in most outer rings of inner pixels) over fInnerSize
    18     Float_t fInnerLeakage2;      // (photons in the 2 outer rings of inner pixels) over fInnerSize
    19     Float_t fInnerSize;          //
     15    Float_t fLeakage1;             // (photons in most outer ring of pixels) over fSize
     16    Float_t fLeakage2;             // (photons in the 2 outer rings of pixels) over fSize
     17    Float_t fInnerLeakage1;        // (photons in most outer rings of inner pixels) over fInnerSize
     18    Float_t fInnerLeakage2;        // (photons in the 2 outer rings of inner pixels) over fInnerSize
     19    Float_t fInnerSize;            //
    2020
    21     Float_t fConc;               // [ratio] concentration ratio: sum of the two highest pixels / fSize
    22     Float_t fConc1;              // [ratio] concentration ratio: sum of the highest pixel / fSize
     21    Float_t fConc;                 // [ratio] concentration ratio: sum of the two highest pixels / fSize
     22    Float_t fConc1;                // [ratio] concentration ratio: sum of the highest pixel / fSize
    2323
    24     Short_t fNumUsedPixels;      // Number of pixels which survived the image cleaning
    25     Short_t fNumCorePixels;      // number of core pixels
     24    Float_t fUsedArea;             // Area of pixels which survived the image cleaning
     25    Float_t fCoreArea;             // Area of core pixels
     26    Short_t fNumUsedPixels;        // Number of pixels which survived the image cleaning
     27    Short_t fNumCorePixels;        // number of core pixels
    2628    Short_t fNumHGSaturatedPixels; // number of pixels with saturating hi-gains
    2729    Short_t fNumSaturatedPixels;   // number of pixels with saturating lo-gains
     
    4143    Short_t GetNumCorePixels() const { return fNumCorePixels; }
    4244
     45    Float_t GetNumUsedArea() const { return fUsedArea; }
     46    Float_t GetNumCoreArea() const { return fCoreArea; }
     47
    4348    Short_t GetNumSaturatedPixels() const { return fNumSaturatedPixels; }
    4449    Short_t GetNumHGSaturatedPixels() const { return fNumHGSaturatedPixels; }
Note: See TracChangeset for help on using the changeset viewer.