Changeset 2476 for trunk


Ignore:
Timestamp:
11/05/03 18:20:19 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2475 r2476  
    33  2003/11/05: Wolfgang Wittek
    44
    5   * macros/CT1Analysis.C
    6           /ONOFFCT1Analysis.C
    7     - current versions of the macros for the analysis of CT1 data
    8 
    9   * manalysis/MMarquardt.[h,cc]
    10     - very pleliminary version of a class performing a minimization
    11       using the Marquardt method
    12 
    13   * mimage/M2dimFunctionFit.[h,cc]
    14     - very pleliminary version of a class which fits a 2-dim function to the
    15       shower image using the maximum likelihood method
    16 
    17   * mimage/M2dimFunction.[h,cc]
    18     - very pleliminary version of a container which contains the parameters
    19       of the 2-dim function describing the shower image
    20 
    21   * mimage/MH2dimFunction.[h,cc]
    22     - very pleliminary version of a container holding the histograms
    23       for the parameters of the 2-dim function describing the shower image
     5   * macros/CT1Analysis.C, macros/ONOFFCT1Analysis.C
     6     - current versions of the macros for the analysis of CT1 data
     7 
     8   * manalysis/MMarquardt.[h,cc]
     9     - very pleliminary version of a class performing a minimization
     10       using the Marquardt method
     11
     12   * mimage/M2dimFunctionFit.[h,cc]
     13     - very pleliminary version of a class which fits a 2-dim function
     14       to the shower image using the maximum likelihood method
     15
     16   * mimage/M2dimFunction.[h,cc]
     17     - very pleliminary version of a container which contains the
     18       parameters of the 2-dim function describing the shower image
     19
     20   * mimage/MH2dimFunction.[h,cc]
     21     - very pleliminary version of a container holding the histograms
     22       for the parameters of the 2-dim function describing the shower
     23      image
    2424
    2525
     
    2828 
    2929   * mmontecarlo/MMcWeightEnergySpecCalc.[h,cc]
    30      - Now, if the new spectrum for the MC showers is a power law, we don't
    31        convert it to a TF1 function.
    32      - Changed the constructor for the case in which the new spectrum is
    33        passed as a TF1 function. Now we pass the TF1 object by reference.
    34      - Thanks to the suggestions of T. Bretz, added three more constructors to
    35        give the possibility of passing the shape of the new spectrum in other
    36        different ways. Now, if the new spectrum that you want for the MC
    37        showers is different from a power law, you can especify its shape either
    38        with a TF1 function, with a string (char*), or with a general C++
    39        function defined by your own.
    40      - In function Reinit(): added a sanity check to prevent from dividing
    41        by zero.
     30     - Now, if the new spectrum for the MC showers is a power law, we
     31       don't convert it to a TF1 function.
     32     - Changed the constructor for the case in which the new spectrum
     33       is passed as a TF1 function. Now we pass the TF1 object by
     34       reference.
     35     - Thanks to the suggestions of T. Bretz, added three more
     36       constructors to give the possibility of passing the shape of the
     37       new spectrum in other different ways. Now, if the new spectrum
     38       that you want for the MC showers is different from a power law,
     39       you can specify its shape either with a TF1 function, with a
     40       string (char*), or with a general C++ function defined by your
     41       own.
     42     - In function Reinit(): added a sanity check to prevent from
     43       dividing by zero.
    4244     - In PreProcess(): removed an unnecessary sentence.
    4345     - Fixed a compiling error which appeared under gcc 3.3
     
    5254   * mbase/MTask.cc:
    5355     - initialize fSerialNumber=0
     56
     57   * mhist/MHCamera.cc:
     58     - removed some obsolete IsUsed(idx) checks when filling the histogram
     59     - ExecuteEvent now plots in the same canvas all the time
    5460
    5561
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r2421 r2476  
    671671//
    672672// Call this function to add a MCamEvent on top of the present contents.
    673 // Only 'used' pixels are added.
    674673//
    675674void MHCamera::AddCamContent(const MCamEvent &event, Int_t type)
     
    682681    {
    683682        Double_t val=0;
    684         if (event.GetPixelContent(val, idx, *fGeomCam, type) && !IsUsed(idx))
     683        if (event.GetPixelContent(val, idx, *fGeomCam, type)/* && !IsUsed(idx)*/)
    685684            SetUsed(idx);
    686685
     
    693692//
    694693// Call this function to add a MHCamera on top of the present contents.
    695 // Only 'used' pixels are added.
    696694// Type:
    697695//  0) bin content
     
    731729//
    732730// Call this function to add a TArrayD on top of the present contents.
    733 // Only 'used' pixels are added.
    734731//
    735732void MHCamera::AddCamContent(const TArrayD &event, const TArrayC *used)
     
    745742        Fill(idx, const_cast<TArrayD&>(event)[idx]); // FIXME: Slow!
    746743
    747         if (used && (*const_cast<TArrayC*>(used))[idx])
     744        if (!used || (*const_cast<TArrayC*>(used))[idx])
    748745            SetUsed(idx);
    749746    }
     
    764761    for (Int_t idx=0; idx<fNcells-2; idx++)
    765762    {
    766         Double_t val=0;
    767         if (event.GetPixelContent(val, idx, *fGeomCam, type) && !IsUsed(idx))
     763        Double_t val=threshold;
     764        if (event.GetPixelContent(val, idx, *fGeomCam, type)/* && !IsUsed(idx)*/)
    768765            SetUsed(idx);
    769766
     
    11281125    if (fNotify && fNotify->GetSize()>0)
    11291126    {
    1130         new TCanvas;
     1127        // FIXME: Is there a simpler and more convinient way?
     1128
     1129        // The name which is created here depends on the instance of
     1130        // MHCamera and on the pad on which it is drawn --> The name
     1131        // is unique. For ExecuteEvent gPad is always correctly set.
     1132        const TString name = Form("%p;%p;PixelContent", this, gPad);
     1133
     1134        TCanvas *old = (TCanvas*)gROOT->GetListOfCanvases()->FindObject(name);
     1135        if (old)
     1136            old->cd();
     1137        else
     1138            new TCanvas(name);
     1139
     1140        /*
     1141         TIter Next(gPad->GetListOfPrimitives());
     1142         TObject *o;
     1143         while (o=Next()) cout << o->GetName() << " " << o->IsA()->GetName() << endl;
     1144         */
     1145
     1146        // FIXME: Make sure, that the old histograms are really deleted.
     1147        //        Are they already deleted?
    11311148        fNotify->ForEach(MCamEvent, DrawPixelContent)(idx);
     1149        gPad->Modified();
     1150        gPad->Update();
    11321151    }
    11331152}
Note: See TracChangeset for help on using the changeset viewer.