Changeset 7691 for trunk/MagicSoft


Ignore:
Timestamp:
05/05/06 07:30:44 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhflux
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc

    r7409 r7691  
    7171    fTitle = title ? title : "3-D histogram   E-true E-est Theta";
    7272
     73    fNameEnergy = "MEnergyEst";
     74    fNameResult = "MinimizationValue";
     75
    7376    fHEnergy.SetDirectory(NULL);
    7477    fHEnergy.SetName("EnergyEst");
     
    184187}
    185188
     189// --------------------------------------------------------------------------
     190//
     191// Divide chisq and bias by number of executions
     192// Print result
     193//
    186194Bool_t MHEnergyEst::Finalize()
    187195{
     
    191199    fResult->SetVal(fChisq);
    192200
     201    *fLog << all << endl;
    193202    Print();
    194203
     
    196205}
    197206
     207// --------------------------------------------------------------------------
     208//
     209// Print result
     210//
    198211void MHEnergyEst::Print(Option_t *o) const
    199212{
    200     //    const Double_t resp =   TMath::Power(10,  res)-1;
    201     //    const Double_t resm = 1-TMath::Power(10, -res);
    202 
    203213    const Double_t res = TMath::Sqrt(fChisq-fBias*fBias);
    204214    if (TMath::IsNaN(res))
     
    209219
    210220    TH1D *h = (TH1D*)fHResolution.ProjectionZ("Resolution");
    211     h->Fit("gaus", "Q0");
     221    h->Fit("gaus", "Q0", "", -1.0, 0.25);
    212222
    213223    TF1 *f = h->GetFunction("gaus");
     
    225235}
    226236
     237// --------------------------------------------------------------------------
     238//
     239// Return Correction Coefficients (weights)
     240// hist = E_mc/E_est
     241//
    227242void MHEnergyEst::GetWeights(TH1D &hist) const
    228243{
     
    301316            }
    302317
    303             hx->Fit("gaus", "Q");
     318            hx->Fit("gaus", "Q", "", -1.0, 0.25);
    304319            gPad=NULL;
    305320            gStyle->SetOptFit(101);
     
    545560    fMatrix = NULL;
    546561}
    547 
  • trunk/MagicSoft/Mars/mhflux/MHEnergyEst.h

    r6954 r7691  
    2222{
    2323private:
     24    TString      fNameEnergy;
     25    TString      fNameResult;
     26
    2427    MMcEvt      *fMcEvt;  //!
    2528    MParameterD *fEnergy; //!
    2629    MParameterD *fResult; //!
    2730
    28     Int_t     fMap[100]; // FIXME!
     31    Int_t        fMap[100]; // FIXME!
    2932    MHMatrix    *fMatrix; //!
    3033
     
    4043
    4144    Double_t GetVal(Int_t i) const;
     45    void     CalcChisq(Double_t &chisq, Double_t &prob) const;
    4246
    4347    Bool_t SetupFill(const MParList *pList);
     
    5862    void Print(Option_t *o="") const;
    5963
    60     ClassDef(MHEnergyEst, 1) //
     64    ClassDef(MHEnergyEst, 2) //
    6165
    6266};
Note: See TracChangeset for help on using the changeset viewer.