Changeset 7287 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
08/16/05 15:38:01 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7286 r7287  
    2626     - fixed a typo in some output
    2727
     28   * ganymed.rc, ganymed_onoff.rc, ganymed_wobble.rc:
     29     - fixed some comments
     30
     31   * macros/dohtml.C:
     32     - updated
     33
     34   * mhflux/MHDisp.cc:
     35     - some small fixes to let the code not crash in on-only more
     36       (still doesn't give reasonable results... maybe a fit to the
     37        background would do it)
     38
     39   * mhflux/MHFalseSource.cc:
     40     - removed some obsolete comment
     41     - set initial marker color of stars in star display
     42
     43   * mjobs/MJCut.cc:
     44     - added a small fix to get the correct parlist in on-only mode
     45
     46   * mpointing/MSrcPosCalc.[h,cc]:
     47     - fixed source position handling in on-only mode
     48
    2849
    2950
     
    102123
    103124   * mpointing/MSrcPocCam.[h,cc]:
    104      - fixed abug which caused problems if now source position was
     125     - fixed a bug which caused problems if now source position was
    105126       defined in the dataset.
    106127
  • trunk/MagicSoft/Mars/ganymed.rc

    r7205 r7287  
    6060# -------------------------------------------------------------------------
    6161# To get a meaningfull false source plot in wobble mode use magic cuts
    62 # and the following two lines. Remark: You'll get worse results
    63 # for you significance
     62# and the following two lines.
    6463# -------------------------------------------------------------------------
    6564MJCut.NameHistFS: MHDisp
    66 #Cut1.HadronnessCut: Area
    6765
    6866MHDisp.Smearing: 0.03
  • trunk/MagicSoft/Mars/ganymed_onoff.rc

    r7220 r7287  
    7171# -------------------------------------------------------------------------
    7272# To get a meaningfull false source plot in wobble mode use magic cuts
    73 # and the following two lines. Remark: You'll get worse results
    74 # for you significance
     73# and the following two lines.
    7574# -------------------------------------------------------------------------
    7675MJCut.NameHistFS: MHDisp
  • trunk/MagicSoft/Mars/ganymed_wobble.rc

    r7220 r7287  
    7171# -------------------------------------------------------------------------
    7272# To get a meaningfull false source plot in wobble mode use magic cuts
    73 # and the following two lines. Remark: You'll get worse results
    74 # for you significance
     73# and the following two lines.
    7574# -------------------------------------------------------------------------
    7675MJCut.NameHistFS: MHDisp
  • trunk/MagicSoft/Mars/macros/dohtml.C

    r7194 r7287  
    100100
    101101    html.SetSourceDir("macros");
    102     html.Convert("merpp.C",         "MARS - Merging and Preprocessing");
    103     html.Convert("tutorials/readraw.C",       "MARS - How To Read A Raw");
    104     html.Convert("rootlogon.C",     "MARS - rootlogon.C");
     102    html.Convert("merpp.C",                     "MARS - Merging and Preprocessing");
     103    html.Convert("tutorials/readraw.C",         "MARS - How To Read A Raw");
     104    html.Convert("rootlogon.C",                 "MARS - rootlogon.C");
    105105    //html.Convert("readCT1.C",       "MARS - Read and display CT1 Events");
    106     html.Convert("readMagic.C",     "MARS - Read and display Magic Events");
     106    html.Convert("readMagic.C",                 "MARS - Read and display Magic Events");
    107107    //html.Convert("CT1Hillas.C",     "MARS - Calculate CT1 Hillas");
    108     html.Convert("MagicHillas.C",   "MARS - Calculate Magic Hillas");
     108    html.Convert("MagicHillas.C",               "MARS - Calculate Magic Hillas");
    109109//?    html.Convert("collarea.C",      "MARS - Calculate Collection Area from a MC root file");
    110     html.Convert("threshold.C",     "MARS - Calculate Energy Threshold from a MC root file");
    111     html.Convert("trigrate.C",      "MARS - Calculate Trigger Rate from a MC root file");
    112     html.Convert("star.C",          "MARS - (St)andard (A)nalysis and (R)econstruction");
    113     html.Convert("tutorials/starplot.C",      "MARS - Plot parameters from file created with star.C");
    114     html.Convert("tutorials/readrfl.C",      "MARS - Example of reading reflector output with Mars");
    115     html.Convert("comprob.C",       "MARS - Calculation of composite probabilities for G/H-Seperation");
    116     html.Convert("multidimdist.C",  "MARS - Calculation of multidimensional distances for G/H-Seperation");
    117     html.Convert("multidimdist2.C", "MARS - Calculation of multidimensional distances for G/H-Seperation");
     110    html.Convert("threshold.C",                 "MARS - Calculate Energy Threshold from a MC root file");
     111    html.Convert("trigrate.C",                  "MARS - Calculate Trigger Rate from a MC root file");
     112    html.Convert("star.C",                      "MARS - (St)andard (A)nalysis and (R)econstruction");
     113    html.Convert("tutorials/starplot.C",        "MARS - Plot parameters from file created with star.C");
     114    html.Convert("tutorials/readrfl.C",         "MARS - Example of reading reflector output with Mars");
     115    html.Convert("comprob.C",                   "MARS - Calculation of composite probabilities for G/H-Seperation");
     116    html.Convert("multidimdist.C",              "MARS - Calculation of multidimensional distances for G/H-Seperation");
     117    html.Convert("multidimdist2.C",             "MARS - Calculation of multidimensional distances for G/H-Seperation");
    118118//    html.Convert("estimate.C",      "MARS - Shows results from the energy estimation");
    119119//    html.Convert("estfit.C",        "MARS - Fits the coefficients of the energy estimator MEnergyEstParam");
    120     html.Convert("tutorials/plot.C",          "MARS - Plots 1D mars histogram");
    121     html.Convert("tutorials/plot2.C",         "MARS - Plots a 2D mars histogram");
    122     html.Convert("tutorials/testenv.C",       "MARS - Example to use TEnv and Mars Eventloops");
    123     html.Convert("triglvl2.C",      "MARS - Example to use MMcTriggerLvl2 class, using filters and creating histograms");
     120    html.Convert("tutorials/plot.C",            "MARS - Plots 1D mars histogram");
     121    html.Convert("tutorials/plot2.C",           "MARS - Plots a 2D mars histogram");
     122    html.Convert("tutorials/testenv.C",         "MARS - Example to use TEnv and Mars Eventloops");
     123    html.Convert("triglvl2.C",                  "MARS - Example to use MMcTriggerLvl2 class, using filters and creating histograms");
    124124    //html.Convert("status.C",        "MARS - Example to use the online display");
    125125    //html.Convert("calibration.C",   "MARS - Example to use the calibration");
    126     html.Convert("tutorials/pedvsevent.C",    "MARS - Example to use MPedCalcPedRun");
     126    html.Convert("tutorials/pedvsevent.C",      "MARS - Example to use MPedCalcPedRun");
    127127    //html.Convert("pedphotcalc.C",   "MARS - Example to use MPedPhotCalc");
    128     html.Convert("tutorials/derotatedc.C",  "MARS - Example of plotting derotated dc currents");
    129     html.Convert("tutorials/evtrate.C",  "MARS - Example how to plot the event rate");
    130     html.Convert("tutorials/pixvsevent.C",  "MARS - Example how to plot pixel value versus event number/time");
    131     html.Convert("tutorials/sectorvstime.C",  "MARS - Example how to plot mean value of a camera sector versus time");
     128    html.Convert("tutorials/derotatedc.C",      "MARS - Example of plotting derotated dc currents");
     129    html.Convert("tutorials/evtrate.C",         "MARS - Example how to plot the event rate");
     130//    html.Convert("tutorials/pixvsevent.C",  "MARS - Example how to plot pixel value versus event number/time");
     131    html.Convert("tutorials/sectorvstime.C",    "MARS - Example how to plot mean value of a camera sector versus time");
    132132    html.Convert("tutorials/pedestalvstime.C",  "MARS - Example how to plot pedestal/rms versus time");
    133     html.Convert("tutorials/pixfirerate.C",  "MARS - Example how to plot the firerate of a pixel (times above threshold)");
    134     html.Convert("tutorials/pixsatrate.C",  "MARS - Example how to plot the saturation rate of a pixel");
     133    html.Convert("tutorials/pixfirerate.C",     "MARS - Example how to plot the firerate of a pixel (times above threshold)");
     134    html.Convert("tutorials/pixsatrate.C",      "MARS - Example how to plot the saturation rate of a pixel");
    135135    //html.Convert("calibration.C",   "MARS - Example how to use the calibrationa camera ");
    136136    //html.Convert("bootcampstandardanalysis.C", "MARS - Example of the status of the standard analysis at the bootcamp");
    137     html.Convert("readIPR.C",       "MARS - Example to read and display the IPRs from a (merpped) report file");
    138     html.Convert("tutorials/extendcam.C",     "MARS - Example of using MGeomCamExtend and MHexagonalFTCalc");
    139     html.Convert("tutorials/hft.C",           "MARS - Example of using MHexagonalFTCalc");
     137    html.Convert("readIPR.C",                   "MARS - Example to read and display the IPRs from a (merpped) report file");
     138    html.Convert("tutorials/extendcam.C",       "MARS - Example of using MGeomCamExtend and MHexagonalFTCalc");
     139    html.Convert("tutorials/hft.C",             "MARS - Example of using MHexagonalFTCalc");
    140140}
  • trunk/MagicSoft/Mars/mhflux/MHDisp.cc

    r7224 r7287  
    389389    const TAxis &axey = *h2.GetYaxis();
    390390
    391     const Double_t rmax = fWobble ? axex.GetXmax()-0.4 : axex.GetXmax();
     391    const Double_t rmax = (fWobble ? axex.GetXmax()-0.4 : axex.GetXmax()) - axex.GetBinWidth(1);
    392392
    393393    for (int x=1; x<=axex.GetNbins(); x++)
     
    571571        //Profile(*h2, *h1, x0, y0);
    572572
    573         // Replace with MAlphaFitter?
    574         TF1 func("fcn", "gaus + [3]*x*x + [4]");
    575         func.SetLineWidth(1);
    576         func.SetLineColor(kBlue);
    577 
    578         func.SetParLimits(2, h2->GetBinWidth(1), 1.0);
    579 
    580         func.SetParameter(0, h2->GetBinContent(1));
    581         func.FixParameter(1, 0);
    582         func.SetParameter(2, 0.12);
    583         if (fHistOff)
    584             func.FixParameter(3, 0);
    585         func.SetParameter(4, 0);//h2->GetBinContent(20));
    586         h2->Fit(&func, "IQ", "", 0, 1.0);
    587 
    588         h2->SetTitle(Form("P=(%.2f\\circ/%.2f\\circ) \\omega=%.2f\\circ f=%.2f", x0, y0, func.GetParameter(2), TMath::Abs(scale)));
     573        if (h2->GetEntries()>0)
     574        {
     575            // Replace with MAlphaFitter?
     576            TF1 func("fcn", "gaus + [3]*x*x + [4]");
     577            func.SetLineWidth(1);
     578            func.SetLineColor(kBlue);
     579
     580            func.SetParLimits(2, h2->GetBinWidth(1), 1.0);
     581
     582            func.SetParameter(0, h2->GetBinContent(1));
     583            func.FixParameter(1, 0);
     584            func.SetParameter(2, 0.12);
     585            if (fHistOff)
     586                func.FixParameter(3, 0);
     587            func.SetParameter(4, 0);//h2->GetBinContent(20));
     588            h2->Fit(&func, "IQ", "", 0, 1.0);
     589
     590            h2->SetTitle(Form("P=(%.2f\\circ/%.2f\\circ) \\omega=%.2f\\circ f=%.2f", x0, y0, func.GetParameter(2), TMath::Abs(scale)));
     591        }
    589592    }
    590593
     
    623626
    624627    if (fHistOff)
    625         GetCatalog()->Draw("white mirror same *");
     628        GetCatalog()->Draw("mirror same *");
    626629
    627630    // ----- Pad number 1 -----
     
    643646
    644647    if (fHistOff)
    645         GetCatalog()->Draw("white mirror same *");
     648        GetCatalog()->Draw("mirror same *");
    646649
    647650    // ----- Pad number 2 -----
  • trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc

    r7109 r7287  
    227227// Also search for MTime, MObservatory and MPointingPos
    228228//
    229 //MHillasExt *ext=0;
    230229Bool_t MHFalseSource::SetupFill(const MParList *plist)
    231230{
     
    236235        return kFALSE;
    237236    }
    238     /*
    239     ext = (MHillasExt*)plist->FindObject("MHillasExt");
    240     if (!ext)
    241     {
    242         *fLog << err << "MHillasExt not found... aborting." << endl;
    243         return kFALSE;
    244     }
    245     */
    246237    fMm2Deg = geom->GetConvMm2Deg();
    247238
     
    653644    // Create catalog...
    654645    MAstroCatalog *stars = new MAstroCatalog;
     646    stars->SetMarkerColor(kWhite);
    655647    stars->SetLimMag(9);
    656648    stars->SetGuiActive(kFALSE);
  • trunk/MagicSoft/Mars/mjobs/MJCut.cc

    r7251 r7287  
    651651
    652652        //plist.FindObject("MTimeEffectiveOnTime")->Clear();
     653    }
     654    else
     655    {
     656        // This is the simplest way to remove the two object from the parlist
     657        delete halphaoff;
     658        delete hfsoff;
    653659    }
    654660
  • trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.cc

    r7220 r7287  
    168168        if (!fSourcePos)
    169169        {
    170             *fLog << warn;
     170            *fLog << inf;
    171171            *fLog << "MSourcePos [MPointPos] not found... The source position" << endl;
    172             *fLog << "set in MSrcPosCam (camera center if not set explicitely)" << endl;
    173             *fLog << "will be left unchanged if not wobble mode Monte Carlo." << endl;
     172            *fLog << "set in MSrcPosCam will be set to  (0/0)  or in the case" << endl;
     173            *fLog << "of  Monte Carlo set to the appropriate wobble position." << endl;
    174174            return kTRUE;
    175175        }
     
    278278        v.Set(-120., 0.);
    279279
    280 
    281280    SetSrcPos(v);
    282281
     
    338337{
    339338    if (fRunType==MRawRunHeader::kRTMonteCarlo || !fSourcePos || !fTime || !fObservatory || fMode==kOffData)
    340         return kTRUE;
     339    {
     340        // If this is MC data do not change source position
     341        if (fRunType==MRawRunHeader::kRTMonteCarlo)
     342            return kTRUE;
     343
     344        // For real data reset source position to 0/0
     345        SetSrcPos();
     346        return kTRUE;
     347    }
    341348
    342349    // Set Sky coordinates of source, taken from container "MSourcePos"
  • trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.h

    r7214 r7287  
    4545
    4646    // MSrcPosCalc
    47     void     SetSrcPos(TVector2 v) const;
     47    void     SetSrcPos(TVector2 v=TVector2()) const;
    4848    TVector2 CalcXYinCamera(const MVector3 &pos0, const MVector3 &pos) const;
    4949    TString  GetRaDec(const MPointingPos &pos) const;
Note: See TracChangeset for help on using the changeset viewer.