Changeset 8940


Ignore:
Timestamp:
06/12/08 15:35:15 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Makefile

    r8913 r8940  
    109109        $(CXX) $(CXXFLAGS) $(SOFLAG) $(OBJS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o ${RNDMNAME}
    110110        mv ${RNDMNAME} $@
     111        chmod go+r $@
    111112
    112113# This is a special workaround to create the shared object (bundle, plugin)
  • trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C

    r8931 r8940  
    119119    }
    120120
     121    MHCamera *cal = (MHCamera*)arr.FindObjectInCanvas("CalPos;avg", "MHCamera", "CalPos");
    121122    MHCamera *pul = (MHCamera*)arr.FindObjectInCanvas("PulsePos;avg", "MHCamera", "PulsePos");
    122123    if (!pul)
     
    220221    TString meansiginner =Form("%6.2f", meansigi);
    221222    TString meansigouter =Form("%6.2f", meansigo);
     223
     224    TString calpos = cal ? Form("%5.1f", cal->GetMean()) : "NULL";
    222225
    223226    if (pul->GetMean()<0 || pul->GetRMS()<0)
     
    300303        Int_t nx = htp->GetNbinsX();
    301304
    302         rateped  = Form("%8.1f", iped <0 ? 0 : htp->Integral(1, nx, iped,  iped)  / nx);
    303         rateped2 = Form("%7.2f", iped2<0 ? 0 : htp->Integral(1, nx, iped2, iped2) / nx);
    304         ratecal  = Form("%8.1f", ical <0 ? 0 : htp->Integral(1, nx, ical,  ical)  / nx);
    305         ratetrig = Form("%8.1f", itrig<0 ? 0 : htp->Integral(1, nx, itrig, itrig) / nx);
    306         ratesum  = Form("%8.1f", isum <0 ? 0 : htp->Integral(1, nx, isum,  isum)  / nx);
    307         ratenull = Form("%8.1f", inull<0 ? 0 : htp->Integral(1, nx, inull, inull) / nx);
    308         ratena   = Form("%7.2f", ina  <0 ? 0 : htp->Integral(1, nx, ina,   ina)   / nx);
     305        rateped  = iped <0 ? "NULL" : Form("%8.1f", htp->Integral(1, nx, iped,  iped)  / nx);
     306        rateped2 = iped2<0 ? "NULL" : Form("%7.2f", htp->Integral(1, nx, iped2, iped2) / nx);
     307        ratecal  = ical <0 ? "NULL" : Form("%8.1f", htp->Integral(1, nx, ical,  ical)  / nx);
     308        ratetrig = itrig<0 ? "NULL" : Form("%8.1f", htp->Integral(1, nx, itrig, itrig) / nx);
     309        ratesum  = isum <0 ? "NULL" : Form("%8.1f", htp->Integral(1, nx, isum,  isum)  / nx);
     310        ratenull = inull<0 ? "NULL" : Form("%8.1f", htp->Integral(1, nx, inull, inull) / nx);
     311        ratena   = ina  <0 ? "NULL" : Form("%7.2f", htp->Integral(1, nx, ina,   ina)   / nx);
    309312    }
    310313
    311314    // *****************************************************
    312 
    313     // *****************************************************
    314 
    315315
    316316    cout << "Sequence #" << seq << endl;
     
    319319    cout << "  Mean Signal  inner [phe] " << meansiginner  << endl;
    320320    cout << "  Mean Signal  outer [phe] " << meansigouter  << endl;
     321    cout << "  Mean extracted  PulsePos " << meanextpulpos << " +- " << rmsextpulpos << endl;
    321322    cout << "  Mean calibrated PulsePos " << meanpulpos    << " +- " << rmspulpos    << endl;
    322     cout << "  Mean extracted  PulsePos " << meanextpulpos << " +- " << rmsextpulpos << endl;
     323    cout << "  Mean calib pulse pos     " << calpos << endl;
    323324//    cout << "  Mean ext.HiGain PulsePos " << meanpulhi     << " +- " << rmspulhi     << endl;
    324325//    cout << "  Mean ext.LoGain PulsePos " << meanpullo     << " +- " << rmspullo     << endl;
     
    346347                        " fPulsePosMean=%s,      fPulsePosRms=%s,      "
    347348                        " fPulsePosCheckMean=%s, fPulsePosCheckRms=%s, "
     349                        " fPulsePosCalib=%s, "
    348350                        //" fPulsePosHiMean=%s,    fPulsePosHiRms=%s,    "
    349351                        //" fPulsePosLoMean=%s,    fPulsePosLoRms=%s,    "
     
    360362                         meanpulpos.Data(),    rmspulpos.Data(),
    361363                         meanextpulpos.Data(), rmsextpulpos.Data(),
     364                         calpos.Data(),
    362365                         //meanpulhi.Data(),     rmspulhi.Data(),
    363366                         //meanpullo.Data(),     rmspullo.Data(),
  • trunk/MagicSoft/Mars/datacenter/macros/fillstar.C

    r8934 r8940  
    183183        return 2;
    184184    }
    185     TString maxhum = Form("%5.1f", TMath::MaxElement(g->GetN(), g->GetY()));
    186     TString avghum = Form("%5.1f", g->GetMean(2));
     185    TString maxhum = g->GetN()>0 ? Form("%5.1f", TMath::MaxElement(g->GetN(), g->GetY())) : "NULL";
     186    TString avghum = g->GetN()>0 ? Form("%5.1f", g->GetMean(2)) : "NULL";
    187187
    188188    g = (TGraph*)arr.FindObjectInCanvas("Temperature", "TGraph", "MHWeather");
     
    192192        return 2;
    193193    }
    194     TString avgtemp = Form("%5.1f", g->GetMean(2));
     194    TString avgtemp = g->GetN()>0 ? Form("%5.1f", g->GetMean(2)) : "NULL";
    195195
    196196    g = (TGraph*)arr.FindObjectInCanvas("WindSpeed", "TGraph", "MHWeather");
     
    200200        return 2;
    201201    }
    202     TString avgwind = Form("%5.1f", g->GetMean(2));
     202    TString avgwind = g->GetN()>0 ? Form("%5.1f", g->GetMean(2)) : "NULL";
    203203
    204204    g = (TGraph*)arr.FindObjectInCanvas("Cloudiness", "TGraph", "MHWeather");
    205205    if (!g)
    206206        cout << "WARNING - Reading of Cloudiness failed." << endl;
    207     TString avgclouds = g ? Form("%5.1f", g->GetMean(2)) : 0;
    208     TString rmsclouds = g ? Form("%5.1f", g->GetRMS(2))  : 0;
     207    TString avgclouds = g ? Form("%5.1f", g->GetMean(2)) : "NULL";
     208    TString rmsclouds = g ? Form("%5.1f", g->GetRMS(2))  : "NULL";
    209209
    210210    g = (TGraph*)arr.FindObjectInCanvas("TempSky", "TGraph", "MHWeather");
    211211    if (!g)
    212212        cout << "WARNING - Reading of TempSky failed." << endl;
    213     TString avgsky = g ? Form("%5.1f", g->GetMean(2)+200) : 0;
     213    TString avgsky = g ? Form("%5.1f", g->GetMean(2)+200) : "NULL";
    214214
    215215
     
    218218        cout << "WARNING - Reading of NumStars failed." << endl;
    219219
    220     Double_t numstarmed = g ? TMath::Median(g->GetN(), g->GetY()) : -1;
    221     TString numstarsmed = Form("%5.1f", numstarmed);
    222     Double_t numstarrms = g ? g->GetRMS(2) : -1;
    223     TString numstarsrms = Form("%5.1f", numstarrms);
     220    TString numstarsmed = g ? Form("%5.1f", TMath::Median(g->GetN(), g->GetY())) : "NULL";
     221    TString numstarsrms = g ? Form("%5.1f", g->GetRMS(2)) : "NULL";
    224222
    225223    g = (TGraph*)arr.FindObjectInCanvas("NumStarsCor", "TGraph", "MHPointing");
     
    230228    }
    231229
    232     TString numcorsmed = Form("%5.1f", g ? TMath::Median(g->GetN(), g->GetY()) : -1);
    233     TString numcorsrms = Form("%5.1f", g ? g->GetRMS(2) : -1);
     230    TString numcorsmed = g ? Form("%5.1f", TMath::Median(g->GetN(), g->GetY())) : "NULL";
     231    TString numcorsrms = g ? Form("%5.1f", g->GetRMS(2)) : "NULL";
    234232
    235233    g = (TGraph*)arr.FindObjectInCanvas("Brightness", "TGraph", "MHPointing");
     
    240238    }
    241239
    242     TString skybrightnessmed = Form("%5.1f", g ? TMath::Median(g->GetN(), g->GetY()) : -1);
    243     TString skybrightnessrms = Form("%5.1f", g ? g->GetRMS(2) : -1);
    244 
     240    TString skybrightnessmed = g ? Form("%5.1f", TMath::Median(g->GetN(), g->GetY())) : "NULL";
     241    TString skybrightnessrms = g ? Form("%5.1f", g->GetRMS(2)) : "NULL";
    245242
    246243    TString sequence = fname(TRegexp("star[0-9]+[.]root$"));
  • trunk/MagicSoft/Mars/macros/tutorials/readrfl.C

    r7159 r8940  
    5353}
    5454
    55 void readrfl(int runno=-1, int evtno=-1, const char *fname="Gamma_zbin0_90_7_50700to50704_w0.rfl")
     55void readrfl(int runno=-1, int evtno=-1, const char *fname="~msmeyer/MC/MagicSoft/Simulation/Detector/ReflectorII/resultsQi/000302.rfl")
    5656{
    5757    MParList plist;
     
    8787    cout << "Runno: " << runno << "  Eventno: " << evtno << endl;
    8888
     89    runhead.Print();
     90
    8991    while (JumpTo(tlist, read, runno, evtno))
    9092    {
     
    9496        cout << "Event #" << evthead.GetEvtNumber() << endl;
    9597
     98        evthead.Print();
     99
    96100        display.SetCamContent(event);
     101
     102        if (display.GetMean()<1e-5)
     103            continue;
    97104
    98105        gPad->Modified();
  • trunk/MagicSoft/Mars/mhist/MHEvent.cc

    r8434 r8940  
    295295
    296296    pad->GetPad(2)->cd(1);
    297     if (gPad->FindObject(Form("Proj_%p", this)))
    298     {
    299         TH1 *h=fHist->Projection(Form("Proj_%p", this));
     297    if (gPad->FindObject("Proj"))
     298    {
     299        TH1 *h=fHist->Projection("Proj");
    300300        if (h->GetMaximum()>0)
    301301            gPad->SetLogy();
     
    303303
    304304    pad->GetPad(2)->cd(2);
    305     if (gPad->FindObject(Form("ProfR_%p", this)))
    306         fHist->RadialProfile(Form("ProfR_%p", this));
     305    if (gPad->FindObject("ProfRad"))
     306        fHist->RadialProfile("ProfRad");
    307307
    308308    pad->GetPad(2)->cd(3);
    309     if (gPad->FindObject(Form("ProfA_%p", this)))
    310         fHist->AzimuthProfile(Form("ProfA_%p", this));
     309    if (gPad->FindObject("ProfAz"))
     310        fHist->AzimuthProfile("ProfAz");
    311311}
    312312
     
    341341    gPad->SetBorderMode(0);
    342342
    343     TH1 *h = fHist->Projection(Form("Proj_%p", this), 50);
     343    TH1 *h = fHist->Projection("Proj", 50);
    344344    h->SetTitle("Projection");
    345345    h->SetBit(kCanDelete);
     
    349349    gPad->SetBorderMode(0);
    350350
    351     h = (TH1*)fHist->RadialProfile(Form("ProfR_%p", this), 20);
     351    h = (TH1*)fHist->RadialProfile("ProfRad", 20);
    352352    h->SetTitle("Radial Profile");
    353353    h->SetBit(kCanDelete|TH1::kNoStats);
     
    356356    pad->cd(3);
    357357    gPad->SetBorderMode(0);
    358     h = (TH1*)fHist->AzimuthProfile(Form("ProfA_%p", this), 30);
     358    h = (TH1*)fHist->AzimuthProfile("ProfAz", 30);
    359359    h->SetTitle("Azimuth Profile");
    360360    h->SetBit(kCanDelete|TH1::kNoStats);
  • trunk/MagicSoft/Mars/mhist/MHWeather.cc

    r8934 r8940  
    249249    axis->SetTitleOffset(1.2);
    250250    axis->SetTextColor(col);
     251    axis->SetLabelColor(col);
    251252    axis->SetBit(kCanDelete);
    252253    axis->Draw();
     
    281282    gPad->SetGridx();
    282283    gPad->SetGridy();
    283     fHumidity.Draw("AP");
     284     fHumidity.Draw("AP");
    284285    fCloudiness.Draw("P");
    285286    DrawRightAxis("Cloudiness [%]");
     
    340341    if (gPad)
    341342    {
    342         fTemperature.GetHistogram()->GetYaxis()->SetTitleColor(kRed);
    343         //fTempSky.GetHistogram()->GetYaxis()->SetTitleColor(kBlue);
     343        fTemperature.GetYaxis()->SetLabelColor(kRed);
     344        fTemperature.GetYaxis()->SetTitleColor(kRed);
    344345        UpdateRightAxis(fTemperature); // Primary axis
    345346    }
     
    348349    if (gPad)
    349350    {
    350         fHumidity.GetHistogram()->GetYaxis()->SetTitleColor(kBlue);
    351         fHumidity.GetHistogram()->GetYaxis()->SetTitleOffset(1.2);
     351        fHumidity.GetYaxis()->SetLabelColor(kBlue);
     352        fHumidity.GetYaxis()->SetTitleColor(kBlue);
     353        fHumidity.GetYaxis()->SetTitleOffset(1.2);
    352354        UpdateRightAxis(fHumidity);    // Primary axis
    353355    }
  • trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc

    r8884 r8940  
    12631263            // Don't do this on the original object!
    12641264            histsel->SetStats(kFALSE);
    1265 
     1265          /*
    12661266            fLog->Separator("Kolmogorov Test");
    12671267            histsel->KolmogorovTest(excess, "DX");
     
    12721272            tex.SetBit(TLatex::kTextNDC);
    12731273            tex.DrawLatex(0.75, 0.93, Form("P(\\chi^{2})=%.0f%%", p*100));
     1274           */
    12741275        }
    12751276    }
     
    13881389    hist.InitTitle(";Slope;Disp-Dist [\\circ];");
    13891390    hist.SetDrawOption("colz profx");
     1391}
     1392
     1393void MJSpectrum::SetupHistEnergyRes(MHn &hist) const
     1394{
     1395    hist.AddHist("MEnergyEst.fVal", "(MMcEvt.fEnergy/MEnergyEst.fVal-1)^2", MH3::kProfile);
     1396    hist.InitName("ResEest;EnergyEst;");
     1397    hist.InitTitle(";E_{est} [GeV];Resolution (E_{mc}/E_{est}-1)^{2};");
     1398
     1399    //hist.AddHist("MMcEvt.fEnergy", "(MEnergyEst.fVal/MMcEvt.fEnergy-1)^2", MH3::kProfile);
     1400    //hist.InitName("ResEmc;EnergyEst;");
     1401    //hist.InitTitle(";E_{mc} [GeV];Resolution (E_{est}/E_{mc}-1)^{2};");
     1402    hist.AddHist("MHillas.fSize", "(MMcEvt.fEnergy/MEnergyEst.fVal-1)^2", MH3::kProfile);
     1403    hist.InitName("ResSize;Size;");
     1404    hist.InitTitle(";S [phe];Resolution (E_{mc}/E_{est}-1)^{2};");
     1405
     1406    hist.AddHist("MPointingPos.fZd", "(MMcEvt.fEnergy/MEnergyEst.fVal-1)^2", MH3::kProfile);
     1407    hist.InitName("ResTheta;Theta;");
     1408    hist.InitTitle(";\\Theta [\\circ];Resolution (E_{mc}/E_{est}-1)^{2};");
     1409
     1410    hist.AddHist("MMcEvt.fImpact/100", "(MMcEvt.fEnergy/MEnergyEst.fVal-1)^2", MH3::kProfile);
     1411    hist.InitName("ResImpact;Impact;");
     1412    hist.InitTitle(";I [m];Resolution (E_{mc}/E_{est}-1)^{2};");
    13901413}
    13911414
     
    15331556    GetThetaDistribution(htheta, hist);
    15341557
    1535     // Give the zenoith angle weights to the weighting task
     1558    // Give the zenith angle weights to the weighting task
    15361559    weight.SetWeightsZd(&htheta);
    15371560
     
    16341657    MBinning binsB(51, -1, 1,      "BinningEnergyResidual", "lin");
    16351658    MBinning binsD(51, -1, 1,      "BinningResidualDist",   "lin");
     1659    MBinning binsI(16,  0, 800,    "BinningImpact",         "lin");
    16361660
    16371661    plist.AddToList(&binsA);
     
    16391663    plist.AddToList(&binsC);
    16401664    plist.AddToList(&binsD);
     1665    plist.AddToList(&binsI);
    16411666
    16421667    MHn heest("Energy", "Energy Residual (lg E_{est} - lg E_{mc})");
     
    16491674    SetupHistEvtDist(henergy);
    16501675
     1676    MHn heres("EnergyRes");
     1677    SetupHistEnergyRes(heres);
     1678
    16511679    MFillH fill4b(&heest, "", "FillEnergyResidual");
    16521680    fill4b.SetWeight();
     
    16541682    MFillH fill4c(&hdisp, "", "FillDispResidual");
    16551683    fill4c.SetWeight();
     1684
     1685    MFillH fill4d(&heres, "", "FillEnergyResolution");
     1686    fill4d.SetWeight();
    16561687
    16571688    MFDataPhrase fdisp("Disp.fVal*sign(MHillasSrc.fCosDeltaAlpha)<0", "FilterDisp");
     
    17451776    tlist2.AddToList(&fill4);
    17461777    tlist2.AddToList(&fill4b);
     1778    tlist2.AddToList(&fill4d);
    17471779    tlist2.AddToList(&fill5);
    17481780    tlist2.AddToList(&fill0a);
     
    18181850        return kTRUE;
    18191851
     1852    TNamed ganame("ganymed.root", gSystem->BaseName(fPathIn));
     1853
    18201854    // Write the output
    18211855    TObjArray cont;
     
    18261860    cont.Add(&area1);
    18271861    cont.Add(&hest);
     1862    cont.Add(&ganame);
    18281863
    18291864    if (fDisplay)
  • trunk/MagicSoft/Mars/mjobs/MJSpectrum.h

    r8882 r8940  
    4343    void SetupHistEnergyEst(MHn &hist) const;
    4444    void SetupHistDisp(MHn &hist) const;
     45    void SetupHistEnergyRes(MHn &hist) const;
    4546
    4647    // Read Input
  • trunk/MagicSoft/Mars/mjobs/MJStar.cc

    r8934 r8940  
    478478    MFillH fillw2("MHWeather", "MTimePyrometer", "FillPyrometer");
    479479    fillw2.SetBit(MFillH::kDoNotDisplay);
     480    fillw2.SetBit(MFillH::kCanSkip);
    480481
    481482    // instantiate camera histogram containers
Note: See TracChangeset for help on using the changeset viewer.