Changeset 6932 for trunk/MagicSoft/Mars/mhflux
- Timestamp:
- 04/12/05 17:05:49 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhflux
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
r6907 r6932 57 57 #include "MSrcPosCam.h" 58 58 #include "MHillasSrc.h" 59 #include "MEnergyEst.h"60 59 #include "MTime.h" 61 60 #include "MObservatory.h" … … 116 115 fHEnergy.UseCurrentStyle(); 117 116 118 fHTheta.SetName(" Theta");117 fHTheta.SetName("ExcessTheta"); 119 118 fHTheta.SetTitle(" N_{exc} vs. \\Theta "); 120 119 fHTheta.SetXTitle("\\Theta [\\circ]"); … … 124 123 125 124 // effective on time versus time 126 fHTime.SetName(" Time");125 fHTime.SetName("ExcessTime"); 127 126 fHTime.SetTitle(" N_{exc} vs. Time "); 128 127 fHTime.SetXTitle("Time"); … … 268 267 } 269 268 */ 270 fEnergy = (M EnergyEst*)pl->FindObject("MEnergyEst");269 fEnergy = (MParameterD*)pl->FindObject("MEnergyEst", "MParameterD"); 271 270 if (!fEnergy) 272 271 { /* … … 277 276 } */ 278 277 279 *fLog << warn << "MEnergyEst not found... " << flush;278 *fLog << warn << "MEnergyEst [MParameterD] not found... " << flush; 280 279 281 280 if (!fHillas) … … 286 285 *fLog << "ignored." << endl; 287 286 288 fHEnergy.SetName(" Size");287 fHEnergy.SetName("ExcessSize"); 289 288 fHEnergy.SetTitle(" N_{exc} vs. Size "); 290 289 fHEnergy.SetXTitle("Size [\\gamma]"); … … 292 291 else 293 292 { 294 fHEnergy.SetName("E nergy");293 fHEnergy.SetName("ExcessEnergy"); 295 294 fHEnergy.SetTitle(" N_{exc} vs. E_{est} "); 296 295 fHEnergy.SetXTitle("E_{est} [GeV]"); … … 488 487 if (fHillas) 489 488 size = fHillas->GetSize(); 490 energy = fEnergy ? fEnergy->Get Energy() : (fHillas?fHillas->GetSize():1000);489 energy = fEnergy ? fEnergy->GetVal() : (fHillas?fHillas->GetSize():1000); 491 490 theta = fPointPos ? fPointPos->GetZd() : 0; 492 491 } … … 715 714 pad->cd(2); 716 715 gPad->SetBorderMode(0); 716 gPad->SetGridx(); 717 gPad->SetGridy(); 717 718 fHEnergy.Draw(); 718 719 … … 737 738 pad->cd(3); 738 739 gPad->SetBorderMode(0); 740 gPad->SetGridx(); 741 gPad->SetGridy(); 739 742 fHTime.Draw(); 740 743 AppendPad("time"); … … 746 749 { 747 750 pad->cd(4); 751 gPad->SetGridx(); 752 gPad->SetGridy(); 748 753 gPad->SetBorderMode(0); 749 754 fHTheta.Draw(); … … 910 915 if (type==0) 911 916 { 912 fMap[1] = fMatrix->AddColumn("MEnergyEst.f Energy");917 fMap[1] = fMatrix->AddColumn("MEnergyEst.fVal"); 913 918 fMap[2] = -1; 914 919 } -
trunk/MagicSoft/Mars/mhflux/MHAlpha.h
r6907 r6932 20 20 class MParList; 21 21 class MParameterD; 22 class MEnergyEst;23 22 class MHillas; 24 23 class MHMatrix; … … 96 95 97 96 MParameterD *fResult; //! 98 M EnergyEst*fEnergy; //!97 MParameterD *fEnergy; //! 99 98 MHillas *fHillas; //! 100 99 MPointingPos *fPointPos; //! -
trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc
r6924 r6932 120 120 } 121 121 122 fEnergy = (M EnergyEst*)plist->FindObject("MEnergyEst");122 fEnergy = (MParameterD*)plist->FindObject("MEnergyEst", "MParameterD"); 123 123 if (!fEnergy) 124 124 { 125 *fLog << err << "MEnergyEst not found... aborting." << endl;125 *fLog << err << "MEnergyEst [MParameterD] not found... aborting." << endl; 126 126 return kFALSE; 127 127 } … … 160 160 Bool_t MHEnergyEst::Fill(const MParContainer *par, const Stat_t w) 161 161 { 162 const Double_t eest = fEnergy->Get Energy();162 const Double_t eest = fEnergy->GetVal(); 163 163 const Double_t etru = fMatrix ? GetVal(0) : fMcEvt->GetEnergy(); 164 164 const Double_t imp = fMatrix ? GetVal(1) : fMcEvt->GetImpact()/100; … … 185 185 fResult->SetVal(sigma); 186 186 187 *fLog << all << "Mean log10(Energy) Resoltion: " << Form("%.1f%%", TMath::Sqrt(fChisq-fBias*fBias)*100) << endl; 188 *fLog << all << "Mean log10(Energy) Bias: " << Form("%.1f%%", fBias*100) << endl; 187 Print(); 189 188 190 189 return kTRUE; 190 } 191 192 void MHEnergyEst::Print(Option_t *o) const 193 { 194 *fLog << all; 195 *fLog << "Mean log10(Energy) Resoltion: " << Form("%5.2f%%", TMath::Sqrt(fChisq-fBias*fBias)) << endl; 196 *fLog << "Mean log10(Energy) Bias: " << Form("%5.2f%%", fBias) << endl; 191 197 } 192 198 … … 298 304 gPad->SetGridy(); 299 305 306 // Results in crashes.... 300 307 //gROOT->GetListOfCleanups()->Add(gPad); // WHY? 301 308 … … 315 322 316 323 h2->Draw(""); 317 h1->Draw("E3 same");318 h1->Draw("Chistsame");324 h1->Draw("E3 hist C same"); 325 // h1->Draw("Chistsame"); 319 326 320 327 return h1; -
trunk/MagicSoft/Mars/mhflux/MHEnergyEst.h
r6890 r6932 15 15 16 16 class MMcEvt; 17 class MEnergyEst;18 17 class MParList; 19 18 class MParameterD; … … 24 23 private: 25 24 MMcEvt *fMcEvt; //! 26 M EnergyEst*fEnergy; //!25 MParameterD *fEnergy; //! 27 26 MParameterD *fResult; //! 28 27 … … 54 53 void Paint(Option_t *opt=""); 55 54 void Draw(Option_t *option=""); 55 void Print(Option_t *o="") const; 56 56 57 57 ClassDef(MHEnergyEst, 1) //
Note:
See TracChangeset
for help on using the changeset viewer.