NuMatrixInput Class Reference

#include <NuMatrixInput.h>

List of all members.

Public Member Functions

 NuMatrixInput ()
 NuMatrixInput (const char *filename)
 NuMatrixInput (const std::string filename)
 NuMatrixInput (const TString filename)
 NuMatrixInput (TFile *infile)
 NuMatrixInput (const NuMatrixInput &original)
void Init (TFile *inputFile)
virtual ~NuMatrixInput ()
virtual const TH2D * NuMuTrueToRecoFD () const
virtual const TH2D * NuMuTrueToRecoCCBkgFD () const
virtual const TH1D * NuMuTrueEnFD () const
virtual const TH1D * NuMuTrueEnCCBkgFD () const
virtual const TH1D * NuMuRecoEnNCBkgFD () const
virtual const TH1D * NuMuTrueEnPotentialAppearanceEffCorFD () const
virtual const TH1D * NuMuEffCorTaus_FD () const
virtual const TH2D * NuMuRecoVsTrueTaus_FD () const
virtual const TH2D * NuMuBarTrueToRecoFD () const
virtual const TH2D * NuMuBarTrueToRecoCCBkgFD () const
virtual const TH1D * NuMuBarTrueEnFD () const
virtual const TH1D * NuMuBarTrueEnCCBkgFD () const
virtual const TH1D * NuMuBarRecoEnNCBkgFD () const
virtual const TH1D * NuMuBarTrueEnPotentialAppearanceEffCorFD () const
virtual const TH2D * NoChargeCutTrueToRecoFD () const
virtual const TH2D * NoChargeCutTrueToRecoCCBkgFD () const
virtual const TH1D * NoChargeCutTrueEnFD () const
virtual const TH1D * NoChargeCutTrueEnCCBkgFD () const
virtual const TH1D * NoChargeCutRecoEnNCBkgFD () const
TH2D * M (bool NuMu) const
TH2D * Mtilde (bool NuMu) const
TH1D * T (bool NuMu) const
TH1D * K (bool NuMu) const
TH1D * Z (bool NuMu) const
TH1D * Appear (bool NuMu) const
void M (TH2D *in, bool NuMu)
void Mtilde (TH2D *in, bool NuMu)
void T (TH1D *in, bool NuMu)
void K (TH1D *in, bool NuMu)
void Z (TH1D *in, bool NuMu)
void Appear (TH1D *in, bool NuMu)
TH1D * PredictFDSpectrumNuMu (const Double_t dm2, const Double_t sn2, const Double_t dm2bar, const Double_t sn2bar)
TH1D * PredictFDSpectrumNuMuBar (const Double_t dm2, const Double_t sn2, const Double_t dm2bar, const Double_t sn2bar)
TH1D * PredictFDSpectrumTransition (const Double_t dm2, const Double_t sn2, const Double_t appearanceFraction)
TH1D * PredictFDSpectrum (const Double_t dm2, const Double_t sn2, const Double_t dm2bar, const Double_t sn2bar, const Double_t appearanceFraction, bool NuMu)
TH1D * PredictFDSpectrumNuMu (const NuXMLConfig *xml)
TH1D * PredictFDSpectrumNuMuBar (const NuXMLConfig *xml)
void Oscillate (TH1D *hist, const Double_t dm2, const Double_t sn2, bool invert=false)
void TrueToReco (TH1D *hist, TH2D *M)

Public Attributes

TH2D * fRecoVsTrueEnergyNQ_FD
TH2D * fTrueToRecoCCContaminationNQ_FD
TH1D * fTrueEnergyEffCorNQ_FD
TH1D * fSuppliedTrueUnoscCCBackgroundNQ_FD
TH1D * fRecoUnoscNCBackgroundNQ_FD
TH1D * fTrueEnPotentialAppearanceEffCorNQ_FD
TH1D * fEffCorTauNQ_FD
TH2D * fRecoVsTrueTauNQ_FD
TH2D * fRecoVsTrueEnergyPQ_FD
TH2D * fTrueToRecoCCContaminationPQ_FD
TH1D * fTrueEnergyEffCorPQ_FD
TH1D * fSuppliedTrueUnoscCCBackgroundPQ_FD
TH1D * fRecoUnoscNCBackgroundPQ_FD
TH1D * fTrueEnPotentialAppearanceEffCorPQ_FD
TH2D * fRecoVsTrueEnergyAll_FD
TH2D * fTrueToRecoCCContaminationAll_FD
TH1D * fTrueEnergyEffCorAll_FD
TH1D * fSuppliedTrueUnoscCCBackgroundAll_FD
TH1D * fRecoUnoscNCBackgroundAll_FD

Detailed Description

Definition at line 96 of file NuMatrixInput.h.


Constructor & Destructor Documentation

NuMatrixInput::NuMatrixInput (  )  [explicit]

Definition at line 124 of file NuMatrixInput.cxx.

00124                              : TObject()
00125 {
00126     cout << "Blank constructor used" << endl;
00127     
00128     //NuMu histograms
00129     fRecoVsTrueEnergyNQ_FD = 0;               //M
00130     fTrueToRecoCCContaminationNQ_FD = 0;      //M tilde
00131     fTrueEnergyEffCorNQ_FD = 0;               //T
00132     fSuppliedTrueUnoscCCBackgroundNQ_FD = 0;  //K
00133     fRecoUnoscNCBackgroundNQ_FD = 0;          //Z
00134     fTrueEnPotentialAppearanceEffCorNQ_FD = 0;//numubar->numu appearance
00135     fEffCorTauNQ_FD = 0;                      //potential taus
00136     fRecoVsTrueTauNQ_FD = 0;                  //tau reco v. true matrix
00137     
00138     //NuMuBar histograms
00139     fRecoVsTrueEnergyPQ_FD = 0;              //M
00140     fTrueToRecoCCContaminationPQ_FD = 0;     //M tilde
00141     fTrueEnergyEffCorPQ_FD = 0;              //T
00142     fSuppliedTrueUnoscCCBackgroundPQ_FD = 0; //K
00143     fRecoUnoscNCBackgroundPQ_FD = 0;         //Z
00144     fTrueEnPotentialAppearanceEffCorPQ_FD = 0;//numu->numubar appearance
00145     
00146     //No charge cut histograms
00147     fRecoVsTrueEnergyAll_FD = 0;              //M
00148     fTrueToRecoCCContaminationAll_FD = 0;     //M tilde
00149     fTrueEnergyEffCorAll_FD = 0;              //T
00150     fSuppliedTrueUnoscCCBackgroundAll_FD = 0; //K
00151     fRecoUnoscNCBackgroundAll_FD = 0;         //Z
00152     
00153 }

NuMatrixInput::NuMatrixInput ( const char *  filename  )  [explicit]

Definition at line 156 of file NuMatrixInput.cxx.

References infile, and Init().

00157 {
00158     TFile *infile = new TFile(filename,"READ");
00159     Init(infile);
00160     infile->Close();
00161 }

NuMatrixInput::NuMatrixInput ( const std::string  filename  )  [explicit]

Definition at line 164 of file NuMatrixInput.cxx.

References infile, and Init().

00165 {
00166     TFile *infile = new TFile(filename.c_str(),"READ");
00167     Init(infile);
00168     infile->Close();
00169 }

NuMatrixInput::NuMatrixInput ( const TString  filename  )  [explicit]

Definition at line 172 of file NuMatrixInput.cxx.

References infile, and Init().

00173 {
00174     TFile *infile = new TFile(filename,"READ");
00175     Init(infile);
00176     infile->Close();
00177 }

NuMatrixInput::NuMatrixInput ( TFile *  infile  )  [explicit]

Definition at line 180 of file NuMatrixInput.cxx.

References Init().

00181 {
00182     Init(infile);
00183 }

NuMatrixInput::NuMatrixInput ( const NuMatrixInput original  ) 

Definition at line 186 of file NuMatrixInput.cxx.

References fEffCorTauNQ_FD, fRecoUnoscNCBackgroundAll_FD, fRecoUnoscNCBackgroundNQ_FD, fRecoUnoscNCBackgroundPQ_FD, fRecoVsTrueEnergyAll_FD, fRecoVsTrueEnergyNQ_FD, fRecoVsTrueEnergyPQ_FD, fRecoVsTrueTauNQ_FD, fSuppliedTrueUnoscCCBackgroundAll_FD, fSuppliedTrueUnoscCCBackgroundNQ_FD, fSuppliedTrueUnoscCCBackgroundPQ_FD, fTrueEnergyEffCorAll_FD, fTrueEnergyEffCorNQ_FD, fTrueEnergyEffCorPQ_FD, fTrueEnPotentialAppearanceEffCorNQ_FD, fTrueEnPotentialAppearanceEffCorPQ_FD, fTrueToRecoCCContaminationAll_FD, fTrueToRecoCCContaminationNQ_FD, and fTrueToRecoCCContaminationPQ_FD.

00187 : TObject()
00188 {
00189     if (original.fRecoVsTrueEnergyNQ_FD){
00190         this->fRecoVsTrueEnergyNQ_FD = new TH2D(*original.fRecoVsTrueEnergyNQ_FD);
00191     }
00192     else {this->fRecoVsTrueEnergyNQ_FD = 0;}
00193     if (original.fTrueToRecoCCContaminationNQ_FD){
00194         this->fRecoVsTrueEnergyNQ_FD = new TH2D(*original.fRecoVsTrueEnergyNQ_FD);
00195     }
00196     else {this->fRecoVsTrueEnergyNQ_FD = 0;}
00197     if (original.fTrueEnergyEffCorNQ_FD){
00198         this->fTrueEnergyEffCorNQ_FD =
00199         new TH1D(*original.fTrueEnergyEffCorNQ_FD);
00200     }
00201     else {this->fTrueEnergyEffCorNQ_FD = 0;}
00202     if (original.fSuppliedTrueUnoscCCBackgroundNQ_FD){
00203         this->fSuppliedTrueUnoscCCBackgroundNQ_FD =
00204         new TH1D(*original.fSuppliedTrueUnoscCCBackgroundNQ_FD);
00205     }
00206     else {this->fSuppliedTrueUnoscCCBackgroundNQ_FD = 0;}
00207     if (original.fRecoUnoscNCBackgroundNQ_FD){
00208         this->fRecoUnoscNCBackgroundNQ_FD =
00209         new TH1D(*original.fRecoUnoscNCBackgroundNQ_FD);
00210     }
00211     else {this->fRecoUnoscNCBackgroundNQ_FD = 0;}
00212     if (original.fTrueEnPotentialAppearanceEffCorNQ_FD){
00213         this->fTrueEnPotentialAppearanceEffCorNQ_FD =
00214         new TH1D(*original.fTrueEnPotentialAppearanceEffCorNQ_FD);
00215     }
00216     else {this->fTrueEnPotentialAppearanceEffCorNQ_FD = 0;}
00217     if (original.fEffCorTauNQ_FD){
00218       this->fEffCorTauNQ_FD =
00219         new TH1D(*original.fEffCorTauNQ_FD);
00220     }
00221     else {this->fEffCorTauNQ_FD = 0;}
00222     if (original.fRecoVsTrueTauNQ_FD){
00223       this->fRecoVsTrueTauNQ_FD =
00224         new TH2D(*original.fRecoVsTrueTauNQ_FD);
00225     }
00226     else {this->fRecoVsTrueTauNQ_FD = 0;}
00227     
00228     if (original.fRecoVsTrueEnergyPQ_FD){
00229         this->fRecoVsTrueEnergyPQ_FD = new TH2D(*original.fRecoVsTrueEnergyPQ_FD);
00230     }
00231     else {this->fRecoVsTrueEnergyPQ_FD = 0;}
00232     if (original.fTrueToRecoCCContaminationPQ_FD){
00233         this->fRecoVsTrueEnergyPQ_FD = new TH2D(*original.fRecoVsTrueEnergyPQ_FD);
00234     }
00235     else {this->fRecoVsTrueEnergyPQ_FD = 0;}
00236     if (original.fTrueEnergyEffCorPQ_FD){
00237         this->fTrueEnergyEffCorPQ_FD =
00238         new TH1D(*original.fTrueEnergyEffCorPQ_FD);
00239     }
00240     else {this->fTrueEnergyEffCorPQ_FD = 0;}
00241     if (original.fSuppliedTrueUnoscCCBackgroundPQ_FD){
00242         this->fSuppliedTrueUnoscCCBackgroundPQ_FD =
00243         new TH1D(*original.fSuppliedTrueUnoscCCBackgroundPQ_FD);
00244     }
00245     else {this->fSuppliedTrueUnoscCCBackgroundPQ_FD = 0;}
00246     if (original.fRecoUnoscNCBackgroundPQ_FD){
00247         this->fRecoUnoscNCBackgroundPQ_FD =
00248         new TH1D(*original.fRecoUnoscNCBackgroundPQ_FD);
00249     }
00250     else {this->fRecoUnoscNCBackgroundPQ_FD = 0;}
00251     if (original.fTrueEnPotentialAppearanceEffCorPQ_FD){
00252         this->fTrueEnPotentialAppearanceEffCorPQ_FD =
00253         new TH1D(*original.fTrueEnPotentialAppearanceEffCorPQ_FD);
00254     }
00255     
00256     if (original.fRecoVsTrueEnergyAll_FD){
00257         this->fRecoVsTrueEnergyAll_FD = new TH2D(*original.fRecoVsTrueEnergyAll_FD);
00258     }
00259     else {this->fRecoVsTrueEnergyAll_FD = 0;}
00260     if (original.fTrueToRecoCCContaminationAll_FD){
00261         this->fRecoVsTrueEnergyAll_FD = new TH2D(*original.fRecoVsTrueEnergyAll_FD);
00262     }
00263     else {this->fRecoVsTrueEnergyAll_FD = 0;}
00264     if (original.fTrueEnergyEffCorAll_FD){
00265         this->fTrueEnergyEffCorAll_FD =
00266         new TH1D(*original.fTrueEnergyEffCorAll_FD);
00267     }
00268     else {this->fTrueEnergyEffCorAll_FD = 0;}
00269     if (original.fSuppliedTrueUnoscCCBackgroundAll_FD){
00270         this->fSuppliedTrueUnoscCCBackgroundAll_FD =
00271         new TH1D(*original.fSuppliedTrueUnoscCCBackgroundAll_FD);
00272     }
00273     else {this->fSuppliedTrueUnoscCCBackgroundAll_FD = 0;}
00274     if (original.fRecoUnoscNCBackgroundAll_FD){
00275         this->fRecoUnoscNCBackgroundAll_FD =
00276         new TH1D(*original.fRecoUnoscNCBackgroundAll_FD);
00277     }
00278 }

NuMatrixInput::~NuMatrixInput (  )  [virtual]

Definition at line 398 of file NuMatrixInput.cxx.

References fEffCorTauNQ_FD, fRecoUnoscNCBackgroundNQ_FD, fRecoUnoscNCBackgroundPQ_FD, fRecoVsTrueEnergyNQ_FD, fRecoVsTrueEnergyPQ_FD, fRecoVsTrueTauNQ_FD, fSuppliedTrueUnoscCCBackgroundNQ_FD, fSuppliedTrueUnoscCCBackgroundPQ_FD, fTrueEnergyEffCorNQ_FD, fTrueEnergyEffCorPQ_FD, fTrueToRecoCCContaminationNQ_FD, and fTrueToRecoCCContaminationPQ_FD.

00399 {
00400     if (fRecoVsTrueEnergyNQ_FD) {
00401         delete fRecoVsTrueEnergyNQ_FD;
00402         fRecoVsTrueEnergyNQ_FD = 0;
00403     }
00404     if (fTrueToRecoCCContaminationNQ_FD){
00405         delete fTrueToRecoCCContaminationNQ_FD;
00406         fTrueToRecoCCContaminationNQ_FD = 0;
00407     }
00408     if (fTrueEnergyEffCorNQ_FD){
00409         delete fTrueEnergyEffCorNQ_FD;
00410         fTrueEnergyEffCorNQ_FD = 0;
00411     }
00412     if (fSuppliedTrueUnoscCCBackgroundNQ_FD){
00413         delete fSuppliedTrueUnoscCCBackgroundNQ_FD;
00414         fSuppliedTrueUnoscCCBackgroundNQ_FD = 0;
00415     }
00416     if (fRecoUnoscNCBackgroundNQ_FD){
00417         delete fRecoUnoscNCBackgroundNQ_FD;
00418         fRecoUnoscNCBackgroundNQ_FD = 0;        
00419     }
00420     if (fEffCorTauNQ_FD){
00421       delete fEffCorTauNQ_FD;
00422       fEffCorTauNQ_FD = 0;
00423     }
00424     if (fRecoVsTrueTauNQ_FD){
00425       delete fRecoVsTrueTauNQ_FD;
00426       fRecoVsTrueTauNQ_FD = 0;
00427     }
00428     if (fRecoVsTrueEnergyPQ_FD){
00429         delete fRecoVsTrueEnergyPQ_FD;
00430         fRecoVsTrueEnergyPQ_FD = 0;
00431     }
00432     if (fTrueToRecoCCContaminationPQ_FD){
00433         delete fTrueToRecoCCContaminationPQ_FD;
00434         fTrueToRecoCCContaminationPQ_FD = 0;
00435     }
00436     if (fTrueEnergyEffCorPQ_FD){
00437         delete fTrueEnergyEffCorPQ_FD;
00438         fTrueEnergyEffCorPQ_FD = 0;
00439     }
00440     if (fSuppliedTrueUnoscCCBackgroundPQ_FD){
00441         delete fSuppliedTrueUnoscCCBackgroundPQ_FD;
00442         fSuppliedTrueUnoscCCBackgroundPQ_FD = 0;
00443     }
00444     if (fRecoUnoscNCBackgroundPQ_FD){
00445         delete fRecoUnoscNCBackgroundPQ_FD;
00446         fRecoUnoscNCBackgroundPQ_FD = 0;
00447     }
00448 }


Member Function Documentation

void NuMatrixInput::Appear ( TH1D *  in,
bool  NuMu 
)

Definition at line 518 of file NuMatrixInput.cxx.

References fTrueEnPotentialAppearanceEffCorNQ_FD, and fTrueEnPotentialAppearanceEffCorPQ_FD.

00518                                               {
00519     if (NuMu) fTrueEnPotentialAppearanceEffCorNQ_FD = (TH1D*)in->Clone();
00520     else fTrueEnPotentialAppearanceEffCorPQ_FD = (TH1D*)in->Clone();
00521 }

TH1D * NuMatrixInput::Appear ( bool  NuMu  )  const
void NuMatrixInput::Init ( TFile *  inputFile  ) 

Definition at line 281 of file NuMatrixInput.cxx.

References fEffCorTauNQ_FD, fRecoUnoscNCBackgroundAll_FD, fRecoUnoscNCBackgroundNQ_FD, fRecoUnoscNCBackgroundPQ_FD, fRecoVsTrueEnergyAll_FD, fRecoVsTrueEnergyNQ_FD, fRecoVsTrueEnergyPQ_FD, fRecoVsTrueTauNQ_FD, fSuppliedTrueUnoscCCBackgroundAll_FD, fSuppliedTrueUnoscCCBackgroundNQ_FD, fSuppliedTrueUnoscCCBackgroundPQ_FD, fTrueEnergyEffCorAll_FD, fTrueEnergyEffCorNQ_FD, fTrueEnergyEffCorPQ_FD, fTrueEnPotentialAppearanceEffCorNQ_FD, fTrueEnPotentialAppearanceEffCorPQ_FD, fTrueToRecoCCContaminationAll_FD, fTrueToRecoCCContaminationNQ_FD, and fTrueToRecoCCContaminationPQ_FD.

Referenced by NuMatrixInput().

00282 {
00283     
00284     fRecoVsTrueEnergyNQ_FD = (TH2D*) inputFile->Get("NMTrueToRecoFD");
00285     if (fRecoVsTrueEnergyNQ_FD){
00286         fRecoVsTrueEnergyNQ_FD->SetDirectory(0);
00287     }
00288     
00289     fTrueToRecoCCContaminationNQ_FD =
00290       (TH2D*) inputFile->Get("NMTrueToRecoCCBkgFD");
00291     if (fTrueToRecoCCContaminationNQ_FD){
00292       fTrueToRecoCCContaminationNQ_FD->SetDirectory(0);
00293     }
00294     
00295     fTrueEnergyEffCorNQ_FD = (TH1D*) inputFile->Get("NMTrueEnFD");
00296     if (fTrueEnergyEffCorNQ_FD){
00297       fTrueEnergyEffCorNQ_FD->SetDirectory(0);
00298     }
00299     
00300     fSuppliedTrueUnoscCCBackgroundNQ_FD =
00301       (TH1D*) inputFile->Get("NMTrueEnCCBkgFD");
00302     if (fSuppliedTrueUnoscCCBackgroundNQ_FD){
00303       fSuppliedTrueUnoscCCBackgroundNQ_FD->SetDirectory(0);
00304     }
00305     
00306     fRecoUnoscNCBackgroundNQ_FD =
00307       (TH1D*) inputFile->Get("NMRecoEnNCBkgFD");
00308     if (fRecoUnoscNCBackgroundNQ_FD){
00309       fRecoUnoscNCBackgroundNQ_FD->SetDirectory(0);
00310     }
00311     
00312     fEffCorTauNQ_FD =
00313       (TH1D*) inputFile->Get("NMEffCorTau_FD");
00314     if (fEffCorTauNQ_FD){
00315       fEffCorTauNQ_FD->SetDirectory(0);
00316     }
00317 
00318     fRecoVsTrueTauNQ_FD =
00319       (TH2D*) inputFile->Get("NMRecoVsTrueEnergyTau_FD");
00320     if (fRecoVsTrueTauNQ_FD){
00321       fRecoVsTrueTauNQ_FD->SetDirectory(0);
00322     }
00323     
00324     
00325     fRecoVsTrueEnergyPQ_FD = (TH2D*) inputFile->Get("NMBTrueToRecoFD");
00326     if (fRecoVsTrueEnergyPQ_FD){
00327         fRecoVsTrueEnergyPQ_FD->SetDirectory(0);
00328     }
00329     
00330     fTrueToRecoCCContaminationPQ_FD =
00331     (TH2D*) inputFile->Get("NMBTrueToRecoCCBkgFD");
00332     if (fTrueToRecoCCContaminationPQ_FD){
00333         fTrueToRecoCCContaminationPQ_FD->SetDirectory(0);
00334     }
00335     
00336     fTrueEnergyEffCorPQ_FD = (TH1D*) inputFile->Get("NMBTrueEnFD");
00337     if (fTrueEnergyEffCorPQ_FD){
00338         fTrueEnergyEffCorPQ_FD->SetDirectory(0);
00339     }
00340     
00341     fSuppliedTrueUnoscCCBackgroundPQ_FD =
00342     (TH1D*) inputFile->Get("NMBTrueEnCCBkgFD");
00343     if (fSuppliedTrueUnoscCCBackgroundPQ_FD){
00344         fSuppliedTrueUnoscCCBackgroundPQ_FD->SetDirectory(0);
00345     }
00346     
00347     fRecoUnoscNCBackgroundPQ_FD =
00348     (TH1D*) inputFile->Get("NMBRecoEnNCBkgFD");
00349     if (fRecoUnoscNCBackgroundPQ_FD){
00350         fRecoUnoscNCBackgroundPQ_FD->SetDirectory(0);
00351     }
00352     
00353     //Appearance analysis:
00354     fTrueEnPotentialAppearanceEffCorNQ_FD = 
00355     (TH1D*) inputFile->Get("NMTrueEnPotentialAppearanceEffCor");
00356     if (fTrueEnPotentialAppearanceEffCorNQ_FD){
00357         fTrueEnPotentialAppearanceEffCorNQ_FD->SetDirectory(0);
00358     }
00359     
00360     fTrueEnPotentialAppearanceEffCorPQ_FD = 
00361     (TH1D*) inputFile->Get("NMBTrueEnPotentialAppearanceEffCor");
00362     if (fTrueEnPotentialAppearanceEffCorPQ_FD){
00363         fTrueEnPotentialAppearanceEffCorPQ_FD->SetDirectory(0);
00364     }
00365     
00366     //No charge cut
00367     fRecoVsTrueEnergyAll_FD =
00368     (TH2D*) inputFile->Get("AllTrueToRecoFD");
00369     if (fRecoVsTrueEnergyAll_FD){
00370         fRecoVsTrueEnergyAll_FD->SetDirectory(0);
00371     }
00372     
00373     fTrueToRecoCCContaminationAll_FD =
00374     (TH2D*) inputFile->Get("AllTrueToRecoCCBkgFD");
00375     if (fTrueToRecoCCContaminationAll_FD){
00376         fTrueToRecoCCContaminationAll_FD->SetDirectory(0);
00377     }
00378     
00379     fTrueEnergyEffCorAll_FD = (TH1D*) inputFile->Get("AllTrueEnFD");
00380     if (fTrueEnergyEffCorAll_FD){
00381         fTrueEnergyEffCorAll_FD->SetDirectory(0);
00382     }
00383     
00384     fSuppliedTrueUnoscCCBackgroundAll_FD =
00385     (TH1D*) inputFile->Get("AllTrueEnCCBkgFD");
00386     if (fSuppliedTrueUnoscCCBackgroundAll_FD){
00387         fSuppliedTrueUnoscCCBackgroundAll_FD->SetDirectory(0);
00388     }
00389     
00390     fRecoUnoscNCBackgroundAll_FD =
00391     (TH1D*) inputFile->Get("AllRecoEnNCBkgFD");
00392     if (fRecoUnoscNCBackgroundAll_FD){
00393         fRecoUnoscNCBackgroundAll_FD->SetDirectory(0);
00394     }
00395 }

void NuMatrixInput::K ( TH1D *  in,
bool  NuMu 
)

Definition at line 506 of file NuMatrixInput.cxx.

References fSuppliedTrueUnoscCCBackgroundNQ_FD, and fSuppliedTrueUnoscCCBackgroundPQ_FD.

00506                                          {
00507     if (NuMu) fSuppliedTrueUnoscCCBackgroundNQ_FD = (TH1D*)in->Clone();
00508     else fSuppliedTrueUnoscCCBackgroundPQ_FD = (TH1D*)in->Clone();
00509 }

TH1D * NuMatrixInput::K ( bool  NuMu  )  const
void NuMatrixInput::M ( TH2D *  in,
bool  NuMu 
)

Definition at line 488 of file NuMatrixInput.cxx.

References fRecoVsTrueEnergyNQ_FD, and fRecoVsTrueEnergyPQ_FD.

00488                                          {
00489     if (NuMu)   fRecoVsTrueEnergyNQ_FD = new TH2D(*in);
00490     else fRecoVsTrueEnergyPQ_FD = new TH2D(*in);
00491 }

TH2D * NuMatrixInput::M ( bool  NuMu  )  const

Definition at line 452 of file NuMatrixInput.cxx.

References fRecoVsTrueEnergyNQ_FD, and fRecoVsTrueEnergyPQ_FD.

Referenced by PredictFDSpectrum(), and NuMatrixMethod::WriteInputForFitter().

00452                                       {
00453     if (NuMu) return fRecoVsTrueEnergyNQ_FD;
00454     else return fRecoVsTrueEnergyPQ_FD;
00455 }

void NuMatrixInput::Mtilde ( TH2D *  in,
bool  NuMu 
)

Definition at line 494 of file NuMatrixInput.cxx.

References fTrueToRecoCCContaminationNQ_FD, and fTrueToRecoCCContaminationPQ_FD.

00494                                               {
00495     if (NuMu) fTrueToRecoCCContaminationNQ_FD = (TH2D*)in->Clone();
00496     else fTrueToRecoCCContaminationPQ_FD = (TH2D*)in->Clone();
00497 }

TH2D * NuMatrixInput::Mtilde ( bool  NuMu  )  const
virtual const TH1D* NuMatrixInput::NoChargeCutRecoEnNCBkgFD (  )  const [inline, virtual]

Definition at line 146 of file NuMatrixInput.h.

References fRecoUnoscNCBackgroundAll_FD.

Referenced by NuMatrixMethod::NuMatrixMethod().

virtual const TH1D* NuMatrixInput::NoChargeCutTrueEnCCBkgFD (  )  const [inline, virtual]

Definition at line 144 of file NuMatrixInput.h.

References fSuppliedTrueUnoscCCBackgroundAll_FD.

virtual const TH1D* NuMatrixInput::NoChargeCutTrueEnFD (  )  const [inline, virtual]

Definition at line 142 of file NuMatrixInput.h.

References fTrueEnergyEffCorAll_FD.

Referenced by NuMatrixMethod::NuMatrixMethod().

00143             {return fTrueEnergyEffCorAll_FD;}

virtual const TH2D* NuMatrixInput::NoChargeCutTrueToRecoCCBkgFD (  )  const [inline, virtual]

Definition at line 140 of file NuMatrixInput.h.

References fTrueToRecoCCContaminationAll_FD.

virtual const TH2D* NuMatrixInput::NoChargeCutTrueToRecoFD (  )  const [inline, virtual]

Definition at line 138 of file NuMatrixInput.h.

References fRecoVsTrueEnergyAll_FD.

Referenced by NuMatrixMethod::NuMatrixMethod().

00139             {return fRecoVsTrueEnergyAll_FD;}

virtual const TH1D* NuMatrixInput::NuMuBarRecoEnNCBkgFD (  )  const [inline, virtual]

Definition at line 133 of file NuMatrixInput.h.

References fRecoUnoscNCBackgroundPQ_FD.

Referenced by NuMatrixMethod::NuMatrixMethod().

virtual const TH1D* NuMatrixInput::NuMuBarTrueEnCCBkgFD (  )  const [inline, virtual]
virtual const TH1D* NuMatrixInput::NuMuBarTrueEnFD (  )  const [inline, virtual]

Definition at line 129 of file NuMatrixInput.h.

References fTrueEnergyEffCorPQ_FD.

Referenced by NuMatrixMethod::NuMatrixMethod().

00130             {return fTrueEnergyEffCorPQ_FD;}

virtual const TH1D* NuMatrixInput::NuMuBarTrueEnPotentialAppearanceEffCorFD (  )  const [inline, virtual]
virtual const TH2D* NuMatrixInput::NuMuBarTrueToRecoCCBkgFD (  )  const [inline, virtual]

Definition at line 127 of file NuMatrixInput.h.

References fTrueToRecoCCContaminationPQ_FD.

Referenced by NuMatrixMethod::NuMatrixMethod().

virtual const TH2D* NuMatrixInput::NuMuBarTrueToRecoFD (  )  const [inline, virtual]

Definition at line 125 of file NuMatrixInput.h.

References fRecoVsTrueEnergyPQ_FD.

Referenced by NuMatrixMethod::NuMatrixMethod().

00126             {return fRecoVsTrueEnergyPQ_FD;}

virtual const TH1D* NuMatrixInput::NuMuEffCorTaus_FD (  )  const [inline, virtual]

Definition at line 120 of file NuMatrixInput.h.

References fEffCorTauNQ_FD.

Referenced by NuMatrixMethod::NuMatrixMethod().

00121           {return fEffCorTauNQ_FD;}

virtual const TH1D* NuMatrixInput::NuMuRecoEnNCBkgFD (  )  const [inline, virtual]

Definition at line 116 of file NuMatrixInput.h.

References fRecoUnoscNCBackgroundNQ_FD.

Referenced by NuMatrixMethod::NuMatrixMethod().

virtual const TH2D* NuMatrixInput::NuMuRecoVsTrueTaus_FD (  )  const [inline, virtual]

Definition at line 122 of file NuMatrixInput.h.

References fRecoVsTrueTauNQ_FD.

Referenced by NuMatrixMethod::NuMatrixMethod().

00123           {return fRecoVsTrueTauNQ_FD;}

virtual const TH1D* NuMatrixInput::NuMuTrueEnCCBkgFD (  )  const [inline, virtual]
virtual const TH1D* NuMatrixInput::NuMuTrueEnFD (  )  const [inline, virtual]

Definition at line 112 of file NuMatrixInput.h.

References fTrueEnergyEffCorNQ_FD.

Referenced by NuMatrixMethod::NuMatrixMethod().

00113             {return fTrueEnergyEffCorNQ_FD;}

virtual const TH1D* NuMatrixInput::NuMuTrueEnPotentialAppearanceEffCorFD (  )  const [inline, virtual]
virtual const TH2D* NuMatrixInput::NuMuTrueToRecoCCBkgFD (  )  const [inline, virtual]

Definition at line 110 of file NuMatrixInput.h.

References fTrueToRecoCCContaminationNQ_FD.

Referenced by NuMatrixMethod::NuMatrixMethod().

virtual const TH2D* NuMatrixInput::NuMuTrueToRecoFD (  )  const [inline, virtual]

Definition at line 108 of file NuMatrixInput.h.

References fRecoVsTrueEnergyNQ_FD.

Referenced by NuMatrixMethod::NuMatrixMethod().

00109             {return fRecoVsTrueEnergyNQ_FD;}

void NuMatrixInput::Oscillate ( TH1D *  hist,
const Double_t  dm2,
const Double_t  sn2,
bool  invert = false 
)

Definition at line 628 of file NuMatrixInput.cxx.

References NuOscProbCalc::OscillationWeight().

Referenced by PredictFDSpectrum().

00629 {
00630     for(int i=1; i <= hist->GetNbinsX(); i++) {
00631         Double_t energy = hist->GetBinCenter(i);
00632         Double_t oscProb = NuOscProbCalc::OscillationWeight(energy, dm2, sn2);
00633         if (invert)
00634             oscProb = 1 - oscProb;
00635         
00636         hist->SetBinContent(i, hist->GetBinContent(i)*oscProb);
00637         hist->SetBinError(i, hist->GetBinError(i)*oscProb);
00638     }
00639 }

TH1D * NuMatrixInput::PredictFDSpectrum ( const Double_t  dm2,
const Double_t  sn2,
const Double_t  dm2bar,
const Double_t  sn2bar,
const Double_t  appearanceFraction,
bool  NuMu 
)

Definition at line 563 of file NuMatrixInput.cxx.

References Appear(), K(), M(), Mtilde(), Oscillate(), T(), TrueToReco(), and Z().

Referenced by PredictFDSpectrumNuMu(), PredictFDSpectrumNuMuBar(), and PredictFDSpectrumTransition().

00565 {
00566     TH1D *pred = (TH1D*)T(NuMu)->Clone();
00567     TH1D *Kosc = (TH1D*)K(NuMu)->Clone();
00568     
00569     Double_t dm2Front, sn2Front, dm2Back, sn2Back;
00570     if (NuMu) {
00571         dm2Front = dm2;
00572         sn2Front = sn2;
00573         dm2Back = dm2bar;
00574         sn2Back = sn2bar;
00575     }
00576     else {
00577         dm2Front = dm2bar;
00578         sn2Front = sn2bar;
00579         dm2Back = dm2;
00580         sn2Back = sn2;
00581     }
00582     
00584     // applies osc to "T" //
00586     
00587     Oscillate(pred, dm2Front, sn2Front);
00588     Oscillate(Kosc, dm2Back, sn2Back);
00589     
00590     
00592     // does true to reco on osc true spectrum //
00594     
00595     TrueToReco(pred, M(NuMu));         // = R
00596     TrueToReco(Kosc, Mtilde(NuMu));    // = C
00597     
00598     
00600     // Add in backgrounds //
00602     
00603     pred->Add(Kosc);
00604     pred->Add(Z(NuMu));
00605 
00606     
00608     // Add in Appeared Events //
00610     
00611     if (appearanceFraction != 0) {
00612         TH1D *app = (TH1D*)Appear(NuMu)->Clone();
00613         
00614         Oscillate(app, dm2Back, sn2Back, true);
00615         TrueToReco(app, M(NuMu));
00616         app->Scale(appearanceFraction);
00617         pred->Add(app);
00618         for (int i = 1; i <= pred->GetNbinsX(); i++) {
00619             if (pred->GetBinContent(i) < 0) pred->SetBinContent(i, 0);
00620         }
00621     }
00622     
00623     return pred;
00624 }

TH1D * NuMatrixInput::PredictFDSpectrumNuMu ( const NuXMLConfig xml  ) 

Definition at line 549 of file NuMatrixInput.cxx.

References NuXMLConfig::DM2Bar(), NuXMLConfig::DM2Nu(), PredictFDSpectrum(), NuXMLConfig::SN2Bar(), NuXMLConfig::SN2Nu(), and NuXMLConfig::TransitionProb().

00550 {
00551     return PredictFDSpectrum(xml->DM2Nu(), xml->SN2Nu(), xml->DM2Bar(), xml->SN2Bar(), xml->TransitionProb(), true);
00552 }

TH1D * NuMatrixInput::PredictFDSpectrumNuMu ( const Double_t  dm2,
const Double_t  sn2,
const Double_t  dm2bar,
const Double_t  sn2bar 
)

Definition at line 525 of file NuMatrixInput.cxx.

References PredictFDSpectrum().

00527 {
00528     return PredictFDSpectrum(dm2, sn2, dm2bar, sn2bar, 0, true);
00529 }

TH1D * NuMatrixInput::PredictFDSpectrumNuMuBar ( const NuXMLConfig xml  ) 

Definition at line 556 of file NuMatrixInput.cxx.

References NuXMLConfig::DM2Bar(), NuXMLConfig::DM2Nu(), PredictFDSpectrum(), NuXMLConfig::SN2Bar(), NuXMLConfig::SN2Nu(), and NuXMLConfig::TransitionProb().

00557 {
00558     return PredictFDSpectrum(xml->DM2Nu(), xml->SN2Nu(), xml->DM2Bar(), xml->SN2Bar(), xml->TransitionProb(), false);
00559 }

TH1D * NuMatrixInput::PredictFDSpectrumNuMuBar ( const Double_t  dm2,
const Double_t  sn2,
const Double_t  dm2bar,
const Double_t  sn2bar 
)

Definition at line 533 of file NuMatrixInput.cxx.

References PredictFDSpectrum().

Referenced by NuMatrixFitter::DoCPTFit().

00535 {
00536     return PredictFDSpectrum(dm2, sn2, dm2bar, sn2bar, 0, false);       
00537 }

TH1D * NuMatrixInput::PredictFDSpectrumTransition ( const Double_t  dm2,
const Double_t  sn2,
const Double_t  appearanceFraction 
)

Definition at line 541 of file NuMatrixInput.cxx.

References PredictFDSpectrum().

Referenced by NuMatrixFitter::DoTransitionFit().

00543 {
00544     return PredictFDSpectrum(dm2, sn2, dm2, sn2, appearanceFraction, false);    
00545 }

void NuMatrixInput::T ( TH1D *  in,
bool  NuMu 
)

Definition at line 500 of file NuMatrixInput.cxx.

References fTrueEnergyEffCorNQ_FD, and fTrueEnergyEffCorPQ_FD.

00500                                          {
00501     if (NuMu) fTrueEnergyEffCorNQ_FD = (TH1D*)in->Clone();
00502     else fTrueEnergyEffCorPQ_FD = (TH1D*)in->Clone();
00503 }

TH1D * NuMatrixInput::T ( bool  NuMu  )  const

Definition at line 464 of file NuMatrixInput.cxx.

References fTrueEnergyEffCorNQ_FD, and fTrueEnergyEffCorPQ_FD.

Referenced by PredictFDSpectrum(), and NuMatrixMethod::WriteInputForFitter().

00464                                       {
00465     if (NuMu) return fTrueEnergyEffCorNQ_FD;
00466     else return fTrueEnergyEffCorPQ_FD;
00467 }

void NuMatrixInput::TrueToReco ( TH1D *  hist,
TH2D *  M 
)

Definition at line 643 of file NuMatrixInput.cxx.

Referenced by PredictFDSpectrum().

00644 {
00645     const int fNbinsX = hist->GetNbinsX();
00646     
00647     //working space:
00648     Double_t *val = new Double_t[fNbinsX+1];
00649     Double_t *valerr = new Double_t[fNbinsX+1];
00650     for(int i=1;i<=fNbinsX;i++) { val[i-1] = 0; valerr[i-1] = 0; }
00651     
00652     //9: Convert to reco:
00653     for(int i=1;i<=fNbinsX;i++){ //loop over true
00654         for(int j=1;j<=fNbinsX+1;j++){ //loop over reco
00655             val[j-1] += (hist->GetBinContent(i) * M->GetBinContent(i,j));
00656             
00657             Double_t error = 0;
00658             if(hist->GetBinContent(i) > 0 && M->GetBinContent(i,j) > 0) {
00659                 error = TMath::Power(hist->GetBinError(i) / hist->GetBinContent(i), 2);
00660                 error += TMath::Power(M->GetBinError(i,j) / M->GetBinContent(i,j), 2);
00661                 error *= TMath::Power(hist->GetBinContent(i) * M->GetBinContent(i,j), 2);
00662             }
00663             valerr[j-1] += error;
00664         }
00665     }
00666     for(int i=1;i<=fNbinsX+1;i++) {
00667         hist->SetBinContent(i,val[i-1]);
00668         if(valerr[i-1]>0) hist->SetBinError(i,TMath::Sqrt(valerr[i-1]));
00669         else hist->SetBinError(i,0);
00670     }
00671 }

void NuMatrixInput::Z ( TH1D *  in,
bool  NuMu 
)

Definition at line 512 of file NuMatrixInput.cxx.

References fRecoUnoscNCBackgroundNQ_FD, and fRecoUnoscNCBackgroundPQ_FD.

00512                                          {
00513     if (NuMu) fRecoUnoscNCBackgroundNQ_FD = (TH1D*)in->Clone();
00514     else fRecoUnoscNCBackgroundPQ_FD = (TH1D*)in->Clone();
00515 }

TH1D * NuMatrixInput::Z ( bool  NuMu  )  const

Definition at line 476 of file NuMatrixInput.cxx.

References fRecoUnoscNCBackgroundNQ_FD, and fRecoUnoscNCBackgroundPQ_FD.

Referenced by PredictFDSpectrum(), and NuMatrixMethod::WriteInputForFitter().

00476                                       {
00477     if (NuMu) return fRecoUnoscNCBackgroundNQ_FD;
00478     else return fRecoUnoscNCBackgroundPQ_FD;
00479 }


Member Data Documentation

Definition at line 184 of file NuMatrixInput.h.

Referenced by Init(), NuMatrixInput(), NuMuEffCorTaus_FD(), and ~NuMatrixInput().

Definition at line 200 of file NuMatrixInput.h.

Referenced by Init(), NoChargeCutRecoEnNCBkgFD(), and NuMatrixInput().

Definition at line 182 of file NuMatrixInput.h.

Referenced by Init(), NuMatrixInput(), NuMuRecoEnNCBkgFD(), Z(), and ~NuMatrixInput().

Definition at line 192 of file NuMatrixInput.h.

Referenced by Init(), NuMatrixInput(), NuMuBarRecoEnNCBkgFD(), Z(), and ~NuMatrixInput().

Definition at line 196 of file NuMatrixInput.h.

Referenced by Init(), NoChargeCutTrueToRecoFD(), and NuMatrixInput().

Definition at line 178 of file NuMatrixInput.h.

Referenced by Init(), M(), NuMatrixInput(), NuMuTrueToRecoFD(), and ~NuMatrixInput().

Definition at line 188 of file NuMatrixInput.h.

Referenced by Init(), M(), NuMatrixInput(), NuMuBarTrueToRecoFD(), and ~NuMatrixInput().

Definition at line 185 of file NuMatrixInput.h.

Referenced by Init(), NuMatrixInput(), NuMuRecoVsTrueTaus_FD(), and ~NuMatrixInput().

Definition at line 199 of file NuMatrixInput.h.

Referenced by Init(), NoChargeCutTrueEnCCBkgFD(), and NuMatrixInput().

Definition at line 181 of file NuMatrixInput.h.

Referenced by Init(), K(), NuMatrixInput(), NuMuTrueEnCCBkgFD(), and ~NuMatrixInput().

Definition at line 191 of file NuMatrixInput.h.

Referenced by Init(), K(), NuMatrixInput(), NuMuBarTrueEnCCBkgFD(), and ~NuMatrixInput().

Definition at line 198 of file NuMatrixInput.h.

Referenced by Init(), NoChargeCutTrueEnFD(), and NuMatrixInput().

Definition at line 180 of file NuMatrixInput.h.

Referenced by Init(), NuMatrixInput(), NuMuTrueEnFD(), T(), and ~NuMatrixInput().

Definition at line 190 of file NuMatrixInput.h.

Referenced by Init(), NuMatrixInput(), NuMuBarTrueEnFD(), T(), and ~NuMatrixInput().

Definition at line 197 of file NuMatrixInput.h.

Referenced by Init(), NoChargeCutTrueToRecoCCBkgFD(), and NuMatrixInput().

Definition at line 179 of file NuMatrixInput.h.

Referenced by Init(), Mtilde(), NuMatrixInput(), NuMuTrueToRecoCCBkgFD(), and ~NuMatrixInput().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1