#include <NuMMRunNoChargeCut.h>
Inheritance diagram for NuMMRunNoChargeCut:

Public Member Functions | |
| NuMMRunNoChargeCut (NuMMHelperNoChargeCut *helper, NuHistInterpolator *ndData, NuHistInterpolator *fdData) | |
| virtual const NuMatrixSpectrum | MakeFDPred (const NuMMParameters &pars) |
| virtual const Double_t | ComparePredWithData (const NuMMParameters &pars) |
| virtual const std::vector< TH1D > | WriteFDPredHistos (const NuMMParameters &pars) const |
Private Attributes | |
| NuMMHelperNoChargeCut * | fHelper |
|
||||||||||||||||
|
Definition at line 12 of file NuMMRunNoChargeCut.cxx. 00015 : NuMMRun() 00016 { 00017 fHelper = helper; 00018 fNDData = ndData; 00019 fFDData = fdData; 00020 }
|
|
|
Implements NuMMRun. Definition at line 233 of file NuMMRunNoChargeCut.cxx. References NuMatrixSpectrum::RebinForFit(). 00234 {
00235 NuMatrixSpectrum prediction(this->MakeFDPred(pars));
00236 prediction.RebinForFit();
00237 NuMatrixSpectrum fdData(fFDData->ProvideSpectrum(0.0),
00238 fFDData->PoT());
00239 fdData.RebinForFit();
00240 return this->StatsLikelihood(prediction.Spectrum(),
00241 fdData.Spectrum());
00242 }
|
|
|
Definition at line 141 of file NuMMRunNoChargeCut.cxx. References NuMatrixSpectrum::Add(), NuMMHelperNoChargeCut::BeamMatrixNuMuCCXSec(), count, NuMatrixSpectrum::DecayCC(), NuMatrixSpectrum::Decohere(), NuMatrixSpectrum::Divide(), NuMMParameters::Dm2(), NuMatrixSpectrum::ExtrapolateNDToFD(), NuMMHelperNoChargeCut::FDEfficiency(), NuMMHelperNoChargeCut::FDPurity(), NuMMHelperNoChargeCut::FDRecoVsTrue(), NuMMHelperNoChargeCut::FDTauEfficiency(), NuMMHelperNoChargeCut::FDTauRecoVsTrue(), fHelper, NuMatrixSpectrum::InverseOscillate(), NuMatrixSpectrum::Multiply(), NuMMParameters::NCBackgroundScale(), NuMMHelperNoChargeCut::NDEfficiency(), NuMMHelperNoChargeCut::NDPurity(), NuMMHelperNoChargeCut::NDRecoVsTrue(), NuMMParameters::Normalisation(), NuMatrixSpectrum::Oscillate(), NuHistInterpolator::PoT(), NuHistInterpolator::ProvideSpectrum(), NuMatrixSpectrum::RecoToTrue(), NuMMParameters::ShwEnScale(), NuMMParameters::Sn2(), NuMatrixSpectrum::Subtract(), NuMatrixSpectrum::TrueToReco(), NuMMHelperNoChargeCut::XSecGraph(), and NuMMHelperNoChargeCut::XSecGraphTaus(). 00142 {
00143 static Int_t count=0;
00144 if ((!(count%3)) && (!fQuietMode)){
00145 cout << "8sn2: " << pars.Sn2() << "; dm2: " << pars.Dm2()
00146 << "; norm: " << pars.Normalisation()
00147 << "; NCBack: " << pars.NCBackgroundScale()
00148 << "; ShwEn: " << pars.ShwEnScale() << endl;
00149 }
00150
00151 NuMatrixSpectrum prediction(fNDData->ProvideSpectrum(pars.ShwEnScale()));
00152
00153 NuMatrixSpectrum signal(prediction);
00154 signal.Multiply(fHelper->NDPurity());
00155 NuMatrixSpectrum background(prediction);
00156 background.Subtract(signal);
00157 background.Multiply(pars.NCBackgroundScale());
00158 prediction.Subtract(background);
00159
00160 prediction.RecoToTrue(fHelper->NDRecoVsTrue());
00161 prediction.Divide(fHelper->NDEfficiency());
00162 // prediction.Divide(fHelper->XSecGraph());
00163 // X-secs are in the BM for no charge cut
00164 prediction.Divide(fNDData->PoT());
00165 prediction.Divide(fNDFidMass);
00166 prediction.ExtrapolateNDToFD(fHelper->BeamMatrixNuMuCCXSec());
00167 prediction.Multiply(fFDFidMass);
00168 prediction.Multiply(fFDData->PoT());
00169
00170 NuMatrixSpectrum potentialTaus(prediction);
00171 //Pretend they're all numus for now. Should be pretty close.
00172 potentialTaus.Divide(fHelper->XSecGraph());
00173 potentialTaus.Multiply(fHelper->XSecGraphTaus());
00174 potentialTaus.Multiply(fHelper->FDTauEfficiency());
00175
00176 // prediction.Multiply(fHelper->XSecGraph());
00177 // X-secs are in the BM.
00178 prediction.Multiply(fHelper->FDEfficiency());
00179
00180 NuMatrixSpectrum unoscTrueSpectrum(prediction);
00181 unoscTrueSpectrum.TrueToReco(fHelper->FDRecoVsTrue());
00182 NuMatrixSpectrum ncBackground(unoscTrueSpectrum);
00183 ncBackground.Divide(fHelper->FDPurity());
00184 ncBackground.Subtract(unoscTrueSpectrum);
00185 ncBackground.Multiply(pars.NCBackgroundScale());
00186
00187 potentialTaus.InverseOscillate(pars.Dm2(),pars.Sn2());
00188 potentialTaus.TrueToReco(fHelper->FDTauRecoVsTrue());
00189
00190
00191 if (0==fDisappearanceModel){
00192 prediction.Oscillate(pars.Dm2(),pars.Sn2());
00193 }
00194 else if (1==fDisappearanceModel){
00195 prediction.DecayCC(pars.Dm2(),pars.Sn2());
00196 }
00197 else if (2==fDisappearanceModel){
00198 prediction.Decohere(pars.Dm2(),pars.Sn2());
00199 }
00200 else{
00201 cout << "Badly configured disappearance model. "
00202 << "Oscillating as that's probably what you want, "
00203 << "but not including taus."
00204 << endl;
00205 prediction.Oscillate(pars.Dm2(),pars.Sn2());
00206 }
00207 prediction.TrueToReco(fHelper->FDRecoVsTrue());
00208 prediction.Add(ncBackground);
00209 if (0==fDisappearanceModel && (!fFakeDataStudy)){
00210 prediction.Add(potentialTaus);
00211 }
00212
00213 prediction.Multiply(pars.Normalisation());
00214
00215 ++count;
00216
00217 if (fFakeDataStudy){
00218 NuMatrixSpectrum shiftedPrediction(*(prediction.Spectrum()));
00219 return shiftedPrediction;
00220 }
00221 else{
00222 TH1D hshifted(fShowerEnergyShifter->
00223 ApplyShiftTo(*(prediction.Spectrum()),
00224 -1.0*pars.ShwEnScale()));
00225 NuMatrixSpectrum shiftedPrediction(hshifted);
00226 return shiftedPrediction;
00227 }
00228
00229 }
|
|
|
Implements NuMMRun. Definition at line 24 of file NuMMRunNoChargeCut.cxx. References NuMatrixSpectrum::Add(), NuMatrixSpectrum::DecayCC(), NuMatrixSpectrum::Decohere(), NuMatrixSpectrum::Divide(), NuMMParameters::Dm2(), NuMatrixSpectrum::ExtrapolateNDToFD(), NuMatrixSpectrum::InverseOscillate(), NuMatrixSpectrum::Multiply(), NuMMParameters::NCBackgroundScale(), NuMMParameters::Normalisation(), NuMatrixSpectrum::Oscillate(), NuMatrixSpectrum::RecoToTrue(), NuMatrixSpectrum::SetName(), NuMatrixSpectrum::SetTitle(), NuMMParameters::ShwEnScale(), NuMMParameters::Sn2(), NuMatrixSpectrum::Spectrum(), NuMatrixSpectrum::Subtract(), and NuMatrixSpectrum::TrueToReco(). 00025 {
00026 vector<TH1D> vHistos;
00027 TH1D hNDData(fNDData->ProvideSpectrum(pars.ShwEnScale()));
00028 hNDData.SetName("ndData");
00029 hNDData.SetTitle("ndData");
00030 vHistos.push_back(*(new TH1D(hNDData)));
00031
00032 NuMatrixSpectrum prediction(fNDData->ProvideSpectrum(pars.ShwEnScale()));
00033
00034 NuMatrixSpectrum signal(prediction);
00035 signal.Multiply(fHelper->NDPurity());
00036 NuMatrixSpectrum background(prediction);
00037 background.Subtract(signal);
00038 background.Multiply(pars.NCBackgroundScale());
00039 prediction.Subtract(background);
00040
00041 TH1D ndNCBackground(*(background.Spectrum()));
00042 ndNCBackground.SetName("ndNCBackground");
00043 ndNCBackground.SetTitle("ndNCBackground");
00044 vHistos.push_back(ndNCBackground);
00045
00046 prediction.RecoToTrue(fHelper->NDRecoVsTrue());
00047 prediction.Divide(fHelper->NDEfficiency());
00048 // prediction.Divide(fHelper->XSecGraph());
00049 // X-secs are in the BM for no charge cut
00050 prediction.Divide(fNDData->PoT());
00051 prediction.Divide(fNDFidMass);
00052 prediction.ExtrapolateNDToFD(fHelper->BeamMatrixNuMuCCXSec());
00053 prediction.Multiply(fFDFidMass);
00054 prediction.Multiply(fFDData->PoT());
00055
00056 NuMatrixSpectrum potentialTaus(prediction);
00057 //Pretend they're all numus for now. Should be pretty close.
00058 potentialTaus.Divide(fHelper->XSecGraph());
00059 potentialTaus.Multiply(fHelper->XSecGraphTaus());
00060 potentialTaus.Multiply(fHelper->FDTauEfficiency());
00061
00062 // prediction.Multiply(fHelper->XSecGraph());
00063 // X-secs are in the BM.
00064 prediction.Multiply(fHelper->FDEfficiency());
00065
00066 NuMatrixSpectrum unoscTrueSpectrum(prediction);
00067 unoscTrueSpectrum.TrueToReco(fHelper->FDRecoVsTrue());
00068 NuMatrixSpectrum ncBackground(unoscTrueSpectrum);
00069 ncBackground.Divide(fHelper->FDPurity());
00070 ncBackground.Subtract(unoscTrueSpectrum);
00071 ncBackground.Multiply(pars.NCBackgroundScale());
00072
00073 potentialTaus.InverseOscillate(pars.Dm2(),pars.Sn2());
00074 potentialTaus.TrueToReco(fHelper->FDTauRecoVsTrue());
00075
00076
00077 if (0==fDisappearanceModel){
00078 prediction.Oscillate(pars.Dm2(),pars.Sn2());
00079 }
00080 else if (1==fDisappearanceModel){
00081 prediction.DecayCC(pars.Dm2(),pars.Sn2());
00082 }
00083 else if (2==fDisappearanceModel){
00084 prediction.Decohere(pars.Dm2(),pars.Sn2());
00085 }
00086 else{
00087 cout << "Badly configured disappearance model. "
00088 << "Oscillating as that's probably what you want, "
00089 << "but not including taus."
00090 << endl;
00091 prediction.Oscillate(pars.Dm2(),pars.Sn2());
00092 }
00093 prediction.TrueToReco(fHelper->FDRecoVsTrue());
00094 prediction.Add(ncBackground);
00095 if (0==fDisappearanceModel && (!fFakeDataStudy)){
00096 prediction.Add(potentialTaus);
00097 }
00098
00099 prediction.Multiply(pars.Normalisation());
00100
00101 TH1D* hshifted = new TH1D(fShowerEnergyShifter->ApplyShiftTo(*(prediction.Spectrum()),-1.0*pars.ShwEnScale()));
00102 NuMatrixSpectrum shiftedPrediction(*hshifted);
00103
00104 TH1D hFDPrediction(*(shiftedPrediction.Spectrum()));
00105 hFDPrediction.SetName("fdPrediction");
00106 vHistos.push_back(hFDPrediction);
00107
00108 potentialTaus.Multiply(pars.Normalisation());
00109 TH1D hFDTaus(*(potentialTaus.Spectrum()));
00110 hFDTaus.SetName("fdTaus");
00111 vHistos.push_back(hFDTaus);
00112
00113 ncBackground.Multiply(pars.Normalisation());
00114 TH1D hFDNCBackground(*(ncBackground.Spectrum()));
00115 hFDNCBackground.SetName("fdNCBackground");
00116 vHistos.push_back(hFDNCBackground);
00117
00118 TH1D fdData = fFDData->ProvideSpectrum(0.0/*pars.ShwEnScale()*/);
00119 hFDNCBackground.SetName("fdData");
00120 vHistos.push_back(fdData);
00121
00122 return vHistos;
00123
00124 // ++count;
00125
00126 // if (fFakeDataStudy){
00127 // NuMatrixSpectrum shiftedPrediction(*(prediction.Spectrum()));
00128 // return shiftedPrediction;
00129 // }
00130 // else{
00131 // TH1D hshifted(fShowerEnergyShifter->
00132 // ApplyShiftTo(*(prediction.Spectrum()),
00133 // -1.0*pars.ShwEnScale()));
00134 // NuMatrixSpectrum shiftedPrediction(hshifted);
00135 // return shiftedPrediction;
00136 // }
00137
00138 }
|
|
|
Reimplemented from NuMMRun. Definition at line 26 of file NuMMRunNoChargeCut.h. Referenced by MakeFDPred(). |
1.3.9.1