Changeset 6978 for trunk/MagicSoft/Mars/mjobs/MJCut.cc
- Timestamp:
- 04/25/05 15:37:35 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJCut.cc
r6958 r6978 48 48 #include "MPrint.h" 49 49 #include "MContinue.h" 50 #include "MEnergyEstimate.h"50 //#include "MEnergyEstimate.h" 51 51 #include "MTaskEnv.h" 52 52 #include "MSrcPosCalc.h" … … 56 56 57 57 #include "../mhflux/MAlphaFitter.h" 58 #include "../mhflux/MHAlpha.h" 59 58 60 #include "MH3.h" 59 61 #include "MBinning.h" … … 71 73 // Default constructor. Set defaults for fStoreSummary, fStoreresult, 72 74 // fWriteOnly, fIsWobble and fFullDisplay to kFALSE and initialize 73 // fEstimateEnergy andfCalcHadronness with NULL.75 // /*fEstimateEnergy and*/ fCalcHadronness with NULL. 74 76 // 75 77 MJCut::MJCut(const char *name, const char *title) 76 : fStoreSummary(kFALSE), fStoreResult(k FALSE), fWriteOnly(kFALSE),78 : fStoreSummary(kFALSE), fStoreResult(kTRUE), fWriteOnly(kFALSE), 77 79 fIsWobble(kFALSE), fIsMonteCarlo(kFALSE), fFullDisplay(kFALSE), /*fSubstraction(kFALSE),*/ 78 fEstimateEnergy(0),fCalcHadronness(0)80 /*fEstimateEnergy(0),*/ fCalcHadronness(0) 79 81 { 80 82 fName = name ? name : "MJCut"; … … 88 90 MJCut::~MJCut() 89 91 { 90 if (fEstimateEnergy)91 delete fEstimateEnergy;92 //if (fEstimateEnergy) 93 // delete fEstimateEnergy; 92 94 if (fCalcHadronness) 93 95 delete fCalcHadronness; … … 132 134 // Setup a task estimating the energy. The given task is cloned. 133 135 // 136 /* 134 137 void MJCut::SetEnergyEstimator(const MTask *task) 135 138 { … … 138 141 fEstimateEnergy = task ? (MTask*)task->Clone() : 0; 139 142 } 143 */ 140 144 141 145 // -------------------------------------------------------------------------- … … 246 250 TObjArray arr; 247 251 252 // Save all MBinnings 248 253 TIter Next(plist); 249 254 TObject *o=0; … … 252 257 arr.Add(o); 253 258 259 // Save also the result, not only the setup 260 const MHAlpha *halpha = (MHAlpha*)plist.FindObject("MHAlpha"); 261 if (halpha) 262 arr.Add((TObject*)(&halpha->GetAlphaFitter())); 263 254 264 const TString fname(GetOutputFile(num)); 255 265 266 // If requested, write to already open output file 256 267 if (fNameResult.IsNull() && fStoreResult) 257 268 { … … 413 424 fit.SetScaleMode(MAlphaFitter::kNone); 414 425 426 MHAlpha halphaoff("MHAlphaOff"); 427 halphaoff.ForceUsingSize(); 428 plist.AddToList(&halphaoff); 429 415 430 MFillH falpha("MHAlphaOff [MHAlpha]", "MHillasSrc", "FillAlpha"); 416 431 MFillH ffs("MHFalseSourceOff [MHFalseSource]", "MHillas", "FillFS"); … … 452 467 SetupWriter(write1, "WriteAfterCut3"); 453 468 454 469 /* 455 470 MEnergyEstimate est; 456 471 457 472 MTaskEnv taskenv1("EstimateEnergy"); 458 473 taskenv1.SetDefault(fEstimateEnergy ? fEstimateEnergy : &est); 459 474 */ 460 475 MTaskEnv taskenv2("CalcHadronness"); 461 476 taskenv2.SetDefault(fCalcHadronness); … … 495 510 if (fIsWobble) 496 511 tlist2.AddToList(&hcalc2); 497 tlist2.AddToList(&taskenv1);512 //tlist2.AddToList(&taskenv1); 498 513 tlist2.AddToList(&taskenv2); 499 514 tlist2.AddToList(&cont0); … … 539 554 540 555 TObjArray cont; 541 cont.Add(&fit);542 556 cont.Add(&cont0); 543 557 cont.Add(&cont1); 544 558 cont.Add(&cont2); 545 559 cont.Add(&cont3); 546 if (taskenv1.GetTask())547 cont.Add(taskenv1.GetTask());560 //if (taskenv1.GetTask()) 561 // cont.Add(taskenv1.GetTask()); 548 562 if (taskenv2.GetTask()) 549 563 cont.Add(taskenv2.GetTask()); … … 641 655 } 642 656 */ 657 MHAlpha halphaon("MHAlpha"); 658 halphaon.ForceUsingSize(); 659 plist.AddToList(&halphaon); 660 643 661 MFillH falpha2("MHAlpha", "MHillasSrc", "FillAlpha"); 644 662 MFillH ffs2("MHFalseSource", "MHillas", "FillFS");
Note:
See TracChangeset
for help on using the changeset viewer.