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

Detailed Description

Definition at line 10 of file NueExtrapolation.h.


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.

References fBg.

00018 {fBg = NULL;}

TH1 * NueExtrapolation::Extrapolate ( const char *  histName,
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.

References fExtrapMethod.

00020 {return fExtrapMethod;}

TH1 * NueExtrapolation::GetSpectrum ( Detector::Detector_t  det,
Double_t  pot,
NueBackground bg 
)

Definition at line 26 of file NueExtrapolation.cxx.

References Extrapolation::AsString(), Selection::AsString(), Background::AsString(), Detector::AsString(), MuELoss::e, Extrapolate(), fBg, fExtrapMethod, NueBackground::GetBackground(), NueBackground::GetDetector(), NueBackground::GetPOT(), NueBackground::GetSelection(), Detector::kNear, 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 *  histName  )  [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  filename  )  [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.

References fBg.

Referenced by GetSpectrum().

00022 { fBg = bg; }


Member Data Documentation

TFile* NueExtrapolation::fHelperFile [protected]

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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1