NuMMHelperPRLPQ Class Reference

#include <NuMMHelperPRLPQ.h>

Inheritance diagram for NuMMHelperPRLPQ:
NuMMHelperPRL NuMMHelper

List of all members.

Public Member Functions

 NuMMHelperPRLPQ ()
 NuMMHelperPRLPQ (const std::string &helperFilename, const std::string &xSecFilename)
virtual ~NuMMHelperPRLPQ ()
virtual const TH1D * NDPurity ()
virtual const TH1D * NDCCContamination ()
virtual const TH2D * NDRecoVsTrue ()
virtual const TH1D * NDEfficiency ()
virtual const TGraph * XSecGraph ()
virtual const TH2D * BeamMatrix ()
virtual const TH2D * BeamMatrixNuMuCCXSec ()
virtual const TH2D * BeamMatrixTauCCXSec ()
virtual const TGraph * XSecGraphTaus ()
virtual const TH1D * FDTauEfficiency ()
virtual const TH1D * FDEfficiency ()
virtual const TH1D * FDCCContamination ()
virtual const TH2D * FDRecoVsTrue ()
virtual const TH2D * NDRecoVsTrueNC ()
virtual const TH2D * FDRecoVsTrueNC ()
virtual const TH2D * FDCCContaminationRecoVsTrue ()
virtual const TH2D * RecoVsTrueNC (int, int)
virtual const TH1D * FDPurity ()
virtual const TH2D * FDTauRecoVsTrue ()
virtual const TH1D * FDEfficiencyOtherChargeWS ()

Private Attributes

TH1D * fPurity_ND
TH1D * fCCContamination_ND
TH2D * fRecoVsTrueEnergy_ND
TH1D * fEfficiency_ND
TGraph * fXSec_CC_Graph
TGraph * fTau_XSec_CC_Graph
TH2D * fFDVsNDMatrixRW
TH2D * fFDVsNDMatrixXSecRW
TH2D * fFDVsNDMatrixTauXSecRW
TH1D * fEfficiency_FD
TH1D * fCCContamination_FD
TH2D * fRecoVsTrueEnergy_FD
TH1D * fPurity_FD
TH2D * fCCContaminationRecoVsTrue_FD
TH1D * fSuppliedTrueUnoscCCBackground_FD
TH1D * fOtherEfficiency_FD
TH1D * fEfficiencyTau_FD
TH2D * fRecoVsTrueEnergyTau_FD
TH1D * fEfficiencyOtherChargeWS_FD

Detailed Description

Definition at line 10 of file NuMMHelperPRLPQ.h.


Constructor & Destructor Documentation

NuMMHelperPRLPQ::NuMMHelperPRLPQ (  )  [inline]

Definition at line 13 of file NuMMHelperPRLPQ.h.

00013 {};

NuMMHelperPRLPQ::NuMMHelperPRLPQ ( const std::string &  helperFilename,
const std::string &  xSecFilename 
) [explicit]

Definition at line 16 of file NuMMHelperPRLPQ.cxx.

00018 {
00019   TFile helperFile(helperFilename.c_str(),"READ");
00020 
00021   fRecoVsTrueEnergy_ND = (TH2D*) helperFile.Get("RecoVsTrueEnergyPQ_ND");
00022   fRecoVsTrueEnergy_ND->SetDirectory(0);
00023   fRecoVsTrueEnergy_FD = (TH2D*) helperFile.Get("RecoVsTrueEnergyPQ_FD");
00024   fRecoVsTrueEnergy_FD->SetDirectory(0);
00025   
00026   fFDVsNDMatrixRW = (TH2D*) helperFile.Get("FDVsNDMatrixRWPQ");
00027   if(fFDVsNDMatrixRW) fFDVsNDMatrixRW->SetDirectory(0);  
00028   fFDVsNDMatrixXSecRW = (TH2D*) helperFile.Get("FDVsNDMatrixXSecRWPQ");
00029   if(fFDVsNDMatrixXSecRW) fFDVsNDMatrixXSecRW->SetDirectory(0);
00030   fFDVsNDMatrixTauXSecRW = (TH2D*) helperFile.Get("FDVsNDMatrixTauXSecRWPQ");
00031   if(fFDVsNDMatrixTauXSecRW) fFDVsNDMatrixTauXSecRW->SetDirectory(0);
00032   
00033   fEfficiency_ND = (TH1D*) helperFile.Get("EfficiencyPQ_ND");
00034   fEfficiency_ND->SetDirectory(0);
00035   fEfficiency_FD = (TH1D*) helperFile.Get("EfficiencyPQ_FD");
00036   fEfficiency_FD->SetDirectory(0);
00037 
00038   //The purity histograms in the helper file remove both the ND
00039   //background and the wrong sign CCs: the PRL analysis doesn't
00040   //remove the latter.
00041   fPurity_FD = (TH1D*) helperFile.Get("NCContaminationPQ_FD");
00042   fPurity_FD->SetDirectory(0);
00043   fPurity_ND = (TH1D*) helperFile.Get("NCContaminationPQ_ND");
00044   fPurity_ND->SetDirectory(0);
00045   for (int i=1; i<=fPurity_ND->GetNbinsX(); ++i){
00046     fPurity_ND->SetBinContent(i, 1.0 -
00047                               fPurity_ND->GetBinContent(i));
00048     fPurity_FD->SetBinContent(i, 1.0 -
00049                               fPurity_FD->GetBinContent(i));
00050   }
00051 
00052   fCCContamination_ND = (TH1D*) helperFile.Get("CCContaminationPQ_ND");
00053   fCCContamination_ND->SetDirectory(0);
00054   fCCContamination_FD = (TH1D*) helperFile.Get("CCContaminationPQ_FD");
00055   fCCContamination_FD->SetDirectory(0);
00056 
00057   fCCContaminationRecoVsTrue_FD =
00058     (TH2D*) helperFile.Get("CCContaminationRecoVsTruePQ_FD");
00059   fCCContaminationRecoVsTrue_FD->SetDirectory(0);
00060 
00061   //Tau helpers
00062   fEfficiencyTau_FD = (TH1D*) helperFile.Get("EfficiencyTauPQ_FD");
00063   fEfficiencyTau_FD->SetDirectory(0);
00064   fRecoVsTrueEnergyTau_FD = (TH2D*)
00065     helperFile.Get("RecoVsTrueEnergyTauPQ_FD");
00066   fRecoVsTrueEnergyTau_FD->SetDirectory(0);
00067   
00068   fEfficiencyOtherChargeWS_FD = 
00069     (TH1D*) helperFile.Get("OtherEfficiencyPQ_FD");
00070   fEfficiencyOtherChargeWS_FD->SetDirectory(0);
00071   
00072   helperFile.Close();
00073   
00074   //Get cross-sections (numu)
00075   TFile *xsecfile = new TFile(xSecFilename.c_str(),"READ");
00076   TH1F* XSec_CC = (TH1F*) xsecfile->Get("h_numubar_cc_tot");
00077   XSec_CC->SetDirectory(0);
00078   xsecfile->Close();
00079   if (xsecfile){delete xsecfile; xsecfile = 0;}
00080   Float_t *x = new Float_t[XSec_CC->GetNbinsX()];
00081   Float_t *y = new Float_t[XSec_CC->GetNbinsX()];
00082   for(int i=0;i<XSec_CC->GetNbinsX();i++) {
00083     x[i] = XSec_CC->GetBinCenter(i+1);
00084     y[i] = XSec_CC->GetBinContent(i+1);
00085   }
00086   fXSec_CC_Graph = new TGraph(XSec_CC->GetNbinsX(),x,y);
00087   if (x) {delete[] x; x = 0;}
00088   if (y) {delete[] y; y = 0;}
00089   
00090   //Get cross-sections (tau)
00091   xsecfile = new TFile(xSecFilename.c_str(),"READ");
00092   TH1F* tau_XSec_CC = (TH1F*) xsecfile->Get("h_nutaubar_cc_tot");
00093   tau_XSec_CC->SetDirectory(0);
00094   xsecfile->Close();
00095   if (xsecfile){delete xsecfile; xsecfile = 0;}
00096   x = new Float_t[tau_XSec_CC->GetNbinsX()];
00097   y = new Float_t[tau_XSec_CC->GetNbinsX()];
00098   for(int i=0;i<tau_XSec_CC->GetNbinsX();i++) {
00099     x[i] = tau_XSec_CC->GetBinCenter(i+1);
00100     y[i] = tau_XSec_CC->GetBinContent(i+1);
00101   }
00102   fTau_XSec_CC_Graph = new TGraph(tau_XSec_CC->GetNbinsX(),x,y);
00103   if (x) {delete[] x; x = 0;}
00104   if (y) {delete[] y; y = 0;}
00105   
00106   if (fCCContaminationRecoVsTrue_FD){ 
00107     //Normalise the FD CC contamination true to reco CC matrix
00108     //First loop over reco axis:
00109     for (Int_t i=1; i<=fCCContaminationRecoVsTrue_FD->GetNbinsX()+1; ++i){
00110       //Find out the total number of true events in this column:
00111       Double_t trueEvents = 0.0;
00112       for (Int_t j=1; j<=fCCContaminationRecoVsTrue_FD->GetNbinsY()+1; ++j){
00113         trueEvents += fCCContaminationRecoVsTrue_FD->GetBinContent(i,j);
00114       }
00115       //Loop again, this time normalise.
00116       for (Int_t j=1; j<=fCCContaminationRecoVsTrue_FD->GetNbinsY()+1; ++j){
00117         if (trueEvents>0){
00118           Double_t oldContent =
00119             fCCContaminationRecoVsTrue_FD->GetBinContent(i,j);
00120           Double_t oldError =
00121             fCCContaminationRecoVsTrue_FD->GetBinError(i,j);
00122           fCCContaminationRecoVsTrue_FD->SetBinContent
00123             (i,j,oldContent/trueEvents);
00124           fCCContaminationRecoVsTrue_FD->SetBinError
00125             (i,j,oldError/trueEvents);
00126         }
00127         else{
00128           fCCContaminationRecoVsTrue_FD->SetBinContent(i,j,0);
00129           
00130           fCCContaminationRecoVsTrue_FD->SetBinError(i,j,0);
00131         }
00132       }
00133     }
00134   }
00135 }

virtual NuMMHelperPRLPQ::~NuMMHelperPRLPQ (  )  [inline, virtual]

Definition at line 16 of file NuMMHelperPRLPQ.h.

00016 {};


Member Function Documentation

virtual const TH2D* NuMMHelperPRLPQ::BeamMatrix ( void   )  [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 23 of file NuMMHelperPRLPQ.h.

References fFDVsNDMatrixRW.

00023 {return fFDVsNDMatrixRW;}

virtual const TH2D* NuMMHelperPRLPQ::BeamMatrixNuMuCCXSec (  )  [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 24 of file NuMMHelperPRLPQ.h.

References fFDVsNDMatrixXSecRW.

00024 {return fFDVsNDMatrixXSecRW;}

virtual const TH2D* NuMMHelperPRLPQ::BeamMatrixTauCCXSec (  )  [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 25 of file NuMMHelperPRLPQ.h.

References fFDVsNDMatrixTauXSecRW.

00025 {return fFDVsNDMatrixTauXSecRW;}

virtual const TH1D* NuMMHelperPRLPQ::FDCCContamination (  )  [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 29 of file NuMMHelperPRLPQ.h.

References fCCContamination_FD.

00029 {return fCCContamination_FD;}

virtual const TH2D* NuMMHelperPRLPQ::FDCCContaminationRecoVsTrue (  )  [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 33 of file NuMMHelperPRLPQ.h.

References fCCContaminationRecoVsTrue_FD.

virtual const TH1D* NuMMHelperPRLPQ::FDEfficiency (  )  [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 28 of file NuMMHelperPRLPQ.h.

References fEfficiency_FD.

00028 {return fEfficiency_FD;}

virtual const TH1D* NuMMHelperPRLPQ::FDEfficiencyOtherChargeWS (  )  [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 41 of file NuMMHelperPRLPQ.h.

References fEfficiencyOtherChargeWS_FD.

00041                                                  {
00042     return fEfficiencyOtherChargeWS_FD;
00043   }

virtual const TH1D* NuMMHelperPRLPQ::FDPurity (  )  [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 37 of file NuMMHelperPRLPQ.h.

References fPurity_FD.

00037 {return fPurity_FD;}

virtual const TH2D* NuMMHelperPRLPQ::FDRecoVsTrue (  )  [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 30 of file NuMMHelperPRLPQ.h.

References fRecoVsTrueEnergy_FD.

00030 {return fRecoVsTrueEnergy_FD;}

virtual const TH2D* NuMMHelperPRLPQ::FDRecoVsTrueNC (  )  [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 32 of file NuMMHelperPRLPQ.h.

00032 {return 0;}

virtual const TH1D* NuMMHelperPRLPQ::FDTauEfficiency (  )  [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 27 of file NuMMHelperPRLPQ.h.

References fEfficiencyTau_FD.

00027 {return fEfficiencyTau_FD;}

virtual const TH2D* NuMMHelperPRLPQ::FDTauRecoVsTrue (  )  [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 38 of file NuMMHelperPRLPQ.h.

References fRecoVsTrueEnergyTau_FD.

00038 {return fRecoVsTrueEnergyTau_FD;}

virtual const TH1D* NuMMHelperPRLPQ::NDCCContamination (  )  [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 19 of file NuMMHelperPRLPQ.h.

References fCCContamination_ND.

00019 {return fCCContamination_ND;}

virtual const TH1D* NuMMHelperPRLPQ::NDEfficiency (  )  [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 21 of file NuMMHelperPRLPQ.h.

References fEfficiency_ND.

00021 {return fEfficiency_ND;}

virtual const TH1D* NuMMHelperPRLPQ::NDPurity (  )  [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 18 of file NuMMHelperPRLPQ.h.

References fPurity_ND.

00018 {return fPurity_ND;}

virtual const TH2D* NuMMHelperPRLPQ::NDRecoVsTrue (  )  [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 20 of file NuMMHelperPRLPQ.h.

References fRecoVsTrueEnergy_ND.

00020 {return fRecoVsTrueEnergy_ND;}

virtual const TH2D* NuMMHelperPRLPQ::NDRecoVsTrueNC (  )  [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 31 of file NuMMHelperPRLPQ.h.

00031 {return 0;}

virtual const TH2D* NuMMHelperPRLPQ::RecoVsTrueNC ( int  ,
int   
) [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 36 of file NuMMHelperPRLPQ.h.

00036 {return 0;}

virtual const TGraph* NuMMHelperPRLPQ::XSecGraph (  )  [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 22 of file NuMMHelperPRLPQ.h.

References fXSec_CC_Graph.

00022 {return fXSec_CC_Graph;}

virtual const TGraph* NuMMHelperPRLPQ::XSecGraphTaus (  )  [inline, virtual]

Reimplemented from NuMMHelperPRL.

Definition at line 26 of file NuMMHelperPRLPQ.h.

References fTau_XSec_CC_Graph.

00026 {return fTau_XSec_CC_Graph;}


Member Data Documentation

Reimplemented from NuMMHelperPRL.

Definition at line 58 of file NuMMHelperPRLPQ.h.

Referenced by FDCCContamination().

Reimplemented from NuMMHelperPRL.

Definition at line 49 of file NuMMHelperPRLPQ.h.

Referenced by NDCCContamination().

Reimplemented from NuMMHelperPRL.

Definition at line 62 of file NuMMHelperPRLPQ.h.

Referenced by FDCCContaminationRecoVsTrue().

Reimplemented from NuMMHelperPRL.

Definition at line 57 of file NuMMHelperPRLPQ.h.

Referenced by FDEfficiency().

Reimplemented from NuMMHelperPRL.

Definition at line 51 of file NuMMHelperPRLPQ.h.

Referenced by NDEfficiency().

Reimplemented from NuMMHelperPRL.

Definition at line 69 of file NuMMHelperPRLPQ.h.

Referenced by FDEfficiencyOtherChargeWS().

Reimplemented from NuMMHelperPRL.

Definition at line 66 of file NuMMHelperPRLPQ.h.

Referenced by FDTauEfficiency().

Reimplemented from NuMMHelperPRL.

Definition at line 54 of file NuMMHelperPRLPQ.h.

Referenced by BeamMatrix().

Reimplemented from NuMMHelperPRL.

Definition at line 56 of file NuMMHelperPRLPQ.h.

Referenced by BeamMatrixTauCCXSec().

Reimplemented from NuMMHelperPRL.

Definition at line 55 of file NuMMHelperPRLPQ.h.

Referenced by BeamMatrixNuMuCCXSec().

Reimplemented from NuMMHelperPRL.

Definition at line 64 of file NuMMHelperPRLPQ.h.

TH1D* NuMMHelperPRLPQ::fPurity_FD [private]

Reimplemented from NuMMHelperPRL.

Definition at line 61 of file NuMMHelperPRLPQ.h.

Referenced by FDPurity().

TH1D* NuMMHelperPRLPQ::fPurity_ND [private]

Reimplemented from NuMMHelperPRL.

Definition at line 48 of file NuMMHelperPRLPQ.h.

Referenced by NDPurity().

Reimplemented from NuMMHelperPRL.

Definition at line 59 of file NuMMHelperPRLPQ.h.

Referenced by FDRecoVsTrue().

Reimplemented from NuMMHelperPRL.

Definition at line 50 of file NuMMHelperPRLPQ.h.

Referenced by NDRecoVsTrue().

Reimplemented from NuMMHelperPRL.

Definition at line 67 of file NuMMHelperPRLPQ.h.

Referenced by FDTauRecoVsTrue().

Reimplemented from NuMMHelperPRL.

Definition at line 63 of file NuMMHelperPRLPQ.h.

Reimplemented from NuMMHelperPRL.

Definition at line 53 of file NuMMHelperPRLPQ.h.

Referenced by XSecGraphTaus().

Reimplemented from NuMMHelperPRL.

Definition at line 52 of file NuMMHelperPRLPQ.h.

Referenced by XSecGraph().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1