Changeset 6932 for trunk/MagicSoft/Mars/mranforest
- Timestamp:
- 04/12/05 17:05:49 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mranforest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mranforest/MRFEnergyEst.cc
r6797 r6932 34 34 #include <TList.h> 35 35 36 #include <TH1 F.h>37 #include <TH2 F.h>36 #include <TH1.h> 37 #include <TH2.h> 38 38 #include <TStyle.h> 39 39 #include <TCanvas.h> 40 #include <TMath.h> 41 #include <TVector.h> 40 42 41 43 #include "MHMatrix.h" … … 53 55 54 56 #include "MData.h" 55 56 #include "TFile.h" 57 #include "TList.h" 58 59 #include "TH1F.h" 60 #include "TH2F.h" 61 #include "TStyle.h" 62 #include "TCanvas.h" 63 #include "TMath.h" 64 #include "TVector.h" 65 66 #include "MEnergyEst.h" 57 #include "MParameters.h" 67 58 68 59 … … 287 278 Double_t e_true = (*mptr)(i,ncols-1); 288 279 Double_t e_est = 0; 289 Double_t hmax = 0;280 //Double_t hmax = 0; 290 281 Double_t hsum = 0; 291 282 … … 388 379 Int_t MRFEnergyEst::PreProcess(MParList *plist) 389 380 { 390 fEnergyEst = (M EnergyEst*)plist->FindCreateObj("MEnergyEst");381 fEnergyEst = (MParameterD*)plist->FindCreateObj("MParameterD", "MEnergyEst"); 391 382 if (!fEnergyEst) 392 383 { 393 *fLog << err << dbginf << "MEnergyEst not found... aborting." << endl;384 *fLog << err << dbginf << "MEnergyEst [MParameterD] not found... aborting." << endl; 394 385 return kFALSE; 395 386 } … … 424 415 *fData >> event; 425 416 426 Double_t e _est = 0;427 Double_t hmax = 0;417 Double_t eest = 0; 418 //Double_t hmax = 0; 428 419 Double_t hsum = 0; 429 420 … … 438 429 }*/ 439 430 hsum+=h; 440 e _est+=h*e;441 } 442 e _est/=hsum;443 e _est=pow(10.,e_est);444 445 fEnergyEst->Set Energy(e_est);431 eest+=h*e; 432 } 433 eest/=hsum; 434 eest=pow(10.,eest); 435 436 fEnergyEst->SetVal(eest); 446 437 fEnergyEst->SetReadyToSave(); 447 438 448 439 return kTRUE; 449 440 } 450 451 Int_t MRFEnergyEst::PostProcess()452 {453 454 return kTRUE;455 } -
trunk/MagicSoft/Mars/mranforest/MRFEnergyEst.h
r6530 r6932 16 16 class MHMatrix; 17 17 class MDataArray; 18 class M EnergyEst;18 class MParameterD; 19 19 20 20 class MRFEnergyEst : public MTask … … 33 33 TObjArray fEForests; 34 34 35 M EnergyEst*fEnergyEst;35 MParameterD *fEnergyEst; 36 36 37 37 Int_t PreProcess(MParList *plist); 38 38 Int_t Process(); 39 Int_t PostProcess();40 39 41 40 Int_t ReadForests(MParList *plist=NULL);
Note:
See TracChangeset
for help on using the changeset viewer.