Changeset 13387


Ignore:
Timestamp:
04/19/12 09:53:17 (13 years ago)
Author:
tbretz
Message:
Added fIsRatio; propagate weights; added a possibility to also fill a ratio into a camera histogram.
Location:
trunk/Mars/mhist
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mhist/MHCamEvent.cc

    r13002 r13387  
    5454// ----------------
    5555//  + fNameSub
     56//  + fIsRatio
    5657//
    5758/////////////////////////////////////////////////////////////////////////////
     
    9697MHCamEvent::MHCamEvent(const char *name, const char *title)
    9798: fSum(NULL), fErr(NULL), fEvt(NULL), fSub(0), fType(0), fErrorSpread(kTRUE), fErrorRelative(kFALSE),
    98 fThreshold(0), fUseThreshold(0)
     99fThreshold(0), fUseThreshold(0), fIsRatio(false)
    99100{
    100101    Init(name, title);
     
    109110MHCamEvent::MHCamEvent(Int_t type, const char *name, const char *title)
    110111: fSum(NULL), fErr(NULL), fEvt(NULL), fSub(0), fType(type), fErrorSpread(kTRUE), fErrorRelative(kFALSE),
    111 fThreshold(0), fUseThreshold(0)
     112fThreshold(0), fUseThreshold(0), fIsRatio(false)
    112113{
    113114    Init(name, title);
     
    226227    case kNoBound:
    227228        if (fSub)
    228             fSum->AddCamDifference(*evt, *fSub, fType);
     229        {
     230            if (fIsRatio)
     231                fSum->AddCamRatio(*evt, *fSub, fType, w);
     232            else
     233                fSum->AddCamDifference(*evt, *fSub, fType, w);
     234        }
    229235        else
    230236            fSum->AddCamContent(*evt, fType, w);
  • trunk/Mars/mhist/MHCamEvent.h

    r13002 r13387  
    3232    Char_t fUseThreshold;  // Use a threshold? Which direction has it?
    3333
     34    Bool_t fIsRatio;       // If NameSub is set: Use Ratio or difference
     35
    3436    Int_t fNumReInit;      //!
    3537
     
    5153
    5254    void SetNameEvt(const TString name)  { fNameEvt = name; }
    53     void SetNameSub(const TString name)  { fNameSub = name; }
     55    void SetNameSub(const TString name, Bool_t ratio=kFALSE)  { fNameSub = name; fIsRatio = ratio; }
    5456    void SetNameGeom(const TString name) { fNameGeom = name; }
    5557    void SetType(Int_t type) { fType = type; }
Note: See TracChangeset for help on using the changeset viewer.