NueBackground Class Reference

#include <NueBackground.h>

List of all members.

Public Member Functions

 NueBackground ()
 NueBackground (std::string, TH1 *, Detector::Detector_t, Background::Background_t, Selection::Selection_t, Double_t)
 ~NueBackground ()
const TH1 * GetHist ()
const char * GetName ()
Detector::Detector_t GetDetector ()
Background::Background_t GetBackground ()
Selection::Selection_t GetSelection ()
Double_t GetPOT ()
void Print (std::ostream &) const
void Draw (Float_t pot=0, Int_t col=1, const char *opt="")

Private Attributes

std::string fName
TH1 * fHist
Detector::Detector_t fDet
Background::Background_t fBg
Selection::Selection_t fSel
Double_t fPOT

Detailed Description

Definition at line 10 of file NueBackground.h.


Constructor & Destructor Documentation

NueBackground::NueBackground (  ) 

Definition at line 3 of file NueBackground.cxx.

References fBg, fDet, fHist, fName, fPOT, fSel, Detector::kUnknown, Selection::kUnknown, and Background::kUnknown.

00004 {
00005   fName = "";
00006   fHist = NULL;
00007   fDet = Detector::kUnknown;
00008   fBg = Background::kUnknown;
00009   fSel = Selection::kUnknown;
00010   fPOT = 0;  
00011 }

NueBackground::NueBackground ( std::string  name,
TH1 *  hist,
Detector::Detector_t  det,
Background::Background_t  bg,
Selection::Selection_t  sel,
Double_t  pot 
)

Definition at line 13 of file NueBackground.cxx.

References fBg, fDet, fHist, fName, fPOT, and fSel.

00017 {
00018   fName = name;
00019   fHist = (TH1*) hist->Clone(name.c_str());
00020   fHist->SetDirectory(0);
00021   fDet = det;
00022   fBg = bg;
00023   fSel = sel;
00024   fPOT = pot;
00025 }

NueBackground::~NueBackground (  )  [inline]

Definition at line 18 of file NueBackground.h.

References fHist.

00018 { delete fHist;}


Member Function Documentation

void NueBackground::Draw ( Float_t  pot = 0,
Int_t  col = 1,
const char *  opt = "" 
)

Definition at line 37 of file NueBackground.cxx.

References fHist, and fPOT.

00038 {
00039   fHist->SetLineColor(col);
00040   if(pot>0) {
00041     fHist->Scale(pot/fPOT);
00042     fPOT = pot;
00043   }
00044   fHist->Draw(opt);  
00045 }

Background::Background_t NueBackground::GetBackground (  )  [inline]

Definition at line 23 of file NueBackground.h.

References fBg.

Referenced by NueFNExtrapolation::GetRatio(), and NueExtrapolation::GetSpectrum().

00023 {return fBg;}

Detector::Detector_t NueBackground::GetDetector (  )  [inline]

Definition at line 22 of file NueBackground.h.

References fDet.

Referenced by NueExtrapolation::GetSpectrum().

00022 {return fDet;}

const TH1* NueBackground::GetHist (  )  [inline]

Definition at line 20 of file NueBackground.h.

References fHist.

Referenced by NueFNExtrapolation::Extrapolate(), and NueExtrapolation::None().

00020 {return fHist;}

const char* NueBackground::GetName ( void   )  [inline]

Definition at line 21 of file NueBackground.h.

References fName.

00021 {return fName.c_str();}

Double_t NueBackground::GetPOT ( void   )  [inline]

Definition at line 25 of file NueBackground.h.

References fPOT.

Referenced by NueExtrapolation::GetSpectrum().

00025 {return fPOT;}

Selection::Selection_t NueBackground::GetSelection (  )  [inline]

Definition at line 24 of file NueBackground.h.

References fSel.

Referenced by NueExtrapolation::GetSpectrum().

00024 {return fSel;}

void NueBackground::Print ( std::ostream &  out  )  const

Definition at line 27 of file NueBackground.cxx.

References bfld::AsString(), fBg, fDet, fHist, fName, fPOT, and fSel.

00028 {
00029   out << fName << std::endl;
00030   out << Background::AsString(Background::EBackground(fBg)) << std::endl; 
00031   out << Detector::AsString(Detector::EDetector(fDet)) << std::endl;
00032   out << Selection::AsString(Selection::ESelection(fSel)) << std::endl;
00033   out << fPOT << " POT" << std::endl;
00034   out << "Histogram integral: " << fHist->Integral() << std::endl;
00035 }


Member Data Documentation

Definition at line 34 of file NueBackground.h.

Referenced by GetBackground(), NueBackground(), and Print().

Definition at line 33 of file NueBackground.h.

Referenced by GetDetector(), NueBackground(), and Print().

TH1* NueBackground::fHist [private]

Definition at line 32 of file NueBackground.h.

Referenced by Draw(), GetHist(), NueBackground(), Print(), and ~NueBackground().

std::string NueBackground::fName [private]

Definition at line 31 of file NueBackground.h.

Referenced by GetName(), NueBackground(), and Print().

Double_t NueBackground::fPOT [private]

Definition at line 36 of file NueBackground.h.

Referenced by Draw(), GetPOT(), NueBackground(), and Print().

Definition at line 35 of file NueBackground.h.

Referenced by GetSelection(), NueBackground(), and Print().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1