Changeset 8673 for trunk/MagicSoft


Ignore:
Timestamp:
08/17/07 11:53:49 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8672 r8673  
    1919                                                 -*-*- END OF LINE -*-*-
    2020
     21 2007/08/17 Thomas Bretz
     22
     23   * sponde.cc:
     24     - removed switch for simple and accurate mode
     25
     26   * mbase/MMath.cc:
     27     - fixed a problem in LiMaExc which could result in NaN
     28       (if signal and background is 0)
     29
     30   * mbase/MStatusDisplay.cc:
     31     - remove canvases in batch-mode from the global list of canvases,
     32       this could result in crahses if two canvases in the display
     33       had the same name
     34
     35   * mhflux/MHCollectionArea.[h,cc]:
     36     - output the maximum impact found in Finalize
     37
     38   * mhflux/MHEnergyEst.cc:
     39     - made the y-axis in the Eest vs Emc plot logarithmic
     40
     41
     42
    2143 2007/08/16 Markus Meyer
    2244
    2345   * resources/calibration.rc:
    2446     - update of muon calibration factors for the periods 41 to 50
    25      .
     47
     48
    2649
    2750 2007/08/15 Thomas Bretz
  • trunk/MagicSoft/Mars/mbase/MMath.cc

    r8585 r8673  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MMath.cc,v 1.36 2007-06-19 11:14:33 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MMath.cc,v 1.37 2007-08-17 10:53:48 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    153153    Double_t sN = s + alpha*alpha*b;
    154154
    155     return Ns<0 || sN<0 ? 0 : Ns/TMath::Sqrt(sN);
     155    if (Ns<0 || sN<0)
     156        return 0;
     157
     158    if (Ns==0 && sN==0)
     159        return 0;
     160
     161    return Ns/TMath::Sqrt(sN);
    156162}
    157163
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r8309 r8673  
    10101010TCanvas &MStatusDisplay::AddTab(const char *name)
    10111011{
     1012    /*
     1013    if (HasCanvas(name))
     1014    {
     1015        *fLog << warn;
     1016        *fLog << "WARNING - A canvas '" << name << "' is already existing in the Status Display." << endl;
     1017        *fLog << "          This can cause unexpected crahes!" << endl;
     1018    }*/
     1019
    10121020    if (gROOT->IsBatch())
    10131021    {
     
    10171025
    10181026        TCanvas *c = new TCanvas(name, name, -cw, ch);
     1027
     1028        gROOT->GetListOfCanvases()->Remove(c);
     1029
    10191030        fBatch->Add(c);
    10201031        return *c;
     
    13421353    if (!c)
    13431354        return kFALSE;
     1355
     1356    // If you encounter unexpected crashes here, check if
     1357    // a canvas is existing twice in the list or has been
     1358    // deleted by accident. (Check AddTab)
    13441359
    13451360    if (gROOT->IsBatch())
  • trunk/MagicSoft/Mars/mhflux/MHCollectionArea.cc

    r8265 r8673  
    284284        //                         GetCollectionAreaEff(),
    285285        //                         GetCollectionAreaAbs(), fMcAreaRadius);
    286         const TString txt = Form("A_{abs}=%.0fm^{2}  r=%.0fm",
     286        const TString txt = Form("r_{max}=%.0fm --> A_{max}=%.0fm^{2}",
    287287                                 GetCollectionAreaAbs(), fMcAreaRadius);
    288288
     
    457457    return kTRUE;
    458458}
     459
     460Bool_t MHCollectionArea::Finalize()
     461{
     462    *fLog << all << "Maximum simulated impact found: " << fMcAreaRadius << "m" << endl;
     463
     464    CalcEfficiency();
     465
     466    return kTRUE;
     467}
  • trunk/MagicSoft/Mars/mhflux/MHCollectionArea.h

    r8047 r8673  
    4444    Bool_t ReInit(MParList *pList);
    4545    Bool_t Fill(const MParContainer *par, const Stat_t weight=1);
    46     Bool_t Finalize() { CalcEfficiency(); return kTRUE; }
     46    Bool_t Finalize();
    4747
    4848    void Draw(Option_t *option="");
  • trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc

    r8666 r8673  
    504504
    505505    pad2->cd(1);
     506    gPad->SetLogy();
    506507    h = MakePlot(fHEnergy, "xy");
    507508    h->SetXTitle("E_{mc} [GeV]");
  • trunk/MagicSoft/Mars/sponde.cc

    r8544 r8673  
    5252    gLog << "   --refill                  Refill the excess histogram from result file" << endl;
    5353    gLog << "                             (usefull to change the binning)" << endl;
    54     gLog << "   --accurate                Fill original energy/theta distribution from data" << endl;
    55     gLog << "                             (do not weight the histogram)" << endl;
     54//    gLog << "   --accurate                Fill original energy/theta distribution from data" << endl;
     55//    gLog << "                             (do not weight the histogram)" << endl;
    5656    gLog << "   --raw-mc                  Use the mc sample as it is" << endl << endl;
    5757    gLog << " Options:" << endl;
     
    121121
    122122    const Bool_t  kRefill        =  arg.HasOnlyAndRemove("--refill");
    123     const Bool_t  kSimple        = !arg.HasOnlyAndRemove("--accurate");
     123//    const Bool_t  kSimple        = !arg.HasOnlyAndRemove("--accurate");
    124124    const Bool_t  kRawMc         =  arg.HasOnlyAndRemove("--raw-mc");
    125125
     
    224224
    225225    job.EnableRefilling(kRefill);
    226     job.EnableSimpleMode(kSimple);
     226//    job.EnableSimpleMode(kSimple);
    227227    job.EnableRawMc(kRawMc);
    228228
Note: See TracChangeset for help on using the changeset viewer.