LoadPDF Class Reference

#include <LoadPDF.h>

List of all members.

Public Member Functions

 LoadPDF ()
 LoadPDF (const char *name)
 ~LoadPDF ()
Double_t GetProb1_nu (Double_t qpeqp_in, Int_t planes_in)
Double_t GetProb1_anu (Double_t qpeqp_in, Int_t planes_in)
Double_t GetProb2_nu (Int_t planes_in)
Double_t GetProb2_anu (Int_t planes_in)
Double_t GetProb3_nu (Double_t y_in)
Double_t GetProb3_anu (Double_t y_in)
Double_t GetProb4_nu (Double_t cosz_in)
Double_t GetProb4_anu (Double_t cosz_in)

Private Attributes

std::vector< TH1 * > fHist
std::vector< TH2 * > fHist2
Double_t minPDFx_1D [6]
Double_t maxPDFx_1D [6]
Double_t minPDFx_2D [2]
Double_t maxPDFx_2D [2]
Double_t minPDFy_2D [2]
Double_t maxPDFy_2D [2]

Detailed Description

Definition at line 12 of file LoadPDF.h.


Constructor & Destructor Documentation

LoadPDF::LoadPDF (  ) 

Definition at line 15 of file LoadPDF.cxx.

References fHist, and fHist2.

00015                  : fHist(6),fHist2(2){
00016 
00017   for (unsigned int i=0;i<6;i++) fHist[i]=0;
00018   for (unsigned int i=0;i<2;i++) fHist2[i]=0;
00019 
00020 }

LoadPDF::LoadPDF ( const char *  name  ) 

Definition at line 22 of file LoadPDF.cxx.

References fHist, fHist2, maxPDFx_1D, maxPDFx_2D, maxPDFy_2D, minPDFx_1D, minPDFx_2D, and minPDFy_2D.

00022                                  : fHist(6),fHist2(2){
00023 
00024   for (unsigned int i=0;i<6;i++) fHist[i]=0;
00025   for (unsigned int i=0;i<2;i++) fHist2[i]=0;
00026 
00027   //Get file
00028   TFile file_pdf(name,"READ");
00029 
00030   //Get PDFs 
00031   fHist2[0] = dynamic_cast<TH2*>(file_pdf.Get("hist_qpeqp_planes_nu"));
00032   fHist2[1] = dynamic_cast<TH2*>(file_pdf.Get("hist_qpeqp_planes_anu"));
00033   fHist[0] = dynamic_cast<TH1*>(file_pdf.Get("hist_planes_nu"));
00034   fHist[1] = dynamic_cast<TH1*>(file_pdf.Get("hist_planes_anu"));
00035   fHist[2] = dynamic_cast<TH1*>(file_pdf.Get("hist_y_nu"));
00036   fHist[3] = dynamic_cast<TH1*>(file_pdf.Get("hist_y_anu"));
00037   fHist[4] = dynamic_cast<TH1*>(file_pdf.Get("hist_cosz_nu"));
00038   fHist[5] = dynamic_cast<TH1*>(file_pdf.Get("hist_cosz_anu"));
00039     
00040   for (unsigned int i=0;i<6;i++){
00041     assert(fHist[i]);
00042     fHist[i]->SetDirectory(0);
00043     minPDFx_1D[i]=fHist[i]->GetXaxis()->GetXmin();
00044     maxPDFx_1D[i]=fHist[i]->GetXaxis()->GetXmax();
00045   }
00046   for (unsigned int i=0;i<2;i++){
00047     assert(fHist2[i]);
00048     fHist2[i]->SetDirectory(0);
00049     minPDFx_2D[i]=fHist2[i]->GetXaxis()->GetXmin();
00050     maxPDFx_2D[i]=fHist2[i]->GetXaxis()->GetXmax();
00051     minPDFy_2D[i]=fHist2[i]->GetYaxis()->GetXmin();
00052     maxPDFy_2D[i]=fHist2[i]->GetYaxis()->GetXmax();
00053     
00054   }
00055   
00056 
00057 }//end of constructor

LoadPDF::~LoadPDF (  ) 

Definition at line 59 of file LoadPDF.cxx.

00059                  {
00060 
00061 }


Member Function Documentation

Double_t LoadPDF::GetProb1_anu ( Double_t  qpeqp_in,
Int_t  planes_in 
)

Definition at line 76 of file LoadPDF.cxx.

References fHist2, maxPDFx_2D, maxPDFy_2D, minPDFx_2D, and minPDFy_2D.

Referenced by PIDCalculator::GetNuBarPID().

00076                                                                 {
00077   Double_t proba = fHist2[1]->GetBinContent(fHist2[1]->FindBin(qpeqp_in,planes_in));
00078 
00079   if(proba==0 || qpeqp_in < minPDFx_2D[1] || qpeqp_in > maxPDFx_2D[1] || planes_in < minPDFy_2D[1] || planes_in > maxPDFy_2D[1]){
00080     proba=0.000001;
00081   }
00082   return proba;
00083 }

Double_t LoadPDF::GetProb1_nu ( Double_t  qpeqp_in,
Int_t  planes_in 
)

Definition at line 65 of file LoadPDF.cxx.

References fHist2, maxPDFx_2D, maxPDFy_2D, minPDFx_2D, and minPDFy_2D.

Referenced by PIDCalculator::GetNuBarPID().

00065                                                                {
00066 
00067   Double_t proba = fHist2[0]->GetBinContent(fHist2[0]->FindBin(qpeqp_in,planes_in));
00068 
00069   if(proba==0 || qpeqp_in < minPDFx_2D[0] || qpeqp_in > maxPDFx_2D[0] || planes_in < minPDFy_2D[0] || planes_in > maxPDFy_2D[0]){
00070     proba=0.000001;
00071   }
00072   return proba;
00073 }

Double_t LoadPDF::GetProb2_anu ( Int_t  planes_in  ) 

Definition at line 96 of file LoadPDF.cxx.

References fHist, maxPDFx_1D, and minPDFx_1D.

Referenced by PIDCalculator::GetNuBarPID().

00096                                              {
00097   Double_t proba = fHist[1]->GetBinContent(fHist[1]->FindBin(planes_in));
00098 
00099   if(proba==0 || planes_in < minPDFx_1D[1] || planes_in > maxPDFx_1D[1]){
00100     proba=0.000001;
00101   }
00102   return proba;
00103 }

Double_t LoadPDF::GetProb2_nu ( Int_t  planes_in  ) 

Definition at line 86 of file LoadPDF.cxx.

References fHist, maxPDFx_1D, and minPDFx_1D.

Referenced by PIDCalculator::GetNuBarPID().

00086                                             {
00087   Double_t proba = fHist[0]->GetBinContent(fHist[0]->FindBin(planes_in)); 
00088 
00089   if(proba==0 || planes_in < minPDFx_1D[0] || planes_in > maxPDFx_1D[0]){
00090     proba=0.000001;
00091   }
00092   return proba;
00093 }

Double_t LoadPDF::GetProb3_anu ( Double_t  y_in  ) 

Definition at line 116 of file LoadPDF.cxx.

References fHist, maxPDFx_1D, and minPDFx_1D.

Referenced by PIDCalculator::GetNuBarPID().

00116                                            {  
00117   Double_t proba = fHist[3]->GetBinContent(fHist[3]->FindBin(y_in));
00118 
00119   if(proba==0 || y_in < minPDFx_1D[3] || y_in > maxPDFx_1D[3]){
00120     proba=0.000001;
00121   }
00122   return proba;
00123 }

Double_t LoadPDF::GetProb3_nu ( Double_t  y_in  ) 

Definition at line 106 of file LoadPDF.cxx.

References fHist, maxPDFx_1D, and minPDFx_1D.

Referenced by PIDCalculator::GetNuBarPID().

00106                                           {
00107   Double_t proba = fHist[2]->GetBinContent(fHist[2]->FindBin(y_in)); 
00108 
00109   if(proba==0 || y_in < minPDFx_1D[2] || y_in > maxPDFx_1D[2]){
00110     proba=0.000001;
00111   }
00112   return proba;
00113 }

Double_t LoadPDF::GetProb4_anu ( Double_t  cosz_in  ) 

Definition at line 136 of file LoadPDF.cxx.

References fHist, maxPDFx_1D, and minPDFx_1D.

Referenced by PIDCalculator::GetNuBarPID().

00136                                               {
00137   Double_t proba = fHist[5]->GetBinContent(fHist[5]->FindBin(cosz_in));
00138 
00139   if(proba==0 || cosz_in < minPDFx_1D[5] || cosz_in > maxPDFx_1D[5]){
00140     proba=0.000001;
00141   }
00142   return proba;
00143 }

Double_t LoadPDF::GetProb4_nu ( Double_t  cosz_in  ) 

Definition at line 126 of file LoadPDF.cxx.

References fHist, maxPDFx_1D, and minPDFx_1D.

Referenced by PIDCalculator::GetNuBarPID().

00126                                              {
00127   Double_t proba = fHist[4]->GetBinContent(fHist[4]->FindBin(cosz_in)); 
00128 
00129   if(proba==0 || cosz_in < minPDFx_1D[4] || cosz_in > maxPDFx_1D[4]){
00130     proba=0.000001;
00131   }
00132   return proba;
00133 }


Member Data Documentation

std::vector<TH1*> LoadPDF::fHist [private]
std::vector<TH2*> LoadPDF::fHist2 [private]

Definition at line 29 of file LoadPDF.h.

Referenced by GetProb1_anu(), GetProb1_nu(), and LoadPDF().

Double_t LoadPDF::maxPDFx_1D[6] [private]
Double_t LoadPDF::maxPDFx_2D[2] [private]

Definition at line 33 of file LoadPDF.h.

Referenced by GetProb1_anu(), GetProb1_nu(), and LoadPDF().

Double_t LoadPDF::maxPDFy_2D[2] [private]

Definition at line 35 of file LoadPDF.h.

Referenced by GetProb1_anu(), GetProb1_nu(), and LoadPDF().

Double_t LoadPDF::minPDFx_1D[6] [private]
Double_t LoadPDF::minPDFx_2D[2] [private]

Definition at line 32 of file LoadPDF.h.

Referenced by GetProb1_anu(), GetProb1_nu(), and LoadPDF().

Double_t LoadPDF::minPDFy_2D[2] [private]

Definition at line 34 of file LoadPDF.h.

Referenced by GetProb1_anu(), GetProb1_nu(), and LoadPDF().


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1