Changeset 8270


Ignore:
Timestamp:
01/25/07 10:59:26 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mreflector
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mreflector/MRflEvtData.cc

    r8267 r8270  
    134134// --------------------------------------------------------------------------
    135135//
     136// Fills all photon distances into a TH1 scaled with scale (default=1)
     137//
     138void MRflEvtData::FillRad(TH1 &hist, Float_t scale) const
     139{
     140    MRflSinglePhoton *ph=NULL;
     141
     142    TIter Next(&fList);
     143    while ((ph=(MRflSinglePhoton*)Next()))
     144        ph->FillRad(hist, scale);
     145}
     146
     147// --------------------------------------------------------------------------
     148//
    136149// Fills all photons into a TH2 scaled with scale (default=1)
    137150//
  • trunk/MagicSoft/Mars/mreflector/MRflEvtData.h

    r8267 r8270  
    1414#endif
    1515
     16class TH1;
    1617class TH2;
    1718class MRflSinglePhoton;
     
    3738    const MRflSinglePhoton &GetPhoton(Int_t i) const;
    3839
     40    void FillRad(TH1 &hist, Float_t scale=1) const;
    3941    void Fill(TH2 &hist, Float_t scale=1) const;
    4042
  • trunk/MagicSoft/Mars/mreflector/MRflSinglePhoton.cc

    r8267 r8270  
    4343// --------------------------------------------------------------------------
    4444//
     45// Fill radial photon distance into histogram scaled by scale.
     46//
     47void MRflSinglePhoton::FillRad(TH1 &hist, Float_t scale) const
     48{
     49    hist.Fill(TMath::Hypot(fX, fY)*scale);
     50}
     51
     52// --------------------------------------------------------------------------
     53//
    4554// Fill photon position into histogram scaled by scale.
    4655//
  • trunk/MagicSoft/Mars/mreflector/MRflSinglePhoton.h

    r8267 r8270  
    66#endif
    77
     8class TH1;
    89class TH2;
    910
     
    3536    Float_t GetY() const { return fY; }
    3637
     38    void FillRad(TH1 &hist, Float_t scale=1) const;
    3739    void Fill(TH2 &hist, Float_t scale=1) const;
    3840
Note: See TracChangeset for help on using the changeset viewer.