Changeset 6993 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
05/03/05 18:02:37 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r6992 r6993  
    2929   * mpointing/MSrcPosCalc.cc:
    3030     - removed dependancy on MTime for MC
     31
     32   * star.cc:
     33     - addde possibility to switch off  muon analysis
     34
     35   * star.rc:
     36     - added parameters for muon analysis
     37
     38   * mbadpixels/MBadPixelsCam.cc:
     39     - fixed a typo in a comment
     40
     41   * mjobs/MJStar.[h,cc]:
     42     - added possibility to switch off muon analysis
     43
     44   * mjobs/Makefile:
     45     - added -I../mmuon
     46
     47   * mjobs/MJCut.cc, mjobs/MJSpectrum.cc:
     48     - renamed MHAlpha to Hist (to have a common naming for all options)
     49     - renamed MHAlphaOff to HistOff
    3150
    3251
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc

    r6705 r6993  
    299299// --------------------------------------------------------------------------
    300300//
    301 // Returns the size of the biggest cluster with the given USuitableType
     301// Returns the size of the biggest cluster with the given UnsuitableType
    302302// type and the given area index.
    303303//
  • trunk/MagicSoft/Mars/mjobs/MJCut.cc

    r6992 r6993  
    258258
    259259    // Save also the result, not only the setup
    260     const MHAlpha *halpha = (MHAlpha*)plist.FindObject(fNameHist, "MHAlpha");
     260    const MHAlpha *halpha = (MHAlpha*)plist.FindObject("Hist", "MHAlpha");
    261261    if (halpha)
    262262        arr.Add((TObject*)(&halpha->GetAlphaFitter()));
     
    365365    }
    366366
    367     const TString objname(Form("%s%s", fNameHist.Data(), name));
     367    const TString objname(Form("%s%s", "Hist"/*fNameHist.Data()*/, name));
    368368    MHAlpha *h = (MHAlpha*)plist.FindCreateObj(fNameHist, objname);
    369369    if (!h)
     
    446446
    447447    MHAlpha *halphaoff = CreateNewHist(plist, "Off");
    448     MFillH falpha(halphaoff, "MHillasSrc", "FillAlpha");
     448    MFillH falpha(halphaoff, "", "FillHist");
    449449    MFillH ffs("MHFalseSourceOff [MHFalseSource]", "MHillas", "FillFS");
    450450
     
    675675    */
    676676    MHAlpha *halphaon=CreateNewHist(plist);
    677     MFillH falpha2(halphaon, "MHillasSrc", "FillAlpha");
     677    MFillH falpha2(halphaon, "", "FillHist");
    678678    MFillH ffs2("MHFalseSource", "MHillas", "FillFS");
    679679
  • trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc

    r6987 r6993  
    6666// Tasks/Filter
    6767#include "MReadMarsFile.h"
     68#include "MReadMarsFile.h"
    6869#include "MFEventSelector2.h"
    6970#include "MFDataMember.h"
     
    173174
    174175    TH1D *vstime = (TH1D*)arr.FindObjectInCanvas("Theta",  "TH1D", "OnTime");
    175     TH1D *size   = (TH1D*)arr.FindObjectInCanvas("Excess", "TH1D", "MHAlpha");
     176    TH1D *size   = (TH1D*)arr.FindObjectInCanvas("Excess", "TH1D", "Hist");
    176177    if (!vstime || !size)
    177178        return -1;
     
    183184
    184185    if (fDisplay)
    185         arr.DisplayIn(*fDisplay, "MHAlpha");
     186        arr.DisplayIn(*fDisplay, "Hist");
    186187
    187188    if (!ReadTask(fCut0, "Cut0"))
     
    343344    taskenv1.SetDefault(fEstimateEnergy ? fEstimateEnergy : &est);
    344345
    345     MFillH fill1("MHAlphaOff [MHAlpha]", "MHillasSrc", "FillAlphaOff");
    346     MFillH fill2("MHAlphaOn  [MHAlpha]", "MHillasSrc", "FillAlphaOn");
     346    MFillH fill1("HistOff [MHAlpha]", "MHillasSrc", "FillHistOff");
     347    MFillH fill2("HistOn  [MHAlpha]", "MHillasSrc", "FillHistOn");
    347348
    348349    MFDataMember f0("DataType.fVal", '<', 0.5, "FilterOffData");
     
    381382    }
    382383
    383     const MHAlpha *halpha = (MHAlpha *)plist.FindObject("MHAlphaOn");
     384    const MHAlpha *halpha = (MHAlpha *)plist.FindObject("HistOn");
    384385    if (!halpha)
    385386    {
    386         *fLog << err << GetDescriptor() << ": MHAlphaOn [MHAlpha] not found... abort." << endl;
     387        *fLog << err << GetDescriptor() << ": HistOn [MHAlpha] not found... abort." << endl;
    387388        return kFALSE;
    388389    }
     
    615616    cout << "Searching..." << endl;
    616617
    617     TH1 *excess = (TH1D*)arr.FindObjectInCanvas("Excess", "TH1D", "MHAlpha");
     618    TH1 *excess = (TH1D*)arr.FindObjectInCanvas("Excess", "TH1D", "Hist");
    618619    if (!excess)
    619620        return kFALSE;
  • trunk/MagicSoft/Mars/mjobs/MJStar.cc

    r6987 r6993  
    6262#include "MSrcPosCalc.h"
    6363#include "MHillasCalc.h"
    64 #include "../mmuon/MMuonSearchParCalc.h"
    65 #include "../mmuon/MMuonCalibParCalc.h"
    66 #include "../mmuon/MMuonSetup.h"
     64#include "MMuonSearchParCalc.h"
     65#include "MMuonCalibParCalc.h"
    6766#include "MFillH.h"
    6867#include "MWriteRootFile.h"
    6968
     69#include "MMuonSetup.h"
    7070#include "MObservatory.h"
    7171#include "MPointingPosCalc.h"
     
    8181// Sets fRuns to 0, fExtractor to NULL, fDataCheck to kFALSE
    8282//
    83 MJStar::MJStar(const char *name, const char *title)
     83MJStar::MJStar(const char *name, const char *title) : fMuonAnalysis(kTRUE)
    8484{
    8585    fName  = name  ? name  : "MJStar";
    8686    fTitle = title ? title : "Standard analysis and reconstruction";
     87}
     88
     89Bool_t MJStar::CheckEnvLocal()
     90{
     91    DisableMuonAnalysis(!GetEnv("MuonAnalysis", fMuonAnalysis));
     92    return kTRUE;
    8793}
    8894
     
    357363    tlist2.AddToList(&fill5);
    358364
    359     // *********************************************************
    360     MMuonSetup setup;
    361     plist.AddToList(&setup);
    362 
     365    // ----------------------- Muon Analysis ----------------------
    363366    MF fmuon1("MHillas.fSize>150", "MuonPreCut");
    364 
    365     MF fmuon2("(MMuonSearchPar.fRadius>180) &&"
    366               "(MMuonSearchPar.fRadius<400) &&"
     367    MF fmuon2("(MMuonSearchPar.fRadius>180) && (MMuonSearchPar.fRadius<400) &&"
    367368              "(MMuonSearchPar.fDeviation<45)", "MuonSearchCut");
    368     fmuon2.SetFilter(&fmuon1);
    369 
    370     MF fmuon3("(MMuonCalibPar.fArcPhi>175)  &&"
    371               "(MMuonSearchPar.fDeviation<37)", "MuonFinalCut");
     369    MF fmuon3("(MMuonCalibPar.fArcPhi>175)  && (MMuonSearchPar.fDeviation<37)",
     370              "MuonFinalCut");
    372371
    373372    MMuonSearchParCalc muscalc;
     
    377376    mcalc.SetFilter(&fmuon2);
    378377
    379     MFillH fill11("MHSingleMuon", "", "FillMuon");
    380     MFillH fill10("MHMuonPar",    "", "FillMuonPar");
    381     fill11.SetFilter(&fmuon2);
    382     fill10.SetFilter(&fmuon3);
    383 
    384     tlist2.AddToList(&fmuon1);
    385     tlist2.AddToList(&muscalc);
    386     tlist2.AddToList(&fmuon2);
    387     tlist2.AddToList(&fill11);
    388     tlist2.AddToList(&mcalc);
    389     tlist2.AddToList(&fmuon3);
    390     tlist2.AddToList(&fill10);
    391 
    392     // *********************************************************
     378    MFillH fillmuon("MHSingleMuon", "", "FillMuon");
     379    MFillH fillmpar("MHMuonPar",    "", "FillMuonPar");
     380    fillmuon.SetFilter(&fmuon2);
     381    fillmpar.SetFilter(&fmuon3);
     382
     383    if (fMuonAnalysis)
     384    {
     385        tlist2.AddToList(&fmuon1);
     386        tlist2.AddToList(&muscalc);
     387        tlist2.AddToList(&fmuon2);
     388        tlist2.AddToList(&fillmuon);
     389        tlist2.AddToList(&mcalc);
     390        tlist2.AddToList(&fmuon3);
     391        tlist2.AddToList(&fillmpar);
     392    }
     393    // ------------------------------------------------------------
    393394
    394395    //tlist2.AddToList(&fill6);
  • trunk/MagicSoft/Mars/mjobs/MJStar.h

    r6987 r6993  
    99{
    1010private:
     11    Bool_t fMuonAnalysis;
     12
    1113    Bool_t WriteResult();
     14    Bool_t CheckEnvLocal();
    1215
    1316public:
    1417    MJStar(const char *name=NULL, const char *title=NULL);
    1518
     19    // Setup
     20    void DisableMuonAnalysis(Bool_t b=kTRUE) { fMuonAnalysis = !b; }
     21
     22    // Process
    1623    Bool_t Process(Bool_t ismc=kFALSE);
    1724
  • trunk/MagicSoft/Mars/mjobs/Makefile

    r6958 r6993  
    2323           -I../mbadpixels -I../msignal -I../mraw -I../mpedestal -I../mtools \
    2424           -I../mimage -I../mpointing -I../mastro -I../mfbase -I../mhvstime \
    25            -I../mtrigger
     25           -I../mtrigger -I../mmuon
    2626
    2727SRCFILES = MSequence.cc \
  • trunk/MagicSoft/Mars/star.cc

    r6987 r6993  
    6666    gLog << "   --out=path                Path to write the all results to [def=local path]" << endl;
    6767    gLog << "                             (overwrites --outc and --outy)" << endl;
     68    gLog << "   --no-muons                Switch off Muon analysis (for fast tests)" << endl;
    6869    gLog << "   --print-seq               Print Sequence information" << endl;
    6970    gLog << "   --print-files             Print Files taken from Sequence" << endl;
     
    122123    //const Bool_t  kForceExec  = arg.HasOnlyAndRemove("-ff");
    123124    const Bool_t  kIsMC       = arg.HasOnlyAndRemove("-mc");
     125    const Bool_t  kNoMuons    = arg.HasOnlyAndRemove("--no-muons");
    124126
    125127    const TString kInpath     = arg.GetStringAndRemove("--ind=", "");
     
    224226        job.SetPathData(kInpath);
    225227        // job.SetPathIn(kInpath); // not yet needed
     228        if (kNoMuons)
     229            job.DisableMuonAnalysis();
    226230
    227231        if (!job.Process(kIsMC))
  • trunk/MagicSoft/Mars/star.rc

    r6986 r6993  
    4343#MJStar.MaxEvents: 10000
    4444#MJStar.Overwrite: yes,no
    45 #MJStar.
    4645
    4746# -------------------------------------------------------------------------
    48 # Setup the muon analysis here
     47# Setup or switch off the muon analysis here
    4948# -------------------------------------------------------------------------
    50 # MMuonSetup.Margin:            0.2
    51 # MMuonSetup.ThresholdArcPhi:   30
    52 # MMuonSetup.ThresholdArcWidth: 30
    53 # BinningRadius.Raw:            20  0.5  1.5
    54 # BinningArcWidth.Raw:          60  0.0  0.3
    55 # BinningRingBroadening.Raw:    20  0.5  1.5
    56 # BinningSizeVsArcRadius.Raw:   20  0.5  1.5
    57 # BinningsArcPhi.Raw:           21 -180  180
    58 # BinningsMuonWidth.Raw:        28  0.3  1.7
     49
     50#MJStar.MuonAnalysis: On
     51
     52#MMuonSetup.Margin:            0.2
     53#MMuonSetup.ThresholdArcPhi:   30
     54#MMuonSetup.ThresholdArcWidth: 30
     55
     56#BinningRadius.Raw:            20  0.5  1.5
     57#BinningArcWidth.Raw:          60  0.0  0.3
     58#BinningRingBroadening.Raw:    20  0.5  1.5
     59#BinningSizeVsArcRadius.Raw:   20  0.5  1.5
     60#BinningsArcPhi.Raw:           21 -180  180
     61#BinningsMuonWidth.Raw:        28  0.3  1.7
     62
     63#MuonPreCut.Condition:   MHillas.fSize>150
     64#MuonSearcCut.Condition: (MMuonSearchPar.fRadius>180) && (MMuonSearchPar.fRadius<400) && (MMuonSearchPar.fDeviation<45)
     65#MuonFinalCut.Condition: (MMuonCalibPar.fArcPhi>175)  && (MMuonSearchPar.fDeviation<37)
    5966
    6067# -------------------------------------------------------------------------
    6168# -------------------------------------------------------------------------
    62 MJStar.MImgCleanStd.CleanLevel1: 4.5
    63 MJStar.MImgCleanStd.CleanLevel2: 3.0
    64 MJStar.MImgCleanStd.CleanMethod: Scaled
     69MImgCleanStd.CleanLevel1: 4.5
     70MImgCleanStd.CleanLevel2: 3.0
     71MImgCleanStd.CleanMethod: Scaled
    6572
    6673# -------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.