Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

NueExtrapolation Class Reference

#include <NueExtrapolation.h>

Inheritance diagram for NueExtrapolation:

NueFNExtrapolation List of all members.

Public Member Functions

 NueExtrapolation ()
virtual ~NueExtrapolation ()
TH1 * GetSpectrum (Detector::Detector_t, Double_t, NueBackground *)
void Clear ()
Extrapolation::Extrapolation_t GetExtrapMethod ()
void SetNueBackground (NueBackground *bg)

Protected Member Functions

void SetHelperFile (std::string)
TH1 * None (const char *)
virtual TH1 * Extrapolate (const char *, Bool_t)

Protected Attributes

NueBackgroundfBg
TFile * fHelperFile
Extrapolation::Extrapolation_t fExtrapMethod

Constructor & Destructor Documentation

NueExtrapolation::NueExtrapolation  ) 
 

Definition at line 9 of file NueExtrapolation.cxx.

00009                                    :
00010   fBg(0),
00011   fHelperFile(0),
00012   fExtrapMethod(Extrapolation::kNone)
00013 {
00014 }

NueExtrapolation::~NueExtrapolation  )  [virtual]
 

Definition at line 16 of file NueExtrapolation.cxx.

References fHelperFile.

00017 {
00018   if(fHelperFile) fHelperFile->Close();
00019 }


Member Function Documentation

void NueExtrapolation::Clear void   )  [inline]
 

Definition at line 18 of file NueExtrapolation.h.

Referenced by Comparator::DrawPrediction().

00018 {fBg = NULL;}

TH1 * NueExtrapolation::Extrapolate const char *  ,
Bool_t 
[protected, virtual]
 

Reimplemented in NueFNExtrapolation.

Definition at line 56 of file NueExtrapolation.cxx.

References None().

Referenced by GetSpectrum().

00057 {
00058   return this->None(histName);
00059 }

Extrapolation::Extrapolation_t NueExtrapolation::GetExtrapMethod  )  [inline]
 

Definition at line 20 of file NueExtrapolation.h.

00020 {return fExtrapMethod;}

TH1 * NueExtrapolation::GetSpectrum Detector::Detector_t  ,
Double_t  ,
NueBackground
 

Definition at line 26 of file NueExtrapolation.cxx.

References Extrapolation::AsString(), Background::AsString(), det, Extrapolate(), fBg, fExtrapMethod, NueBackground::GetBackground(), NueBackground::GetDetector(), NueBackground::GetPOT(), NueBackground::GetSelection(), None(), and SetNueBackground().

Referenced by Comparator::GetPredictions().

00029 {
00030   this->SetNueBackground(bg);
00031   TH1 *hist = NULL;
00032   char histName[256];
00033   sprintf(histName,"%s_Prediction_%s_%s_%s_%.2fe20POT",
00034           Detector::AsString(det),
00035           Selection::AsString(fBg->GetSelection()),
00036           Background::AsString(fBg->GetBackground()),
00037           Extrapolation::AsString(fExtrapMethod),pot*1e-20);
00038 
00039   //first check whether this is already the right detector:
00040   if(det == fBg->GetDetector()) hist = this->None(histName);
00041   else {
00042     //are we going near->far or far->near?
00043     Bool_t extrapNtoF = true;
00044     if(det == Detector::kNear) extrapNtoF = false;
00045     hist = this->Extrapolate(histName,extrapNtoF); 
00046   }
00047   hist->Scale(pot/fBg->GetPOT());
00048   return hist;
00049 }

TH1 * NueExtrapolation::None const char *   )  [protected]
 

Definition at line 51 of file NueExtrapolation.cxx.

References fBg, and NueBackground::GetHist().

Referenced by Extrapolate(), and GetSpectrum().

00052 {
00053   return (TH1*) fBg->GetHist()->Clone(histName);
00054 }

void NueExtrapolation::SetHelperFile std::string   )  [protected]
 

Definition at line 21 of file NueExtrapolation.cxx.

References fHelperFile.

Referenced by NueFNExtrapolation::NueFNExtrapolation().

00022 {
00023   fHelperFile = new TFile(filename.c_str(),"READ");
00024 }

void NueExtrapolation::SetNueBackground NueBackground bg  )  [inline]
 

Definition at line 22 of file NueExtrapolation.h.

Referenced by GetSpectrum().

00022 { fBg = bg; }


Member Data Documentation

NueBackground* NueExtrapolation::fBg [protected]
 

Definition at line 26 of file NueExtrapolation.h.

Referenced by GetSpectrum(), and None().

Extrapolation::Extrapolation_t NueExtrapolation::fExtrapMethod [protected]
 

Definition at line 32 of file NueExtrapolation.h.

Referenced by GetSpectrum().

TFile* NueExtrapolation::fHelperFile [protected]
 

Definition at line 29 of file NueExtrapolation.h.

Referenced by SetHelperFile(), and ~NueExtrapolation().


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:09:47 2010 for loon by  doxygen 1.3.9.1