Changeset 6948 for trunk/MagicSoft/Mars/mjobs
- Timestamp:
- 04/18/05 10:17:03 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mjobs
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJCut.cc
r6941 r6948 227 227 // analysis number num, see GetOutputFile() 228 228 // 229 Bool_t MJCut::WriteResult( UInt_t num) const229 Bool_t MJCut::WriteResult(const MParList &plist, UInt_t num) const 230 230 { 231 231 TObjArray arr; 232 233 TIter Next(plist); 234 TObject *o=0; 235 while ((o=Next())) 236 if (o->InheritsFrom(MBinning::Class())) 237 arr.Add(o); 238 232 239 return WriteContainer(arr, GetOutputFile(num), "UPDATE"); 233 240 } … … 278 285 write->AddContainer("MHillas", "Events"); 279 286 write->AddContainer("MHillasSrc", "Events"); 287 write->AddContainer("MHillasExt", "Events"); 280 288 write->AddContainer("MPointingPos", "Events"); 281 289 write->AddContainer("MHillasSrcAnti", "Events", kFALSE); … … 293 301 } 294 302 303 void MJCut::DisplayResult(const MParList &plist) const 304 { 305 /* 306 TObject *h1 = plist.FindObject("MHHillasOffPre", "MHHillas"); 307 TObject *h2 = plist.FindObject("MHHillasOffPost", "MHHillas"); 308 TObject *h3 = plist.FindObject("MHVsSizeOffPost", "MHVsSize"); 309 TObject *h4 = plist.FindObject("MHHilExtOffPost", "MHHillasExt"); 310 TObject *h5 = plist.FindObject("MHHilSrcOffPost", "MHHillasSrc"); 311 TObject *h6 = plist.FindObject("MHImgParOffPost", "MHImagePar"); 312 TObject *h7 = plist.FindObject("MHNewParOffPost", "MHNewImagePar"); 313 */ 314 } 315 295 316 Bool_t MJCut::ProcessFile(const MDataSet &set) 296 317 { … … 342 363 MBinning bins3(50, 0, 60, "BinningTheta", "cos"); 343 364 MBinning bins4("BinningFalseSource"); 344 //MBinning bins5("BinningWidth"); 345 //MBinning bins6("BinningLength"); 346 //MBinning bins7("BinningDist"); 365 MBinning bins5("BinningWidth"); 366 MBinning bins6("BinningLength"); 367 MBinning bins7("BinningDist"); 368 MBinning bins8("BinningMaxDist"); 347 369 plist.AddToList(&bins1); 348 370 plist.AddToList(&bins2); 349 371 plist.AddToList(&bins3); 350 372 plist.AddToList(&bins4); 351 //plist.AddToList(&bins5); 352 //plist.AddToList(&bins6); 353 //plist.AddToList(&bins7); 373 plist.AddToList(&bins5); 374 plist.AddToList(&bins6); 375 plist.AddToList(&bins7); 376 plist.AddToList(&bins8); 354 377 355 378 // -------------------------------------------------------------------------------- … … 623 646 tlist.PrintStatistics(); 624 647 648 DisplayResult(plist); 649 625 650 // FIXME: Perform fit and plot energy dependant alpha plots 626 651 // and fit result to new tabs! 627 if (!WriteResult( set.GetNumAnalysis()))652 if (!WriteResult(plist, set.GetNumAnalysis())) 628 653 return kFALSE; 629 654 -
trunk/MagicSoft/Mars/mjobs/MJCut.h
r6907 r6948 8 8 class MTask; 9 9 class MDataSet; 10 class MParList; 10 11 class MWriteRootFile; 11 12 … … 18 19 Bool_t fIsWobble; 19 20 Bool_t fFullDisplay; 21 //Bool_t fSubstraction; 20 22 21 23 TString fNameSummary; … … 30 32 void SetupWriter(MWriteRootFile *write, const char *name) const; 31 33 Bool_t WriteTasks(UInt_t num, TObjArray &cont) const; 32 Bool_t WriteResult(UInt_t num) const; 34 Bool_t WriteResult(const MParList &plist, UInt_t num) const; 35 void DisplayResult(const MParList &plist) const; 33 36 34 37 Bool_t CanStoreSummary() const { return !fPathOut.IsNull() && fStoreSummary; } … … 46 49 void EnableWobbleMode(Bool_t b=kTRUE) { fIsWobble = b; } 47 50 void EnableFullDisplay(Bool_t b=kTRUE) { fFullDisplay = b; } 51 //void EnableSubstraction(Bool_t b=kTRUE) { fSubstraction = b; } 48 52 49 53 void SetNameSummaryFile(const char *name=""); -
trunk/MagicSoft/Mars/mjobs/MJOptimize.cc
r6939 r6948 228 228 } 229 229 230 MJOptimize::MJOptimize() : fDebug(-1), fNumEvents(0), fType(kSimplex), fNumMaxCalls(0), fTolerance(0), fTestTrain( kFALSE)230 MJOptimize::MJOptimize() : fDebug(-1), fNumEvents(0), fType(kSimplex), fNumMaxCalls(0), fTolerance(0), fTestTrain(0) 231 231 { 232 232 fRules.SetOwner(); … … 661 661 case kMigrad: txt += "Migrad"; break; 662 662 case kMinimize: txt += "Minimize"; break; 663 case kMinos: txt += "Mino t"; break;663 case kMinos: txt += "Minos"; break; 664 664 case kImprove: txt += "Improve"; break; 665 665 case kSimplex: txt += "Simplex"; break; … … 682 682 // In case the reader is the matrix loop and testrain is enabled 683 683 // switch on even mode... 684 if (loop && fTestTrain)685 loop->SetOperationMode( MMatrixLoop::kEven);684 if (loop && TMath::Abs(fTestTrain)>0) 685 loop->SetOperationMode(fTestTrain>0?MMatrixLoop::kEven:MMatrixLoop::kOdd); 686 686 687 687 if (!Optimize(evtloop)) … … 696 696 // In case the reader is the matrix loop and testrain is enabled 697 697 // switch on odd mode... 698 if (!loop || !fTestTrain)698 if (!loop || fTestTrain==0) 699 699 return kTRUE; 700 700 701 loop->SetOperationMode( MMatrixLoop::kOdd);701 loop->SetOperationMode(fTestTrain<0?MMatrixLoop::kEven:MMatrixLoop::kOdd); 702 702 703 703 // Done already in Fcn -
trunk/MagicSoft/Mars/mjobs/MJOptimize.h
r6932 r6948 84 84 UInt_t fNumMaxCalls; 85 85 Float_t fTolerance; 86 Bool_tfTestTrain;86 Int_t fTestTrain; 87 87 88 88 Bool_t Optimize(MEvtLoop &evtloop); … … 110 110 void SetNumMaxCalls(UInt_t num=0) { fNumMaxCalls=num; } 111 111 void SetTolerance(Float_t tol=0) { fTolerance=tol; } 112 void EnableTestTrain( Bool_t b=kTRUE){ fTestTrain=b; }112 void EnableTestTrain(Int_t b=2) { fTestTrain=b; } 113 113 114 114 // Parameter access
Note:
See TracChangeset
for help on using the changeset viewer.