Ignore:
Timestamp:
04/12/05 17:05:49 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mranforest/MRFEnergyEst.cc

    r6797 r6932  
    3434#include <TList.h>
    3535
    36 #include <TH1F.h>
    37 #include <TH2F.h>
     36#include <TH1.h>
     37#include <TH2.h>
    3838#include <TStyle.h>
    3939#include <TCanvas.h>
     40#include <TMath.h>
     41#include <TVector.h>
    4042
    4143#include "MHMatrix.h"
     
    5355
    5456#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"
    6758
    6859
     
    287278        Double_t e_true = (*mptr)(i,ncols-1);
    288279        Double_t e_est = 0;
    289         Double_t hmax  = 0;
     280        //Double_t hmax  = 0;
    290281        Double_t hsum  = 0;
    291282
     
    388379Int_t MRFEnergyEst::PreProcess(MParList *plist)
    389380{
    390     fEnergyEst = (MEnergyEst*)plist->FindCreateObj("MEnergyEst");
     381    fEnergyEst = (MParameterD*)plist->FindCreateObj("MParameterD", "MEnergyEst");
    391382    if (!fEnergyEst)
    392383    {
    393         *fLog << err << dbginf << "MEnergyEst not found... aborting." << endl;
     384        *fLog << err << dbginf << "MEnergyEst [MParameterD] not found... aborting." << endl;
    394385        return kFALSE;
    395386    }
     
    424415    *fData >> event;
    425416
    426     Double_t e_est = 0;
    427     Double_t hmax  = 0;
     417    Double_t eest = 0;
     418    //Double_t hmax  = 0;
    428419    Double_t hsum  = 0;
    429420       
     
    438429        }*/
    439430        hsum+=h;
    440         e_est+=h*e;
    441     }
    442     e_est/=hsum;
    443     e_est=pow(10.,e_est);
    444 
    445     fEnergyEst->SetEnergy(e_est);
     431        eest+=h*e;
     432    }
     433    eest/=hsum;
     434    eest=pow(10.,eest);
     435
     436    fEnergyEst->SetVal(eest);
    446437    fEnergyEst->SetReadyToSave();
    447438
    448439    return kTRUE;
    449440}
    450 
    451 Int_t MRFEnergyEst::PostProcess()
    452 {
    453 
    454     return kTRUE;
    455 }
Note: See TracChangeset for help on using the changeset viewer.