Changeset 7134 for trunk


Ignore:
Timestamp:
06/03/05 20:15:28 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7131 r7134  
    2121
    2222                                                 -*-*- END OF LINE -*-*-
     23 2005/06/03 Thomas Bretz
     24
     25   * ganymed.cc:
     26     - fixed the wrong printout of ganymed
     27
     28   * mars.cc:
     29     - allow to open a file via commandline
     30
     31   * mars.rc:
     32     - added some more comments
     33
     34   * mcalib/MCalibrateRelTimes.cc:
     35     - removed obsolete comments
     36
     37   * mmain/MEventDisplay.cc:
     38     - implemented muon analysis
     39     - fixed a crash caused by the DF
     40
     41   * mmain/Makefile:
     42     - added -I../mmuon
     43
     44   * mmuon/MMuonCalibPar.cc:
     45     - updated Print output
     46
     47   * mmuon/MMuonSearchPar.[h,cc]:
     48     - updated print output
     49     - added Paint function
     50
     51   * mranforest/MRFEnergyEst.h:
     52     - fixed thw wrong data types in setters
     53
     54   * msignal/MExtractTimeAndChargeDigitalFilter.cc:
     55     - don't try to find automatic weights without template file name
     56
     57
     58
    2359 2005/06/03
    2460
  • trunk/MagicSoft/Mars/NEWS

    r7133 r7134  
    33 *** Version <cvs>
    44
    5 
     5   - mars: show muon parameters graphically
     6
     7   - mars: now the file to open can be given as commandline
     8     argument
     9 
    610
    711 *** Version 0.9.3 (2005/06/03)
  • trunk/MagicSoft/Mars/ganymed.cc

    r7091 r7134  
    4141    gLog << all << endl;
    4242    gLog << "Sorry the usage is:" << endl;
    43     gLog << " ganymed [-c] [-y] [options] sequences.txt" << endl << endl;
     43    gLog << " ganymed [options] sequences.txt" << endl << endl;
    4444    gLog << " Arguments:" << endl;
    4545    gLog << "   dataset.txt:              Ascii file defining a collection of sequences" << endl;
  • trunk/MagicSoft/Mars/mars.cc

    r7091 r7134  
    66#include "MLogManip.h"
    77
    8 #include "MCameraDisplay.h"
    98#include "MArgs.h"
    109#include "MArray.h"
     
    1413#include "MLogo.h"
    1514#endif
     15
     16#include "MCameraDisplay.h"
     17#include "MEventDisplay.h"
    1618
    1719using namespace std;
     
    4345    gLog << all << endl;
    4446    gLog << "Sorry the usage is:" << endl;
    45     gLog << " mars [options]" << endl << endl;
     47    gLog << " mars [options] [filename]" << endl << endl;
    4648    gLog << " Options:" << endl;
    4749    gLog.Usage();
     
    5961    StartUpMessage();
    6062
    61     if (arg.HasOption("-?") || arg.HasOption("-h"))
     63    if (arg.HasOption("-?") || arg.HasOption("-h") || arg.GetNumArguments()>1)
    6264    {
    6365        Usage();
    6466        return 2;
    6567    }
     68
     69    //
     70    // This is to make argv[i] more readable insidethe code
     71    //
     72    const TString kFilename = arg.GetArgumentStr(0);
    6673
    6774#ifdef HAVE_XPM
     
    8693    MParContainer::Class()->IgnoreTObjectStreamer();
    8794
    88     /*
    89     TGApplication app("Mars", &argc, argv);
    90 
    91 #if ROOT_VERSION_CODE < ROOT_VERSION(3,10,02)
    92     InitGuiFactory();
    93 #endif
    94     */
    95 
    9695#ifdef HAVE_XPM
    9796    logo.Popdown();
     
    101100    // start the main window
    102101    //
    103     new MCameraDisplay;
     102    if (kFilename.IsNull())
     103        new MCameraDisplay;
     104    else
     105        new MEventDisplay(kFilename);
    104106
    105107    //
  • trunk/MagicSoft/Mars/mars.rc

    r6569 r7134  
    2323# whole calibration chain
    2424# -------------------------------------------------------------------------
    25 ExtractSignal: MExtractTimeAndChargeDigitalFilter
     25#ExtractSignal: MExtractTimeAndChargeDigitalFilter
     26#ExtractSignal.WeightsFile: msignal/MC_weights46.dat
    2627# -------------------------------------------------------------------------
    2728# Define here an extractor which can be used for the December 04 data.
  • trunk/MagicSoft/Mars/mcalib/MCalibrateRelTimes.cc

    r6855 r7134  
    8484//  - MBadPixelsCam
    8585//
    86 // The following output containers are also searched and created if
    87 // they were not found:
    88 //
    89 //  - MArrivalTime
    90 //
    9186Int_t MCalibrateRelTimes::PreProcess(MParList *pList)
    9287{
     
    127122Int_t MCalibrateRelTimes::Process()
    128123{
    129     /*
    130      if (fCalibrations->GetNumPixels() != (UInt_t)fSignals->GetSize())
    131      {
    132      // FIXME: MArrivalTime must be of variable size -
    133      //        like MSignalCam - because we must be able
    134      //        to reduce size by zero supression
    135      //        For the moment this check could be done in ReInit...
    136      *fLog << err << "MArrivalTime and MCalibrationCam have different sizes... abort." << endl;
    137      return kFALSE;
    138      }
    139      */
    140 
    141124    const UInt_t npix = fSignals->GetSize();
    142125
  • trunk/MagicSoft/Mars/mmain/MEventDisplay.cc

    r7061 r7134  
    8383#include "MMcCalibrationUpdate.h" // MMcCalibrationUpdate
    8484#include "MCalibrateData.h"       // MCalibrateData
     85#include "MMuonSearchParCalc.h"   // MMuonSearchParCalc
     86#include "MMuonCalibParCalc.h"    // MMuonCalibParCalc
    8587//#include "MMcTriggerLvl2Calc.h"   // MMcTriggerLvl2Calc
    8688
     
    100102#include "MPedPhotCam.h"           // MPedPhotCam
    101103#include "MCalibrationChargeCam.h" // MCalibrationChargeCam
     104#include "MMuonSearchPar.h"        // MMuonCalibPar
    102105//#include "MMcTriggerLvl2.h"        // MMcTriggerLvl2
    103106
     
    212215    //plist->AddToList(atime);
    213216
    214     MHEvent *evt01 = new MHEvent(MHEvent::kEvtSignalRaw);
    215     MHEvent *evt02 = new MHEvent(MHEvent::kEvtSignalRaw);
     217    MHEvent *evt01 = new MHEvent(MHEvent::kEvtSignalDensity);
     218    MHEvent *evt02 = new MHEvent(MHEvent::kEvtSignalDensity);
    216219    MHEvent *evt03 = new MHEvent(type==1?MHEvent::kEvtPedPhot:MHEvent::kEvtPedestal);
    217220    MHEvent *evt04 = new MHEvent(type==1?MHEvent::kEvtPedPhotRMS:MHEvent::kEvtPedestalRMS);
     
    247250
    248251    MExtractTimeAndChargeDigitalFilter *digf = new MExtractTimeAndChargeDigitalFilter;
    249     digf->ReadWeightsFile("msignal/MC_weights.dat");
     252    digf->SetNameWeightsFile("msignal/cosmics_weights46.dat");
    250253
    251254    MTaskEnv *taskenv1=new MTaskEnv("ExtractSignal");
     
    253256    taskenv1->SetOwner();
    254257
    255     MSignalCalc        *nanal  = new MSignalCalc;
    256     MFillH             *fill01 = new MFillH(evt01, "MSignalCam", "MFillH01");
    257     MImgCleanStd       *clean  = new MImgCleanStd;
    258     MFillH             *fill02 = new MFillH(evt02, "MSignalCam", "MFillH02");
    259     MFillH             *fill03 = new MFillH(evt03, type==1?"MPedPhotFundamental":"MPedestalCam",       "MFillH03");
    260     MFillH             *fill04 = new MFillH(evt04, type==1?"MPedPhotFromExtractorRndm":"MPedestalCam", "MFillH04");
    261     MFillH             *fill06a= new MFillH(evt06a, "MCameraData", "MFillH06a");
    262     MFillH             *fill06b= new MFillH(evt06b, "MCameraData", "MFillH06b");
    263     MHillasCalc        *hcalc  = new MHillasCalc;
     258    MSignalCalc     *nanal   = new MSignalCalc;
     259    MFillH          *fill01 = new MFillH(evt01, "MSignalCam", "MFillH01");
     260    MImgCleanStd    *clean   = new MImgCleanStd;
     261    MFillH          *fill02 = new MFillH(evt02, "MSignalCam", "MFillH02");
     262    MFillH          *fill03 = new MFillH(evt03, type==1?"MPedPhotFundamental":"MPedestalCam",       "MFillH03");
     263    MFillH          *fill04 = new MFillH(evt04, type==1?"MPedPhotFromExtractorRndm":"MPedestalCam", "MFillH04");
     264    MFillH          *fill06a = new MFillH(evt06a, "MCameraData", "MFillH06a");
     265    MFillH          *fill06b = new MFillH(evt06b, "MCameraData", "MFillH06b");
     266    MHillasCalc     *hcalc   = new MHillasCalc;
    264267    //MMcTriggerLvl2Calc *trcal  = new MMcTriggerLvl2Calc;
    265268    //MFillH             *fill09 = new MFillH(evt09, "MMcTriggerLvl2", "MFillH09");
    266     MFillH             *fill10 = new MFillH(evt10, "MSignalCam",    "MFillH10");
    267 
    268     MBadPixelsCalc     *bcalc  = new MBadPixelsCalc;
    269     MBadPixelsTreat    *btreat = new MBadPixelsTreat;
     269    MFillH          *fill10 = new MFillH(evt10, "MSignalCam",    "MFillH10");
     270
     271    MBadPixelsCalc  *bcalc   = new MBadPixelsCalc;
     272    MBadPixelsTreat *btreat = new MBadPixelsTreat;
    270273    btreat->SetProcessTimes(kFALSE);
    271274    if (type==1)
     
    336339    }
    337340    tlist->AddToList(hcalc);
     341    // --------------------------------------------------
     342    MMuonSearchParCalc *muscalc = new MMuonSearchParCalc;
     343    MMuonCalibParCalc  *mcalc   = new MMuonCalibParCalc;
     344    MFillH *fillmuon = new MFillH("MHSingleMuon", "", "FillMuon");
     345    tlist->AddToList(muscalc);
     346    tlist->AddToList(fillmuon);
     347    tlist->AddToList(mcalc);
     348    // --------------------------------------------------
    338349
    339350    //
     
    542553    plist->FindObject("MImagePar")->Print();
    543554    ((MNewImagePar*)plist->FindObject("MNewImagePar"))->Print(*geom);
     555    plist->FindObject("MMuonCalibPar")->Print();
     556    ((MMuonSearchPar*)plist->FindObject("MMuonSearchPar"))->Print(*geom);
    544557
    545558    //
     
    589602    TObject *hillas1 = plist->FindObject("MHillas");
    590603    TObject *hillas2 = plist->FindObject("MHillasSrc");
     604    TObject *hmuon   = plist->FindObject("MMuonSearchPar");
    591605    for (int i=1; i<7;i++)
    592606    {
    593607        TCanvas *c = GetCanvas(i);
    594608        c->GetPad(1)->cd(1);
     609        hmuon->Draw();
    595610        hillas1->Draw();
    596611        hillas2->Draw();
  • trunk/MagicSoft/Mars/mmain/Makefile

    r6856 r7134  
    2323           -I../mfileio -I../mimage -I../mhistmc -I../mgbase -I../mfbase  \
    2424           -I../mdata -I../msignal -I../mcalib -I../mbadpixels            \
    25            -I../mpointing -I../mpedestal
     25           -I../mpointing -I../mpedestal -I../mmuon
    2626
    2727SRCFILES = MBrowser.cc \
  • trunk/MagicSoft/Mars/mmuon/MMuonCalibPar.cc

    r7009 r7134  
    5252{
    5353    fName  = name  ? name  : "MMuonCalibPar";
    54     fTitle = title ? title : "Muon calibration parameters";
     54    fTitle = title ? title : "Parameters to calculate Muon calibration";
    5555
    5656    Reset();
     
    7676    *fLog << "Muon Parameters (" << GetName() << ")"       << endl;
    7777//    *fLog << " - Arc Length    [deg]   = " << fArcLength   << endl;
    78     *fLog << " - Arc Phi       [deg]   = " << fArcPhi      << endl;
    79     *fLog << " - Arc Width     [deg]   = " << fArcWidth    << endl;
    80     *fLog << " - Chi Arc Phi   [x2/ndf]= " << fChiArcPhi   << endl;
    81     *fLog << " - Chi Arc Width [x2/ndf]= " << fChiArcWidth << endl;
     78    *fLog << " - Arc Phi      [deg]   = " << fArcPhi      << endl;
     79    *fLog << " - Arc Width    [deg]   = " << fArcWidth    << endl;
     80    *fLog << " - Chi Arc Phi  [x2/ndf]= " << fChiArcPhi   << endl;
     81    *fLog << " - Chi Arc Width[x2/ndf]= " << fChiArcWidth << endl;
    8282//    *fLog << " - Est. I. P.    [m]     = " << fEstImpact   << endl;
    83     *fLog << " - Size of muon  [phe]   = " << fMuonSize    << endl;
    84     *fLog << " - Peak Phi      [deg]   = " << fPeakPhi     << endl;
     83    *fLog << " - Size of muon [phe]   = " << fMuonSize    << endl;
     84    *fLog << " - Peak Phi     [deg]   = " << fPeakPhi     << endl;
    8585}
    8686
  • trunk/MagicSoft/Mars/mmuon/MMuonSearchPar.cc

    r7009 r7134  
    5454
    5555#include <TMinuit.h>
     56#include <TEllipse.h>
    5657
    5758#include "MLog.h"
     
    7778{
    7879    fName  = name  ? name  : "MMuonSearchPar";
    79     fTitle = title ? title : "Muon search parameters";
     80    fTitle = title ? title : "Parameters to find Muons";
    8081}
    8182
     
    261262    *fLog << all;
    262263    *fLog << "Muon Parameters (" << GetName() << ")" << endl;
    263     *fLog << " - Est. Radius   [mm] = " << fRadius  << endl;
    264     *fLog << " - Deviation     [mm] = " << fDeviation  << endl;
    265     *fLog << " - Center Pos. X [mm] = " << fCenterX << endl;
    266     *fLog << " - Center Pos. Y [mm] = " << fCenterY << endl;
     264    *fLog << " - Est. Radius     [mm] = " << fRadius  << endl;
     265    *fLog << " - Deviation       [mm] = " << fDeviation  << endl;
     266    *fLog << " - Center Pos. X   [mm] = " << fCenterX << endl;
     267    *fLog << " - Center Pos. Y   [mm] = " << fCenterY << endl;
    267268}
    268269
     
    271272    *fLog << all;
    272273    *fLog << "Muon Parameters (" << GetName() << ")" << endl;
    273     *fLog << " - Est. Radius   [deg] = " << fRadius*geom.GetConvMm2Deg()   << endl;
    274     *fLog << " - Deviation     [deg] = " << fDeviation*geom.GetConvMm2Deg()   << endl;
    275     *fLog << " - Center Pos. X [deg] = " << fCenterX*geom.GetConvMm2Deg()  << endl;
    276     *fLog << " - Center Pos. Y [deg] = " << fCenterY*geom.GetConvMm2Deg()  << endl;
    277 }
     274    *fLog << " - Est. Radius    [deg] = " << fRadius*geom.GetConvMm2Deg()   << endl;
     275    *fLog << " - Deviation      [deg] = " << fDeviation*geom.GetConvMm2Deg()   << endl;
     276    *fLog << " - Center Pos. X  [deg] = " << fCenterX*geom.GetConvMm2Deg()  << endl;
     277    *fLog << " - Center Pos. Y  [deg] = " << fCenterY*geom.GetConvMm2Deg()  << endl;
     278}
     279
     280// --------------------------------------------------------------------------
     281//
     282// Paint the ellipse corresponding to the parameters
     283//
     284void MMuonSearchPar::Paint(Option_t *opt)
     285{
     286    if (fRadius<180 || fRadius>400 || fDeviation>45)
     287        return;
     288
     289    TEllipse e1(fCenterX, fCenterY, fRadius-fDeviation, fRadius-fDeviation);
     290    TEllipse e2(fCenterX, fCenterY, fRadius+fDeviation, fRadius+fDeviation);
     291    e1.SetLineWidth(1);
     292    e2.SetLineWidth(1);
     293    e1.SetLineColor(kYellow);
     294    e2.SetLineColor(kYellow);
     295    e1.Paint();
     296    e2.Paint();
     297}
  • trunk/MagicSoft/Mars/mmuon/MMuonSearchPar.h

    r6979 r7134  
    3232    MMuonSearchPar(const char *name=NULL, const char *title=NULL);
    3333
     34    // MParContainer
    3435    void Reset();
    3536
     37    // Getter
    3638    Float_t GetRadius()    const { return fRadius; }
    3739    Float_t GetDeviation() const { return fDeviation; }
     
    3941    Float_t GetCenterY()   const { return fCenterY; }
    4042
     43    // MMuonSearchPar
    4144    void   CalcMinimumDeviation(const MGeomCam &geom, const MSignalCam &evt,
    4245                                Double_t &x, Double_t &y, Double_t &sigma, Double_t &rad);
     
    4548                const MHillas &hillas);
    4649
     50    // TObject
     51    void   Paint(Option_t *opt="");
    4752    void   Print(Option_t *opt=NULL) const;
    4853    void   Print(const MGeomCam &geom, Option_t *opt=NULL) const;
  • trunk/MagicSoft/Mars/mranforest/MRFEnergyEst.h

    r7130 r7134  
    4141    void  SetFileName(TString str)     { fFileName = str; }
    4242
    43     void  SetNumTrees(UShort_t n=-1)   { fNumTrees = n; }
    44     void  SetNdSize(UShort_t n=-1)     { fNdSize   = n; }
    45     void  SetNumTry(UShort_t n=-1)     { fNumTry   = n; }
     43    void  SetNumTrees(Int_t n=-1)   { fNumTrees = n; }
     44    void  SetNdSize(Int_t n=-1)     { fNdSize   = n; }
     45    void  SetNumTry(Int_t n=-1)     { fNumTry   = n; }
    4646
    4747    void  SetTestMatrix(MHMatrix *m=0) { fTestMatrix=m; }
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.cc

    r7099 r7134  
    846846        return kTRUE;
    847847
     848    if (fNameWeightsFile.IsNull())
     849    {
     850        *fLog << err << "ERROR - Cannot get automatic weights without default filename." << endl;
     851        return kFALSE;
     852    }
     853
    848854    *fLog << dbg << endl;
    849855    *fLog << underline << GetDescriptor() << endl;
Note: See TracChangeset for help on using the changeset viewer.