PDFReader Class Reference

#include <PDFReader.h>

List of all members.

Public Member Functions

 PDFReader ()
 PDFReader (const char *name)
 ~PDFReader ()
Double_t GetProb_f_sig (NueAnaReader *nueana)
Double_t GetProb_f_bg (NueAnaReader *nueana)
Double_t GetProb_q_sig (NueAnaReader *nueana)
Double_t GetProb_q_bg (NueAnaReader *nueana)
Double_t GetProb_y_sig (NueAnaReader *nueana)
Double_t GetProb_y_bg (NueAnaReader *nueana)
Double_t GetProb_mfqm_sig (NueAnaReader *nueana)
Double_t GetProb_mfqm_bg (NueAnaReader *nueana)
Double_t GetInt_f_sig (NueAnaReader *nueana)
Double_t GetInt_f_bg (NueAnaReader *nueana)
void Setycut (Float_t y_cut_in)
Double_t GetProb_f_sig (NueRecord *nuerec)
Double_t GetProb_f_bg (NueRecord *nuerec)
Double_t GetProb_q_sig (NueRecord *nuerec)
Double_t GetProb_q_bg (NueRecord *nuerec)
Double_t GetProb_y_sig (NueRecord *nuerec)
Double_t GetProb_y_bg (NueRecord *nuerec)
Double_t GetProb_mfqm_sig (NueRecord *nuerec)
Double_t GetProb_mfqm_bg (NueRecord *nuerec)
Double_t GetInt_f_sig (NueRecord *nuerec)
Double_t GetInt_f_bg (NueRecord *nuerec)

Private Attributes

std::vector< TH2 * > fHist
Double_t minPDFx [8]
Double_t maxPDFx [8]
Double_t minPDFy [8]
Double_t maxPDFy [8]
Float_t y_cut

Detailed Description

Definition at line 24 of file PDFReader.h.


Constructor & Destructor Documentation

PDFReader::PDFReader (  ) 

Definition at line 29 of file PDFReader.cxx.

References fHist, and y_cut.

00029                      : fHist(8){
00030 
00031   for(UInt_t i=0;i<8;++i) fHist[i]=0;
00032   y_cut=1.0;
00033 
00034 }

PDFReader::PDFReader ( const char *  name  ) 

Definition at line 36 of file PDFReader.cxx.

References fHist, gSystem(), maxPDFx, maxPDFy, minPDFx, minPDFy, and y_cut.

00036                                      : fHist(8){
00037 
00038   for(UInt_t i=0;i<8;++i) fHist[i]=0;
00039 
00040   //Get file (expand first to resolve environment variables)
00041   char *expanded_name = gSystem->ExpandPathName(name);
00042   TFile file_pdf(expanded_name,"READ");
00043   delete expanded_name;
00044 
00045   //Get PDFs
00046   fHist[0] = dynamic_cast<TH2*>(file_pdf.Get("h_f_sig"));
00047   fHist[1] = dynamic_cast<TH2*>(file_pdf.Get("h_f_bg"));
00048   fHist[2] = dynamic_cast<TH2*>(file_pdf.Get("h_q_sig"));
00049   fHist[3] = dynamic_cast<TH2*>(file_pdf.Get("h_q_bg"));
00050   fHist[4] = dynamic_cast<TH2*>(file_pdf.Get("h_y_sig"));
00051   fHist[5] = dynamic_cast<TH2*>(file_pdf.Get("h_y_bg"));
00052   fHist[6] = dynamic_cast<TH2*>(file_pdf.Get("h_mfqm_sig"));
00053   fHist[7] = dynamic_cast<TH2*>(file_pdf.Get("h_mfqm_bg"));
00054 
00055   //Get mins and maxs
00056   for(UInt_t ii=0;ii<8;++ii){
00057     assert(fHist[ii]);
00058     fHist[ii]->SetDirectory(0);
00059     minPDFx[ii]=fHist[ii]->GetXaxis()->GetXmin();
00060     maxPDFx[ii]=fHist[ii]->GetXaxis()->GetXmax();
00061     minPDFy[ii]=fHist[ii]->GetYaxis()->GetXmin();
00062     maxPDFy[ii]=fHist[ii]->GetYaxis()->GetXmax();
00063   }
00064   
00065   y_cut=1.0;
00066 
00067 }

PDFReader::~PDFReader (  ) 

Definition at line 69 of file PDFReader.cxx.

00069 {}


Member Function Documentation

Double_t PDFReader::GetInt_f_bg ( NueRecord nuerec  ) 

Definition at line 352 of file PDFReader.cxx.

References fHist, maxPDFy, minPDFy, ANtpEventInfoNue::phNueGeV, and NueRecord::srevent.

00352                                                 {
00353   
00354   Double_t theint=0;
00355   Float_t Ereco=nuerec->srevent.phNueGeV;
00356   if(Ereco > minPDFy[1] && Ereco < maxPDFy[1]){
00357     Int_t elbin=fHist[1]->ProjectionY()->FindBin(nuerec->srevent.phNueGeV);    
00358     theint=fHist[1]->ProjectionX("",elbin,elbin)->Integral();
00359   }
00360   return theint;
00361 
00362 }

Double_t PDFReader::GetInt_f_bg ( NueAnaReader nueana  ) 

Definition at line 326 of file PDFReader.cxx.

References fHist, maxPDFy, minPDFy, NueAnaReader::nuerecord, ANtpEventInfoNue::phNueGeV, and NueRecord::srevent.

Referenced by MCNNpid::GetMCNNpid_value().

00326                                                    {
00327   
00328   Double_t theint=0;
00329   Float_t Ereco=nueana->nuerecord->srevent.phNueGeV;
00330   if(Ereco > minPDFy[1] && Ereco < maxPDFy[1]){
00331     Int_t elbin=fHist[1]->ProjectionY()->FindBin(nueana->nuerecord->srevent.phNueGeV);    
00332     theint=fHist[1]->ProjectionX("",elbin,elbin)->Integral();
00333   }
00334   return theint;
00335 
00336 }

Double_t PDFReader::GetInt_f_sig ( NueRecord nuerec  ) 

Definition at line 339 of file PDFReader.cxx.

References fHist, maxPDFy, minPDFy, ANtpEventInfoNue::phNueGeV, and NueRecord::srevent.

00339                                                  {
00340    
00341   Double_t theint=0;
00342   Float_t Ereco=nuerec->srevent.phNueGeV;
00343   if(Ereco > minPDFy[0] && Ereco < maxPDFy[0]){
00344     Int_t elbin=fHist[0]->ProjectionY()->FindBin(nuerec->srevent.phNueGeV);
00345     theint=fHist[0]->ProjectionX("",elbin,elbin)->Integral();
00346   }
00347   return theint;
00348 
00349 }

Double_t PDFReader::GetInt_f_sig ( NueAnaReader nueana  ) 

Definition at line 313 of file PDFReader.cxx.

References fHist, maxPDFy, minPDFy, NueAnaReader::nuerecord, ANtpEventInfoNue::phNueGeV, and NueRecord::srevent.

Referenced by MCNNpid::GetMCNNpid_value().

00313                                                     {
00314    
00315   Double_t theint=0;
00316   Float_t Ereco=nueana->nuerecord->srevent.phNueGeV;
00317   if(Ereco > minPDFy[0] && Ereco < maxPDFy[0]){
00318     Int_t elbin=fHist[0]->ProjectionY()->FindBin(nueana->nuerecord->srevent.phNueGeV);
00319     theint=fHist[0]->ProjectionX("",elbin,elbin)->Integral();
00320   }
00321   return theint;
00322 
00323 }

Double_t PDFReader::GetProb_f_bg ( NueRecord nuerec  ) 

Definition at line 118 of file PDFReader.cxx.

References fHist, LEMStandard::GetfracCCy(), maxPDFx, maxPDFy, minPDFx, minPDFy, ANtpEventInfoNue::phNueGeV, NueRecord::srevent, and y_cut.

00118                                              {
00119 
00120   Float_t fracCC=LEMStandard::GetfracCCy(nr,y_cut);
00121   Float_t Ereco=nr->srevent.phNueGeV;
00122   Double_t proba = fHist[1]->GetBinContent(fHist[1]->FindBin(fracCC,Ereco));
00123 
00124   if(fracCC < minPDFx[1] || fracCC > maxPDFx[1] || Ereco < minPDFy[1] || Ereco > maxPDFy[1]){
00125     proba=0;
00126   }
00127 
00128   return proba;
00129 
00130 }

Double_t PDFReader::GetProb_f_bg ( NueAnaReader nueana  ) 

Definition at line 104 of file PDFReader.cxx.

References fHist, NueAnaReader::GetfracCCy(), maxPDFx, maxPDFy, minPDFx, minPDFy, NueAnaReader::nuerecord, ANtpEventInfoNue::phNueGeV, NueRecord::srevent, and y_cut.

Referenced by MCNNpid::GetMCNNpid_value().

00104                                                     {
00105 
00106   Float_t fracCC=nueana->GetfracCCy(y_cut);
00107   Float_t Ereco=nueana->nuerecord->srevent.phNueGeV;
00108   Double_t proba = fHist[1]->GetBinContent(fHist[1]->FindBin(fracCC,Ereco));
00109 
00110   if(fracCC < minPDFx[1] || fracCC > maxPDFx[1] || Ereco < minPDFy[1] || Ereco > maxPDFy[1]){
00111     proba=0;
00112   }
00113 
00114   return proba;
00115 
00116 }

Double_t PDFReader::GetProb_f_sig ( NueRecord nuerec  ) 

Definition at line 89 of file PDFReader.cxx.

References fHist, LEMStandard::GetfracCCy(), maxPDFx, maxPDFy, minPDFx, minPDFy, ANtpEventInfoNue::phNueGeV, NueRecord::srevent, and y_cut.

00089                                               {
00090 
00091   Float_t fracCC = LEMStandard::GetfracCCy(nr,y_cut);
00092   Float_t Ereco=nr->srevent.phNueGeV;
00093   Double_t proba = fHist[0]->GetBinContent(fHist[0]->FindBin(fracCC,Ereco));
00094 
00095   if( fracCC < minPDFx[0] || fracCC > maxPDFx[0] || Ereco < minPDFy[0] || Ereco > maxPDFy[0]){
00096     proba=0;
00097   }
00098 
00099   return proba;
00100 
00101 }

Double_t PDFReader::GetProb_f_sig ( NueAnaReader nueana  ) 

Definition at line 75 of file PDFReader.cxx.

References fHist, NueAnaReader::GetfracCCy(), maxPDFx, maxPDFy, minPDFx, minPDFy, NueAnaReader::nuerecord, ANtpEventInfoNue::phNueGeV, NueRecord::srevent, and y_cut.

Referenced by MCNNpid::GetMCNNpid_value().

00075                                                      {
00076 
00077   Float_t fracCC=nueana->GetfracCCy(y_cut);
00078   Float_t Ereco=nueana->nuerecord->srevent.phNueGeV;
00079   Double_t proba = fHist[0]->GetBinContent(fHist[0]->FindBin(fracCC,Ereco));
00080 
00081   if( fracCC < minPDFx[0] || fracCC > maxPDFx[0] || Ereco < minPDFy[0] || Ereco > maxPDFy[0]){
00082     proba=0;
00083   }
00084 
00085   return proba;
00086 
00087 }

Double_t PDFReader::GetProb_mfqm_bg ( NueRecord nuerec  ) 

Definition at line 298 of file PDFReader.cxx.

References fHist, LEMStandard::GetMeanFracQMatched(), maxPDFx, maxPDFy, minPDFx, minPDFy, ANtpEventInfoNue::phNueGeV, NueRecord::srevent, and y_cut.

00298                                                 {
00299 
00300   Float_t fracCC=LEMStandard::GetMeanFracQMatched(nr,y_cut);
00301   Float_t Ereco=nr->srevent.phNueGeV;
00302   Double_t proba = fHist[7]->GetBinContent(fHist[7]->FindBin(fracCC,Ereco));
00303 
00304   if(fracCC < minPDFx[7] || fracCC > maxPDFx[7] || Ereco < minPDFy[7] || Ereco > maxPDFy[7]){
00305     proba=0;
00306   }
00307 
00308   return proba;
00309 
00310 }

Double_t PDFReader::GetProb_mfqm_bg ( NueAnaReader nueana  ) 

Definition at line 283 of file PDFReader.cxx.

References fHist, NueAnaReader::GetMeanFracQMatched(), maxPDFx, maxPDFy, minPDFx, minPDFy, NueAnaReader::nuerecord, ANtpEventInfoNue::phNueGeV, NueRecord::srevent, and y_cut.

Referenced by MCNNpid::GetMCNNpid_value().

00283                                                        {
00284 
00285   Float_t fracCC=nueana->GetMeanFracQMatched(y_cut);
00286   Float_t Ereco=nueana->nuerecord->srevent.phNueGeV;
00287   Double_t proba = fHist[7]->GetBinContent(fHist[7]->FindBin(fracCC,Ereco));
00288 
00289   if(fracCC < minPDFx[7] || fracCC > maxPDFx[7] || Ereco < minPDFy[7] || Ereco > maxPDFy[7]){
00290     proba=0;
00291   }
00292 
00293   return proba;
00294 
00295 }

Double_t PDFReader::GetProb_mfqm_sig ( NueRecord nuerec  ) 

Definition at line 268 of file PDFReader.cxx.

References fHist, LEMStandard::GetMeanFracQMatched(), maxPDFx, maxPDFy, minPDFx, minPDFy, ANtpEventInfoNue::phNueGeV, NueRecord::srevent, and y_cut.

00268                                                  {
00269 
00270   Float_t fracCC=LEMStandard::GetMeanFracQMatched(nr,y_cut);
00271   Float_t Ereco=nr->srevent.phNueGeV;
00272   Double_t proba = fHist[6]->GetBinContent(fHist[6]->FindBin(fracCC,Ereco));
00273 
00274   if( fracCC < minPDFx[6] || fracCC > maxPDFx[6] || Ereco < minPDFy[6] || Ereco > maxPDFy[6]){
00275     proba=0;
00276   }
00277 
00278   return proba;
00279 
00280 }

Double_t PDFReader::GetProb_mfqm_sig ( NueAnaReader nueana  ) 

Definition at line 253 of file PDFReader.cxx.

References fHist, NueAnaReader::GetMeanFracQMatched(), maxPDFx, maxPDFy, minPDFx, minPDFy, NueAnaReader::nuerecord, ANtpEventInfoNue::phNueGeV, NueRecord::srevent, and y_cut.

Referenced by MCNNpid::GetMCNNpid_value().

00253                                                         {
00254 
00255   Float_t fracCC=nueana->GetMeanFracQMatched(y_cut);
00256   Float_t Ereco=nueana->nuerecord->srevent.phNueGeV;
00257   Double_t proba = fHist[6]->GetBinContent(fHist[6]->FindBin(fracCC,Ereco));
00258 
00259   if( fracCC < minPDFx[6] || fracCC > maxPDFx[6] || Ereco < minPDFy[6] || Ereco > maxPDFy[6]){
00260     proba=0;
00261   }
00262 
00263   return proba;
00264 
00265 }

Double_t PDFReader::GetProb_q_bg ( NueRecord nuerec  ) 

Definition at line 178 of file PDFReader.cxx.

References fHist, maxPDFx, maxPDFy, NueRecord::mcnnv, minPDFx, minPDFy, ANtpEventInfoNue::phNueGeV, MCNNVars::qtot, and NueRecord::srevent.

00178                                              {
00179 
00180   Float_t fracCC=nr->mcnnv.qtot;
00181   Float_t Ereco=nr->srevent.phNueGeV;
00182   Double_t proba = fHist[3]->GetBinContent(fHist[3]->FindBin(fracCC,Ereco));
00183 
00184   if(fracCC < minPDFx[3] || fracCC > maxPDFx[3] || Ereco < minPDFy[3] || Ereco > maxPDFy[3]){
00185     proba=0;
00186   }
00187 
00188   return proba;
00189 
00190 }

Double_t PDFReader::GetProb_q_bg ( NueAnaReader nueana  ) 

Definition at line 163 of file PDFReader.cxx.

References fHist, maxPDFx, maxPDFy, NueRecord::mcnnv, minPDFx, minPDFy, NueAnaReader::nuerecord, ANtpEventInfoNue::phNueGeV, MCNNVars::qtot, and NueRecord::srevent.

Referenced by MCNNpid::GetMCNNpid_value().

00163                                                     {
00164 
00165   Float_t fracCC=nueana->nuerecord->mcnnv.qtot;
00166   Float_t Ereco=nueana->nuerecord->srevent.phNueGeV;
00167   Double_t proba = fHist[3]->GetBinContent(fHist[3]->FindBin(fracCC,Ereco));
00168 
00169   if(fracCC < minPDFx[3] || fracCC > maxPDFx[3] || Ereco < minPDFy[3] || Ereco > maxPDFy[3]){
00170     proba=0;
00171   }
00172 
00173   return proba;
00174 
00175 }

Double_t PDFReader::GetProb_q_sig ( NueRecord nuerec  ) 

Definition at line 148 of file PDFReader.cxx.

References fHist, maxPDFx, maxPDFy, NueRecord::mcnnv, minPDFx, minPDFy, ANtpEventInfoNue::phNueGeV, MCNNVars::qtot, and NueRecord::srevent.

00148                                               {
00149 
00150   Float_t fracCC=nr->mcnnv.qtot;
00151   Float_t Ereco=nr->srevent.phNueGeV;
00152   Double_t proba = fHist[2]->GetBinContent(fHist[2]->FindBin(fracCC,Ereco));
00153 
00154   if( fracCC < minPDFx[2] || fracCC > maxPDFx[2] || Ereco < minPDFy[2] || Ereco > maxPDFy[2]){
00155     proba=0;
00156   }
00157 
00158   return proba;
00159 
00160 }

Double_t PDFReader::GetProb_q_sig ( NueAnaReader nueana  ) 

Definition at line 133 of file PDFReader.cxx.

References fHist, maxPDFx, maxPDFy, NueRecord::mcnnv, minPDFx, minPDFy, NueAnaReader::nuerecord, ANtpEventInfoNue::phNueGeV, MCNNVars::qtot, and NueRecord::srevent.

Referenced by MCNNpid::GetMCNNpid_value().

00133                                                      {
00134 
00135   Float_t fracCC=nueana->nuerecord->mcnnv.qtot;
00136   Float_t Ereco=nueana->nuerecord->srevent.phNueGeV;
00137   Double_t proba = fHist[2]->GetBinContent(fHist[2]->FindBin(fracCC,Ereco));
00138 
00139   if( fracCC < minPDFx[2] || fracCC > maxPDFx[2] || Ereco < minPDFy[2] || Ereco > maxPDFy[2]){
00140     proba=0;
00141   }
00142 
00143   return proba;
00144 
00145 }

Double_t PDFReader::GetProb_y_bg ( NueRecord nuerec  ) 

Definition at line 238 of file PDFReader.cxx.

References fHist, LEMStandard::Getymean(), maxPDFx, maxPDFy, minPDFx, minPDFy, ANtpEventInfoNue::phNueGeV, NueRecord::srevent, and y_cut.

00238                                              {
00239 
00240   Float_t fracCC=LEMStandard::Getymean(nr,y_cut);
00241   Float_t Ereco=nr->srevent.phNueGeV;
00242   Double_t proba = fHist[5]->GetBinContent(fHist[5]->FindBin(fracCC,Ereco));
00243 
00244   if(fracCC < minPDFx[5] || fracCC > maxPDFx[5] || Ereco < minPDFy[5] || Ereco > maxPDFy[5]){
00245     proba=0;
00246   }
00247 
00248   return proba;
00249 
00250 }

Double_t PDFReader::GetProb_y_bg ( NueAnaReader nueana  ) 

Definition at line 223 of file PDFReader.cxx.

References fHist, NueAnaReader::Getymean(), maxPDFx, maxPDFy, minPDFx, minPDFy, NueAnaReader::nuerecord, ANtpEventInfoNue::phNueGeV, NueRecord::srevent, and y_cut.

Referenced by MCNNpid::GetMCNNpid_value().

00223                                                     {
00224 
00225   Float_t fracCC=nueana->Getymean(y_cut);
00226   Float_t Ereco=nueana->nuerecord->srevent.phNueGeV;
00227   Double_t proba = fHist[5]->GetBinContent(fHist[5]->FindBin(fracCC,Ereco));
00228 
00229   if(fracCC < minPDFx[5] || fracCC > maxPDFx[5] || Ereco < minPDFy[5] || Ereco > maxPDFy[5]){
00230     proba=0;
00231   }
00232 
00233   return proba;
00234 
00235 }

Double_t PDFReader::GetProb_y_sig ( NueRecord nuerec  ) 

Definition at line 208 of file PDFReader.cxx.

References fHist, LEMStandard::Getymean(), maxPDFx, maxPDFy, minPDFx, minPDFy, ANtpEventInfoNue::phNueGeV, NueRecord::srevent, and y_cut.

00208                                               {
00209 
00210   Float_t fracCC=LEMStandard::Getymean(nr,y_cut);
00211   Float_t Ereco=nr->srevent.phNueGeV;
00212   Double_t proba = fHist[4]->GetBinContent(fHist[4]->FindBin(fracCC,Ereco));
00213 
00214   if( fracCC < minPDFx[4] || fracCC > maxPDFx[4] || Ereco < minPDFy[4] || Ereco > maxPDFy[4]){
00215     proba=0;
00216   }
00217 
00218   return proba;
00219 
00220 }

Double_t PDFReader::GetProb_y_sig ( NueAnaReader nueana  ) 

Definition at line 193 of file PDFReader.cxx.

References fHist, NueAnaReader::Getymean(), maxPDFx, maxPDFy, minPDFx, minPDFy, NueAnaReader::nuerecord, ANtpEventInfoNue::phNueGeV, NueRecord::srevent, and y_cut.

Referenced by MCNNpid::GetMCNNpid_value().

00193                                                      {
00194 
00195   Float_t fracCC=nueana->Getymean(y_cut);
00196   Float_t Ereco=nueana->nuerecord->srevent.phNueGeV;
00197   Double_t proba = fHist[4]->GetBinContent(fHist[4]->FindBin(fracCC,Ereco));
00198 
00199   if( fracCC < minPDFx[4] || fracCC > maxPDFx[4] || Ereco < minPDFy[4] || Ereco > maxPDFy[4]){
00200     proba=0;
00201   }
00202 
00203   return proba;
00204 
00205 }

void PDFReader::Setycut ( Float_t  y_cut_in  ) 

Definition at line 366 of file PDFReader.cxx.

References y_cut.

Referenced by MCNNpid::Setycut().

00366                                        {
00367  
00368   y_cut=y_cut_in;
00369 
00370 }


Member Data Documentation

std::vector<TH2*> PDFReader::fHist [private]
Double_t PDFReader::maxPDFx[8] [private]
Double_t PDFReader::maxPDFy[8] [private]
Double_t PDFReader::minPDFx[8] [private]
Double_t PDFReader::minPDFy[8] [private]
Float_t PDFReader::y_cut [private]

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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1