Changeset 9301


Ignore:
Timestamp:
02/07/09 16:11:57 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9300 r9301  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2009/02/07 Thomas Bretz
     22
     23   * sponde.rc:
     24     - fixed a typo
     25
     26   * datacenter/scripts/runcorsika:
     27     - added a comment
     28
     29   * mbase/MContinue.h:
     30     - changed a comment
     31
     32   * mbase/MEnv.h:
     33     - Do not assign a temporary TString to const char *
     34
     35   * mcamera/MCameraCentralPix.[h,cc]:
     36     - changed fDC from Float_t to Int_t
     37
     38   * mhflux/MHCollectionArea.cc, mhflux/MHDisp.cc, mhflux/MHEnergyEst.cc,
     39     mhflux/MHFalseSource.cc, mhflux/MHThreshold.cc:
     40     - use MString::Format instead of Form
     41
     42   * msim/MHPhotonEvent.cc:
     43     - don't fill kNightSky primaries
     44
     45   * msim/MPhotonEvent.[h,cc]:
     46     - return the number of non NightSky photons
     47
     48   * msimcamera/MSimPSF.cc:
     49     - changed default for fSigma from 1 to -1
     50
     51
    2052
    2153 2009/02/06 Daniela Dorner
  • trunk/MagicSoft/Mars/datacenter/scripts/runcorsika

    r9220 r9301  
    6262   echo "OBSLEV 2200.E2"
    6363   # From www.noaa.gov/geomagmodels roughly for January 2009. (was 29.5 and 23.0)
     64   # MAGNET BX BZ (BX is the horizontal component (muT) to the x-direction of
     65   # the detector, BZ is the vertical component (muT) downwards)
    6466   echo "MAGNET 30.3 24.1"
    6567   # Atmosphere
  • trunk/MagicSoft/Mars/mbase/MContinue.h

    r9178 r9301  
    5757    void Print(Option_t *o="") const; //*MENU*
    5858
    59     ClassDef(MContinue, 2) //Task returning kCONTINUE
     59    ClassDef(MContinue, 2) //Task returning kCONTINUE (or any other return code)
    6060};
    6161
  • trunk/MagicSoft/Mars/mbase/MEnv.h

    r8882 r9301  
    4040    Double_t    GetValue(const char *name, Double_t dflt);
    4141    const char *GetValue(const char *name, const char *dflt);
     42
     43    // GetValue: regexp
    4244
    4345    const char *GetName() const;
  • trunk/MagicSoft/Mars/mcamera/MCameraCentralPix.cc

    r9289 r9301  
    2929// Class Version 2:
    3030// ----------------
    31 //   + Float_t fDC
     31//   + Int_t fDC
    3232//
    3333/////////////////////////////////////////////////////////////////////////////
  • trunk/MagicSoft/Mars/mcamera/MCameraCentralPix.h

    r9289 r9301  
    1313    Bool_t fStatus; // Status of central pixel
    1414
    15     Float_t fDC;    // [nA]
     15    Int_t fDC;     // DC current in ADC counts
    1616
    1717public:
    18     MCameraCentralPix() : fDC(-1)
     18    MCameraCentralPix() : fDC(0)
    1919    {
    2020        fName  = "MCameraCentralPix";
     
    2525    Bool_t GetStatusCPix() const { return fStatus; } // deprecated - for compatibility only
    2626
     27    Int_t GetDC() const { return fDC; }
     28
    2729    ClassDef(MCameraCentralPix, 2) // Container storing information about the Central Pixel status
    2830};
  • trunk/MagicSoft/Mars/mhflux/MHCollectionArea.cc

    r9153 r9301  
    4545#include "MLogManip.h"
    4646
     47#include "MString.h"
    4748#include "MBinning.h"
    4849
     
    300301        //                         GetCollectionAreaEff(),
    301302        //                         GetCollectionAreaAbs(), fMcAreaRadius);
    302         const TString txt = Form("r_{max}=%.0fm --> A_{max}=%.0fm^{2}",
    303                                  fMcAreaRadius, GetCollectionAreaAbs());
     303        const TString txt = MString::Format("r_{max}=%.0fm --> A_{max}=%.0fm^{2}",
     304                                            fMcAreaRadius, GetCollectionAreaAbs());
    304305
    305306        TLatex text(0.31, 0.95, txt);
  • trunk/MagicSoft/Mars/mhflux/MHDisp.cc

    r9281 r9301  
    624624            h2->Fit(&func, "IQ", "", 0, 1.0);
    625625
    626             h2->SetTitle(Form("P=(%.2f\\circ/%.2f\\circ) \\omega=%.2f\\circ f=%.2f", x0, y0, func.GetParameter(2), TMath::Abs(scale)));
     626            h2->SetTitle(MString::Format("P=(%.2f\\circ/%.2f\\circ) \\omega=%.2f\\circ f=%.2f",
     627                                         x0, y0, func.GetParameter(2), TMath::Abs(scale)));
    627628        }
    628629    }
  • trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc

    r9153 r9301  
    399399TH1 *MHEnergyEst::MakeProf(TH2 &h)
    400400{
    401     TH1 *p = h.ProfileX(Form("Prof%s", h.GetName()), -1, -1, "s");
     401    TH1 *p = h.ProfileX(MString::Format("Prof%s", h.GetName()), -1, -1, "s");
    402402    p->SetDirectory(NULL);
    403403    p->SetBit(kCanDelete);
  • trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc

    r9153 r9301  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHFalseSource.cc,v 1.23 2008-11-11 11:42:14 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHFalseSource.cc,v 1.24 2009-02-07 16:11:57 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    144144#include "MAlphaFitter.h"
    145145
     146#include "MString.h"
    146147#include "MBinning.h"
    147148#include "MParList.h"
     
    409410    const Float_t cut1 = axe.GetBinLowEdge(f);
    410411    const Float_t cut2 = axe.GetBinUpEdge(l);
    411     h2->SetTitle(Form("Distribution of %.1f\\circ<|\\alpha|<%.1f\\circ in x,y", cut1, cut2));
     412    h2->SetTitle(MString::Format("Distribution of %.1f\\circ<|\\alpha|<%.1f\\circ in x,y", cut1, cut2));
    412413
    413414    // Get projection for range
     
    446447    axe.SetRangeUser(0, fAlphaCut);
    447448    const Float_t cut = axe.GetBinUpEdge(axe.GetLast());
    448     h3->SetTitle(Form("Distribution of |\\alpha|<%.1f\\circ in x,y", cut));
     449    h3->SetTitle(MString::Format("Distribution of |\\alpha|<%.1f\\circ in x,y", cut));
    449450
    450451    // Get projection for range
     
    606607            // Than for their projections
    607608            TH1 *h = fHist.ProjectionZ("Alpha_z", maxx, maxx, maxy, maxy);
    608             h->SetTitle(Form("Distribution of \\alpha for x=%.2f y=%.2f (S_{max}=%.1f\\sigma)", x, y, s));
     609            h->SetTitle(MString::Format("Distribution of \\alpha for x=%.2f y=%.2f (S_{max}=%.1f\\sigma)", x, y, s));
    609610
    610611            TH1D *ho=0;
     
    934935    histb->Reset();
    935936    hist->SetNameTitle("Significance",
    936                        Form("Fit Region: Signal<%.1f\\circ, %.1f\\circ<Bg<%.1f\\circ",
    937                             sigmax, bgmin, bgmax));
     937                       MString::Format("Fit Region: Signal<%.1f\\circ, %.1f\\circ<Bg<%.1f\\circ",
     938                                       sigmax, bgmin, bgmax));
    938939    hists->SetName("Excess");
    939940    histb->SetName("Background");
     
    10521053    h0b.GetXaxis()->SetRangeUser(0, maxalpha0*1.5);
    10531054
    1054     hists->SetTitle(Form("Excess events for \\alpha<%.0f\\circ (N_{max}=%d)", sigint, (int)hists->GetMaximum()));
    1055     histb->SetTitle(Form("Background events for \\alpha<%.0f\\circ", sigint));
     1055    hists->SetTitle(MString::Format("Excess events for \\alpha<%.0f\\circ (N_{max}=%d)", sigint, (int)hists->GetMaximum()));
     1056    histb->SetTitle(MString::Format("Background events for \\alpha<%.0f\\circ", sigint));
    10561057
    10571058    //hists->SetMinimum(GetMinimumGT(*hists));
     
    11421143    if (maxx>0 && maxy>0)
    11431144    {
    1144         const char *title = Form(" \\alpha for x=%.2f y=%.2f (S_{max}=%.1f\\sigma) ",
    1145                                  hist->GetXaxis()->GetBinCenter(maxx),
    1146                                  hist->GetYaxis()->GetBinCenter(maxy), maxs);
     1145        const char *title = MString::Format(" \\alpha for x=%.2f y=%.2f (S_{max}=%.1f\\sigma) ",
     1146                                            hist->GetXaxis()->GetBinCenter(maxx),
     1147                                            hist->GetYaxis()->GetBinCenter(maxy), maxs);
    11471148
    11481149        h = fHist.ProjectionZ("AlphaFit", maxx, maxx, maxy, maxy);
     
    11881189        }
    11891190
    1190         TF1 f1("f1", Form("gaus(0) + pol%d(3)", fHistOff ? 0 : polynom), 0, 90);
    1191         TF1 f2("f2", Form("gaus(0) + pol%d(3)", fHistOff ? 0 : polynom), 0, 90);
     1191        TF1 f1("f1", MString::Format("gaus(0) + pol%d(3)", fHistOff ? 0 : polynom), 0, 90);
     1192        TF1 f2("f2", MString::Format("gaus(0) + pol%d(3)", fHistOff ? 0 : polynom), 0, 90);
    11921193        f1.SetParameters(maxpar.GetArray());
    11931194        f2.SetParameters(maxpar.GetArray());
     
    12041205        leg->SetBorderSize(1);
    12051206        leg->SetTextSize(0.04);
    1206         leg->AddText(0.5, 0.82, Form("A * exp(-(\\frac{x-\\mu}{\\sigma})^{2}/2) + pol%d", polynom))->SetTextAlign(22);
     1207        leg->AddText(0.5, 0.82, MString::Format("A * exp(-(\\frac{x-\\mu}{\\sigma})^{2}/2) + pol%d", polynom))->SetTextAlign(22);
    12071208        //leg->AddText(0.5, 0.82, "A * exp(-(\\frac{x-\\mu}{\\sigma})^{2}/2) + b*x^{2} + a")->SetTextAlign(22);
    12081209        leg->AddLine(0, 0.65, 0, 0.65);
    1209         leg->AddText(0.06, 0.54, Form("A=%.2f", maxpar[0]))->SetTextAlign(11);
    1210         leg->AddText(0.06, 0.34, Form("\\sigma=%.2f", maxpar[2]))->SetTextAlign(11);
    1211         leg->AddText(0.06, 0.14, Form("\\mu=%.2f (fix)", maxpar[1]))->SetTextAlign(11);
    1212         leg->AddText(0.60, 0.54, Form("a=%.2f", maxpar[3]))->SetTextAlign(11);
    1213         leg->AddText(0.60, 0.34, Form("b=%.2f (fix)", maxpar[4]))->SetTextAlign(11);
     1210        leg->AddText(0.06, 0.54, MString::Format("A=%.2f", maxpar[0]))->SetTextAlign(11);
     1211        leg->AddText(0.06, 0.34, MString::Format("\\sigma=%.2f", maxpar[2]))->SetTextAlign(11);
     1212        leg->AddText(0.06, 0.14, MString::Format("\\mu=%.2f (fix)", maxpar[1]))->SetTextAlign(11);
     1213        leg->AddText(0.60, 0.54, MString::Format("a=%.2f", maxpar[3]))->SetTextAlign(11);
     1214        leg->AddText(0.60, 0.34, MString::Format("b=%.2f (fix)", maxpar[4]))->SetTextAlign(11);
    12141215        if (polynom>1)
    1215             leg->AddText(0.60, 0.14, Form("c=%.2f", !fHistOff?maxpar[5]:0))->SetTextAlign(11);
     1216            leg->AddText(0.60, 0.14, MString::Format("c=%.2f", !fHistOff?maxpar[5]:0))->SetTextAlign(11);
    12161217        leg->SetBit(kCanDelete);
    12171218        leg->Draw();
     
    12491250        leg->SetBorderSize(1);
    12501251        leg->SetTextSize(0.1);
    1251         leg->AddText(Form("S_{max}=%.1f\\sigma at \\alpha_{max}=%d\\circ", maxsig, max));
     1252        leg->AddText(MString::Format("S_{max}=%.1f\\sigma at \\alpha_{max}=%d\\circ", maxsig, max));
    12521253        leg->SetBit(kCanDelete);
    12531254        leg->Draw();
     
    13561357    TString str2("el.SetY1(gPad->GetY1()+0.9*(gPad->GetY2()-gPad->GetY1()));");
    13571358
    1358     str1.ReplaceAll("el.", Form("((TEllipse*)%p)->", el));
    1359     str2.ReplaceAll("el.", Form("((TEllipse*)%p)->", el));
    1360 
    1361     str1.ReplaceAll("0.9", Form("%f", x0));
    1362     str2.ReplaceAll("0.9", Form("%f", y0));
     1359    str1.ReplaceAll("el.", MString::Format("((TEllipse*)%p)->", el));
     1360    str2.ReplaceAll("el.", MString::Format("((TEllipse*)%p)->", el));
     1361
     1362    str1.ReplaceAll("0.9", MString::Format("%f", x0));
     1363    str2.ReplaceAll("0.9", MString::Format("%f", y0));
    13631364
    13641365    TLatex tex;
     
    13911392                 "y.GetBinLowEdge(y.GetLast()+1));");
    13921393
    1393     str3.ReplaceAll("x.", Form("((TAxis*)%p)->", &x));
    1394     str3.ReplaceAll("y.", Form("((TAxis*)%p)->", &y));
     1394    str3.ReplaceAll("x.", MString::Format("((TAxis*)%p)->", &x));
     1395    str3.ReplaceAll("y.", MString::Format("((TAxis*)%p)->", &y));
    13951396    // str3.ReplaceAll("pad", Form("((TPad*)(%p))", pad));
    13961397
  • trunk/MagicSoft/Mars/mhflux/MHThreshold.cc

    r9153 r9301  
    4646#include "MLogManip.h"
    4747
     48#include "MString.h"
    4849#include "MBinning.h"
    4950
     
    115116
    116117    TH1D h(fHEnergy);
     118    h.SetDirectory(0);
    117119
    118120#if ROOT_VERSION_CODE<ROOT_VERSION(5,20,00)
     
    138140    const Axis_t maxe = TMath::Sqrt(axe.GetBinLowEdge(bin)*axe.GetBinUpEdge(bin));
    139141
    140     TLatex text(0.30, 0.95, Form("E_{max}=%dGeV (%dGeV,%dGeV)", TMath::Nint(maxe),
    141                                  TMath::Nint(axe.GetBinLowEdge(bin)),
    142                                  TMath::Nint(axe.GetBinUpEdge(bin))));
     142    TLatex text(0.30, 0.95, MString::Format("E_{max}=%dGeV (%dGeV,%dGeV)", TMath::Nint(maxe),
     143                                            TMath::Nint(axe.GetBinLowEdge(bin)),
     144                                            TMath::Nint(axe.GetBinUpEdge(bin))));
    143145    text.SetBit(TLatex::kTextNDC);
    144146    text.SetTextSize(0.04);
  • trunk/MagicSoft/Mars/msim/MPhotonEvent.cc

    r9243 r9301  
    213213}
    214214
     215Int_t MPhotonEvent::GetNumExternal() const
     216{
     217    Int_t n=0;
     218
     219    for (int i=0; i<GetNumPhotons(); i++)
     220        if ((*this)[i].GetPrimary()!=MMcEvtBasic::kNightSky)
     221            n++;
     222
     223    return n;
     224}
     225
    215226// --------------------------------------------------------------------------
    216227//
  • trunk/MagicSoft/Mars/msim/MPhotonEvent.h

    r9239 r9301  
    7878    // Getter/Setter
    7979    Int_t GetNumPhotons() const { return fData.GetEntriesFast(); }
     80    Int_t GetNumExternal() const;
    8081
    8182    TClonesArray &GetArray() { return fData; }
  • trunk/MagicSoft/Mars/msimcamera/MSimPSF.cc

    r9243 r9301  
    5858//
    5959MSimPSF::MSimPSF(const char* name, const char *title)
    60     : fEvt(0), fSigma(1)
     60    : fEvt(0), fSigma(-1)
    6161{
    6262    fName  = name  ? name  : "MSimPSF";
  • trunk/MagicSoft/Mars/sponde.rc

    r8750 r9301  
    6363
    6464# You can apply a cut in addition to all other cuts to your data and
    65 # MOnte Carlos. This can be usefull for example to setup a second
     65# Monte Carlos. This can be usefull for example to setup a second
    6666# MFMagicCuts with a tighter behaviour assuming that your ganymed
    6767# was written with a really loose cut.
Note: See TracChangeset for help on using the changeset viewer.