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

|
|
How to perform the extrapolation for the NC FD prediction. WARNING, NOT ALL IMPLEMENTED.
References to kNoExtrapolation does exactly what is says on the tin
kNCFarOverNear F/N method in reco energy a la NC analysis
kCCFluxMeasurement assumes the ND CC spectrum measures flux in true energy
kConstrainNCCCRatio uses ND data vs MC NC to CC ratio in reco energy
kCCNDDataOnly doesn't use systematic-prone ND NC data
Definition at line 48 of file NuMMRunNC2010.h. 00048 {
00049 kNoExtrapolation,
00050 kNCFarOverNear,
00051 kCCFluxMeasurement,
00052 kConstrainNCCCRatio,
00053 kCCNDDataOnly
00054 };
|
|
||||||||||||||||||||
|
Definition at line 16 of file NuMMRunNC2010.cxx. 00020 : NuMMRun(), 00021 fSingleNCBin(false), 00022 fNDNCData(ndNCData), 00023 fFDNCData(fdNCData), 00024 fNDCCData(ndCCData), 00025 fHelper(helper), 00026 fExtrapMode(kNCFarOverNear) 00027 { 00028 // Precalculate stuff 00029 00030 using namespace ENCTruth; 00031 00032 // Project reco vs true down to true energy 00033 for(int truth = 0; truth < kNumTruths; ++truth){ 00034 // Initialize with a normalization of 1 POT. 00035 fNCFDMCTrueE[truth] = 00036 NuMatrixSpectrum(*fHelper->RecoVsTrueNC(truth, 1)->ProjectionX(), 1); 00037 // Scale to correct exposure 00038 fNCFDMCTrueE[truth].ScaleToPot(fFDNCData->PoT()); 00039 // These are now correctly normalized unosc predictions in true energy 00040 } 00041 00042 // Initialize with a normalization of 1 POT 00043 fNCNDMCRecoE = 00044 NuMatrixSpectrum(*fHelper->NDRecoVsTrueNC()->ProjectionY(), 1); 00045 // Scale to correct exposure 00046 fNCNDMCRecoE.ScaleToPot(fNDNCData->PoT()); 00047 }
|
|
|
Implements NuMMRun. Definition at line 232 of file NuMMRunNC2010.cxx. References NuMatrixSpectrum::Integral(), and NuMatrixSpectrum::Spectrum(). 00233 {
00234 NuMatrixSpectrum ncPrediction = MakeFDPred(pars);
00235
00236 double ncChisq = 0;
00237 if(fSingleNCBin){
00238 const double pred = ncPrediction.Integral();
00239 const double data = fFDNCData->Integral();
00240 ncChisq = 2*(pred - data + data*log(data/pred));
00241 }
00242 else{
00243 ncChisq = StatsLikelihood(ncPrediction.Spectrum(),
00244 fFDNCData->Spectrum());
00245 }
00246
00247 return ncChisq;
00248 }
|
|
|
Definition at line 215 of file NuMMRunNC2010.cxx. References NuMatrixSpectrum::Add(), fNCFDMCTrueE, and Oscillate(). 00216 {
00217 NuMatrixSpectrum truthPreds[ENCTruth::kNumTruths];
00218 for(int truth = 0; truth < ENCTruth::kNumTruths; ++truth){
00219 truthPreds[truth] = fNCFDMCTrueE[truth];
00220 }
00221 Oscillate(truthPreds, pars);
00222
00223 NuMatrixSpectrum truthPred;
00224 for(int truth = 0; truth < ENCTruth::kNumTruths; ++truth)
00225 truthPred.Add(truthPreds[truth]);
00226
00227 return truthPred;
00228 }
|
|
|
Definition at line 76 of file NuMMRunNC2010.cxx. References count, NuMatrixSpectrum::Divide(), NuMMParameters::Dm2(), fExtrapMode, fHelper, fNCFDMCTrueE, fNCNDMCRecoE, fNDNCData, NuMatrixSpectrum::GetNbinsX(), NuMatrixSpectrum::Multiply(), NuMMParameters::NCBackgroundScale(), NuMMParameters::Normalisation(), Oscillate(), NuMMHelperPRL::RecoVsTrueNC(), NuMatrixSpectrum::ScaleToPot(), NuMMParameters::ShwEnScale(), NuMMParameters::Sn2(), and NuMatrixSpectrum::Spectrum(). 00077 {
00078 static Int_t count = 0;
00079 if ((!(count%3)) && (!fQuietMode)){
00080 cout << "8sn2: " << pars.Sn2() << "; dm2: " << pars.Dm2()
00081 << "; norm: " << pars.Normalisation()
00082 << "; NCBack: " << pars.NCBackgroundScale()
00083 << "; ShwEn: " << pars.ShwEnScale() << endl;
00084 }
00085 ++count;
00086
00087 using namespace ENCTruth;
00088
00089 NuMatrixSpectrum ncPred[kNumTruths];
00090 for(int truth = 0; truth < kNumTruths; ++truth)
00091 ncPred[truth] = fNCFDMCTrueE[truth];
00092
00093 Oscillate(ncPred, pars);
00094
00095 // We need to scale the reco vs true histogram so that every bin in
00096 // true energy matches the normalized, oscillated true energy prediction
00097
00098 // So get the true energy prediction this matrix has now
00099
00100 TH2D* t2rs[kNumTruths];
00101 NuMatrixSpectrum predOld[kNumTruths];
00102 for(int truth = 0; truth < kNumTruths; ++truth){
00103 t2rs[truth] = new TH2D(*fHelper->RecoVsTrueNC(truth, 1));
00104 predOld[truth] = fNCFDMCTrueE[truth];
00105 // Need to scale to 1 POT to match... something. TODO CJB, can we avoid this bit?
00106 predOld[truth].ScaleToPot(1);
00107 }
00108
00109 // Include underflow and overflow
00110 const int numTrueBins = t2rs[0]->GetNbinsX()+2;
00111 const int numRecoBins = t2rs[0]->GetNbinsY()+2;
00112 for(int trueBin = 0; trueBin < numTrueBins; ++trueBin){
00113 for(int truth = 0; truth < kNumTruths; ++truth){
00114 // Access fArray directly. GetBinContent and SetBinContent are slow
00115 const double oldTot = predOld[truth].Spectrum()->fArray[trueBin];
00116 const double oscTot = ncPred[truth].Spectrum()->fArray[trueBin];
00117
00118 // The scale between the true energy spectrum the matrix
00119 // currently predicts and the one that it should
00120 const double scale = oldTot ? oscTot/oldTot : 1;
00121 // Apply this correction factor
00122 for(int recoBin = 0; recoBin < numRecoBins; ++recoBin){
00123 t2rs[truth]->fArray[trueBin+numTrueBins*recoBin] *= scale;
00124 } // end for recoBin
00125 } // end for truth
00126 } // end for trueBin
00127
00128 // Now project back to reco energy
00129 // Do this to get the right binning
00130 NuMatrixSpectrum ncPrediction = fNCNDMCRecoE;
00131 ncPrediction.Spectrum()->Reset("ICE");
00132
00133 for(int truth = 0; truth < kNumTruths; ++truth){
00134 // The next two loops are equivalent to this, but faster.
00135 // ncPrediction.Add(t2rs[truth]->ProjectionY());
00136
00137 double* ncPredSpecArr = ncPrediction.Spectrum()->fArray;
00138 const double* t2rsTruthArr = t2rs[truth]->fArray;
00139 for(int trueBin = 0; trueBin < numTrueBins; ++trueBin){
00140 for(int recoBin = 0; recoBin < numRecoBins; ++recoBin){
00141 ncPredSpecArr[recoBin] += t2rsTruthArr[trueBin+numTrueBins*recoBin];
00142 }
00143 }
00144 }
00145
00146 if(fExtrapMode == kNCFarOverNear){
00147 // Simple F/N ratio. Compare ND data...
00148 NuMatrixSpectrum fnCorrection(*fNDNCData);
00149 // with ND prediction
00150 fnCorrection.Divide(&fNCNDMCRecoE);
00151 // Apply correction to the FD prediction
00152 ncPrediction.Multiply(&fnCorrection);
00153 }
00154
00155 for(int truth = 0; truth < kNumTruths; ++truth) delete t2rs[truth];
00156
00157 return ncPrediction;
00158 }
|
|
||||||||||||
|
Definition at line 161 of file NuMMRunNC2010.cxx. References NuMatrixSpectrum::DecayCC(), NuMatrixSpectrum::DecayNC(), NuMatrixSpectrum::Decohere(), NuMMParameters::Dm2(), NuMatrixSpectrum::InverseOscillate(), NuMatrixSpectrum::Oscillate(), and NuMMParameters::Sn2(). Referenced by FDPredictionMCTrueE(), and MakeFDPred(). 00163 {
00164 using namespace ENCTruth;
00165
00166 const double dm2 = pars.Dm2();
00167 const double sn2 = pars.Sn2();
00168
00169 switch(fDisappearanceModel){
00170 case 0:
00171 // NC oscillations are not observable
00172
00173 // TODO CJB Hardoded CPT conserving oscillations, since the fitter
00174 // TODO CJB doesn't seem to conserve CPT for us.
00175 ncPred[kCCmu].Oscillate(dm2, sn2);
00176 // ncPred[kCCmubar].Oscillate(pars.Dm2Bar(), pars.Sn2Bar());
00177 ncPred[kCCmubar].Oscillate(dm2, sn2);
00178 ncPred[kCCtau].InverseOscillate(dm2, sn2);
00179 // ncPred[kCCtaubar].InverseOscillate(pars.Dm2Bar(), pars.Sn2Bar());
00180 ncPred[kCCtaubar].InverseOscillate(dm2, sn2);
00181
00182 break;
00183 case 1:
00184 // TODO CJB - this makes true taus decay the same as true mus. Is that OK?
00185 // TODO CJB - for nubar analysis we should assume -ve neutrinos don't decay
00186 // TODO CJB - if the fitter is taught about CPT this will be easier
00187 // TODO CJB - This doesn't handle CC electron and tau events right - ought
00188 // TODO CJB - to be a small effect.
00189 for(int n = 0; n < kNumTruths; ++n){
00190 if(n == kNC || n == kNCbar)
00191 ncPred[n].DecayNC(dm2, sn2);
00192 else
00193 ncPred[n].DecayCC(dm2, sn2);
00194 }
00195
00196 break;
00197 case 2:
00198 // NC decoherence is not observable
00199
00200 // TODO CJB is this enough?
00201 ncPred[kCCmu].Decohere(dm2, sn2);
00202 // ncPred[kCCmubar].Decohere(pars.Dm2Bar(), pars.Sn2Bar());
00203 ncPred[kCCmubar].Decohere(dm2, sn2);
00204
00205 break;
00206 default:
00207 cout << "Badly configured disappearance model. "
00208 << endl;
00209 break;
00210 }
00211 }
|
|
|
Definition at line 56 of file NuMMRunNC2010.h. References fExtrapMode. 00056 {fExtrapMode = m;}
|
|
|
Definition at line 27 of file NuMMRunNC2010.h. References fSingleNCBin. 00027 {fSingleNCBin = val;}
|
|
|
Implements NuMMRun. Definition at line 51 of file NuMMRunNC2010.cxx. 00052 {
00053 // The order of these histograms is chosen to match those in RunCC2010
00054 vector<TH1D> vHistos;
00055
00056 TH1D blank;
00057
00058 vHistos.push_back(*fNDNCData->Spectrum()); // ND data
00059
00060 vHistos.push_back(*FDPredictionMCTrueE(pars).Spectrum()); // True E FD Pred
00061
00062 vHistos.push_back(blank); // NC-only prediction
00063
00064 vHistos.push_back(*MakeFDPred(pars).Spectrum()); // Full prediction
00065
00066 vHistos.push_back(blank); // FD taus
00067
00068 vHistos.push_back(blank); // FD CC bkg
00069
00070 vHistos.push_back(*fFDNCData->Spectrum()); // FD data
00071
00072 return vHistos;
00073 }
|
|
|
Definition at line 72 of file NuMMRunNC2010.h. Referenced by MakeFDPred(), and SetExtrapolationMode(). |
|
|
Definition at line 68 of file NuMMRunNC2010.h. |
|
|
Reimplemented from NuMMRun. Definition at line 70 of file NuMMRunNC2010.h. Referenced by MakeFDPred(). |
|
|
Definition at line 75 of file NuMMRunNC2010.h. Referenced by FDPredictionMCTrueE(), and MakeFDPred(). |
|
|
Definition at line 76 of file NuMMRunNC2010.h. Referenced by MakeFDPred(). |
|
|
Definition at line 69 of file NuMMRunNC2010.h. |
|
|
Definition at line 67 of file NuMMRunNC2010.h. Referenced by MakeFDPred(). |
|
|
Definition at line 65 of file NuMMRunNC2010.h. Referenced by UseSingleNCBin(). |
1.3.9.1