Ignore:
Timestamp:
04/18/05 20:11:09 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhflux
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhflux/MHCollectionArea.h

    r6938 r6954  
    3636
    3737    void Calc(TH2D &hsel, TH2D &hall);
     38    void CalcEfficiency();
    3839
    3940public:
     
    4344    Bool_t ReInit(MParList *pList);
    4445    Bool_t Fill(const MParContainer *par, const Stat_t weight=1);
     46    Bool_t Finalize() { CalcEfficiency(); return kTRUE; }
    4547
    4648    void Draw(Option_t *option="");
    4749    void Paint(Option_t *option="");
    48 
    49     void CalcEfficiency();
    5050
    5151    void SetHistAll(const TH2D &h) { h.Copy(fHistAll); fIsExtern=kTRUE; }
     
    5353    TH2D &GetHistAll()             { return fHistAll; }
    5454    const TH2D &GetHistAll() const { return fHistAll; }
     55    const TH1D &GetHEnergy() const { return fHEnergy; }
    5556
    5657/*
  • trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc

    r6949 r6954  
    219219}
    220220
     221void MHEnergyEst::GetWeights(TH1D &hist) const
     222{
     223    // Project into EnergyEst_ey
     224    TH1D *h1 = (TH1D*)fHEnergy.Project3D("rtlprmft_ex");
     225    TH1D *h2 = (TH1D*)fHEnergy.Project3D("rtlprmft_ey");
     226
     227    h1->Copy(hist);
     228    hist.Divide(h2);
     229
     230    delete h1;
     231    delete h2;
     232
     233    hist.SetNameTitle("EnergyRatio", "Ratio between estimated and monte carlo energy");
     234    hist.SetXTitle("E [GeV]");
     235    hist.SetYTitle("N_{est}/N_{mc} [1]");
     236    hist.SetDirectory(0);
     237}
     238
    221239void MHEnergyEst::Paint(Option_t *opt)
    222240{
  • trunk/MagicSoft/Mars/mhflux/MHEnergyEst.h

    r6938 r6954  
    4949
    5050    const TH3D &GetHEnergy() const { return fHEnergy; }
     51    void GetWeights(TH1D &hist) const;
    5152
    5253    void InitMapping(MHMatrix *mat);
Note: See TracChangeset for help on using the changeset viewer.