Changeset 5955


Ignore:
Timestamp:
01/24/05 10:28:16 (20 years ago)
Author:
domingo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mtemp/mifae
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mtemp/mifae/Changelog

    r5954 r5955  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2005/01/24 Eva Domingo
     22    * library/MFDisp.[cc,h]
     23     - Number of islands read from MImagePar container
     24       to be used as cut parameter if wanted
     25    * library/MHDisp.cc
     26     - corrected to be able to run Disp method also over
     27       data (MMcEvt container info just used if available)
     28    * library/MDispCalc.cc
     29     - introduced DISP = Xi*(1/(1+width/length)) as default
     30       Disp parameterization for the moment
    2031
    2132 2005/01/24 Eva Domingo
  • trunk/MagicSoft/Mars/mtemp/mifae/library/MDispCalc.cc

    r5923 r5955  
    300300    //      + (p[2] + p[3]*(logsize-fLogSize0))*width/length;
    301301
    302     Double_t disp = p[0] + p[1]*(logsize-fLogSize0) + p[4]*(length-fLength0)
    303       + (p[2] + p[3]*(logsize-fLogSize0))*width/length;
     302//    Double_t disp = p[0] + p[1]*(logsize-fLogSize0) + p[4]*(length-fLength0)
     303//      + (p[2] + p[3]*(logsize-fLogSize0))*width/length;
    304304
    305305    //    Double_t disp = p[0] + p[1]*(logsize-fLogSize0) + p[4]*(length-fLength0)
     
    327327    //                    *(1-width/length);
    328328
     329    Double_t disp = ( p[0] + p[1]*(logsize)
     330                    + p[2]*pow(logsize,2)
     331                    + p[3]*pow(logsize,3)
     332                    + p[4]*pow(logsize,4) )
     333                        *( 1/(1+width/length) );
    329334    return disp;
    330335}
  • trunk/MagicSoft/Mars/mtemp/mifae/library/MFDisp.cc

    r5671 r5955  
    4040#include "MHillas.h"
    4141#include "MHillasSrc.h"
     42#include "MImagePar.h"
    4243#include "MNewImagePar.h"
    4344
     
    130131    }
    131132
     133    fImgPar = (MImagePar*)pList->FindObject("MImagePar");
     134    if (!fImgPar)
     135    {
     136        *fLog << err << "MImagePar not found... aborting." << endl;
     137        return kFALSE;
     138    }
     139
    132140    fNewImgPar = (MNewImagePar*)pList->FindObject("MNewImagePar");
    133141    if (!fNewImgPar)
     
    200208    const Int_t numusedpixels = fNewImgPar->GetNumUsedPixels();
    201209    const Int_t numcorepixels = fNewImgPar->GetNumCorePixels();
    202     //const Int_t numislands    = fNewImgPar->GetNumIslands();
     210    const Int_t numislands    = fImgPar->GetNumIslands();
    203211
    204212    fResult = kFALSE;
    205213
    206     //if  (numislands<fIslandsMin  || numislands>fIslandsMax )
    207     //    return Set(1);
     214    if  (numislands<fIslandsMin  || numislands>fIslandsMax )
     215        return Set(1);
    208216
    209217    if  (numusedpixels<fUsedPixelsMin  || numusedpixels>fUsedPixelsMax )
  • trunk/MagicSoft/Mars/mtemp/mifae/library/MFDisp.h

    r5671 r5955  
    88class MHillas;
    99class MHillasSrc;
     10class MImagePar;
    1011class MNewImagePar;
    1112
     
    1617    MHillas      *fHil;
    1718    MHillasSrc   *fHilSrc;
     19    MImagePar    *fImgPar;
    1820    MNewImagePar *fNewImgPar;
    1921
  • trunk/MagicSoft/Mars/mtemp/mifae/library/MHDisp.cc

    r5923 r5955  
    299299    if (!fMcEvt)
    300300    {
    301         *fLog << err << "MMcEvt not found... aborting." << endl;
    302         return kFALSE;
     301        *fLog << err << "MMcEvt not found... This is not a MC file,"
     302              << " you are not trying to optimize Disp, just calculating it."
     303              << endl;
     304        //        return kFALSE;
    303305    }
    304306
     
    424426      xmax     = fMatrix ? GetVal(kLongitmax)  : fMcEvt->GetLongitmax();     
    425427    }
    426     else
    427       *fLog << "No MMcEvt container available (no Energy,ImpactPar or Xmax)" << endl;
    428428
    429429    Double_t theta      = fMatrix ? GetVal(kZd)  : fPointing->GetZd();
     
    504504   
    505505    // Fill Energy, Size and ZA distributions
    506     fHistEnergy->Fill(log10(energy));
     506    if (fMatrix || (!fMatrix && fMcEvt))
     507      fHistEnergy->Fill(log10(energy));
    507508    fHistSize->Fill(log10(size));
    508509    fHistcosZA->Fill(cos(theta/kRad2Deg));
    509510   
    510511    // to check the size and energy dependence of the optimization
    511     fHistMinParEnergy->Fill(log10(energy),d2);
     512    if (fMatrix || (!fMatrix && fMcEvt))
     513    {
     514      fHistMinParEnergy->Fill(log10(energy),d2);
     515      fHistDuEnergy->Fill(log10(energy),Du);
     516      fHistDvEnergy->Fill(log10(energy),Dv);
     517    }
    512518    fHistMinParSize->Fill(log10(size),d2);
    513     fHistDuEnergy->Fill(log10(energy),Du);
    514519    fHistDuSize->Fill(log10(size),Du);
    515     fHistDvEnergy->Fill(log10(energy),Dv);
    516520    fHistDvSize->Fill(log10(size),Dv);
    517521   
Note: See TracChangeset for help on using the changeset viewer.