Ignore:
Timestamp:
03/02/09 14:34:40 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mjobs
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mjobs/MJCut.cc

    r9278 r9374  
    259259    if (fNameResult.IsNull() && fStoreResult)
    260260    {
     261        // If no special name fNameResult is given but the result should be stored,
     262        // search for a file named oname (fNameOutput or ganymed%08d.root)
    261263        file = (TFile*)gROOT->GetListOfFiles()->FindObject(oname);
    262         if (file)
    263             file->cd();
     264        if (!file)
     265        {
     266            *fLog << err << "ERROR - File " << oname << " expected to be open, but isn't..." << endl;
     267            return kFALSE;
     268        }
     269
     270        file->cd();
    264271    }
    265272    else
     273    {
     274        // If special name fNameResult is given or no storage requested,
     275        // open a new file named oname (fNameOutput or ganymed%08d.root)
    266276        file = TFile::Open(oname, fOverwrite?"RECREATE":"NEW", "File created by MJCut", 9);
    267277
    268     if (!file)
    269     {
    270         *fLog << err << "ERROR - Couldn't open file " << oname << " for writing..." << endl;
    271         return kFALSE;
    272     }
    273 
     278        if (!file)
     279        {
     280            *fLog << err << "ERROR - Couldn't open new file " << oname << " for writing..." << endl;
     281            return kFALSE;
     282        }
     283    }
     284
     285    // Write container to output file
    274286    const Bool_t rc = WriteContainer(cont);
    275287
     288    // If file was newly opened, close it
    276289    if (!(fNameResult.IsNull() && fStoreResult))
    277290        delete file;
    278291
     292    // Return result of writing
    279293    return rc;
    280294}
     
    301315        arr.Add((TObject*)(&halpha->GetAlphaFitter()));
    302316
    303     // Save also the dataset
     317    // Save also the dataset, environment and display
    304318    arr.Add(const_cast<MDataSet*>(&set));
     319    arr.Add(const_cast<TEnv*>(GetEnv()));
     320    if (fDisplay)
     321        arr.Add(fDisplay);
    305322
    306323    const Int_t num = set.GetNumAnalysis();
     
    317334        }
    318335    }
    319 
    320     if (fDisplay)
    321         arr.Add(fDisplay);
    322 
    323     arr.Add(const_cast<TEnv*>(GetEnv()));
    324336
    325337    return WriteContainer(arr, fname, "UPDATE");
     
    9951007    fillsrc.SetNameTab("SrcPos");
    9961008
    997     if (set.IsWobbleMode() && !set.IsMonteCarlo())
     1009    if (set.IsWobbleMode()/* && !set.IsMonteCarlo()*/)
    9981010        tlist2.AddToListBefore(&fillsrc, &hcalc);
    9991011
  • trunk/MagicSoft/Mars/mjobs/MJSimulation.cc

    r9362 r9374  
    496496    //  NSB = 0.2*6e-3
    497497
    498     // FIXME: Simulate photons before QE!
     498    // MAGIC: 84MHz       / Pixel
     499    // DWARF: 14MHz-25Mhz / APD
     500
     501
     502    // FIXME: Simulate photons before cones and QE!
    499503
    500504    MSimRandomPhotons  simnsb;
     
    520524
    521525    MParameterD pulpos("IntendedPulsePos");
    522 //    pulpos.SetVal(40);  // [ns]
     526    // FIXME: Set a default which could be 1/3 of the digitization window
     527    //    pulpos.SetVal(40);  // [ns]
    523528    plist.AddToList(&pulpos);
    524529
  • trunk/MagicSoft/Mars/mjobs/MJStar.cc

    r9369 r9374  
    174174    MBinning bins5("BinningMuonWidth");
    175175    MBinning bins6("BinningArcPhi");
     176    MBinning binsd("BinningDist");
    176177    plist.AddToList(&bins1);
    177178    plist.AddToList(&bins2);
     
    180181    plist.AddToList(&bins5);
    181182    plist.AddToList(&bins6);
     183    plist.AddToList(&binsd);
    182184
    183185
     
    434436    MFDataPhrase fmuon1("MHillas.fSize>150 && MNewImagePar.fConcCOG<0.1", "MuonPreCut");
    435437    // Filter to calculate further muon parameters
    436     MFDataPhrase fmuon2("(MMuonSearchPar.fRadius>180) && (MMuonSearchPar.fRadius<400) &&"
    437                         "(MMuonSearchPar.fDeviation<45)", "MuonSearchCut");
     438    MFDataPhrase fmuon2("(MMuonSearchPar.fRadius*MGeomCam.fConvMm2Deg>0.6) && (MMuonSearchPar.fRadius*MGeomCam.fConvMm2Deg<1.35) &&"
     439                        "(MMuonSearchPar.fDeviation*MGeomCam.fConvMm2Deg<0.152)", "MuonSearchCut");
    438440    // Filter to fill the MHMuonPar
    439     MFDataPhrase fmuon3("(MMuonCalibPar.fArcPhi>190) && (MMuonSearchPar.fDeviation<35) &&"
     441    MFDataPhrase fmuon3("(MMuonCalibPar.fArcPhi>190) && (MMuonSearchPar.fDeviation*MGeomCam.fConvMm2Deg<0.118) &&"
    440442                        "(MMuonCalibPar.fArcWidth<0.20) && (MMuonCalibPar.fArcWidth>0.04) &&"
    441443                        "MMuonCalibPar.fRelTimeSigma<1.5",
Note: See TracChangeset for help on using the changeset viewer.