NuMMRunCCTutorial Class Reference

#include <NuMMRunCCTutorial.h>

Inheritance diagram for NuMMRunCCTutorial:
NuMMRun

List of all members.

Public Member Functions

 NuMMRunCCTutorial (NuMMHelperPRL *helper, NuMatrixSpectrum *ndData, NuMatrixSpectrum *fdData)
virtual Double_t ComparePredWithData (const NuMMParameters &pars)
virtual NuMatrixSpectrum MakeFDPred (const NuMMParameters &pars)
virtual std::vector< TH1D > WriteFDPredHistos (const NuMMParameters &pars) const

Private Attributes

NuMatrixSpectrumfNDData
NuMatrixSpectrumfFDData
NuMMHelperPRLfHelper

Detailed Description

Definition at line 13 of file NuMMRunCCTutorial.h.


Constructor & Destructor Documentation

NuMMRunCCTutorial::NuMMRunCCTutorial ( NuMMHelperPRL helper,
NuMatrixSpectrum ndData,
NuMatrixSpectrum fdData 
)

Definition at line 16 of file NuMMRunCCTutorial.cxx.

00019   : NuMMRun()
00020 {
00021   fHelper = helper;
00022   fNDData = ndData;
00023   fFDData = fdData;
00024 }


Member Function Documentation

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

Implements NuMMRun.

Definition at line 190 of file NuMMRunCCTutorial.cxx.

References NuMatrixSpectrum::Spectrum().

00191 {
00192   NuMatrixSpectrum prediction(this->MakeFDPred(pars));
00193   return this->StatsLikelihood(prediction.Spectrum(),
00194                                fFDData->Spectrum());
00195 }

NuMatrixSpectrum NuMMRunCCTutorial::MakeFDPred ( const NuMMParameters pars  )  [virtual]

Definition at line 112 of file NuMMRunCCTutorial.cxx.

References NuMatrix1D::Add(), NuMMParameters::Alpha(), NuMMHelperPRL::BeamMatrix(), count, NuMatrix1D::DecayCC(), NuMatrix1D::Decohere(), NuMatrixSpectrum::Divide(), NuMMParameters::Dm2(), NuMatrixSpectrum::ExtrapolateNDToFD(), NuMMHelperPRL::FDEfficiency(), NuMMRun::fDisappearanceModel, NuMMHelperPRL::FDPurity(), NuMMHelperPRL::FDRecoVsTrue(), NuMMHelperPRL::FDTauEfficiency(), NuMMHelperPRL::FDTauRecoVsTrue(), fFDData, NuMMRun::fFDFidMass, fHelper, fNDData, NuMMRun::fNDFidMass, NuMMRun::fQuietMode, NuMatrix::GetPOT(), NuMatrixSpectrum::InverseOscillate(), NuMMParameters::Mu2(), NuMatrixSpectrum::Multiply(), NuMMParameters::NCBackgroundScale(), NuMMHelperPRL::NDEfficiency(), NuMMHelperPRL::NDPurity(), NuMMHelperPRL::NDRecoVsTrue(), NuMMParameters::Normalisation(), NuMatrixSpectrum::Oscillate(), NuMatrixSpectrum::RecoToTrue(), NuMMParameters::ShwEnScale(), NuMMParameters::Sn2(), NuMatrix1D::Subtract(), NuMatrixSpectrum::TrueToReco(), NuMMHelperPRL::XSecGraph(), and NuMMHelperPRL::XSecGraphTaus().

00113 {
00114   static Int_t count=0;
00115   if ((!(count%3)) && (!fQuietMode)){
00116     cout << "8sn2: " << pars.Sn2() << "; dm2: " << pars.Dm2() 
00117          << "; norm: " << pars.Normalisation() 
00118          << "; NCBack: " << pars.NCBackgroundScale()
00119          << "; ShwEn: " << pars.ShwEnScale()
00120          << "; mu2: " << pars.Mu2()
00121          << "; alpha: " << pars.Alpha() << endl;
00122   }
00123   
00124   NuMatrixSpectrum prediction(*fNDData);
00125 
00126   NuMatrixSpectrum signal(prediction);
00127   signal.Multiply(fHelper->NDPurity());
00128   NuMatrixSpectrum background(prediction);
00129   background.Subtract(signal);
00130   background.Multiply(pars.NCBackgroundScale());
00131   prediction.Subtract(background);
00132 
00133   prediction.RecoToTrue(fHelper->NDRecoVsTrue());
00134   prediction.Divide(fHelper->NDEfficiency());
00135   prediction.Divide(fHelper->XSecGraph());
00136   prediction.Divide(fNDData->GetPOT());
00137   prediction.Divide(fNDFidMass);
00138   prediction.ExtrapolateNDToFD(fHelper->BeamMatrix());
00139   prediction.Multiply(fFDFidMass);
00140   prediction.Multiply(fFDData->GetPOT());
00141 
00142   NuMatrixSpectrum potentialTaus(prediction);
00143   potentialTaus.Multiply(fHelper->XSecGraphTaus());
00144   potentialTaus.Multiply(fHelper->FDTauEfficiency());
00145 
00146   prediction.Multiply(fHelper->XSecGraph());
00147   prediction.Multiply(fHelper->FDEfficiency());
00148 
00149   NuMatrixSpectrum unoscTrueSpectrum(prediction);
00150   unoscTrueSpectrum.TrueToReco(fHelper->FDRecoVsTrue());
00151   NuMatrixSpectrum ncBackground(unoscTrueSpectrum);
00152   ncBackground.Divide(fHelper->FDPurity());
00153   ncBackground.Subtract(unoscTrueSpectrum);
00154   ncBackground.Multiply(pars.NCBackgroundScale());
00155 
00156   potentialTaus.InverseOscillate(pars.Dm2(),pars.Sn2());
00157   potentialTaus.TrueToReco(fHelper->FDTauRecoVsTrue());
00158 
00159 
00160   if (0==fDisappearanceModel){
00161     prediction.Oscillate(pars.Dm2(),pars.Sn2());
00162   }
00163   else if (1==fDisappearanceModel){
00164     prediction.DecayCC(pars.Dm2(),pars.Sn2(),pars.Alpha());
00165   }
00166   else if (2==fDisappearanceModel){
00167     prediction.Decohere(pars.Dm2(),pars.Sn2(), pars.Mu2());
00168   }
00169   else{
00170     cout << "Badly configured disappearance model. "
00171          << "Oscillating as that's probably what you want, "
00172          << "but not including taus."
00173          << endl;
00174     prediction.Oscillate(pars.Dm2(),pars.Sn2());
00175   }
00176   prediction.TrueToReco(fHelper->FDRecoVsTrue());
00177   prediction.Add(ncBackground);
00178   if (0==fDisappearanceModel){
00179     prediction.Add(potentialTaus);
00180   }
00181   
00182   ++count;
00183   
00184   return prediction;
00185   
00186 }

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

Implements NuMMRun.

Definition at line 28 of file NuMMRunCCTutorial.cxx.

References NuMatrix1D::Add(), NuMMParameters::Alpha(), NuMatrix1D::DecayCC(), NuMatrix1D::Decohere(), NuMatrixSpectrum::Divide(), NuMMParameters::Dm2(), NuMatrixSpectrum::ExtrapolateNDToFD(), NuMatrixSpectrum::InverseOscillate(), NuMMParameters::Mu2(), NuMatrixSpectrum::Multiply(), NuMMParameters::NCBackgroundScale(), NuMatrixSpectrum::Oscillate(), NuMatrixSpectrum::RecoToTrue(), NuMMParameters::Sn2(), NuMatrixSpectrum::Spectrum(), NuMatrix1D::Subtract(), and NuMatrixSpectrum::TrueToReco().

00029 {
00030   vector<TH1D> vHistos;
00031   TH1D hNDData(*(fNDData->Spectrum()));
00032   hNDData.SetName("ndData");
00033   hNDData.SetTitle("ndData");
00034   vHistos.push_back(*(new TH1D(hNDData)));
00035 
00036   NuMatrixSpectrum prediction(*(fNDData->Spectrum()));
00037 
00038   NuMatrixSpectrum signal(prediction);
00039   signal.Multiply(fHelper->NDPurity());
00040   NuMatrixSpectrum background(prediction);
00041   background.Subtract(signal);
00042   background.Multiply(pars.NCBackgroundScale());
00043   prediction.Subtract(background);
00044 
00045   prediction.RecoToTrue(fHelper->NDRecoVsTrue());
00046   prediction.Divide(fHelper->NDEfficiency());
00047   prediction.Divide(fHelper->XSecGraph());
00048   prediction.Divide(fNDData->GetPOT());
00049   prediction.Divide(fNDFidMass);
00050   prediction.ExtrapolateNDToFD(fHelper->BeamMatrix());
00051   prediction.Multiply(fFDFidMass);
00052   prediction.Multiply(fFDData->GetPOT());
00053 
00054   NuMatrixSpectrum potentialTaus(prediction);
00055   potentialTaus.Multiply(fHelper->XSecGraphTaus());
00056   potentialTaus.Multiply(fHelper->FDTauEfficiency());
00057 
00058   prediction.Multiply(fHelper->XSecGraph());
00059   prediction.Multiply(fHelper->FDEfficiency());
00060 
00061   NuMatrixSpectrum unoscTrueSpectrum(prediction);
00062   unoscTrueSpectrum.TrueToReco(fHelper->FDRecoVsTrue());
00063   NuMatrixSpectrum ncBackground(unoscTrueSpectrum);
00064   ncBackground.Divide(fHelper->FDPurity());
00065   ncBackground.Subtract(unoscTrueSpectrum);
00066   ncBackground.Multiply(pars.NCBackgroundScale());
00067 
00068   potentialTaus.InverseOscillate(pars.Dm2(),pars.Sn2());
00069   potentialTaus.TrueToReco(fHelper->FDTauRecoVsTrue());
00070 
00071   if (0==fDisappearanceModel){
00072     prediction.Oscillate(pars.Dm2(),pars.Sn2());
00073   }
00074   else if (1==fDisappearanceModel){
00075     prediction.DecayCC(pars.Dm2(),pars.Sn2(),pars.Alpha());
00076   }
00077   else if (2==fDisappearanceModel){
00078     prediction.Decohere(pars.Dm2(),pars.Sn2(), pars.Mu2());
00079   }
00080   else{
00081     cout << "Badly configured disappearance model. "
00082          << "Oscillating as that's probably what you want."
00083          << endl;
00084     prediction.Oscillate(pars.Dm2(),pars.Sn2());
00085   }
00086   prediction.TrueToReco(fHelper->FDRecoVsTrue());
00087   prediction.Add(ncBackground);
00088   if (0==fDisappearanceModel && (!fFakeDataStudy)){
00089     prediction.Add(potentialTaus);
00090   }
00091 
00092   TH1D hFDPrediction(*(prediction.Spectrum()));  
00093   hFDPrediction.SetName("fdPrediction");
00094   vHistos.push_back(hFDPrediction);
00095   
00096   TH1D hFDTaus(*(potentialTaus.Spectrum()));
00097   hFDTaus.SetName("fdTaus");
00098   vHistos.push_back(hFDTaus);
00099 
00100   TH1D hFDNCBackground(*(ncBackground.Spectrum()));
00101   hFDNCBackground.SetName("fdNCBackground");
00102   vHistos.push_back(hFDNCBackground);
00103 
00104   TH1D fdData(*(fFDData->Spectrum()));
00105   hFDNCBackground.SetName("fdData");
00106   vHistos.push_back(fdData);
00107 
00108   return vHistos;
00109 }


Member Data Documentation

Reimplemented from NuMMRun.

Definition at line 26 of file NuMMRunCCTutorial.h.

Referenced by MakeFDPred().

Reimplemented from NuMMRun.

Definition at line 27 of file NuMMRunCCTutorial.h.

Referenced by MakeFDPred().

Reimplemented from NuMMRun.

Definition at line 25 of file NuMMRunCCTutorial.h.

Referenced by MakeFDPred().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1