Changeset 8695 for trunk/MagicSoft


Ignore:
Timestamp:
08/22/07 19:18:35 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8694 r8695  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21
     22 2007/08/22 Thomas Bretz
     23
     24   * mbase/MEnv.cc:
     25     - changed title print out for untouched resources
     26
     27   * mhbase/HBaseLinkDef.h, mhbase/Makefile:
     28     - added new class MHn
     29
     30   * mhbase/MH.[h,cc]
     31     - changed start bin to search for GetRange
     32     - added GetRangeX and GetRangeY member functions
     33     - added GetRangeUserX and GetRangeUserY member functions
     34     - added default to SetPalette
     35
     36   * mhbase/MH3.[h,cc]:
     37     - chnaged to tokenize the name allowing to have different
     38       Binning names for all axes
     39     - added a style bit which allow to auto scale an axis if the
     40       histogram is finally filled
     41     - replaced 9999 with -1 in ProfileX/Y
     42     - moved SetLog from Paint to Draw
     43     - increased class version
     44
     45   * mhflux/MAlphaFitter.cc, mhflux/MHAlpha.cc, mhflux/MHCollectionArea.cc,
     46     mhflux/MHEffectiveOnTime.cc, mhflux/MHEnergyEst.cc,
     47     mreflector/MHReflector.cc:
     48     - replaced 9999 with -1 in ProjectionX/Y/Z
     49     - replaced 9999 with -1 in ProfileX/Y
     50
     51   * mhflux/MMcSpectrumWeight.cc:
     52     - tiny change to output of Print
     53
     54   * mjobs/MJCut.cc:
     55     - added a new Tab CuT displaying VsSize a second time, but with a
     56       user definable cut "CutT" applied
     57
     58   * mjobs/MSequence.[h,cc]:
     59     - added "Comment" to resources
     60     - increased class version nimber
     61
     62   * mmuon/MHMuonPar.cc:
     63     - enable all grids
     64
    2065
    2166
  • trunk/MagicSoft/Mars/mbase/MEnv.cc

    r8674 r8695  
    875875    gLog << inf << flush;
    876876
    877     TString sep = "Untouched Resources - ";
     877    TString sep = "Untouched Resources in ";
    878878    sep += GetRcName();
    879879    gLog.Separator(sep);
  • trunk/MagicSoft/Mars/mhbase/HBaseLinkDef.h

    r6915 r8695  
    99#pragma link C++ class MH+;
    1010#pragma link C++ class MH3+;
     11#pragma link C++ class MHn+;
    1112#pragma link C++ class MHArray+;
    1213#pragma link C++ class MHMatrix+;
  • trunk/MagicSoft/Mars/mhbase/MH3.cc

    r8669 r8695  
    5454// If the binning should have a different name than the histogram name
    5555// the binning name can be added to the name, eg.:
    56 //    SetName("MyHistName;MyBinning")
     56//    SetName("MyHistName;MyXBins;MyYBins")
    5757// Instead of BinningMyHistName[XYZ] the parameter list will be searched
    58 // for BinningMyBinning[XYZ].
     58// for BinningMyXBinning, BinningMyYBins and BinningMyHistNameZ
    5959//
    6060//
     
    8686//   + MData      *fData[3];        // Object from which the data is filled
    8787//
     88// Class Version 3:
     89// ----------------
     90//   - Byte_t fStyleBits
    8891//
    8992/////////////////////////////////////////////////////////////////////////////
     
    9396#include <fstream>
    9497
    95 #include <TPad.h>
     98//#include <TPad.h>
    9699#include <TStyle.h>
    97100#include <TCanvas.h>
     
    121124//
    122125MH3::MH3(const unsigned int dim)
    123     : fDimension(dim>3?3:dim), fHist(NULL)
     126    : fDimension(dim>3?3:dim), fHist(NULL), fStyleBits(0)
    124127
    125128    switch (fDimension)
     
    162165//
    163166MH3::MH3(const char *memberx)
    164     : fDimension(1)
     167    : fDimension(1), fStyleBits(0)
    165168{
    166169    fHist = new TH1D;
     
    182185}
    183186
    184 MH3::MH3(const TH1 &h1) : fDimension(1)
     187MH3::MH3(const TH1 &h1)
     188    : fDimension(1), fStyleBits(0)
    185189{
    186190    if (h1.InheritsFrom(TH3::Class()))
     
    221225//
    222226MH3::MH3(const char *memberx, const char *membery)
    223     : fDimension(2)
     227    : fDimension(2), fStyleBits(0)
    224228{
    225229    fHist = new TH2D;
     
    248252//
    249253MH3::MH3(const char *memberx, const char *membery, const char *memberz)
    250     : fDimension(3)
     254    : fDimension(3), fStyleBits(0)
    251255{
    252256    fHist = new TH3D;
     
    312316    fHist->Reset();
    313317
    314     const Int_t split = fName.First(';');
    315 
    316     const TString name = split<0 ? fName : fName(0, split);
    317     const TString bins = split<0 ? fName : fName(split+1, fName.Length());
    318 
    319     TString bname("Binning");
    320     bname += bins;
     318    // Tokenize name into name and binnings names
     319    TObjArray *tok = fName.Tokenize(";");
     320
     321    const TString name = (*tok)[0] ? (*tok)[0]->GetName() : fName.Data();
     322
     323    TString bx = (*tok)[1] ? (*tok)[1]->GetName() : Form("%sX", name.Data());
     324    TString by = (*tok)[2] ? (*tok)[2]->GetName() : Form("%sY", name.Data());
     325    TString bz = (*tok)[3] ? (*tok)[3]->GetName() : Form("%sZ", name.Data());
     326
     327    bx.Prepend("Binning");
     328    by.Prepend("Binning");
     329    bz.Prepend("Binning");
     330
     331    delete tok;
     332
    321333
    322334    MBinning *binsx = NULL;
     
    327339    {
    328340    case 3:
    329         binsz = (MBinning*)plist->FindObject(bname+"Z", "MBinning");
     341        binsz = (MBinning*)plist->FindObject(bz, "MBinning");
    330342        if (!binsz)
    331343        {
    332             *fLog << err << dbginf << "MBinning '" << bname << "X' not found... aborting." << endl;
     344            *fLog << err << dbginf << "MBinning '" << bz << "' not found... aborting." << endl;
    333345            return kFALSE;
    334346        }
     
    342354            fHist->SetBit(kIsLogz);
    343355    case 2:
    344         binsy = (MBinning*)plist->FindObject(bname+"Y", "MBinning");
     356        binsy = (MBinning*)plist->FindObject(by, "MBinning");
    345357        if (!binsy)
    346358        {
    347             *fLog << err << dbginf << "MBinning '" << bname << "Y' not found... aborting." << endl;
     359            *fLog << err << dbginf << "MBinning '" << by << "' not found... aborting." << endl;
    348360            return kFALSE;
    349361        }
     
    357369            fHist->SetBit(kIsLogy);
    358370    case 1:
    359         binsx = (MBinning*)plist->FindObject(bname+"X", "MBinning");
     371        binsx = (MBinning*)plist->FindObject(bx, "MBinning");
    360372        if (!binsx)
    361373        {
    362374            if (fDimension==1)
    363                 binsx = (MBinning*)plist->FindObject(bname, "MBinning");
     375                binsx = (MBinning*)plist->FindObject("Binning"+fName, "MBinning");
    364376
    365377            if (!binsx)
    366378            {
    367                 *fLog << err << dbginf << "Neither MBinning '" << bname << "X' nor '" << bname << "' found... aborting." << endl;
     379                *fLog << err << dbginf << "Neither '" << bx << "' nor '" << binsx << fName << "' found... aborting." << endl;
    368380                return kFALSE;
    369381            }
     
    477489    return kFALSE;
    478490}
    479 /*
    480 // --------------------------------------------------------------------------
    481 //
    482 // Set the palette you wanna use:
    483 //  - you could set the root "Pretty Palette Violet->Red" by
    484 //    gStyle->SetPalette(1, 0), but in some cases this may look
    485 //    confusing
    486 //  - The maximum colors root allowes us to set by ourself
    487 //    is 50 (idx: 51-100). This colors are set to a grayscaled
    488 //    palette
    489 //  - the number of contours must be two less than the number
    490 //    of palette entries
    491 //
    492 void MHStarMap::PrepareDrawing() const
    493 {
    494     const Int_t numg = 32; // number of gray scaled colors
    495     const Int_t numw = 32; // number of white
    496 
    497     Int_t palette[numg+numw];
    498 
    499     //
    500     // The first half of the colors are white.
    501     // This is some kind of optical background supression
    502     //
    503     gROOT->GetColor(51)->SetRGB(1, 1, 1);
    504 
    505     Int_t i;
    506     for (i=0; i<numw; i++)
    507         palette[i] = 51;
    508 
    509     //
    510     // now the (gray) scaled part is coming
    511     //
    512     for (;i<numw+numg; i++)
    513     {
    514         const Float_t gray = 1.0-(float)(i-numw)/(numg-1.0);
    515 
    516         gROOT->GetColor(52+i)->SetRGB(gray, gray, gray);
    517         palette[i] = 52+i;
    518     }
    519 
    520     //
    521     // Set the palette and the number of contour levels
    522     //
    523     gStyle->SetPalette(numg+numw, palette);
    524     fStarMap->SetContour(numg+numw-2);
    525 }
    526 */
     491
     492// --------------------------------------------------------------------------
     493//
     494// If an auto range bit is set the histogram range of the corresponding
     495// axis is set to show only the non-empty bins (with a single empty bin
     496// on both sides)
     497//
     498Bool_t MH3::Finalize()
     499{
     500    Bool_t autorangex=TESTBIT(fStyleBits, 0);
     501    Bool_t autorangey=TESTBIT(fStyleBits, 1);
     502    //Bool_t autorangez=TESTBIT(fStyleBits, 2);
     503
     504    Int_t lo, hi;
     505
     506    if (autorangex)
     507    {
     508        GetRangeX(*fHist, lo, hi);
     509        cout << "====> " << GetName() << " " << fHist->GetName() << ": " << lo << " " << hi <<" " << fHist->GetNbinsX() <<  endl;
     510        fHist->GetXaxis()->SetRange(lo-2, hi+1);
     511    }
     512    if (autorangey)
     513    {
     514        GetRangeY(*fHist, lo, hi);
     515        fHist->GetYaxis()->SetRange(lo-2, hi+1);
     516    }
     517    /*
     518    if (autorangez)
     519    {
     520        GetRangeZ(*fHist, lo, hi);
     521        fHist->GetZaxis()->SetRange(lo-2, hi+1);
     522    }
     523    */
     524    return kTRUE;
     525}
     526
    527527// --------------------------------------------------------------------------
    528528//
     
    547547    {
    548548        Int_t col = p->GetLineColor();
    549         p = ((TH2*)fHist)->ProfileX(pfx, -1, 9999, "s");
     549        p = ((TH2*)fHist)->ProfileX(pfx, -1, -1, "s");
    550550        p->SetLineColor(col);
    551551    }
     
    555555    {
    556556        Int_t col = p->GetLineColor();
    557         p = ((TH2*)fHist)->ProfileY(pfy, -1, 9999, "s");
     557        p = ((TH2*)fHist)->ProfileY(pfy, -1, -1, "s");
    558558        p->SetLineColor(col);
    559559    }
    560 
     560/*
    561561    if (fHist->TestBit(kIsLogx) && fHist->GetEntries()>0) gPad->SetLogx();
    562562    if (fHist->TestBit(kIsLogy) && fHist->GetEntries()>0) gPad->SetLogy();
    563563    if (fHist->TestBit(kIsLogz) && fHist->GetEntries()>0) gPad->SetLogz();
     564    */
    564565}
    565566
     
    587588    pad->SetGridy();
    588589
     590    if (fHist->TestBit(kIsLogx)) pad->SetLogx();
     591    if (fHist->TestBit(kIsLogy)) pad->SetLogy();
     592    if (fHist->TestBit(kIsLogz)) pad->SetLogz();
     593
    589594    fHist->SetFillStyle(4000);
    590595
     
    624629            *fLog << warn << "TProfile " << pfx << " already in pad." << endl;
    625630
    626         p = ((TH2*)fHist)->ProfileX(pfx, -1, 9999, "s");
     631        p = ((TH2*)fHist)->ProfileX(pfx, -1, -1, "s");
    627632        p->UseCurrentStyle();
    628633        p->SetLineColor(blue ? kBlue : fHist->GetLineColor());
     
    640645            *fLog << warn << "TProfile " << pfy << " already in pad." << endl;
    641646
    642         p = ((TH2*)fHist)->ProfileY(pfy, -1, 9999, "s");
     647        p = ((TH2*)fHist)->ProfileY(pfy, -1, -1, "s");
    643648        p->UseCurrentStyle();
    644649        p->SetLineColor(blue ? kBlue : fHist->GetLineColor());
  • trunk/MagicSoft/Mars/mhbase/MH3.h

    r8082 r8695  
    1010
    1111class TH1;
    12 class TMethodCall;
    1312class MData;
    1413
     
    2524    MData      *fData[3];        // Object from which the data is filled
    2625    Double_t    fScale[3];       // Scale for the three axis (eg unit)
     26    Byte_t      fStyleBits;      // Set the range of a histogram automatically in Finalize
    2727
    2828    void StreamPrimitive(ostream &out) const;
     
    4646    void SetScaleY(Double_t scale) { fScale[1] = scale; }
    4747    void SetScaleZ(Double_t scale) { fScale[2] = scale; }
     48    void SetScale(Double_t x, Double_t y=1, Double_t z=2) { SetScaleX(x); SetScaleY(y); SetScaleZ(z); }
    4849
    4950    void SetLogx(Bool_t b=kTRUE) { b ? fHist->SetBit(kIsLogx) : fHist->ResetBit(kIsLogx); }
    5051    void SetLogy(Bool_t b=kTRUE) { b ? fHist->SetBit(kIsLogy) : fHist->ResetBit(kIsLogy); }
    5152    void SetLogz(Bool_t b=kTRUE) { b ? fHist->SetBit(kIsLogz) : fHist->ResetBit(kIsLogz); }
     53    void SetLog(Bool_t x=kTRUE, Bool_t y=kTRUE, Bool_t z=kTRUE) { SetLogx(x); SetLogy(y); SetLogz(z); }
     54
     55    void SetAutoRangeX(Bool_t b=kTRUE) { b ? SETBIT(fStyleBits, 0) : CLRBIT(fStyleBits, 0); }
     56    void SetAutoRangeY(Bool_t b=kTRUE) { b ? SETBIT(fStyleBits, 1) : CLRBIT(fStyleBits, 1); }
     57    void SetAutoRangeZ(Bool_t b=kTRUE) { b ? SETBIT(fStyleBits, 2) : CLRBIT(fStyleBits, 2); }
     58    void SetAutoRange(Bool_t x=kTRUE, Bool_t y=kTRUE, Bool_t z=kTRUE) { SetAutoRangeX(x); SetAutoRangeY(y); SetAutoRangeZ(z); }
    5259
    5360    void Sumw2() const { if (fHist) fHist->Sumw2(); }
     
    6774    Bool_t SetupFill(const MParList *pList);
    6875    Bool_t Fill(const MParContainer *par, const Stat_t w=1);
     76    Bool_t Finalize();
    6977
    7078    TH1 *GetHistByName(const TString name="") const { return fHist; }
     
    8694    void Paint(Option_t *opt="");
    8795
    88     ClassDef(MH3, 2) // Generalized 1/2/3D-histogram for Mars variables
     96    ClassDef(MH3, 3) // Generalized 1/2/3D-histogram for Mars variables
    8997};
    9098
  • trunk/MagicSoft/Mars/mhbase/Makefile

    r6915 r8695  
    2525           MH.cc \
    2626           MH3.cc \
     27           MHn.cc \
    2728           MHArray.cc \
    2829           MHMatrix.cc
  • trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc

    r8049 r8695  
    526526{
    527527    const TString name(Form("TempAlphaEnergy%06d", gRandom->Integer(1000000)));
    528     TH1D *h = hon.ProjectionZ(name, -1, 9999, bin, bin, "E");
     528    TH1D *h = hon.ProjectionZ(name, -1, -1, bin, bin, "E");
    529529    h->SetDirectory(0);
    530530
     
    537537{
    538538    const TString name(Form("TempAlphaTheta%06d", gRandom->Integer(1000000)));
    539     TH1D *h = hon.ProjectionZ(name, bin, bin, -1, 9999, "E");
     539    TH1D *h = hon.ProjectionZ(name, bin, bin, -1, -1, "E");
    540540    h->SetDirectory(0);
    541541
     
    551551    hon.GetZaxis()->SetRange(bin,bin);
    552552    TH1D *h = (TH1D*)hon.Project3D("ye");
    553     hon.GetZaxis()->SetRange(-1,9999);
     553    hon.GetZaxis()->SetRange(-1,-1);
    554554
    555555    h->SetDirectory(0);
     
    563563{
    564564    const TString name(Form("TempAlpha%06d", gRandom->Integer(1000000)));
    565     TH1D *h = hon.ProjectionZ(name, -1, 9999, -1, 9999, "E");
     565    TH1D *h = hon.ProjectionZ(name, -1, -1, -1, -1, "E");
    566566    h->SetDirectory(0);
    567567
     
    576576    const TString name0(Form("TempAlpha%06d_off", gRandom->Integer(1000000)));
    577577
    578     TH1D *h1 = hon.ProjectionZ(name1, -1, 9999, bin, bin, "E");
    579     TH1D *h0 = hof.ProjectionZ(name0, -1, 9999, bin, bin, "E");
     578    TH1D *h1 = hon.ProjectionZ(name1, -1, -1, bin, bin, "E");
     579    TH1D *h0 = hof.ProjectionZ(name0, -1, -1, bin, bin, "E");
    580580    h1->SetDirectory(0);
    581581    h0->SetDirectory(0);
     
    594594    const TString name0(Form("TempAlpha%06d_off", gRandom->Integer(1000000)));
    595595
    596     TH1D *h1 = hon.ProjectionZ(name1, bin, bin, -1, 9999, "E");
    597     TH1D *h0 = hof.ProjectionZ(name0, bin, bin, -1, 9999, "E");
     596    TH1D *h1 = hon.ProjectionZ(name1, bin, bin, -1, -1, "E");
     597    TH1D *h0 = hof.ProjectionZ(name0, bin, bin, -1, -1, "E");
    598598    h1->SetDirectory(0);
    599599    h0->SetDirectory(0);
     
    614614    hon.GetZaxis()->SetRange(bin,bin);
    615615    TH1D *h1 = (TH1D*)hon.Project3D("ye");
    616     hon.GetZaxis()->SetRange(-1,9999);
     616    hon.GetZaxis()->SetRange(-1,-1);
    617617    h1->SetDirectory(0);
    618618
    619619    hof.GetZaxis()->SetRange(bin,bin);
    620620    TH1D *h0 = (TH1D*)hof.Project3D("ye");
    621     hof.GetZaxis()->SetRange(-1,9999);
     621    hof.GetZaxis()->SetRange(-1,-1);
    622622    h0->SetDirectory(0);
    623623
     
    635635    const TString name0(Form("TempAlpha%06d_off", gRandom->Integer(1000000)));
    636636
    637     TH1D *h1 = hon.ProjectionZ(name1, -1, 9999, -1, 9999, "E");
    638     TH1D *h0 = hof.ProjectionZ(name0, -1, 9999, -1, 9999, "E");
     637    TH1D *h1 = hon.ProjectionZ(name1, -1, -1, -1, -1, "E");
     638    TH1D *h0 = hof.ProjectionZ(name0, -1, -1, -1, -1, "E");
    639639    h1->SetDirectory(0);
    640640    h0->SetDirectory(0);
  • trunk/MagicSoft/Mars/mhflux/MHAlpha.cc

    r8664 r8695  
    401401    MAlphaFitter fit(fFit);
    402402
    403     TH1D *h = fOffData ? fOffData->ProjectionZ("ProjTimeTemp", -1, 9999, -1, 9999, "E") : 0;
     403    TH1D *h = fOffData ? fOffData->ProjectionZ("ProjTimeTemp", -1, -1, -1, -1, "E") : 0;
    404404    const Bool_t rc = fit.ScaleAndFit(fHistTime, h);
    405405    if (h)
  • trunk/MagicSoft/Mars/mhflux/MHCollectionArea.cc

    r8674 r8695  
    121121void MHCollectionArea::CalcEfficiency()
    122122{
    123     TH1D *hsel = fHistSel.ProjectionY("Spy", -1, 9999, "E");;
    124     TH1D *hall = fHistAll.ProjectionY("Apy", -1, 9999, "E");
     123    TH1D *hsel = fHistSel.ProjectionY("Spy", -1, -1, "E");;
     124    TH1D *hall = fHistAll.ProjectionY("Apy", -1, -1, "E");
    125125
    126126    //
     
    327327    pad->cd(1);
    328328    if (gPad->FindObject("ProjSelX"))
    329         fHistSel.ProjectionX("ProjSelX", -1, 9999, "E");
     329        fHistSel.ProjectionX("ProjSelX", -1, -1, "E");
    330330
    331331    pad->cd(2);
    332332    if (gPad->FindObject("ProjAllY"))
    333         h1=fHistAll.ProjectionY("ProjAllY", -1, 9999, "E");
     333        h1=fHistAll.ProjectionY("ProjAllY", -1, -1, "E");
    334334    if (gPad->FindObject("ProjSelY"))
    335         h2=fHistSel.ProjectionY("ProjSelY", -1, 9999, "E");
     335        h2=fHistSel.ProjectionY("ProjSelY", -1, -1, "E");
    336336
    337337    if (h1 && h1->GetMaximum()>0)
     
    381381        gPad->SetGridy();
    382382        /*
    383         h = fHistAll.ProjectionX("ProjAllX", -1, 9999, "E");
     383        h = fHistAll.ProjectionX("ProjAllX", -1, -1, "E");
    384384        h->SetXTitle("\\Theta [\\circ]");
    385385        h->SetDirectory(NULL);
     
    388388        h->Draw();
    389389        */
    390         h = fHistSel.ProjectionX("ProjSelX", -1, 9999, "E");
     390        h = fHistSel.ProjectionX("ProjSelX", -1, -1, "E");
    391391        h->SetXTitle("\\Theta [\\circ]");
    392392        h->SetDirectory(NULL);
     
    405405        gPad->SetGridy();
    406406
    407         h1 = fHistAll.ProjectionY("ProjAllY", -1, 9999, "E");
     407        h1 = fHistAll.ProjectionY("ProjAllY", -1, -1, "E");
    408408        h1->SetDirectory(NULL);
    409409        h1->SetLineColor(kGreen);
     
    412412        h1->Draw();
    413413
    414         h2 = fHistSel.ProjectionY("ProjSelY", -1, 9999, "E");
     414        h2 = fHistSel.ProjectionY("ProjSelY", -1, -1, "E");
    415415        h2->SetDirectory(NULL);
    416416        h2->SetLineColor(kRed);
  • trunk/MagicSoft/Mars/mhflux/MHEffectiveOnTime.cc

    r7818 r8695  
    866866        if ((h = (TH1D*)gPad->FindObject("ProjDeltaT"/*fNameProjDeltaT*/)))
    867867        {
    868             h = fH2DeltaT.ProjectionX("ProjDeltaT"/*fNameProjDeltaT*/, -1, 9999, "E");
     868            h = fH2DeltaT.ProjectionX("ProjDeltaT"/*fNameProjDeltaT*/, -1, -1, "E");
    869869            if (h->GetEntries()>0)
    870870                gPad->SetLogy();
     
    873873        pad->GetPad(2)->cd(1);
    874874        if ((h = (TH1D*)gPad->FindObject("ProjTheta"/*fNameProjTheta*/)))
    875             fH2DeltaT.ProjectionY("ProjTheta"/*fNameProjTheta*/, -1, 9999, "E");
     875            fH2DeltaT.ProjectionY("ProjTheta"/*fNameProjTheta*/, -1, -1, "E");
    876876
    877877        if (!fIsFinalized)
     
    963963    pad->GetPad(1)->cd(1);
    964964    gPad->SetBorderMode(0);
    965     h = fH2DeltaT.ProjectionX("ProjDeltaT"/*fNameProjDeltaT*/, -1, 9999, "E");
     965    h = fH2DeltaT.ProjectionX("ProjDeltaT"/*fNameProjDeltaT*/, -1, -1, "E");
    966966    h->SetTitle("Distribution of \\Delta t [s]");
    967967    h->SetXTitle("\\Delta t [s]");
     
    993993    pad->GetPad(2)->cd(1);
    994994    gPad->SetBorderMode(0);
    995     h = fH2DeltaT.ProjectionY("ProjTheta"/*fNameProjTheta*/, -1, 9999, "E");
     995    h = fH2DeltaT.ProjectionY("ProjTheta"/*fNameProjTheta*/, -1, -1, "E");
    996996    h->SetTitle("Distribution of  \\Theta [\\circ]");
    997997    h->SetXTitle("\\Theta [\\circ]");
  • trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc

    r8673 r8695  
    364364    if ((hx=(TH1D*)gPad->FindObject(MString::Format("Prof%s", h.GetName()))))
    365365    {
    366         hx = hyx->ProfileX(Form("Prof%s", h.GetName()), -1, 9999, "s");
     366        hx = hyx->ProfileX(Form("Prof%s", h.GetName()), -1, -1, "s");
    367367
    368368        if (logy && hx->GetMaximum()>0)
     
    387387    h2->SetLineColor(kRed);
    388388
    389     TH1D *h1 = h2->ProfileX(Form("Prof%s", h.GetName()), -1, 9999, "s");
     389    TH1D *h1 = h2->ProfileX(Form("Prof%s", h.GetName()), -1, -1, "s");
    390390    h1->SetDirectory(NULL);
    391391    h1->SetBit(kCanDelete);
     
    478478    gPad->SetGridy();
    479479    /*
    480     h = fHImpact.ProjectionX("Impact", -1, 9999, "e");
     480    h = fHImpact.ProjectionX("Impact", -1, -1, "e");
    481481    h->SetBit(TH1::kNoStats);
    482482    h->SetTitle("Distribution of Impact");
  • trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.cc

    r8680 r8695  
    485485        *fLog << " New spectral slope:       ";
    486486        if (fNewSlope==-99)
    487             *fLog << "undefined" << endl;
     487            *fLog << "undefined/no change" << endl;
    488488        else
    489489            *fLog << fNewSlope << endl;
  • trunk/MagicSoft/Mars/mimage/MNewImagePar.cc

    r8647 r8695  
    271271    fConcCOG /= hillas.GetSize();                        // [ratio]
    272272
     273    // This can for example happen in case of Muon Rings
     274    if (fConcCOG<0)
     275        fConcCOG=0;
     276
    273277    // Concentration of signal contained in ellipse
    274278    fConcCore /= hillas.GetSize();
  • trunk/MagicSoft/Mars/mjobs/MJCut.cc

    r8669 r8695  
    6262
    6363// Filter
    64 //#include "MFDataMember.h"
     64#include "MFDataPhrase.h"
    6565
    6666// Fit signal environment
     
    665665    cont3.SetAllowEmpty();
    666666
     667    // Filter for VsSize
     668    MFDataPhrase ftheta("", "CutT");
     669    ftheta.SetAllowEmpty();
     670
    667671    // ------------- Loop Off Data --------------------
    668672    MReadReports readoffdata;
     
    712716    MFillH fill2a("MHHillasOffPost [MHHillas]",      "MHillas",      "FillHillasPost");
    713717    MFillH fill3a("MHVsSizeOffPost [MHVsSize]",      "MHillasSrc",   "FillVsSizePost");
     718    MFillH fill3c("MHVsSizeOffTheta [MHVsSize]",     "MHillasSrc",   "FillVsSizeTheta");
    714719    MFillH fill4a("MHHilExtOffPost [MHHillasExt]",   "MHillasSrc",   "FillHilExtPost");
    715720    MFillH fill5a("MHHilSrcOffPost [MHHillasSrc]",   "MHillasSrc",   "FillHilSrcPost");
     
    720725    fill2a.SetNameTab("PostCut");
    721726    fill3a.SetNameTab("VsSize");
     727    fill3c.SetNameTab("CutT");
    722728    fill4a.SetNameTab("HilExt");
    723729    fill5a.SetNameTab("HilSrc");
     
    726732    //fill9a.SetNameTab("EffOffT");
    727733
     734    fill3c.SetFilter(&ftheta);
     735
    728736    //MFDataMember fbin("Bin.fVal", '>', 0);
    729737    //fill9a.SetFilter(&fbin);
     
    738746        fill2a.SetWeight(&scale);
    739747        fill3a.SetWeight(&scale);
     748        fill3c.SetWeight(&scale);
    740749        fill4a.SetWeight(&scale);
    741750        fill5a.SetWeight(&scale);
     
    797806        if (fFullDisplay)
    798807        {
     808            tlist2.AddToList(&ftheta);
    799809            tlist2.AddToList(&fill3a);
     810            tlist2.AddToList(&fill3c);
    800811            tlist2.AddToList(&fill4a);
    801812            tlist2.AddToList(&fill5a);
     
    905916    MFillH fill2b("MHHillasOnPost [MHHillas]",      "MHillas",      "FillHillasPost");
    906917    MFillH fill3b("MHVsSizeOnPost [MHVsSize]",      "MHillasSrc",   "FillVsSizePost");
     918    MFillH fill3d("MHVsSizeOnTheta [MHVsSize]",     "MHillasSrc",   "FillVsSizeTheta");
    907919    MFillH fill4b("MHHilExtOnPost [MHHillasExt]",   "MHillasSrc",   "FillHilExtPost");
    908920    MFillH fill5b("MHHilSrcOnPost [MHHillasSrc]",   "MHillasSrc",   "FillHilSrcPost");
     
    913925    fill2b.SetNameTab("PostCut");
    914926    fill3b.SetNameTab("VsSize");
     927    fill3d.SetNameTab("CutT");
    915928    fill4b.SetNameTab("HilExt");
    916929    fill5b.SetNameTab("HilSrc");
     
    921934    fill2b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":"");
    922935    fill3b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":"");
     936    fill3d.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":"");
    923937    fill4b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":"");
    924938    fill5b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":"");
     
    926940    fill7b.SetDrawOption(set.HasOffSequences()||set.IsWobbleMode()?"same":"");
    927941    //fill9b.SetFilter(&fbin);
     942
     943    fill3d.SetFilter(&ftheta);
    928944
    929945    /*
     
    9851001    {
    9861002        tlist.Replace(&fill1b);
    987 /*        if (fIsWobble)
    988         {
    989             tlist2.AddToListAfter(&fill2b, &fill2a);
    990             tlist2.AddToListAfter(&fill3b, &fill3a);
    991         }
    992         else
    993         */
     1003
    9941004        tlist2.Replace(&fill2b);
    9951005        if (fFullDisplay)
    9961006        {
    9971007            tlist2.Replace(&fill3b);
     1008            tlist2.Replace(&fill3d);
    9981009            tlist2.Replace(&fill4b);
    9991010            tlist2.Replace(&fill5b);
  • trunk/MagicSoft/Mars/mjobs/MSequence.cc

    r8674 r8695  
    123123//   + fMonteCarlo
    124124//
     125//  Class Version 3:
     126//   + fComment
     127//
    125128/////////////////////////////////////////////////////////////////////////////
    126129#include "MSequence.h"
     
    450453    fHvSettings   = env.GetValue("HvSettings", "");
    451454    fMonteCarlo   = env.GetValue("MonteCarlo", kFALSE);
     455    fComment      = env.GetValue("Comment",    "");
    452456
    453457    str = env.GetValue("Runs", "");
     
    544548    if (!fDataPath.IsNull())
    545549        gLog << endl << "DataPath: " << fDataPath << endl;
     550
     551    gLog << endl << "Comment: " << fComment << endl;
     552
    546553}
    547554
  • trunk/MagicSoft/Mars/mjobs/MSequence.h

    r8674 r8695  
    4545    TString fTriggerTable;
    4646    TString fHvSettings;
     47    TString fComment;
    4748
    4849    TArrayI fRuns;
     
    144145    static Bool_t InflatePath(TString &seq, Bool_t ismc=kFALSE);
    145146
    146     ClassDef(MSequence, 2)
     147    ClassDef(MSequence, 3)
    147148};
    148149
  • trunk/MagicSoft/Mars/mmuon/MHMuonPar.cc

    r8691 r8695  
    201201    pad->cd(1);
    202202    gPad->SetBorderMode(0);
     203    gPad->SetGridx();
     204    gPad->SetGridy();
    203205    fHistRadius.Draw();
    204206
    205207    pad->cd(2);
    206208    gPad->SetBorderMode(0);
     209    gPad->SetGridx();
     210    gPad->SetGridy();
    207211    fHistArcWidth.Draw();
    208212
    209213    pad->cd(3);
    210214    gPad->SetBorderMode(0);
     215    gPad->SetGridx();
     216    gPad->SetGridy();
    211217    fHistSize.Draw();
    212218
     
    228234    pad->cd(4);
    229235    gPad->SetBorderMode(0);
     236    gPad->SetGridx();
     237    gPad->SetGridy();
    230238    fHistBroad.Draw();
    231239
  • trunk/MagicSoft/Mars/mreflector/MHReflector.cc

    r8315 r8695  
    196196    pad->cd(2);
    197197    gPad->SetBorderMode(0);
    198     TH1 *h = fHistRad.ProjectionY("ProfRad", -1, 9999, "e");
     198    TH1 *h = fHistRad.ProjectionY("ProfRad", -1, -1, "e");
    199199    h->SetTitle("RadialProfile");
    200200    h->SetDirectory(NULL);
     
    209209    gPad->SetLogx();
    210210    gPad->SetLogy();
    211     h = fHistSize.ProjectionY("ProfSize", -1, 9999, "e");
     211    h = fHistSize.ProjectionY("ProfSize", -1, -1, "e");
    212212    h->SetTitle("Size distribution");
    213213    h->SetDirectory(NULL);
     
    279279    if (gPad->FindObject("ProfRad"))
    280280    {
    281         h = fHistRad.ProjectionY("ProfRad", -1, 9999, "e");
     281        h = fHistRad.ProjectionY("ProfRad", -1, -1, "e");
    282282        h->Scale(1./h->Integral());
    283283    }
     
    287287    if (gPad->FindObject("ProfSize"))
    288288    {
    289         h = fHistSize.ProjectionY("ProfSize", -1, 9999, "e");
     289        h = fHistSize.ProjectionY("ProfSize", -1, -1, "e");
    290290        h->Scale(1./h->Integral());
    291291    }
Note: See TracChangeset for help on using the changeset viewer.