NuMMRunCPTSyst Class Reference

#include <NuMMRunCPTSyst.h>

Inheritance diagram for NuMMRunCPTSyst:

NuMMRun List of all members.

Public Member Functions

 NuMMRunCPTSyst (NuMMHelperCPT *helper, NuShiftableSpectrum *ndNuData, NuShiftableSpectrum *ndBarData, NuShiftableSpectrum *fdNuData, NuShiftableSpectrum *fdBarData)
virtual Double_t ComparePredWithData (const NuMMParameters &pars)
virtual std::vector< NuMatrixSpectrumMakeFDPred (const NuMMParameters &pars)
virtual std::vector< TH1D > WriteFDPredHistos (const NuMMParameters &pars) const
void PredictNus (Bool_t predict)
void PredictNuBars (Bool_t predict)

Private Member Functions

virtual void CrossCheckWritingOn ()
virtual void CrossCheckWritingOff ()

Private Attributes

NuShiftableSpectrumfndNuData
NuShiftableSpectrumfndBarData
NuShiftableSpectrumffdNuData
NuShiftableSpectrumffdBarData
NuMMHelperCPTfHelper
Bool_t fPredictNeutrinos
Bool_t fPredictAntiNeutrinos
Bool_t fWriteCrossCheckHistos
std::vector< TH1D > fCrossCheckHistos

Detailed Description

Definition at line 17 of file NuMMRunCPTSyst.h.


Constructor & Destructor Documentation

NuMMRunCPTSyst::NuMMRunCPTSyst ( NuMMHelperCPT helper,
NuShiftableSpectrum ndNuData,
NuShiftableSpectrum ndBarData,
NuShiftableSpectrum fdNuData,
NuShiftableSpectrum fdBarData 
)

Definition at line 19 of file NuMMRunCPTSyst.cxx.

00024   : NuMMRun(),
00025     fPredictNeutrinos(true),
00026     fPredictAntiNeutrinos(true),
00027     fWriteCrossCheckHistos(false)
00028 {
00029   fndNuData = ndNuData;
00030   fndBarData = ndBarData;
00031   ffdNuData = fdNuData;
00032   ffdBarData = fdBarData;
00033   fHelper = helper;
00034 }


Member Function Documentation

Double_t NuMMRunCPTSyst::ComparePredWithData ( const NuMMParameters pars  )  [virtual]

Implements NuMMRun.

Definition at line 180 of file NuMMRunCPTSyst.cxx.

References NuBinningScheme::kNuMuBar0325Std, NuMatrixSpectrum::RebinToScheme(), and NuMatrixSpectrum::Spectrum().

00181 {
00182   const vector<NuMatrixSpectrum> predictions =
00183     this->MakeFDPred(pars);
00184   Double_t like = 0.0;
00185 
00186   if (fPredictNeutrinos) {
00187     NuMatrixSpectrum fdPred(*(predictions[0].Spectrum()));
00188     NuMatrixSpectrum fdData(ffdNuData->Spectrum(pars));
00189     fdPred.RebinToScheme(NuBinningScheme::kNuMuBar0325Std);
00190     fdData.RebinToScheme(NuBinningScheme::kNuMuBar0325Std);
00191     like += this->StatsLikelihood(fdPred.Spectrum(),
00192                                   fdData.Spectrum());
00193   }
00194   if (fPredictAntiNeutrinos) {
00195     NuMatrixSpectrum fdBarPred(*(predictions[1].Spectrum()));
00196     NuMatrixSpectrum fdBarData(ffdBarData->Spectrum(pars));
00197     fdBarPred.RebinToScheme(NuBinningScheme::kNuMuBar0325Std);
00198     fdBarData.RebinToScheme(NuBinningScheme::kNuMuBar0325Std);
00199     like += this->StatsLikelihood(fdBarPred.Spectrum(),
00200                                   fdBarData.Spectrum());
00201   }
00202   return like;
00203 }

virtual void NuMMRunCPTSyst::CrossCheckWritingOff (  )  [inline, private, virtual]

Definition at line 42 of file NuMMRunCPTSyst.h.

References fWriteCrossCheckHistos.

00042 {fWriteCrossCheckHistos = false;}

virtual void NuMMRunCPTSyst::CrossCheckWritingOn (  )  [inline, private, virtual]

Definition at line 41 of file NuMMRunCPTSyst.h.

References fWriteCrossCheckHistos.

00041 {fWriteCrossCheckHistos = true;}

vector< NuMatrixSpectrum > NuMMRunCPTSyst::MakeFDPred ( const NuMMParameters pars  )  [virtual]

Definition at line 48 of file NuMMRunCPTSyst.cxx.

References NuMMHelperCPT::BarBeamMatrix(), NuMMHelperCPT::BarXSecGraph(), NuMatrixSpectrum::Divide(), NuMMParameters::Dm2(), NuMMParameters::Dm2Bar(), NuMMHelperCPT::FDBarEfficiency(), NuMMHelperCPT::FDBarNCContamination(), NuMMHelperCPT::FDBarPurity(), NuMMHelperCPT::FDBarRecoVsTrue(), NuMMHelperCPT::FDNuEfficiency(), NuMMHelperCPT::FDNuNCContamination(), NuMMHelperCPT::FDNuPurity(), NuMMHelperCPT::FDNuRecoVsTrue(), NuMMHelperCPT::FDNuTauEfficiency(), NuMMHelperCPT::FDNuTauRecoVsTrue(), NuMMHelperCPT::FDTauBarEfficiency(), NuMMHelperCPT::FDTauBarRecoVsTrue(), NuMMHelperCPT::FDWrongSignBarEfficiency(), NuMMHelperCPT::FDWrongSignBarRecoVsTrue(), NuMMHelperCPT::FDWrongSignNuEfficiency(), NuMMHelperCPT::FDWrongSignNuRecoVsTrue(), ffdBarData, NuMMRun::fFDFidMass, ffdNuData, fHelper, fndBarData, NuMMRun::fNDFidMass, fndNuData, NuMMRun::fQuietMode, NuMatrixSpectrum::InverseOscillateLinearInterp(), NuMatrixSpectrum::Multiply(), NuMMParameters::NCBackgroundScale(), NuMMHelperCPT::NDBarEfficiency(), NuMMHelperCPT::NDBarPurity(), NuMMHelperCPT::NDBarRecoVsTrue(), NuMMHelperCPT::NDNuEfficiency(), NuMMHelperCPT::NDNuPurity(), NuMMHelperCPT::NDNuRecoVsTrue(), NuMMParameters::Normalisation(), NuMMHelperCPT::NuBeamMatrix(), NuMMHelperCPT::NuXSecGraph(), NuMatrixSpectrum::OscillateLinearInterp(), NuShiftableSpectrum::PoT(), NuMMParameters::ShwEnScale(), NuMMParameters::Sn2(), NuMMParameters::Sn2Bar(), NuShiftableSpectrum::Spectrum(), NuMatrix1D::Subtract(), NuMatrixSpectrum::TrueToReco(), NuMMHelperCPT::XSecGraphNuTaus(), and NuMMHelperCPT::XSecGraphTauBars().

00049 {
00050   if (!fQuietMode) {
00051     cout << "sn2: " << pars.Sn2() << "; dm2: " << pars.Dm2()
00052     << "; sn2bar: " << pars.Sn2Bar() << "; dm2bar: " << pars.Dm2Bar()
00053     << endl
00054     << "; norm: " << pars.Normalisation()
00055     << "; NCBack: " << pars.NCBackgroundScale()
00056     << "; ShwEn: " << pars.ShwEnScale() << endl;
00057   }
00058 
00059   //Get the neutrinos to the FD
00060   NuMatrixSpectrum nuPrediction(fndNuData->Spectrum(pars));
00061 
00062   NuMatrixSpectrum nuSignal(nuPrediction);
00063   nuSignal.Multiply(fHelper->NDNuPurity());
00064   NuMatrixSpectrum nuBackground(nuPrediction);
00065   nuBackground.Subtract(nuSignal);
00066   nuBackground.Multiply(pars.NCBackgroundScale());
00067   nuPrediction.Subtract(nuBackground);
00068 
00069   nuPrediction.RecoToTrue(fHelper->NDNuRecoVsTrue());
00070   nuPrediction.Divide(fHelper->NDNuEfficiency());
00071   nuPrediction.Divide(fHelper->NuXSecGraph());
00072   nuPrediction.Divide(fndNuData->PoT());
00073   nuPrediction.Divide(fNDFidMass);
00074   nuPrediction.ExtrapolateNDToFD(fHelper->NuBeamMatrix());
00075   nuPrediction.Multiply(fFDFidMass);
00076   nuPrediction.Multiply(ffdNuData->PoT());
00077   nuPrediction.ResetPOT(ffdNuData->PoT());
00078 
00079   //Get the antineutrinos to the FD
00080   NuMatrixSpectrum barPrediction(fndBarData->Spectrum(pars));
00081 
00082   NuMatrixSpectrum barSignal(barPrediction);
00083   barSignal.Multiply(fHelper->NDBarPurity());
00084   NuMatrixSpectrum barBackground(barPrediction);
00085   barBackground.Subtract(barSignal);
00086   barBackground.Multiply(pars.NCBackgroundScale());
00087   barPrediction.Subtract(barBackground);
00088 
00089   barPrediction.RecoToTrue(fHelper->NDBarRecoVsTrue());
00090   barPrediction.Divide(fHelper->NDBarEfficiency());
00091   barPrediction.Divide(fHelper->BarXSecGraph());
00092   barPrediction.Divide(fndBarData->PoT());
00093   barPrediction.Divide(fNDFidMass);
00094   barPrediction.ExtrapolateNDToFD(fHelper->BarBeamMatrix());
00095   barPrediction.Multiply(fFDFidMass);
00096   barPrediction.Multiply(ffdBarData->PoT());
00097   barPrediction.ResetPOT(ffdBarData->PoT());
00098 
00099   //Get the taus (ignoring any wrong-sign taubars)
00100   NuMatrixSpectrum potentialNuTaus(nuPrediction);
00101   potentialNuTaus.Multiply(fHelper->XSecGraphNuTaus());
00102   potentialNuTaus.Multiply(fHelper->FDNuTauEfficiency());
00103   potentialNuTaus.InverseOscillateLinearInterp(pars.Dm2(),pars.Sn2());
00104   potentialNuTaus.TrueToReco(fHelper->FDNuTauRecoVsTrue());
00105   //Get the taubars (ignoring any wrong-sign taus)
00106   NuMatrixSpectrum potentialTauBars(barPrediction);
00107   potentialTauBars.Multiply(fHelper->XSecGraphTauBars());
00108   potentialTauBars.Multiply(fHelper->FDTauBarEfficiency());
00109   potentialTauBars.InverseOscillateLinearInterp(pars.Dm2Bar(),pars.Sn2Bar());
00110   potentialTauBars.TrueToReco(fHelper->FDTauBarRecoVsTrue());
00111 
00112   //Cross sections
00113   nuPrediction.Multiply(fHelper->NuXSecGraph());
00114   barPrediction.Multiply(fHelper->BarXSecGraph());
00115 
00116   //Get the neutrino NC background
00117   NuMatrixSpectrum nuNCBackground(nuPrediction);
00118   nuNCBackground.Multiply(fHelper->FDNuEfficiency());
00119   nuNCBackground.TrueToReco(fHelper->FDNuRecoVsTrue());
00120   nuNCBackground.Divide(fHelper->FDNuPurity());
00121   nuNCBackground.Multiply(fHelper->FDNuNCContamination());
00122 
00123   //Get the antineutrino NC background
00124   NuMatrixSpectrum barNCBackground(barPrediction);
00125   barNCBackground.Multiply(fHelper->FDBarEfficiency());
00126   barNCBackground.TrueToReco(fHelper->FDBarRecoVsTrue());
00127   barNCBackground.Divide(fHelper->FDBarPurity());
00128   barNCBackground.Multiply(fHelper->FDBarNCContamination());
00129 
00130   //Get the wrong-sign neutrino background for the antineutrino
00131   //prediction
00132   NuMatrixSpectrum wrongSignNuMus(nuPrediction);
00133   wrongSignNuMus.Multiply(fHelper->FDWrongSignNuEfficiency());
00134   wrongSignNuMus.OscillateLinearInterp(pars.Dm2(),pars.Sn2());
00135   wrongSignNuMus.TrueToReco(fHelper->FDWrongSignNuRecoVsTrue());
00136 
00137   //Get the wrong-sign antineutrino background for the neutrino
00138   //prediction
00139   NuMatrixSpectrum wrongSignNuBars(barPrediction);
00140   wrongSignNuBars.Multiply(fHelper->FDWrongSignBarEfficiency());
00141   wrongSignNuBars.OscillateLinearInterp(pars.Dm2Bar(),pars.Sn2Bar());
00142   wrongSignNuBars.TrueToReco(fHelper->FDWrongSignBarRecoVsTrue());
00143 
00144   //Oscillations
00145   nuPrediction.OscillateLinearInterp(pars.Dm2(),pars.Sn2());
00146   barPrediction.OscillateLinearInterp(pars.Dm2Bar(),pars.Sn2Bar());
00147   //Efficiencies
00148   nuPrediction.Multiply(fHelper->FDNuEfficiency());
00149   barPrediction.Multiply(fHelper->FDBarEfficiency());
00150 
00151   //True to reco
00152   nuPrediction.TrueToReco(fHelper->FDNuRecoVsTrue());
00153   barPrediction.TrueToReco(fHelper->FDBarRecoVsTrue());
00154 
00155   //Scale the backgrounds by the systematic shift (scale the NC and CC
00156   //backgrounds together, in both the numu and numubar samples).
00157   wrongSignNuBars.Multiply(pars.NCBackgroundScale());
00158   wrongSignNuMus.Multiply(pars.NCBackgroundScale());
00159   nuNCBackground.Multiply(pars.NCBackgroundScale());
00160   barNCBackground.Multiply(pars.NCBackgroundScale());
00161 
00162   //Add in backgrounds
00163   nuPrediction.Add(wrongSignNuBars);
00164   barPrediction.Add(wrongSignNuMus);
00165   nuPrediction.Add(nuNCBackground);
00166   nuPrediction.Add(potentialNuTaus);
00167   barPrediction.Add(barNCBackground);
00168   barPrediction.Add(potentialTauBars);
00169 
00170   nuPrediction.Multiply(pars.Normalisation());
00171   barPrediction.Multiply(pars.Normalisation());
00172 
00173   std::vector<NuMatrixSpectrum> predictions;
00174   predictions.push_back(nuPrediction);
00175   predictions.push_back(barPrediction);
00176   return predictions;
00177 }

void NuMMRunCPTSyst::PredictNuBars ( Bool_t  predict  )  [inline]

Definition at line 36 of file NuMMRunCPTSyst.h.

References fPredictAntiNeutrinos.

00036                                      {
00037     fPredictAntiNeutrinos = predict;
00038   }

void NuMMRunCPTSyst::PredictNus ( Bool_t  predict  )  [inline]

Definition at line 32 of file NuMMRunCPTSyst.h.

References fPredictNeutrinos.

00032                                   {
00033     fPredictNeutrinos = predict;
00034   }

std::vector< TH1D > NuMMRunCPTSyst::WriteFDPredHistos ( const NuMMParameters pars  )  const [virtual]

Implements NuMMRun.

Definition at line 38 of file NuMMRunCPTSyst.cxx.

References fCrossCheckHistos.

00039 {/*
00040   this->CrossCheckWritingOn();
00041   this->MakeFDPred(pars);
00042   this->CrossCheckWritingOff();*/
00043   return fCrossCheckHistos;
00044 }


Member Data Documentation

std::vector<TH1D> NuMMRunCPTSyst::fCrossCheckHistos [private]

Definition at line 57 of file NuMMRunCPTSyst.h.

Referenced by WriteFDPredHistos().

NuShiftableSpectrum* NuMMRunCPTSyst::ffdBarData [private]

Definition at line 47 of file NuMMRunCPTSyst.h.

Referenced by MakeFDPred().

NuShiftableSpectrum* NuMMRunCPTSyst::ffdNuData [private]

Definition at line 46 of file NuMMRunCPTSyst.h.

Referenced by MakeFDPred().

NuMMHelperCPT* NuMMRunCPTSyst::fHelper [private]

Reimplemented from NuMMRun.

Definition at line 48 of file NuMMRunCPTSyst.h.

Referenced by MakeFDPred().

NuShiftableSpectrum* NuMMRunCPTSyst::fndBarData [private]

Definition at line 45 of file NuMMRunCPTSyst.h.

Referenced by MakeFDPred().

NuShiftableSpectrum* NuMMRunCPTSyst::fndNuData [private]

Definition at line 44 of file NuMMRunCPTSyst.h.

Referenced by MakeFDPred().

Bool_t NuMMRunCPTSyst::fPredictAntiNeutrinos [private]

Definition at line 53 of file NuMMRunCPTSyst.h.

Referenced by PredictNuBars().

Bool_t NuMMRunCPTSyst::fPredictNeutrinos [private]

Definition at line 51 of file NuMMRunCPTSyst.h.

Referenced by PredictNus().

Bool_t NuMMRunCPTSyst::fWriteCrossCheckHistos [private]

Definition at line 55 of file NuMMRunCPTSyst.h.

Referenced by CrossCheckWritingOff(), and CrossCheckWritingOn().


The documentation for this class was generated from the following files:
Generated on Mon Nov 10 00:56:02 2014 for loon by  doxygen 1.4.7