NuMMRunCC2010 Class Reference

#include <NuMMRunCC2010.h>

Inheritance diagram for NuMMRunCC2010:
NuMMRun

List of all members.

Public Member Functions

 NuMMRunCC2010 (NuMMHelperPRL *helper, NuMatrixSpectrum *ndCCData, NuMatrixSpectrum *fdCCData)
 NuMMRunCC2010 (NuMMHelperCPT *helper, NuMatrixSpectrum *ndCCData, NuMatrixSpectrum *ndCCDataBar, NuMatrixSpectrum *fdCCData, NuMatrixSpectrum *fdCCDataBar)
virtual Double_t ComparePredWithData (const NuMMParameters &pars)
virtual pair< NuMatrixSpectrum,
NuMatrixSpectrum
MakeFDPred (const NuMMParameters &pars)
virtual std::vector< TH1D > WriteFDPredHistos (const NuMMParameters &pars) const

Private Member Functions

virtual pair< NuMatrixSpectrum,
NuMatrixSpectrum
CalculateFDFlux () const
void OscillateNuMu (NuMatrixSpectrum &numu, const NuMMParameters &pars) const
 Helper. Oscillates, decays or decoheres a true energy numu spectrum.
void InverseOscillateNuTau (NuMatrixSpectrum &nutau, const NuMMParameters &pars) const
 Helper. Inverse oscillates a true energy nutau spectrum.

Private Attributes

NuMatrixSpectrumfNDCCData
NuMatrixSpectrumfFDCCData
NuMatrixSpectrumfNDCCDataBar
NuMatrixSpectrumfFDCCDataBar
pair< NuMatrixSpectrum,
NuMatrixSpectrum
fFDFlux
NuMMHelperPRLfHelper
NuMMHelperCPTfHelperCPT

Detailed Description

Definition at line 12 of file NuMMRunCC2010.h.


Constructor & Destructor Documentation

NuMMRunCC2010::NuMMRunCC2010 ( NuMMHelperPRL helper,
NuMatrixSpectrum ndCCData,
NuMatrixSpectrum fdCCData 
)

Definition at line 17 of file NuMMRunCC2010.cxx.

00020   : NuMMRun(),
00021     fNDCCData(ndCCData),
00022     fFDCCData(fdCCData),
00023     fHelper(helper),
00024     fHelperCPT(0)
00025 {
00026   assert(fNDCCData);
00027   assert(fFDCCData);
00028   
00029   //Independent of fit parameters for a stats-only fit
00030   fFDFlux = this->CalculateFDFlux();
00031 }

NuMMRunCC2010::NuMMRunCC2010 ( NuMMHelperCPT helper,
NuMatrixSpectrum ndCCData,
NuMatrixSpectrum ndCCDataBar,
NuMatrixSpectrum fdCCData,
NuMatrixSpectrum fdCCDataBar 
)

Definition at line 35 of file NuMMRunCC2010.cxx.

References CalculateFDFlux(), fFDCCData, fFDCCDataBar, fFDFlux, fNDCCData, and fNDCCDataBar.

00040   : NuMMRun(),
00041     fNDCCData(ndCCData),
00042     fFDCCData(fdCCData),
00043     fNDCCDataBar(ndCCDataBar),
00044     fFDCCDataBar(fdCCDataBar),
00045     fHelper(0),
00046     fHelperCPT(helper)
00047 {
00048   assert(fNDCCData);
00049   assert(fNDCCDataBar);
00050   assert(fFDCCData);
00051   assert(fFDCCDataBar);
00052   
00053   fFDFlux = this->CalculateFDFlux();
00054 }


Member Function Documentation

pair< NuMatrixSpectrum, NuMatrixSpectrum > NuMMRunCC2010::CalculateFDFlux (  )  const [private, virtual]

Definition at line 309 of file NuMMRunCC2010.cxx.

References NuMMHelperCPT::BarBeamMatrix(), NuMMHelperCPT::BarXSecGraph(), NuMMHelperPRL::BeamMatrix(), NuMatrixSpectrum::Divide(), NuMatrixSpectrum::ExtrapolateNDToFD(), fFDCCData, fFDCCDataBar, NuMMRun::fFDFidMass, fHelper, fHelperCPT, fNDCCData, fNDCCDataBar, NuMMRun::fNDFidMass, NuMatrix::GetPOT(), Msg::kError, MSG, NuMatrixSpectrum::Multiply(), NuMMHelperCPT::NDBarEfficiency(), NuMMHelperCPT::NDBarPurity(), NuMMHelperCPT::NDBarRecoVsTrue(), NuMMHelperPRL::NDEfficiency(), NuMMHelperCPT::NDNuEfficiency(), NuMMHelperCPT::NDNuPurity(), NuMMHelperCPT::NDNuRecoVsTrue(), NuMMHelperPRL::NDPurity(), NuMMHelperPRL::NDRecoVsTrue(), NuMMHelperCPT::NuBeamMatrix(), NuMMHelperCPT::NuXSecGraph(), NuMatrixSpectrum::RecoToTrue(), NuMatrix::ResetPOT(), and NuMMHelperPRL::XSecGraph().

Referenced by NuMMRunCC2010().

00310 {
00311   if(fHelper){
00312     NuMatrixSpectrum prediction(*fNDCCData);
00313     prediction.Multiply(fHelper->NDPurity());
00314     prediction.RecoToTrue(fHelper->NDRecoVsTrue());
00315     prediction.Divide(fHelper->NDEfficiency());
00316     prediction.Divide(fHelper->XSecGraph());
00317     prediction.Divide(fNDCCData->GetPOT());
00318     prediction.Divide(fNDFidMass);
00319     prediction.ExtrapolateNDToFD(fHelper->BeamMatrix());
00320     prediction.Multiply(fFDFidMass);
00321     prediction.Multiply(fFDCCData->GetPOT());
00322     
00323     NuMatrixSpectrum dummy;
00324     pair<NuMatrixSpectrum,NuMatrixSpectrum>
00325       predictions(prediction,dummy);
00326     return predictions;
00327 
00328   }
00329   else if(fHelperCPT){
00330     
00331     //Get the neutrinos to the FD
00332     NuMatrixSpectrum nuPrediction(*fNDCCData);
00333     nuPrediction.Multiply(fHelperCPT->NDNuPurity());
00334     nuPrediction.RecoToTrue(fHelperCPT->NDNuRecoVsTrue());
00335     nuPrediction.Divide(fHelperCPT->NDNuEfficiency());
00336     nuPrediction.Divide(fHelperCPT->NuXSecGraph());
00337     nuPrediction.Divide(fNDCCData->GetPOT());
00338     nuPrediction.Divide(fNDFidMass);
00339     nuPrediction.ExtrapolateNDToFD(fHelperCPT->NuBeamMatrix());
00340     nuPrediction.Multiply(fFDFidMass);
00341     nuPrediction.Multiply(fFDCCData->GetPOT());
00342     nuPrediction.ResetPOT(fFDCCData->GetPOT());
00343 
00344     //Get the antineutrinos to the FD
00345     NuMatrixSpectrum barPrediction(*fNDCCDataBar);
00346     barPrediction.Multiply(fHelperCPT->NDBarPurity());
00347     barPrediction.RecoToTrue(fHelperCPT->NDBarRecoVsTrue());
00348     barPrediction.Divide(fHelperCPT->NDBarEfficiency());
00349     barPrediction.Divide(fHelperCPT->BarXSecGraph());
00350     barPrediction.Divide(fNDCCDataBar->GetPOT());
00351     barPrediction.Divide(fNDFidMass);
00352     barPrediction.ExtrapolateNDToFD(fHelperCPT->BarBeamMatrix());
00353     barPrediction.Multiply(fFDFidMass);
00354     barPrediction.Multiply(fFDCCDataBar->GetPOT());
00355     barPrediction.ResetPOT(fFDCCDataBar->GetPOT());
00356     
00357     pair<NuMatrixSpectrum,NuMatrixSpectrum>
00358       predictions(nuPrediction,barPrediction);
00359     return predictions;
00360   }
00361   else{
00362     //Woah, how did you get here without a helper?
00363     MSG("NuMMRunCC2010",Msg::kError) <<"Helpers not set!"<<endl;
00364     NuMatrixSpectrum dummy;
00365     pair<NuMatrixSpectrum,NuMatrixSpectrum>
00366       predictions(dummy,dummy);
00367     return predictions;
00368   }
00369 }

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

Implements NuMMRun.

Definition at line 499 of file NuMMRunCC2010.cxx.

00500 {
00501   const pair<NuMatrixSpectrum,NuMatrixSpectrum> predictions =
00502     this->MakeFDPred(pars);
00503   Double_t like = 0.0;
00504   
00505   like += this->StatsLikelihood(predictions.first.Spectrum(),
00506                                 fFDCCData->Spectrum());
00507   
00508   if (fHelperCPT) {
00509     like += this->StatsLikelihood(predictions.second.Spectrum(),
00510                                   fFDCCDataBar->Spectrum());
00511   }
00512   return like;
00513 }

void NuMMRunCC2010::InverseOscillateNuTau ( NuMatrixSpectrum nutau,
const NuMMParameters pars 
) const [private]

Helper. Inverse oscillates a true energy nutau spectrum.

Does nothing if the model is decay or decoherence

Definition at line 537 of file NuMMRunCC2010.cxx.

References NuMMParameters::Alpha(), NuMatrix1D::DecayMuToTau(), NuMMParameters::Dm2(), NuMMRun::fDisappearanceModel, NuMatrix1D::InverseDecohere(), NuMatrixSpectrum::InverseOscillateLinearInterp(), NuMMParameters::Mu2(), and NuMMParameters::Sn2().

Referenced by MakeFDPred().

00539 {
00540   if(fDisappearanceModel == 0)
00541     nutau.InverseOscillateLinearInterp(pars.Dm2(), pars.Sn2());
00542   if(fDisappearanceModel == 1)
00543     nutau.DecayMuToTau(pars.Dm2(), pars.Sn2(), pars.Alpha());
00544   if(fDisappearanceModel == 2)
00545     nutau.InverseDecohere(pars.Dm2(), pars.Sn2(), pars.Mu2());
00546 }

pair< NuMatrixSpectrum, NuMatrixSpectrum > NuMMRunCC2010::MakeFDPred ( const NuMMParameters pars  )  [virtual]

Definition at line 372 of file NuMMRunCC2010.cxx.

References NuMatrix1D::Add(), NuMMHelperCPT::BarXSecGraph(), NuMatrixSpectrum::Divide(), NuMMParameters::Dm2(), NuMMParameters::Dm2Bar(), NuMMHelperCPT::FDBarEfficiency(), NuMMHelperCPT::FDBarNCContamination(), NuMMHelperCPT::FDBarPurity(), NuMMHelperCPT::FDBarRecoVsTrue(), NuMMHelperPRL::FDEfficiency(), NuMMHelperCPT::FDNuEfficiency(), NuMMHelperCPT::FDNuNCContamination(), NuMMHelperCPT::FDNuPurity(), NuMMHelperCPT::FDNuRecoVsTrue(), NuMMHelperCPT::FDNuTauEfficiency(), NuMMHelperCPT::FDNuTauRecoVsTrue(), NuMMHelperPRL::FDPurity(), NuMMHelperPRL::FDRecoVsTrue(), NuMMHelperCPT::FDTauBarEfficiency(), NuMMHelperCPT::FDTauBarRecoVsTrue(), NuMMHelperPRL::FDTauEfficiency(), NuMMHelperPRL::FDTauRecoVsTrue(), NuMMHelperCPT::FDWrongSignBarEfficiency(), NuMMHelperCPT::FDWrongSignBarRecoVsTrue(), NuMMHelperCPT::FDWrongSignNuEfficiency(), NuMMHelperCPT::FDWrongSignNuRecoVsTrue(), fFDFlux, fHelper, fHelperCPT, NuMMRun::fQuietMode, InverseOscillateNuTau(), Msg::kError, MSG, NuMatrixSpectrum::Multiply(), NuMMParameters::NCBackgroundScale(), NuMMParameters::Normalisation(), NuMMHelperCPT::NuXSecGraph(), OscillateNuMu(), NuMMParameters::ShwEnScale(), NuMMParameters::Sn2(), NuMMParameters::Sn2Bar(), NuMatrix1D::Subtract(), NuMatrixSpectrum::TrueToReco(), NuMMHelperPRL::XSecGraph(), NuMMHelperCPT::XSecGraphNuTaus(), NuMMHelperCPT::XSecGraphTauBars(), and NuMMHelperPRL::XSecGraphTaus().

00373 {
00374   if (!fQuietMode) {
00375     cout << "sn2: " << pars.Sn2() << "; dm2: " << pars.Dm2() 
00376          << "; sn2bar: " << pars.Sn2Bar() << "; dm2bar: " << pars.Dm2Bar()
00377          << endl
00378          << "; norm: " << pars.Normalisation() 
00379          << "; NCBack: " << pars.NCBackgroundScale()
00380          << "; ShwEn: " << pars.ShwEnScale() << endl;
00381   }
00382   
00383   const pair<NuMatrixSpectrum,NuMatrixSpectrum> predictions =
00384     fFDFlux;
00385   NuMatrixSpectrum nuPrediction = predictions.first;
00386   NuMatrixSpectrum barPrediction = predictions.second;
00387   
00388   if(fHelperCPT){
00389     //Get the taus (ignoring any wrong-sign taubars)
00390     NuMatrixSpectrum potentialNuTaus(nuPrediction);
00391     potentialNuTaus.Multiply(fHelperCPT->XSecGraphNuTaus());
00392     potentialNuTaus.Multiply(fHelperCPT->FDNuTauEfficiency());
00393     InverseOscillateNuTau(potentialNuTaus, pars);
00394     potentialNuTaus.TrueToReco(fHelperCPT->FDNuTauRecoVsTrue());
00395     //Get the taubars (ignoring any wrong-sign taus)
00396     NuMatrixSpectrum potentialTauBars(barPrediction);
00397     potentialTauBars.Multiply(fHelperCPT->XSecGraphTauBars());
00398     potentialTauBars.Multiply(fHelperCPT->FDTauBarEfficiency());
00399     InverseOscillateNuTau(potentialTauBars, pars);
00400     potentialTauBars.TrueToReco(fHelperCPT->FDTauBarRecoVsTrue());
00401     
00402     //Cross sections
00403     nuPrediction.Multiply(fHelperCPT->NuXSecGraph());
00404     barPrediction.Multiply(fHelperCPT->BarXSecGraph());
00405     
00406     //Get the neutrino NC background
00407     NuMatrixSpectrum nuNCBackground(nuPrediction);
00408     nuNCBackground.Multiply(fHelperCPT->FDNuEfficiency());
00409     nuNCBackground.TrueToReco(fHelperCPT->FDNuRecoVsTrue());
00410     nuNCBackground.Divide(fHelperCPT->FDNuPurity());
00411     nuNCBackground.Multiply(fHelperCPT->FDNuNCContamination());
00412     
00413     //Get the antineutrino NC background
00414     NuMatrixSpectrum barNCBackground(barPrediction);
00415     barNCBackground.Multiply(fHelperCPT->FDBarEfficiency());
00416     barNCBackground.TrueToReco(fHelperCPT->FDBarRecoVsTrue());
00417     barNCBackground.Divide(fHelperCPT->FDBarPurity());
00418     barNCBackground.Multiply(fHelperCPT->FDBarNCContamination());
00419     
00420     //Get the wrong-sign neutrino background for the antineutrino
00421     //prediction
00422     NuMatrixSpectrum wrongSignNuMus(nuPrediction);
00423     wrongSignNuMus.Multiply(fHelperCPT->FDWrongSignNuEfficiency());
00424     OscillateNuMu(wrongSignNuMus, pars);
00425     wrongSignNuMus.TrueToReco(fHelperCPT->FDWrongSignNuRecoVsTrue());
00426     
00427     //Get the wrong-sign antineutrino background for the neutrino
00428     //prediction
00429     NuMatrixSpectrum wrongSignNuBars(barPrediction);
00430     wrongSignNuBars.Multiply(fHelperCPT->FDWrongSignBarEfficiency());
00431     OscillateNuMu(wrongSignNuBars, pars);
00432     wrongSignNuBars.TrueToReco(fHelperCPT->FDWrongSignBarRecoVsTrue());
00433     
00434     //Oscillations - both sets oscillate together
00435     OscillateNuMu(nuPrediction, pars);
00436     OscillateNuMu(barPrediction, pars);
00437     //Efficiencies
00438     nuPrediction.Multiply(fHelperCPT->FDNuEfficiency());
00439     barPrediction.Multiply(fHelperCPT->FDBarEfficiency());
00440     
00441     //True to reco
00442     nuPrediction.TrueToReco(fHelperCPT->FDNuRecoVsTrue());
00443     barPrediction.TrueToReco(fHelperCPT->FDBarRecoVsTrue());
00444     
00445     //Add in backgrounds
00446     nuPrediction.Add(wrongSignNuBars);
00447     barPrediction.Add(wrongSignNuMus);
00448     nuPrediction.Add(nuNCBackground);
00449     nuPrediction.Add(potentialNuTaus);
00450     barPrediction.Add(barNCBackground);
00451     barPrediction.Add(potentialTauBars);
00452     
00453     pair<NuMatrixSpectrum,NuMatrixSpectrum>
00454       ccPredictions(nuPrediction,barPrediction);
00455     return ccPredictions;
00456   }
00457 
00458   else if(fHelper){
00459     NuMatrixSpectrum potentialTaus(nuPrediction);
00460     potentialTaus.Multiply(fHelper->XSecGraphTaus());
00461     potentialTaus.Multiply(fHelper->FDTauEfficiency());
00462     
00463     nuPrediction.Multiply(fHelper->XSecGraph());
00464     nuPrediction.Multiply(fHelper->FDEfficiency());
00465     
00466     NuMatrixSpectrum unoscTrueSpectrum(nuPrediction);
00467     unoscTrueSpectrum.TrueToReco(fHelper->FDRecoVsTrue());
00468     NuMatrixSpectrum ncBackground(unoscTrueSpectrum);
00469     ncBackground.Divide(fHelper->FDPurity());
00470     ncBackground.Subtract(unoscTrueSpectrum);
00471     
00472     OscillateNuMu(nuPrediction, pars);
00473     InverseOscillateNuTau(potentialTaus, pars);
00474     
00475     potentialTaus.TrueToReco(fHelper->FDTauRecoVsTrue());
00476     nuPrediction.TrueToReco(fHelper->FDRecoVsTrue());
00477     nuPrediction.Add(ncBackground);
00478    
00479     nuPrediction.Add(potentialTaus);
00480     
00481     NuMatrixSpectrum dummy;
00482     pair<NuMatrixSpectrum,NuMatrixSpectrum>
00483       ccPredictions(nuPrediction,dummy);
00484     return ccPredictions;
00485   }
00486   else{
00487     //Woah, how did you get here without a helper?
00488     MSG("NuMMRunCC2010",Msg::kError)<<"Helper not set!"<<endl;
00489     NuMatrixSpectrum dummy;
00490     pair<NuMatrixSpectrum,NuMatrixSpectrum>
00491       predictions(dummy,dummy);
00492     return predictions;
00493   }
00494 }

void NuMMRunCC2010::OscillateNuMu ( NuMatrixSpectrum numu,
const NuMMParameters pars 
) const [private]

Helper. Oscillates, decays or decoheres a true energy numu spectrum.

Definition at line 517 of file NuMMRunCC2010.cxx.

References NuMMParameters::Alpha(), NuMatrix1D::DecayCC(), NuMatrix1D::Decohere(), NuMMParameters::Dm2(), NuMMRun::fDisappearanceModel, NuMMParameters::Mu2(), NuMatrixSpectrum::OscillateLinearInterp(), and NuMMParameters::Sn2().

Referenced by MakeFDPred().

00519 {
00520   switch(fDisappearanceModel){
00521   case 0:
00522     numu.OscillateLinearInterp(pars.Dm2(), pars.Sn2());
00523     return;
00524   case 1:
00525     numu.DecayCC(pars.Dm2(), pars.Sn2(), pars.Alpha());
00526     return;
00527   case 2:
00528     numu.Decohere(pars.Dm2(), pars.Sn2(), pars.Mu2());
00529     return;
00530   default:
00531     assert(0 && "Badly configured disappearance model");
00532   }
00533 }

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

Implements NuMMRun.

Definition at line 58 of file NuMMRunCC2010.cxx.

References NuMatrix1D::Add(), NuMatrixSpectrum::Divide(), NuMMParameters::Dm2(), NuMMParameters::Dm2Bar(), NuMatrixSpectrum::ExtrapolateNDToFD(), NuMatrixSpectrum::Multiply(), NuMMParameters::NCBackgroundScale(), NuMMParameters::Normalisation(), NuMatrixSpectrum::RecoToTrue(), NuMatrix::ResetPOT(), NuMMParameters::ShwEnScale(), NuMMParameters::Sn2(), NuMMParameters::Sn2Bar(), NuMatrixSpectrum::Spectrum(), NuMatrix1D::Subtract(), and NuMatrixSpectrum::TrueToReco().

00059 {
00060   vector<TH1D> vHistos;
00061 
00062   pair<NuMatrixSpectrum,NuMatrixSpectrum> predictions = fFDFlux;  
00063   NuMatrixSpectrum nuPrediction = fFDFlux.first;
00064   NuMatrixSpectrum barPrediction = fFDFlux.first;
00065   
00066   if(fHelper){
00067     TH1D hNDData(*(fNDCCData->Spectrum()));
00068     hNDData.SetName("ndData");
00069     hNDData.SetTitle("ndData");
00070     vHistos.push_back(*(new TH1D(hNDData)));
00071   
00072     NuMatrixSpectrum potentialTaus(nuPrediction);
00073     potentialTaus.Multiply(fHelper->XSecGraphTaus());
00074     potentialTaus.Multiply(fHelper->FDTauEfficiency());
00075     
00076     nuPrediction.Multiply(fHelper->XSecGraph());
00077     nuPrediction.Multiply(fHelper->FDEfficiency());
00078     
00079     NuMatrixSpectrum unoscTrueSpectrum(nuPrediction);
00080     unoscTrueSpectrum.TrueToReco(fHelper->FDRecoVsTrue());
00081     NuMatrixSpectrum ncBackground(unoscTrueSpectrum);
00082     ncBackground.Divide(fHelper->FDPurity());
00083     ncBackground.Subtract(unoscTrueSpectrum);
00084 
00085     OscillateNuMu(nuPrediction, pars);
00086     InverseOscillateNuTau(potentialTaus, pars);
00087     
00088     //Output the prediction in true energy
00089     TH1D hTrueFDPrediction(*(nuPrediction.Spectrum()));
00090     hTrueFDPrediction.SetName("fdTruePrediction");
00091     vHistos.push_back(hTrueFDPrediction);
00092     
00093     potentialTaus.TrueToReco(fHelper->FDTauRecoVsTrue());  
00094     nuPrediction.TrueToReco(fHelper->FDRecoVsTrue());
00095     
00096     //Get the prediction in reco energy
00097     TH1D hBaseFDPrediction(*(nuPrediction.Spectrum()));
00098     hBaseFDPrediction.SetName("fdBasePrediction");
00099     vHistos.push_back(hBaseFDPrediction);
00100     
00101     nuPrediction.Add(ncBackground);
00102     if (0==fDisappearanceModel){
00103       nuPrediction.Add(potentialTaus);
00104     }
00105     
00106     //Get the prediction with backgrounds
00107     TH1D hFDPrediction(*(nuPrediction.Spectrum()));  
00108     hFDPrediction.SetName("fdPrediction");
00109     vHistos.push_back(hFDPrediction);
00110     
00111     TH1D hFDTaus(*(potentialTaus.Spectrum()));
00112     hFDTaus.SetName("fdTaus");
00113     vHistos.push_back(hFDTaus);
00114     
00115     TH1D hFDNCBackground(*(ncBackground.Spectrum()));
00116     hFDNCBackground.SetName("fdNCBackground");
00117     vHistos.push_back(hFDNCBackground);
00118     
00119     TH1D hfdData(*(fFDCCData->Spectrum()));
00120     hfdData.SetName("fdData");
00121     vHistos.push_back(hfdData);
00122   }
00123   
00124   if(fHelperCPT){
00125     //Put the ND data in the vector:
00126     TH1D hNDNuData(*(fNDCCData->Spectrum()));
00127     hNDNuData.SetName("ndDataNQ");
00128     hNDNuData.SetTitle("ndDataNQ");
00129     vHistos.push_back(*(new TH1D(hNDNuData)));
00130     TH1D hNDBarData(*(fNDCCDataBar->Spectrum()));
00131     hNDBarData.SetName("ndDataPQ");
00132     hNDBarData.SetTitle("ndDataPQ");
00133     vHistos.push_back(*(new TH1D(hNDBarData)));
00134     
00135     cout << "sn2: " << pars.Sn2() << "; dm2: " << pars.Dm2() 
00136          << "; sn2bar: " << pars.Sn2Bar() << "; dm2bar: " << pars.Dm2Bar()
00137          << endl
00138          << "; norm: " << pars.Normalisation() 
00139          << "; NCBack: " << pars.NCBackgroundScale()
00140          << "; ShwEn: " << pars.ShwEnScale() << endl;
00141     
00142     //Get the neutrinos to the FD
00143     NuMatrixSpectrum nuPrediction(*fNDCCData);
00144     nuPrediction.Multiply(fHelperCPT->NDNuPurity());
00145     nuPrediction.RecoToTrue(fHelperCPT->NDNuRecoVsTrue());
00146     nuPrediction.Divide(fHelperCPT->NDNuEfficiency());
00147     nuPrediction.Divide(fHelperCPT->NuXSecGraph());
00148     nuPrediction.Divide(fNDCCData->GetPOT());
00149     nuPrediction.Divide(fNDFidMass);
00150     nuPrediction.ExtrapolateNDToFD(fHelperCPT->NuBeamMatrix());
00151     nuPrediction.Multiply(fFDFidMass);
00152     nuPrediction.Multiply(fFDCCData->GetPOT());
00153     nuPrediction.ResetPOT(fFDCCData->GetPOT());
00154     
00155     //Get the antineutrinos to the FD
00156     NuMatrixSpectrum barPrediction(*fNDCCDataBar);
00157     barPrediction.Multiply(fHelperCPT->NDBarPurity());
00158     barPrediction.RecoToTrue(fHelperCPT->NDBarRecoVsTrue());
00159     barPrediction.Divide(fHelperCPT->NDBarEfficiency());
00160     barPrediction.Divide(fHelperCPT->BarXSecGraph());
00161     barPrediction.Divide(fNDCCDataBar->GetPOT());
00162     barPrediction.Divide(fNDFidMass);
00163     barPrediction.ExtrapolateNDToFD(fHelperCPT->BarBeamMatrix());
00164     barPrediction.Multiply(fFDFidMass);
00165     barPrediction.Multiply(fFDCCDataBar->GetPOT());
00166     barPrediction.ResetPOT(fFDCCDataBar->GetPOT());
00167 
00168     //Get the taus (ignoring any wrong-sign taubars)
00169     NuMatrixSpectrum potentialNuTaus(nuPrediction);
00170     potentialNuTaus.Multiply(fHelperCPT->XSecGraphNuTaus());
00171     potentialNuTaus.Multiply(fHelperCPT->FDNuTauEfficiency());
00172     InverseOscillateNuTau(potentialNuTaus, pars);
00173     //Get the taubars (ignoring any wrong-sign taus)
00174     NuMatrixSpectrum potentialTauBars(barPrediction);
00175     potentialTauBars.Multiply(fHelperCPT->XSecGraphTauBars());
00176     potentialTauBars.Multiply(fHelperCPT->FDTauBarEfficiency());
00177     InverseOscillateNuTau(potentialTauBars, pars);
00178     
00179     // Write out the true tau spectra
00180     TH1D hFDTausNuMu(*(potentialNuTaus.Spectrum()));
00181     hFDTausNuMu.SetName("fdTausNuMu");
00182     vHistos.push_back(hFDTausNuMu);
00183     TH1D hFDTausNuBar(*(potentialTauBars.Spectrum()));
00184     hFDTausNuBar.SetName("fdTausNuBar");
00185     vHistos.push_back(hFDTausNuBar);
00186     
00187     // Do the tau true to reco speerately so that we can write out the spectra
00188     potentialNuTaus.TrueToReco(fHelperCPT->FDNuTauRecoVsTrue());
00189     potentialTauBars.TrueToReco(fHelperCPT->FDTauBarRecoVsTrue());
00190     
00191     //Cross sections
00192     nuPrediction.Multiply(fHelperCPT->NuXSecGraph());
00193     barPrediction.Multiply(fHelperCPT->BarXSecGraph());
00194     
00195     //Get the neutrino NC background
00196     NuMatrixSpectrum nuNCBackground(nuPrediction);
00197     nuNCBackground.Multiply(fHelperCPT->FDNuEfficiency());
00198     nuNCBackground.TrueToReco(fHelperCPT->FDNuRecoVsTrue());
00199     nuNCBackground.Divide(fHelperCPT->FDNuPurity());
00200     nuNCBackground.Multiply(fHelperCPT->FDNuNCContamination());
00201     
00202     //Get the antineutrino NC background
00203     NuMatrixSpectrum barNCBackground(barPrediction);
00204     barNCBackground.Multiply(fHelperCPT->FDBarEfficiency());
00205     barNCBackground.TrueToReco(fHelperCPT->FDBarRecoVsTrue());
00206     barNCBackground.Divide(fHelperCPT->FDBarPurity());
00207     barNCBackground.Multiply(fHelperCPT->FDBarNCContamination());
00208     
00209     //Get the wrong-sign neutrino background for the antineutrino
00210     //prediction
00211     NuMatrixSpectrum wrongSignNuMus(nuPrediction);
00212     wrongSignNuMus.Multiply(fHelperCPT->FDWrongSignNuEfficiency());
00213     OscillateNuMu(wrongSignNuMus, pars);
00214     
00215     //Get the wrong-sign antineutrino background for the neutrino
00216     //prediction
00217     NuMatrixSpectrum wrongSignNuBars(barPrediction);
00218     wrongSignNuBars.Multiply(fHelperCPT->FDWrongSignBarEfficiency());
00219     OscillateNuMu(wrongSignNuBars, pars);
00220     
00221     TH1D hFDWrongSignNQ(*(wrongSignNuBars.Spectrum()));
00222     hFDWrongSignNQ.SetName("fdWrongSignNQ");
00223     vHistos.push_back(hFDWrongSignNQ);
00224     
00225     TH1D hFDWrongSignPQ(*(wrongSignNuMus.Spectrum()));
00226     hFDWrongSignPQ.SetName("fdWrongSignPQ");
00227     vHistos.push_back(hFDWrongSignPQ);
00228     
00229     // Do the truetoreco seperately so that we can write out the histos first
00230     wrongSignNuBars.TrueToReco(fHelperCPT->FDWrongSignBarRecoVsTrue());
00231     wrongSignNuMus.TrueToReco(fHelperCPT->FDWrongSignNuRecoVsTrue());
00232     
00233     //Oscillations
00234     OscillateNuMu(nuPrediction, pars);
00235     OscillateNuMu(barPrediction, pars);
00236     //Efficiencies
00237     nuPrediction.Multiply(fHelperCPT->FDNuEfficiency());
00238     barPrediction.Multiply(fHelperCPT->FDBarEfficiency());
00239     
00240     // Write out the true spectra for the prediction components
00241     TH1D hFDNoBackTrueNQ(*(nuPrediction.Spectrum()));
00242     hFDNoBackTrueNQ.SetName("fdBasePredictionNuMus");
00243     vHistos.push_back(hFDNoBackTrueNQ);
00244     
00245     TH1D hFDNoBackTruePQ(*(barPrediction.Spectrum()));
00246     hFDNoBackTruePQ.SetName("fdBasePredictionNuBars");
00247     vHistos.push_back(hFDNoBackTruePQ);
00248     
00249     //True to reco
00250     nuPrediction.TrueToReco(fHelperCPT->FDNuRecoVsTrue());
00251     barPrediction.TrueToReco(fHelperCPT->FDBarRecoVsTrue());
00252     
00253     // Dump out the prediction spectrum before adding in the backgrounds
00254     TH1D hFDNoBackNQ(*(nuPrediction.Spectrum()));
00255     hFDNoBackNQ.SetName("fdBasePredictionNQ");
00256     vHistos.push_back(hFDNoBackNQ);
00257     
00258     TH1D hFDNoBackPQ(*(barPrediction.Spectrum()));
00259     hFDNoBackPQ.SetName("fdBasePredictionPQ");
00260     vHistos.push_back(hFDNoBackPQ);
00261     
00262     //Add in backgrounds
00263     nuPrediction.Add(wrongSignNuBars);
00264     barPrediction.Add(wrongSignNuMus);
00265     nuPrediction.Add(nuNCBackground);
00266     nuPrediction.Add(potentialNuTaus);
00267     barPrediction.Add(barNCBackground);
00268     barPrediction.Add(potentialTauBars);
00269     
00270     //Put the components of the predictions in the vector
00271     
00272     TH1D hFDPredictionNQ(*(nuPrediction.Spectrum()));
00273     hFDPredictionNQ.SetName("fdPredictionNQ");
00274     vHistos.push_back(hFDPredictionNQ);
00275     
00276     TH1D hFDPredictionPQ(*(barPrediction.Spectrum()));
00277     hFDPredictionPQ.SetName("fdPredictionPQ");
00278     vHistos.push_back(hFDPredictionPQ);
00279     
00280     TH1D hFDNCNQ(*(nuNCBackground.Spectrum()));
00281     hFDNCNQ.SetName("fdNCNQ");
00282     vHistos.push_back(hFDNCNQ);
00283     
00284     TH1D hFDNCPQ(*(barNCBackground.Spectrum()));
00285     hFDNCPQ.SetName("fdNCPQ");
00286     vHistos.push_back(hFDNCPQ);
00287     
00288     TH1D hFDTausNQ(*(potentialNuTaus.Spectrum()));
00289     hFDTausNQ.SetName("fdTausNQ");
00290     vHistos.push_back(hFDTausNQ);
00291     
00292     TH1D hFDTausPQ(*(potentialTauBars.Spectrum()));
00293     hFDTausPQ.SetName("fdTausPQ");
00294     vHistos.push_back(hFDTausPQ);
00295     
00296     TH1D hFDDataNQ(*(fFDCCData->Spectrum()));
00297     hFDDataNQ.SetName("fdDataNQ");
00298     vHistos.push_back(hFDDataNQ);
00299     
00300     TH1D hFDDataPQ(*(fFDCCDataBar->Spectrum()));
00301     hFDDataPQ.SetName("fdDataPQ");
00302     vHistos.push_back(hFDDataPQ);
00303   }
00304   return vHistos;
00305 }


Member Data Documentation

Definition at line 47 of file NuMMRunCC2010.h.

Referenced by CalculateFDFlux(), and NuMMRunCC2010().

Definition at line 49 of file NuMMRunCC2010.h.

Referenced by CalculateFDFlux(), and NuMMRunCC2010().

Definition at line 50 of file NuMMRunCC2010.h.

Referenced by MakeFDPred(), and NuMMRunCC2010().

Reimplemented from NuMMRun.

Definition at line 51 of file NuMMRunCC2010.h.

Referenced by CalculateFDFlux(), and MakeFDPred().

Definition at line 52 of file NuMMRunCC2010.h.

Referenced by CalculateFDFlux(), and MakeFDPred().

Definition at line 46 of file NuMMRunCC2010.h.

Referenced by CalculateFDFlux(), and NuMMRunCC2010().

Definition at line 48 of file NuMMRunCC2010.h.

Referenced by CalculateFDFlux(), and NuMMRunCC2010().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1