NuSterileRunFC Class Reference

#include <NuSterileRunFC.h>

Inheritance diagram for NuSterileRunFC:
NuMMRun

List of all members.

Public Member Functions

 NuSterileRunFC (NuSterileHelper *helper, const NuMatrixSpectrum *ndNCData, const NuMatrixSpectrum *ndCCData, const NuMatrixSpectrum *fdNCData, const NuMatrixSpectrum *fdCCData, const double fdPot)
 NuSterileRunFC (const NuSterileRunFC &old)
 ~NuSterileRunFC ()
NuMatrixSpectrumCalcNDDataMCRatio (const NuMMParameters &pars, Sterile::fSpectra spec) const
virtual Double_t ComparePredWithData (const NuMMParameters &pars)
virtual std::pair
< NuMatrixSpectrum,
NuMatrixSpectrum
MakeFDPred (const NuMMParameters &pars)
virtual std::vector< TH1D > WriteFDPredHistos (const NuMMParameters &pars) const
virtual void PredictNC (Bool_t predict)
 Will the NC prediction be calculated?
virtual void PredictCC (Bool_t predict)
 Will the CC prediction be calculated?
virtual Bool_t PredictNC ()
virtual Bool_t PredictCC ()
virtual void ResetNDData (const NuMatrix &nddata)
 Replace the ND data used in extrapolation.
virtual void ResetFDData (const NuMatrix &fddata)
 Replace the FD data used in extrapolation.
virtual std::auto_ptr< NuMatrixGetNDData (void) const
 Returns the ND data used in extrapolation.
virtual std::auto_ptr< NuMatrixGetFDData (void) const
 Return the FD data used in extrapolation.

Private Member Functions

void Init (NuSterileHelper *helper, const NuMatrixSpectrum *ndNCData, const NuMatrixSpectrum *ndCCData, const NuMatrixSpectrum *fdNCData, const NuMatrixSpectrum *fdCCData, const double fdPot)
NuSterileRunFCoperator= (const NuSterileRunFC &rhs)
 Disallow assignment: This is broken, so don't let people do it.

Private Attributes

Bool_t fPredictNC
 Controls NC component of prediction.
Bool_t fPredictCC
 Controls CC component of prediction.
NuSterileHelperfHelper
NuMatrixSpectrumfndNCData
NuMatrixSpectrumfndCCData
NuMatrixSpectrumffdNCData
NuMatrixSpectrumffdCCData
double ffdPot

Detailed Description

Definition at line 27 of file NuSterileRunFC.h.


Constructor & Destructor Documentation

NuSterileRunFC::NuSterileRunFC ( NuSterileHelper helper,
const NuMatrixSpectrum ndNCData,
const NuMatrixSpectrum ndCCData,
const NuMatrixSpectrum fdNCData,
const NuMatrixSpectrum fdCCData,
const double  fdPot 
)

Definition at line 24 of file NuSterileRunFC.cxx.

00030   : NuMMRun()
00031 {
00032   Init(helper, ndNCData, ndCCData, fdNCData, fdCCData, fdPot);
00033 }

NuSterileRunFC::NuSterileRunFC ( const NuSterileRunFC old  ) 

Definition at line 96 of file NuSterileRunFC.cxx.

References ffdCCData, ffdNCData, fHelper, fndCCData, fndNCData, fPredictCC, and fPredictNC.

00096                                                         : NuMMRun(old)
00097 {
00098   // Copy all the old histograms
00099   fndNCData = new NuMatrixSpectrum(*old.fndNCData);
00100   fndCCData = new NuMatrixSpectrum(*old.fndCCData);
00101   ffdNCData = new NuMatrixSpectrum(*old.ffdNCData);
00102   ffdCCData = new NuMatrixSpectrum(*old.ffdCCData);
00103 
00104   fHelper = old.fHelper;
00105   
00106   fPredictNC = old.fPredictNC;
00107   fPredictCC = old.fPredictCC;
00108   
00109 }

NuSterileRunFC::~NuSterileRunFC (  ) 

Definition at line 113 of file NuSterileRunFC.cxx.

References ffdCCData, ffdNCData, fndCCData, and fndNCData.

00113                                 {
00114   // We now take copies of the data histograms - clean them up
00115   if (fndNCData) delete fndNCData;  fndNCData   = 0;
00116   if (fndCCData) delete fndCCData;  fndCCData  = 0;
00117   if (ffdNCData) delete ffdNCData;  ffdNCData   = 0;
00118   if (ffdCCData) delete ffdCCData;  ffdCCData  = 0;
00119 }


Member Function Documentation

NuMatrixSpectrum * NuSterileRunFC::CalcNDDataMCRatio ( const NuMMParameters pars,
Sterile::fSpectra  spec 
) const

Calculates the data/MC ratio at the ND, assuming the MC is oscillated with the given parameters

Parameters:
pars The oscillation parameters to use
Returns:
A NuMatrixSpectrum object describing the ratio as a function of reconstructed energy

Definition at line 128 of file NuSterileRunFC.cxx.

References NuMatrix1D::Add(), NuMatrixSpectrum::Copy(), NuMatrixSpectrum::Divide(), fHelper, fndCCData, fndNCData, NuMatrixSpectrum::GetNbinsX(), it, Sterile::kCCAll, Sterile::kCCNQ, Sterile::kCCPQ, Sterile::kNC, NuSterileHelper::NDNueRecoVsTrueSelCCNQAppearNue(), NuSterileHelper::NDNueRecoVsTrueSelNCAppearNue(), NuSterileHelper::NDRecoVsTrueSelCCNQBeamNue(), NuSterileHelper::NDRecoVsTrueSelCCNQTrueCCNuMu(), NuSterileHelper::NDRecoVsTrueSelCCNQTrueCCNuMuBar(), NuSterileHelper::NDRecoVsTrueSelCCNQTrueNC(), NuSterileHelper::NDRecoVsTrueSelNCBeamNue(), NuSterileHelper::NDRecoVsTrueSelNCTrueCCNuMu(), NuSterileHelper::NDRecoVsTrueSelNCTrueNC(), NuSterileHelper::NDTauRecoVsTrueSelCCNQAppearNuTau(), NuSterileHelper::NDTauRecoVsTrueSelNCAppearNuTau(), and NuMatrixSpectrum::Spectrum().

Referenced by WriteFDPredHistos().

00128                                                                                                               {
00129 
00130   // First, get the reco-vs-true matrices from the helper
00131   TH2D* ndrvtnc       = (TH2D*)fHelper->NDRecoVsTrueSelNCTrueNC()->Clone();
00132   TH2D* ndrvtcc       = (TH2D*)fHelper->NDRecoVsTrueSelNCTrueCCNuMu()->Clone();
00133   TH2D* ndrvtccbar    = (TH2D*)fHelper->NDRecoVsTrueSelNCTrueCCNuMu()->Clone(); // not used for NC
00134   TH2D* ndrvtbeamnue  = (TH2D*)fHelper->NDRecoVsTrueSelNCBeamNue()->Clone();
00135   TH2D* ndrvtappnue   = (TH2D*)fHelper->NDNueRecoVsTrueSelNCAppearNue()->Clone();
00136   TH2D* ndrvtappnutau = (TH2D*)fHelper->NDTauRecoVsTrueSelNCAppearNuTau()->Clone();
00137   
00138   if (spec == Sterile::kCCNQ) {
00139     ndrvtnc       = (TH2D*)fHelper->NDRecoVsTrueSelCCNQTrueNC()->Clone();
00140     ndrvtcc       = (TH2D*)fHelper->NDRecoVsTrueSelCCNQTrueCCNuMu()->Clone();
00141     ndrvtccbar    = (TH2D*)fHelper->NDRecoVsTrueSelCCNQTrueCCNuMuBar()->Clone();
00142     ndrvtbeamnue  = (TH2D*)fHelper->NDRecoVsTrueSelCCNQBeamNue()->Clone();
00143     ndrvtappnue   = (TH2D*)fHelper->NDNueRecoVsTrueSelCCNQAppearNue()->Clone();
00144     ndrvtappnutau = (TH2D*)fHelper->NDTauRecoVsTrueSelCCNQAppearNuTau()->Clone();
00145   } else if (spec == Sterile::kCCPQ) {
00146 //     ndrvtnc       = (TH2D*)fHelper->NDRecoVsTrueSelCCPQTrueNC()->Clone();
00147 //     ndrvtcc       = (TH2D*)fHelper->NDRecoVsTrueSelCCPQTrueCCNuMu()->Clone();
00148 //     ndrvtbeamnue  = (TH2D*)fHelper->NDRecoVsTrueSelCCPQBeamNue()->Clone();
00149 //     ndrvtappnue   = (TH2D*)fHelper->NDNueRecoVsTrueSelCCPQAppearNue()->Clone();
00150 //     ndrvtappnutau = (TH2D*)fHelper->NDTauRecoVsTrueSelCCPQAppearNuTau()->Clone();
00151   } else if (spec == Sterile::kCCAll) {
00152 //     ndrvtnc       = (TH2D*)fHelper->NDRecoVsTrueSelCCAllTrueNC()->Clone();
00153 //     ndrvtcc       = (TH2D*)fHelper->NDRecoVsTrueSelCCAllTrueCCNuMu()->Clone();
00154 //     ndrvtbeamnue  = (TH2D*)fHelper->NDRecoVsTrueSelCCAllBeamNue()->Clone();
00155 //     ndrvtappnue   = (TH2D*)fHelper->NDNueRecoVsTrueSelCCAllAppearNue()->Clone();
00156 //     ndrvtappnutau = (TH2D*)fHelper->NDTauRecoVsTrueSelCCAllAppearNuTau()->Clone();
00157   } else if (spec != Sterile::kNC) {
00158     assert(false && "Unrecognized spectrum type. Exiting now");
00159   }
00160 
00161   NuMatrixSpectrum* data = new NuMatrixSpectrum(*fndNCData);
00162   if (spec == Sterile::kCCNQ) {
00163     data = new NuMatrixSpectrum(*fndCCData);
00164   }
00165 
00166   NuMatrixSpectrum* mc = data->Copy();
00167   mc->Spectrum()->SetTitle("mc");
00168 
00169   NuMatrixSpectrum* mcnumu = data->Copy();
00170   NuMatrixSpectrum* mcnumubar = data->Copy();
00171   NuMatrixSpectrum* mcbeamnue = data->Copy();
00172   NuMatrixSpectrum* mcappnue = data->Copy();
00173   NuMatrixSpectrum* mcappnutau = data->Copy();
00174   double oscWeightNC = 0, oscWeightNuMu = 1, oscWeightBeamNue = 1; 
00175   double oscWeightAppNue = 0, oscWeightAppNutau = 0; // default is to not oscillate
00176   const int NX = ndrvtnc->GetNbinsX();
00177 
00178   Double_t valnc[221 + 2];
00179   Double_t valnumu[221 + 2];
00180   Double_t valnumubar[221 + 2];
00181   Double_t valbeamnue[221 + 2];
00182   Double_t valappnue[221 + 2];
00183   Double_t valappnutau[221 + 2];
00184   for (int i = 0; i <= NX + 1; ++i) {
00185     valnc[i] = 0;
00186     valnumu[i] = 0;
00187     valnumubar[i] = 0;
00188     valbeamnue[i] = 0;
00189     valappnue[i] = 0;
00190     valappnutau[i] = 0;
00191   }
00192   for (int it = 1; it <= NX; ++it) {
00193     /*
00194       double trueEnd = ndrvtnc->GetXaxis()->GetBinCenter(it);
00195     
00196     oscWeightNC = 
00197       NuOscProbCalc::FourFlavourNuMuToNuSProbability(trueEnd, pars.Dm2(), pars.Sn2(), pars.Dm221(), 
00198                                                      pars.Dm243(), pars.Theta12(), pars.Theta13(), 
00199                                                      pars.Theta14(), pars.Theta24(), 
00200                                                      pars.Theta34(), pars.Delta1(), pars.Delta2(), 
00201                                                      1.04 * Munits::km);
00202 
00203     oscWeightNuMu = 
00204       NuOscProbCalc::FourFlavourDisappearanceWeight(trueEnd, pars.Dm2(), pars.Sn2(), pars.Dm221(), 
00205                                                     pars.Dm243(), pars.Theta12(), pars.Theta13(), 
00206                                                     pars.Theta14(), pars.Theta24(), 
00207                                                     pars.Theta34(), pars.Delta1(), pars.Delta2(), 
00208                                                     1.04 * Munits::km);
00209     
00210     oscWeightBeamNue = 
00211       NuOscProbCalc::FourFlavourNuESurvivalProbability(trueEnd, pars.Dm2(), pars.Sn2(), pars.Dm221(), 
00212                                                        pars.Dm243(), pars.Theta12(), pars.Theta13(), 
00213                                                        pars.Theta14(), pars.Theta24(), 
00214                                                        pars.Theta34(), pars.Delta1(), pars.Delta2(), 
00215                                                        1.04 * Munits::km);
00216 
00217     oscWeightAppNue = 
00218       NuOscProbCalc::FourFlavourNuMuToNuEProbability(trueEnd, pars.Dm2(), pars.Sn2(), pars.Dm221(), 
00219                                                      pars.Dm243(), pars.Theta12(), pars.Theta13(), 
00220                                                      pars.Theta14(), pars.Theta24(), 
00221                                                      pars.Theta34(), pars.Delta1(), pars.Delta2(), 
00222                                                      1.04 * Munits::km);
00223 
00224     oscWeightAppNutau = 
00225       NuOscProbCalc::FourFlavourNuMuToNuTauProbability(trueEnd, pars.Dm2(), pars.Sn2(), pars.Dm221(), 
00226                                                        pars.Dm243(), pars.Theta12(), pars.Theta13(), 
00227                                                        pars.Theta14(), pars.Theta24(), 
00228                                                        pars.Theta34(), pars.Delta1(), pars.Delta2(), 
00229                                                        1.04 * Munits::km);
00230     */
00231     // Loop over recoE
00232     for (int ir = 1; ir <= ndrvtnc->GetNbinsX(); ++ir) {      
00233       double recoEnc       = ndrvtnc->GetBinContent(it, ir);
00234       double recoEnumu     = ndrvtcc->GetBinContent(it, ir);
00235       double recoEnumubar  = ndrvtccbar->GetBinContent(it, ir);
00236       double recoEbeamnue  = ndrvtbeamnue->GetBinContent(it, ir);
00237       double recoEappnue   = ndrvtappnue->GetBinContent(it, ir);
00238       double recoEappnutau = ndrvtappnutau->GetBinContent(it, ir);
00239 
00240       valnc[ir] += recoEnc * (1 - oscWeightNC);
00241       valnumu[ir] += recoEnumu * oscWeightNuMu;
00242       valnumubar[ir] += recoEnumubar * oscWeightNuMu;
00243       valbeamnue[ir] += recoEbeamnue * oscWeightBeamNue;
00244       valappnue[ir] += recoEappnue * oscWeightAppNue;
00245       valappnutau[ir] += recoEappnutau * oscWeightAppNutau;
00246 
00247     } // for loop over reco E
00248     /*
00249     cout << "ND Oscillation weights: " << (1 - oscWeightNC) << " "
00250          << oscWeightNuMu << " " 
00251          << oscWeightNuMuBar << " " 
00252          << oscWeightBeamNue << " "
00253          << oscWeightAppNue << " "
00254          << oscWeightAppNutau << endl;
00255     */
00256   } // for loop over true E
00257   
00258   for (int i = 1; i < NX + 1; ++i) {
00259     mc->Spectrum()->SetBinContent(i, valnc[i]);
00260     mcnumu->Spectrum()->SetBinContent(i, valnumu[i]);
00261     mcnumubar->Spectrum()->SetBinContent(i, valnumubar[i]);
00262     mcbeamnue->Spectrum()->SetBinContent(i, valbeamnue[i]);
00263     mcappnue->Spectrum()->SetBinContent(i, valappnue[i]);
00264     mcappnutau->Spectrum()->SetBinContent(i, valappnutau[i]);
00265   }
00266   
00267   cout << "ND NC MC integral = " << mc->Spectrum()->Integral() << ", NuMu integral = "
00268        << mcnumu->Spectrum()->Integral() << ", NuMuBar integral = " 
00269        << mcnumubar->Spectrum()->Integral() << ", beam nue integral = " 
00270        << mcbeamnue->Spectrum()->Integral() << ", app nue integral = "
00271        << mcappnue->Spectrum()->Integral() << ", app nutau integral = " 
00272        << mcappnutau->Spectrum()->Integral() << endl;
00273   
00274   mc->Add(mcnumu->Spectrum());
00275   if (spec != Sterile::kNC) {
00276     mc->Add(mcnumubar->Spectrum());
00277   }
00278   mc->Add(mcbeamnue->Spectrum());
00279   mc->Add(mcappnue->Spectrum());
00280   mc->Add(mcappnutau->Spectrum());
00281   
00282   
00283   cout << "Total ND MC integral = " << mc->Spectrum()->Integral() << ", ND data integral = "
00284        << data->Spectrum()->Integral() << endl;
00285   
00286   data->Divide(mc);
00287   return data;
00288 } // CalcNDDataMCRatio()

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

Implements NuMMRun.

Definition at line 657 of file NuSterileRunFC.cxx.

References ffdCCData, ffdNCData, fPredictCC, fPredictNC, MakeFDPred(), NuMatrixSpectrum::Spectrum(), and NuMMRun::StatsLikelihood().

00658 {
00659   // Generate a prediction
00660   const pair<NuMatrixSpectrum,NuMatrixSpectrum> predictions = MakeFDPred(pars);
00661   Double_t like = 0;
00662   // Now, only count a likelihood for components we want - this is just
00663   // a constant offset, but should help speed things up a little.
00664   if (fPredictNC) {
00665     like += this->StatsLikelihood(predictions.first.Spectrum(),
00666                                   ffdNCData->Spectrum());
00667     /*
00668     cout << "NC: Prediction = " << predictions.first.Spectrum()->Integral() 
00669          << ", data = " << ffdNCData->Spectrum()->Integral() << endl;
00670     */
00671   }
00672   if (fPredictCC) {
00673     like += this->StatsLikelihood(predictions.second.Spectrum(),
00674                                   ffdCCData->Spectrum());
00675     /*
00676     cout << "CC: Prediction = " << predictions.second.Spectrum()->Integral() 
00677          << ", data = " << ffdCCData->Spectrum()->Integral() << endl;
00678     */
00679   }
00680   return like;
00681 }

auto_ptr< NuMatrix > NuSterileRunFC::GetFDData ( void   )  const [virtual]

Return the FD data used in extrapolation.

Reimplemented from NuMMRun.

Definition at line 782 of file NuSterileRunFC.cxx.

References ffdCCData, ffdNCData, and Munits::nm.

00783 {
00784   // NOTE: The data objects are stored as protected data members in the
00785   // NuMMRunNuBar class. However, the way the data is dealt with is very
00786   // specific to each extrapolation, so it turns out to be easier to 
00787   // do this here, in this leaf class than centrally.
00788   
00789   // Convert to a NuMatrixCPT, as charge-signs are separated internally
00790   NuMatrixCPT *nm = new NuMatrixCPT(ffdNCData, ffdCCData);
00791   return auto_ptr<NuMatrix>(nm);
00792 }

auto_ptr< NuMatrix > NuSterileRunFC::GetNDData ( void   )  const [virtual]

Returns the ND data used in extrapolation.

Reimplemented from NuMMRun.

Definition at line 769 of file NuSterileRunFC.cxx.

References fndCCData, fndNCData, and Munits::nm.

00770 {
00771   // NOTE: The data objects are stored as protected data members in the
00772   // NuMMRunNuBar class. However, the way the data is dealt with is very
00773   // specific to each extrapolation, so it turns out to be easier to 
00774   // do this here, in this leaf class than centrally.
00775   
00776   // Convert to a NuMatrixCPT, as charge-signs are separated internally
00777   NuMatrixCPT *nm = new NuMatrixCPT(fndNCData, fndCCData);
00778   return auto_ptr<NuMatrix>(nm);
00779 }

void NuSterileRunFC::Init ( NuSterileHelper helper,
const NuMatrixSpectrum ndNCData,
const NuMatrixSpectrum ndCCData,
const NuMatrixSpectrum fdNCData,
const NuMatrixSpectrum fdCCData,
const double  fdPot 
) [private]

Definition at line 37 of file NuSterileRunFC.cxx.

References NuSterileHelper::FDRecoVsTrueSelNCTrueNC(), ffdCCData, ffdNCData, ffdPot, fHelper, fndCCData, fndNCData, fPredictCC, fPredictNC, Msg::kError, MSG, and NuMatrixSpectrum::Spectrum().

00043 {
00044   fPredictNC = true;
00045   fPredictCC = true;
00046   ffdPot = fdPot;
00047   
00048   cout << "Making a run with " << fdPot << " POT, " << ndNCData->Spectrum()->Integral() << " ND NC events, "
00049        << ndCCData->Spectrum()->Integral() << " ND CC events" << endl;
00050 
00051   if (!helper) {
00052     MSG("NuSterileRunFC",Msg::kError) << "Passed a null pointer for helper" << endl;
00053     assert(helper);
00054   }
00055   if (!ndNCData) {
00056     MSG("NuSterileRunFC",Msg::kError) << "Passed a null pointer for ndNCData" << endl;
00057     assert(ndNCData);
00058   }
00059   if (!ndCCData) {
00060     MSG("NuSterileRunFC",Msg::kError) << "Passed a null pointer for ndCCData" << endl;
00061     assert(ndCCData);
00062   }
00063   if (!fdNCData) {
00064     MSG("NuSterileRunFC",Msg::kError) << "Passed a null pointer for fdNCData" << endl;
00065     assert(fdNCData);
00066   }
00067   if (!fdCCData) {
00068     MSG("NuSterileRunFC",Msg::kError) << "Passed a null pointer for fdCCData" << endl;
00069     assert(fdCCData);
00070   }  
00071   
00072   fndNCData = new NuMatrixSpectrum(*ndNCData);
00073   fndCCData = new NuMatrixSpectrum(*ndCCData);
00074   ffdNCData = new NuMatrixSpectrum(*fdNCData);
00075   ffdCCData = new NuMatrixSpectrum(*fdCCData);
00076 
00077   fHelper = helper;
00078   
00079   // Protect against cases where the FD data is not the same
00080   // binning as the prediction would be. Use the helper file
00081   // as a guide to what this should be...
00082   // Only perform this check if the passed in data has a spectrum
00083   if (fdNCData->Spectrum()) {
00084     if (fdNCData->Spectrum()->GetNbinsX() != fHelper->FDRecoVsTrueSelNCTrueNC()->GetNbinsX()) {
00085       MSG("NuSterileRunFC",Msg::kError) << "Nu Binning Mismatch: fdNCData # bins: " 
00086                                           << fdNCData->Spectrum()->GetNbinsX() 
00087       << " and fHelper # bins: " << fHelper->FDRecoVsTrueSelNCTrueNC()->GetNbinsX() << endl;
00088       assert(fdNCData->Spectrum()->GetNbinsX() == fHelper->FDRecoVsTrueSelNCTrueNC()->GetNbinsX());
00089     }
00090   }
00091 } // Init

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

Definition at line 638 of file NuSterileRunFC.cxx.

References WriteFDPredHistos().

Referenced by ComparePredWithData().

00639 { 
00640   std::vector<TH1D> predVector = WriteFDPredHistos(pars);
00641 
00642   TH1D ncPred = predVector[4];  // the total NC prediction
00643   TH1D ccPred = predVector[10]; // the total CC prediction
00644 
00645   NuMatrixSpectrum ncPrediction(ncPred);
00646   NuMatrixSpectrum ccPrediction(ccPred);
00647 
00648   // Return the two predictions, as a pair
00649   pair<NuMatrixSpectrum,NuMatrixSpectrum>
00650     predictions(ncPrediction,ccPrediction);
00651   return predictions;
00652 } // MakeFDPred()

NuSterileRunFC& NuSterileRunFC::operator= ( const NuSterileRunFC rhs  )  [private]

Disallow assignment: This is broken, so don't let people do it.

virtual Bool_t NuSterileRunFC::PredictCC (  )  [inline, virtual]

Definition at line 57 of file NuSterileRunFC.h.

References fPredictCC.

00057 { return fPredictCC;}

virtual void NuSterileRunFC::PredictCC ( Bool_t  predict  )  [inline, virtual]

Will the CC prediction be calculated?

Definition at line 53 of file NuSterileRunFC.h.

References fPredictCC.

00053                                          {
00054       fPredictCC = predict;
00055   }

virtual Bool_t NuSterileRunFC::PredictNC (  )  [inline, virtual]

Definition at line 56 of file NuSterileRunFC.h.

References fPredictNC.

00056 { return fPredictNC;}

virtual void NuSterileRunFC::PredictNC ( Bool_t  predict  )  [inline, virtual]

Will the NC prediction be calculated?

Definition at line 48 of file NuSterileRunFC.h.

References fPredictNC.

00048                                          {
00049       fPredictNC = predict;
00050   }

void NuSterileRunFC::ResetFDData ( const NuMatrix fddata  )  [virtual]

Replace the FD data used in extrapolation.

Reimplemented from NuMMRun.

Definition at line 717 of file NuSterileRunFC.cxx.

References NuMatrixSpectrum::Copy(), ffdCCData, ffdNCData, NuMatrix1D::GetNuMatrixSpectrum(), Msg::kFatal, MSG, NuMatrixCPT::NQ(), and NuMatrixCPT::PQ().

00718 {
00719   // Attempt downcast to a CPT object
00720   const NuMatrixCPT *cpt = dynamic_cast<const NuMatrixCPT*>(&fddata);
00721   if (!cpt) {
00722     MSG("NuSterileRunFC",Msg::kFatal) << "Error: Have not been passed a CPT matrix object to reset ND Data" << endl;
00723   }
00724 
00725   // Pointers to temporary storage if we need to convert NuMatrix1D->NuMatrixspectrum
00726   // This is because we use borrowed pointers normally, but by creating a new NuMatrixSpectrum
00727   // we become responsible for destroying the objects, and leaking them is not an option.
00728   auto_ptr<NuMatrixSpectrum> tmpPQ, tmpNQ;
00729   
00730   // Extract the NQ and PQ spectra
00731   const NuMatrixSpectrum *pq = dynamic_cast<const NuMatrixSpectrum*>(cpt->PQ());
00732   if (!pq) {
00733     // Try a NuMatrix1D, then convert it to a NuMatrixSpecturm if it is
00734     const NuMatrix1D *nm1d = dynamic_cast<const NuMatrix1D*>(cpt->PQ());
00735     if (!nm1d) {
00736       // Fail if we cannot handle this histogram
00737       MSG("NuSterileRunFC",Msg::kFatal) << "Error: PQ spectrum appears not to be a NuMatrixSpectrum or NuMatrix1D" << endl;
00738     }
00739     tmpPQ.reset(nm1d->GetNuMatrixSpectrum().Copy());
00740     pq = tmpPQ.get();
00741   }
00742   
00743   const NuMatrixSpectrum *nq = dynamic_cast<NuMatrixSpectrum*>(cpt->NQ());
00744   if (!nq) {
00745     // Try a NuMatrix1D, then convert it to a NuMatrixSpecturm if it is
00746     const NuMatrix1D *nm1d = dynamic_cast<const NuMatrix1D*>(cpt->NQ());
00747     if (!nm1d) {
00748       // Fail if we cannot handle this histogram
00749       MSG("NuSterileRunFC",Msg::kFatal) << "Error: NQ spectrum appears not to be a NuMatrixSpectrum" << endl;
00750     }
00751     tmpNQ.reset(nm1d->GetNuMatrixSpectrum().Copy());
00752     nq = tmpNQ.get();
00753   }
00754   
00755   // Store the old FD data POT
00756   //Double_t oldPOT = ffdNCData->GetPOT();
00757   
00758   // Delete the old spectra, if they exist
00759   if (ffdNCData) delete ffdNCData; ffdNCData = 0;
00760   if (ffdCCData) delete ffdCCData; ffdCCData = 0;
00761   
00762   // Copy the spectra to this object
00763   ffdNCData = nq->Copy();
00764   ffdCCData = pq->Copy();
00765   
00766 }

void NuSterileRunFC::ResetNDData ( const NuMatrix nddata  )  [virtual]

Replace the ND data used in extrapolation.

Reimplemented from NuMMRun.

Definition at line 685 of file NuSterileRunFC.cxx.

References NuMatrixSpectrum::Copy(), fndCCData, fndNCData, Msg::kFatal, MSG, NuMatrixCPT::NQ(), and NuMatrixCPT::PQ().

00686 {
00687   // Attempt downcast to a CPT object
00688   const NuMatrixCPT *cpt = dynamic_cast<const NuMatrixCPT*>(&nddata);
00689   if (!cpt) {
00690     MSG("NuSterileRunFC",Msg::kFatal) << "Error: Have not been passed a CPT matrix object to reset ND Data" << endl;
00691   }
00692   
00693   // Extract the NQ and PQ spectra
00694   const NuMatrixSpectrum *pq = dynamic_cast<NuMatrixSpectrum*>(cpt->PQ());
00695   if (!pq) {
00696     MSG("NuSterileRunFC",Msg::kFatal) << "Error: PQ spectrum appears not to be a NuMatrixSpectrum" << endl;
00697   }
00698   
00699   const NuMatrixSpectrum *nq = dynamic_cast<NuMatrixSpectrum*>(cpt->NQ());
00700   if (!nq) {
00701     MSG("NuSterileRunFC",Msg::kFatal) << "Error: NQ spectrum appears not to be a NuMatrixSpectrum" << endl;
00702   }
00703   
00704   // Delete the old spectra, if they exist
00705   if (fndNCData) delete fndNCData; fndNCData = 0;
00706   if (fndCCData) delete fndCCData; fndCCData = 0;
00707   
00708   // Now we have the spectra!
00709   fndNCData = nq->Copy();
00710   fndCCData = pq->Copy();
00711 
00712 }

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

Calculates the prediction at the FD, component by component, and returns all components in a vector.

Returns:
A vector containing, in this order: the ND NC data, the ND CC data, the FD NC and CC data, the FD total NC prediction, the 5 components of the FD NC prediction, the total FD CC prediction, and the 6 components of the FD CC prediction. If fPredictNC/CC is false, then the corresponding predictions will be scaled to 0;

Implements NuMMRun.

Definition at line 302 of file NuSterileRunFC.cxx.

References CalcNDDataMCRatio(), count, NuMMParameters::Delta1(), NuMMParameters::Delta2(), NuMMParameters::Delta3(), NuMMParameters::Dm2(), NuMMParameters::Dm221(), NuMMParameters::Dm243(), NuSterileHelper::FDNueRecoVsTrueSelCCNQAppearNue(), NuSterileHelper::FDNueRecoVsTrueSelNCAppearNue(), NuSterileHelper::FDRecoVsTrueSelCCNQBeamNue(), NuSterileHelper::FDRecoVsTrueSelCCNQTrueCCNuMu(), NuSterileHelper::FDRecoVsTrueSelCCNQTrueCCNuMuBar(), NuSterileHelper::FDRecoVsTrueSelCCNQTrueNC(), NuSterileHelper::FDRecoVsTrueSelNCBeamNue(), NuSterileHelper::FDRecoVsTrueSelNCTrueCCNuMu(), NuSterileHelper::FDRecoVsTrueSelNCTrueNC(), NuSterileHelper::FDTauRecoVsTrueSelCCNQAppearNuTau(), NuSterileHelper::FDTauRecoVsTrueSelNCAppearNuTau(), ffdCCData, ffdNCData, ffdPot, fHelper, fndCCData, fndNCData, NuOscProb::FourFlavourDisappearanceWeight(), NuOscProb::FourFlavourNuESurvivalProbability(), NuOscProb::FourFlavourNuMuToNuEProbability(), NuOscProb::FourFlavourNuMuToNuSProbability(), NuOscProb::FourFlavourNuMuToNuTauProbability(), fPredictCC, fPredictNC, it, Sterile::kCCNQ, Munits::km, Sterile::kNC, NuMMParameters::Sn2(), NuMatrixSpectrum::Spectrum(), NuMMParameters::Theta12(), NuMMParameters::Theta13(), NuMMParameters::Theta14(), NuMMParameters::Theta24(), and NuMMParameters::Theta34().

Referenced by MakeFDPred().

00303 {    
00304   // Set up a vector to push the histograms into.
00305   vector<TH1D> vHistos;
00306 
00307   // Put the ND data in the vector:
00308   TH1D hNDNCData(*(fndNCData->Spectrum()));
00309   hNDNCData.SetName("ndDataNC");
00310   vHistos.push_back(*(new TH1D(hNDNCData)));
00311 
00312   TH1D hNDCCData(*(fndCCData->Spectrum()));
00313   hNDCCData.SetName("ndDataCC");
00314   vHistos.push_back(*(new TH1D(hNDCCData)));
00315 
00316   // Put the FD data in the vector:
00317   TH1D hFDNCData(*(ffdNCData->Spectrum()));
00318   hFDNCData.SetName("fdDataNC");
00319   vHistos.push_back(*(new TH1D(hFDNCData)));
00320 
00321   TH1D hFDCCData(*(ffdCCData->Spectrum()));
00322   hFDCCData.SetName("fdDataCC");
00323   vHistos.push_back(*(new TH1D(hFDCCData)));
00324 
00325   // get the ND data/MC ratio, with MC oscillated at 'pars'
00326   NuMatrixSpectrum* fDataMCNC   = CalcNDDataMCRatio(pars, Sterile::kNC);
00327   NuMatrixSpectrum* fDataMCCCNQ = CalcNDDataMCRatio(pars, Sterile::kCCNQ);
00328 
00329   // Oscillate the true energy, and collapse into reco energy
00330   // First, get the reco-vs-true matrices from the helper for NC
00331   TH2D* fdrvtnc       = (TH2D*)fHelper->FDRecoVsTrueSelNCTrueNC()->Clone();
00332   TH2D* fdrvtcc       = (TH2D*)fHelper->FDRecoVsTrueSelNCTrueCCNuMu()->Clone();
00333   TH2D* fdrvtbeamnue  = (TH2D*)fHelper->FDRecoVsTrueSelNCBeamNue()->Clone();
00334   TH2D* fdrvtappnue   = (TH2D*)fHelper->FDNueRecoVsTrueSelNCAppearNue()->Clone();
00335   TH2D* fdrvtappnutau = (TH2D*)fHelper->FDTauRecoVsTrueSelNCAppearNuTau()->Clone();
00336 
00337   // and CC
00338   TH2D* fdrvtccnc       = (TH2D*)fHelper->FDRecoVsTrueSelCCNQTrueNC()->Clone();
00339   TH2D* fdrvtcccc       = (TH2D*)fHelper->FDRecoVsTrueSelCCNQTrueCCNuMu()->Clone();
00340   TH2D* fdrvtccccbar    = (TH2D*)fHelper->FDRecoVsTrueSelCCNQTrueCCNuMuBar()->Clone();
00341   TH2D* fdrvtccbeamnue  = (TH2D*)fHelper->FDRecoVsTrueSelCCNQBeamNue()->Clone();
00342   TH2D* fdrvtccappnue   = (TH2D*)fHelper->FDNueRecoVsTrueSelCCNQAppearNue()->Clone();
00343   TH2D* fdrvtccappnutau = (TH2D*)fHelper->FDTauRecoVsTrueSelCCNQAppearNuTau()->Clone();
00344 
00345   NuMatrixSpectrum* data = new NuMatrixSpectrum(*ffdNCData);
00346 
00347   // set up NC prediction histograms
00348   TH1D* predstarnc = (TH1D*)data->Spectrum()->Clone("fdNCPredNC");
00349   TH1D* predstarnumu = (TH1D*)data->Spectrum()->Clone("fdNCPredNuMu");
00350   TH1D* predstarbnue = (TH1D*)data->Spectrum()->Clone("fdNCPredBeamNue");
00351   TH1D* predstaranue = (TH1D*)data->Spectrum()->Clone("fdNCPredAppearedNue");
00352   TH1D* predstaranutau = (TH1D*)data->Spectrum()->Clone("fdNCPredAppearedNuTau");
00353 
00354   TH1D prednc(*predstarnc);
00355   TH1D prednumu(*predstarnumu);
00356   TH1D predbeamnue(*predstarbnue);
00357   TH1D predappnue(*predstaranue);
00358   TH1D predappnutau(*predstaranutau);
00359 
00360   // Set up CC prediction histograms
00361   TH1D* predstarccnc = (TH1D*)data->Spectrum()->Clone("fdCCNQPredNC");
00362   TH1D* predstarccnumu = (TH1D*)data->Spectrum()->Clone("fdCCNQPredNuMu");
00363   TH1D* predstarccnumubar = (TH1D*)data->Spectrum()->Clone("fdCCNQPredNuMuBar");
00364   TH1D* predstarccbnue = (TH1D*)data->Spectrum()->Clone("fdCCNQPredBeamNue");
00365   TH1D* predstarccanue = (TH1D*)data->Spectrum()->Clone("fdCCNQPredAppearedNue");
00366   TH1D* predstarccanutau = (TH1D*)data->Spectrum()->Clone("fdCCNQPredAppearedNuTau");
00367 
00368   TH1D predccnc(*predstarccnc);
00369   TH1D predccnumu(*predstarccnumu);
00370   TH1D predccnumubar(*predstarccnumubar);
00371   TH1D predccbeamnue(*predstarccbnue);
00372   TH1D predccappnue(*predstarccanue);
00373   TH1D predccappnutau(*predstarccanutau);
00374 
00375   //double oscWeightNC = 0, oscWeightNuMu = 1, oscWeightBeamNue = 1;
00376   //double oscWeightAppNue = 0, oscWeightAppNutau = 0;
00377   const int NX = fdrvtnc->GetNbinsX();
00378 
00379   // The arrays correspond to the bins of recoE for the FD oscillated MC
00380   Double_t valnc[221 + 2];
00381   Double_t valnumu[221 + 2];
00382   Double_t valbeamnue[221 + 2];
00383   Double_t valappnue[221 + 2];
00384   Double_t valappnutau[221 + 2];
00385 
00386   Double_t valccnc[221 + 2];
00387   Double_t valccnumu[221 + 2];
00388   Double_t valccnumubar[221 + 2];
00389   Double_t valccbeamnue[221 + 2];
00390   Double_t valccappnue[221 + 2];
00391   Double_t valccappnutau[221 + 2];
00392   for (int i = 0; i <= NX + 1; ++i) {
00393     valnc[i]       = 0;
00394     valnumu[i]     = 0;
00395     valbeamnue[i]  = 0;
00396     valappnue[i]   = 0;
00397     valappnutau[i] = 0;
00398 
00399     valccnc[i]       = 0;
00400     valccnumu[i]     = 0;
00401     valccnumubar[i]  = 0;
00402     valccbeamnue[i]  = 0;
00403     valccappnue[i]   = 0;
00404     valccappnutau[i] = 0;
00405   }
00406 
00407   // Loop over true energy, then reco energy
00408   for (int it = 1; it <= NX; ++it) {
00409     //    double trueEfd = fdrvtnc->GetXaxis()->GetBinCenter(it);
00410     Double_t increment = 0.001;
00411     Int_t count = 0;
00412     double oscWeightNC = 0, oscWeightNuMu = 0, oscWeightBeamNue = 0;
00413     double oscWeightAppNue = 0, oscWeightAppNutau = 0;
00414     for (Double_t energy = fdrvtnc->GetXaxis()->GetBinLowEdge(it) + increment / 2.0;
00415          energy < fdrvtnc->GetXaxis()->GetBinLowEdge(it + 1);
00416          energy += increment) {
00417     
00418       oscWeightNC += 
00419         NuOscProbCalc::FourFlavourNuMuToNuSProbability(energy, pars.Dm2(), pars.Sn2(), pars.Dm221(), 
00420                                                        pars.Dm243(), pars.Theta12(), pars.Theta13(), 
00421                                                        pars.Theta14(), pars.Theta24(), 
00422                                                        pars.Theta34(), pars.Delta1(), pars.Delta2(), 
00423                                                        pars.Delta3(),
00424                                                        735.0 * Munits::km);
00425       
00426       oscWeightNuMu += 
00427         NuOscProbCalc::FourFlavourDisappearanceWeight(energy, pars.Dm2(), pars.Sn2(), pars.Dm221(), 
00428                                                       pars.Dm243(), pars.Theta12(), pars.Theta13(), 
00429                                                       pars.Theta14(), pars.Theta24(), 
00430                                                       pars.Theta34(), pars.Delta1(), pars.Delta2(), 
00431                                                       pars.Delta3(),
00432                                                       735.0 * Munits::km);
00433       
00434       oscWeightBeamNue += 
00435         NuOscProbCalc::FourFlavourNuESurvivalProbability(energy, pars.Dm2(), pars.Sn2(), pars.Dm221(), 
00436                                                          pars.Dm243(), pars.Theta12(), pars.Theta13(), 
00437                                                          pars.Theta14(), pars.Theta24(), 
00438                                                          pars.Theta34(), pars.Delta1(), pars.Delta2(), 
00439                                                          pars.Delta3(),
00440                                                          735.0 * Munits::km);
00441       
00442       oscWeightAppNue += 
00443         NuOscProbCalc::FourFlavourNuMuToNuEProbability(energy, pars.Dm2(), pars.Sn2(), pars.Dm221(), 
00444                                                        pars.Dm243(), pars.Theta12(), pars.Theta13(), 
00445                                                        pars.Theta14(), pars.Theta24(), 
00446                                                        pars.Theta34(), pars.Delta1(), pars.Delta2(), 
00447                                                        pars.Delta3(),
00448                                                        735.0 * Munits::km);
00449       
00450       oscWeightAppNutau += 
00451         NuOscProbCalc::FourFlavourNuMuToNuTauProbability(energy, pars.Dm2(), pars.Sn2(), pars.Dm221(), 
00452                                                          pars.Dm243(), pars.Theta12(), pars.Theta13(), 
00453                                                          pars.Theta14(), pars.Theta24(), 
00454                                                          pars.Theta34(), pars.Delta1(), pars.Delta2(), 
00455                                                          pars.Delta3(),
00456                                                          735.0 * Munits::km);
00457       ++count;
00458     } // for loop over energy bin
00459       
00460     oscWeightNC /= count;
00461     oscWeightNuMu /= count;
00462     oscWeightBeamNue /= count;
00463     oscWeightAppNue /= count;
00464     oscWeightAppNutau /= count;
00465 
00466     /*
00467     cout << "FD Oscillation weights, for energy  " << trueEfd << " " 
00468          << (1 - oscWeightNC) << " "
00469          << oscWeightNuMu << " " 
00470          << oscWeightBeamNue << " "
00471          << oscWeightAppNue << " "
00472          << oscWeightAppNutau << endl;
00473     */
00474     // Loop over reco energy
00475     for (int ir = 1; ir <= fdrvtnc->GetNbinsX(); ++ir) {
00476       // get the recoE
00477       double recoEnc       = fdrvtnc->GetBinContent(it, ir);
00478       double recoEnumu     = fdrvtcc->GetBinContent(it, ir);
00479       double recoEbeamnue  = fdrvtbeamnue->GetBinContent(it, ir);
00480       double recoEappnue   = fdrvtappnue->GetBinContent(it, ir);
00481       double recoEappnutau = fdrvtappnutau->GetBinContent(it, ir);
00482 
00483       double recoEccnc       = fdrvtccnc->GetBinContent(it, ir);
00484       double recoEccnumu     = fdrvtcccc->GetBinContent(it, ir);
00485       double recoEccnumubar  = fdrvtccccbar->GetBinContent(it, ir);
00486       double recoEccbeamnue  = fdrvtccbeamnue->GetBinContent(it, ir);
00487       double recoEccappnue   = fdrvtccappnue->GetBinContent(it, ir);
00488       double recoEccappnutau = fdrvtccappnutau->GetBinContent(it, ir);
00489       
00490       //cout << "FD Energy: NC Numu = " << recoEnumu << ", CC Numu = " << recoEccnumu << ", CC Numubar = " << 
00491       //recoEccnumubar << endl;
00492       
00493       // Weight by the oscillation probability
00494       valnc[ir]       += recoEnc       * (1 - oscWeightNC);
00495       valnumu[ir]     += recoEnumu     * oscWeightNuMu;
00496       valbeamnue[ir]  += recoEbeamnue  * oscWeightBeamNue;
00497       valappnue[ir]   += recoEappnue   * oscWeightAppNue;
00498       valappnutau[ir] += recoEappnutau * oscWeightAppNutau;
00499 
00500       valccnc[ir]       += recoEccnc       * (1 - oscWeightNC);
00501       valccnumu[ir]     += recoEccnumu     * oscWeightNuMu;
00502       valccnumubar[ir]  += recoEccnumubar  * oscWeightNuMu;
00503       valccbeamnue[ir]  += recoEccbeamnue  * oscWeightBeamNue;
00504       valccappnue[ir]   += recoEccappnue   * oscWeightAppNue;
00505       valccappnutau[ir] += recoEccappnutau * oscWeightAppNutau;
00506 
00507     } // for loop over reco E 
00508   } // for loop over true E
00509   
00510   // Set the actual bin contents of the recoE spectra of the predictions
00511   for (int i = 1; i < NX + 1; ++i) {
00512     prednc.SetBinContent(i,       valnc[i]);
00513     prednumu.SetBinContent(i,     valnumu[i]);
00514     predbeamnue.SetBinContent(i,  valbeamnue[i]);
00515     predappnue.SetBinContent(i,   valappnue[i]);
00516     predappnutau.SetBinContent(i, valappnutau[i]);
00517 
00518     predccnc.SetBinContent(i,       valccnc[i]);
00519     predccnumu.SetBinContent(i,     valccnumu[i]);
00520     predccnumubar.SetBinContent(i,  valccnumubar[i]);
00521     predccbeamnue.SetBinContent(i,  valccbeamnue[i]);
00522     predccappnue.SetBinContent(i,   valccappnue[i]);
00523     predccappnutau.SetBinContent(i, valccappnutau[i]);
00524   }
00525 
00526   // Scale to the correct POT. RvT matrices were scaled to 1e20 POT.
00527   prednc.Scale(ffdPot       / 1.0e20);
00528   prednumu.Scale(ffdPot     / 1.0e20);
00529   predbeamnue.Scale(ffdPot  / 1.0e20);
00530   predappnue.Scale(ffdPot   / 1.0e20);
00531   predappnutau.Scale(ffdPot / 1.0e20);
00532 
00533   predccnc.Scale(ffdPot       / 1.0e20);
00534   predccnumu.Scale(ffdPot     / 1.0e20);
00535   predccnumubar.Scale(ffdPot  / 1.0e20);
00536   predccbeamnue.Scale(ffdPot  / 1.0e20);
00537   predccappnue.Scale(ffdPot   / 1.0e20);
00538   predccappnutau.Scale(ffdPot / 1.0e20);
00539 
00540   // Now multiply by ND data/MC ratio
00541   prednc.Multiply(fDataMCNC->Spectrum());
00542   prednumu.Multiply(fDataMCNC->Spectrum());
00543   predbeamnue.Multiply(fDataMCNC->Spectrum());
00544   predappnue.Multiply(fDataMCNC->Spectrum());
00545   predappnutau.Multiply(fDataMCNC->Spectrum());
00546 
00547   cout << "CC Numu before data/MC multiplication: " << predccnumu.Integral() << " and after: ";
00548 
00549   predccnc.Multiply(fDataMCCCNQ->Spectrum());
00550   predccnumu.Multiply(fDataMCCCNQ->Spectrum());
00551   predccnumubar.Multiply(fDataMCCCNQ->Spectrum());
00552   predccbeamnue.Multiply(fDataMCCCNQ->Spectrum());
00553   predccappnue.Multiply(fDataMCCCNQ->Spectrum());
00554   predccappnutau.Multiply(fDataMCCCNQ->Spectrum());
00555 
00556   cout << predccnumu.Integral() << endl;
00557 
00558   // Finally, add all of the predictions together
00559   TH1D pred = prednc;
00560   pred.SetName("fdNCPred");
00561   pred.Add(new TH1D(prednumu));
00562   pred.Add(new TH1D(predbeamnue));
00563   pred.Add(new TH1D(predappnue));
00564   pred.Add(new TH1D(predappnutau));
00565 
00566   TH1D predcc = predccnc;
00567   predcc.SetName("fdCCNQPred");
00568   predcc.Add(new TH1D(predccnumu));
00569   predcc.Add(new TH1D(predccnumubar));
00570   predcc.Add(new TH1D(predccbeamnue));
00571   predcc.Add(new TH1D(predccappnue));
00572   predcc.Add(new TH1D(predccappnutau));
00573 
00574   /*
00575   cout << "Total NC-selected prediction: " << pred.Integral() 
00576        << ", NC prediction: " << prednc.Integral()
00577        << ", NuMu prediction: " << prednumu.Integral()
00578        << ", Beam nue prediction: " << predbeamnue.Integral()
00579        << ", Nue prediction: " << predappnue.Integral()
00580        << ", Nutau prediction: " << predappnutau.Integral()
00581        << endl;
00582 
00583   cout << "Total CC-selected prediction: " << predcc.Integral() 
00584        << ", NC prediction: " << predccnc.Integral()
00585        << ", NuMu prediction: " << predccnumu.Integral()
00586        << ", NuMuBar prediction: " << predccnumubar.Integral()
00587        << ", Beam nue prediction: " << predccbeamnue.Integral()
00588        << ", Nue prediction: " << predccappnue.Integral()
00589        << ", Nutau prediction: " << predccappnutau.Integral()
00590        << endl;
00591   */
00592 
00593   if (!fPredictNC) {
00594     pred.Scale(0);
00595     prednc.Scale(0);
00596     prednumu.Scale(0);
00597     predbeamnue.Scale(0);
00598     predappnue.Scale(0);
00599     predappnutau.Scale(0);
00600   }
00601 
00602   if (!fPredictCC) {
00603     predcc.Scale(0);
00604     predccnc.Scale(0);
00605     predccnumu.Scale(0);
00606     predccnumubar.Scale(0);
00607     predccbeamnue.Scale(0);
00608     predccappnue.Scale(0);
00609     predccappnutau.Scale(0);
00610   }
00611   
00612   // Now add everything to the vector
00613   vHistos.push_back(*(new TH1D(pred)));
00614   vHistos.push_back(*(new TH1D(prednc)));
00615   vHistos.push_back(*(new TH1D(prednumu)));
00616   vHistos.push_back(*(new TH1D(predbeamnue)));
00617   vHistos.push_back(*(new TH1D(predappnue)));
00618   vHistos.push_back(*(new TH1D(predappnutau)));
00619 
00620   vHistos.push_back(*(new TH1D(predcc)));
00621   vHistos.push_back(*(new TH1D(predccnc)));
00622   vHistos.push_back(*(new TH1D(predccnumu)));
00623   vHistos.push_back(*(new TH1D(predccnumubar)));
00624   vHistos.push_back(*(new TH1D(predccbeamnue)));
00625   vHistos.push_back(*(new TH1D(predccappnue)));
00626   vHistos.push_back(*(new TH1D(predccappnutau)));
00627   /*
00628   cout << "Total NC prediction: " << pred.Integral() << endl;
00629   cout << "Total CC prediction: " << predcc.Integral() << endl;
00630   */
00631   return vHistos;
00632 } // WriteFDPredHistos


Member Data Documentation

double NuSterileRunFC::ffdPot [private]

Definition at line 98 of file NuSterileRunFC.h.

Referenced by Init(), and WriteFDPredHistos().

Reimplemented from NuMMRun.

Definition at line 89 of file NuSterileRunFC.h.

Referenced by CalcNDDataMCRatio(), Init(), NuSterileRunFC(), and WriteFDPredHistos().

Bool_t NuSterileRunFC::fPredictCC [private]

Controls CC component of prediction.

Definition at line 86 of file NuSterileRunFC.h.

Referenced by ComparePredWithData(), Init(), NuSterileRunFC(), PredictCC(), and WriteFDPredHistos().

Bool_t NuSterileRunFC::fPredictNC [private]

Controls NC component of prediction.

Definition at line 84 of file NuSterileRunFC.h.

Referenced by ComparePredWithData(), Init(), NuSterileRunFC(), PredictNC(), and WriteFDPredHistos().


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1