Changeset 8655
- Timestamp:
- 08/02/07 10:46:14 (17 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r8653 r8655 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2007/08/02 Thomas Bretz 22 23 * mjobs/MJSpectrum.[h,cc]: 24 - made it compile again 25 26 20 27 21 28 2007/07/29 Thomas Bretz -
trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc
r8651 r8655 86 86 87 87 MJSpectrum::MJSpectrum(const char *name, const char *title) 88 : fCutQ(0), fCut0(0),fCut1(0), fCut2(0), fCut3(0), f EstimateEnergy(0),89 f CalcHadronness(0), fRefill(kFALSE), fSimpleMode(kTRUE),90 f RawMc(kFALSE), fNoThetaWeights(kFALSE)88 : fCutQ(0), fCut0(0),fCut1(0), fCut2(0), fCut3(0), fCutS(0), 89 fEstimateEnergy(0), fCalcHadronness(0), fRefill(kFALSE), 90 fSimpleMode(kTRUE), fRawMc(kFALSE), fNoThetaWeights(kFALSE) 91 91 { 92 92 fName = name ? name : "MJSpectrum"; … … 106 106 if (fCut3) 107 107 delete fCut3; 108 if (fCutS) 109 delete fCutS; 108 110 if (fEstimateEnergy) 109 111 delete fEstimateEnergy; … … 158 160 fLog->Separator("Alpha Fitter"); 159 161 *fLog << all; 160 fit.Print( );162 fit.Print("result"); 161 163 162 164 fLog->Separator("Used Cuts"); … … 164 166 fCut0->Print(); 165 167 fCut1->Print(); 168 fCutS->Print(); 166 169 fCut2->Print(); 167 170 fCut3->Print(); 168 169 //gLog.Separator("Energy Estimator");170 //fEstimateEnergy->Print();171 171 } 172 172 … … 383 383 { 384 384 if (!fDisplay || !fDisplay->CdCanvas("ZdDist")) 385 return; 385 { 386 *fLog << err << "ERROR - Display or tab ZdDist vanished... abort." << endl; 387 return kFALSE; 388 } 386 389 387 390 TH1D &proj = *h2.ProjectionX(); … … 459 462 // The resulting histogram excess-vs-energy ist copied into h2. 460 463 // 461 Bool_t MJSpectrum::Refill(MParList &plist, TH1D &h2) const464 Bool_t MJSpectrum::Refill(MParList &plist, TH1D &h2)/*const*/ 462 465 { 463 466 // Try to find the class used to determin the signal! … … 478 481 } 479 482 480 cout << "FOUND: "<< cls << endl;481 482 483 // Now fill the histogram 483 484 *fLog << endl; … … 492 493 read.AddFile(fPathIn); 493 494 495 MTaskEnv taskenv0("CalcHadronness"); 496 taskenv0.SetDefault(fCalcHadronness); 497 494 498 MEnergyEstimate est; 495 499 MTaskEnv taskenv1("EstimateEnergy"); 496 500 taskenv1.SetDefault(fEstimateEnergy ? fEstimateEnergy : &est); 497 501 502 MContinue *cont = new MContinue("", "CutS"); 503 cont->SetAllowEmpty(); 504 505 if (fCutS) 506 delete fCutS; 507 fCutS = cont; 508 498 509 // FIXME: Create HistE and HistEOff to be able to modify it from 499 510 // the resource file. … … 509 520 510 521 tlist.AddToList(&read); 522 //tlist.AddToList(&taskenv0); // not necessary, stored in file! 523 tlist.AddToList(fCutS); 511 524 tlist.AddToList(&taskenv1); 512 525 tlist.AddToList(&f0); … … 1121 1134 return kFALSE; 1122 1135 1123 // Print the setup of the MAlphaFitter1124 PrintSetup(fit);1125 1136 bins3.SetEdges(temp1, 'x'); 1126 1137 … … 1144 1155 if (!Refill(plist, excess)) 1145 1156 return kFALSE; 1157 1158 // Print the setup and result of the MAlphaFitter 1159 // Print used cuts 1160 PrintSetup(fit); 1146 1161 1147 1162 TH2D hist; … … 1172 1187 else 1173 1188 { 1174 // This rereads the original MC spectrum and aaplies both1175 // weights spectral weights and ZA-weights.1189 // This rereads the original MC spectrum and aplies both 1190 // weights, spectral weights and ZA-weights. 1176 1191 weight.SetNameMcEvt("MMcEvtBasic"); 1177 1192 if (!IntermediateLoop(plist, mh1, temp1, set, weight)) … … 1298 1313 tlist2.AddToList(fCut0); 1299 1314 tlist2.AddToList(&taskenv0); 1315 tlist2.AddToList(fCutS); 1300 1316 tlist2.AddToList(fCut1); 1301 1317 tlist2.AddToList(fCut2); -
trunk/MagicSoft/Mars/mjobs/MJSpectrum.h
r8651 r8655 29 29 MTask *fCut2; 30 30 MTask *fCut3; 31 MTask *fCutS; 31 32 MTask *fEstimateEnergy; 32 33 MTask *fCalcHadronness; … … 42 43 Bool_t ReadOrigMCDistribution(const MDataSet &set, TH1 &h, MMcSpectrumWeight &w) const; 43 44 Bool_t GetThetaDistribution(TH1D &temp1, TH1D &temp2) const; 44 Bool_t Refill(MParList &plist, TH1D &h) const;45 Bool_t Refill(MParList &plist, TH1D &h) /*const*/; 45 46 Bool_t InitWeighting(const MDataSet &set, MMcSpectrumWeight &w) const; 46 47
Note:
See TracChangeset
for help on using the changeset viewer.