NuMMRunSterile Class Reference

#include <NuMMRunSterile.h>

Inheritance diagram for NuMMRunSterile:
NuMMRun

List of all members.

Public Types

enum  whichPred { CC, NC }
enum  whichDet { ND, FD }

Public Member Functions

 NuMMRunSterile ()
virtual ~NuMMRunSterile ()
void LoadHelpers (TFile *NDMC_file, TFile *FDMC_file)
void LoadData (TFile *NDData_file, TFile *FDData_file)
void SetPOT (double POT_)
TH1D * MakeDataHisto (SterileEvents *Evts)
virtual Double_t ComparePredWithData (const NuMMParameters &pars)
virtual std::vector< TH1D > WriteFDPredHistos (const NuMMParameters &pars) const
TH1D * FDPrediction (const NuMMParameters &pars, whichPred Pred)
TH1D * FDPrediction (NuXMLConfig *xml_config, whichPred Pred)
TH1D * MCOscillated (const NuMMParameters &pars, whichPred Pred, whichDet Det)
TH1D * MCOscillated (NuXMLConfig *xml_config, whichPred Pred, whichDet Det)
std::vector< float > Binning ()
int FindBin (float recoE)
void SetNoNC ()
void SetNoCC ()
void SetFitSysts (bool test=true)
void SetBinnedOsc (bool test=true)

Public Attributes

TH1D * oscTrueNC
TH1D * oscNuMu
TH1D * oscBeamNue
TH1D * oscAppNue
TH1D * oscAppNuTau
TH1D * FD_dataNC
TH1D * FD_dataCC
TH1D * ND_dataNC
TH1D * ND_dataCC
Bool_t fFitSysts
Bool_t fBinnedOsc

Private Member Functions

void cleanup ()
NuMMParameters XMLtoParameters (NuXMLConfig *xml_config)
void GetHistos ()
 ClassDef (NuMMRunSterile, 1)

Private Attributes

TFile * ND_MC
TFile * ND_data
TFile * FD_MC
TFile * FD_data
double fFDDataPOT
double fNDDataPOT
double fFDMCPOT
double fNDMCPOT
SterileEventsNDNCDataEvts
SterileEventsFDNCDataEvts
SterileEventsNDCCDataEvts
SterileEventsFDCCDataEvts
SterileEventsNDNCMCEvts
SterileEventsFDNCMCEvts
SterileEventsNDCCMCEvts
SterileEventsFDCCMCEvts
bool got_histos
bool fNoNC
bool fNoCC

Detailed Description

Definition at line 16 of file NuMMRunSterile.h.


Member Enumeration Documentation

Enumerator:
ND 
FD 

Definition at line 20 of file NuMMRunSterile.h.

00020 {ND, FD};

Enumerator:
CC 
NC 

Definition at line 19 of file NuMMRunSterile.h.

00019 {CC, NC};


Constructor & Destructor Documentation

NuMMRunSterile::NuMMRunSterile (  ) 

Definition at line 22 of file NuMMRunSterile.cxx.

00022                                :   
00023   oscTrueNC(0),      oscNuMu(0),       oscBeamNue(0),    oscAppNue(0),     oscAppNuTau(0),
00024   FD_dataNC(0),      FD_dataCC(0),     ND_dataNC(0),     ND_dataCC(0),
00025   ND_MC(0),          ND_data(0),       FD_MC(0),         FD_data(0),
00026   fFDDataPOT(0),     fNDDataPOT(0),    fFDMCPOT(0),      fNDMCPOT(0),
00027   NDNCDataEvts(0),   FDNCDataEvts(0),  NDCCDataEvts(0),  FDCCDataEvts(0),
00028   NDNCMCEvts(0),     FDNCMCEvts(0),    NDCCMCEvts(0),    FDCCMCEvts(0),
00029   got_histos(false), fNoNC(false),     fNoCC(false)
00030 
00031 {
00032 
00033   fFitSysts = false;
00034   fBinnedOsc = true;
00035 
00036 }

NuMMRunSterile::~NuMMRunSterile (  )  [virtual]

Definition at line 49 of file NuMMRunSterile.cxx.

References cleanup().

00050 {
00051   cleanup();
00052 }


Member Function Documentation

vector< float > NuMMRunSterile::Binning (  ) 

Definition at line 137 of file NuMMRunSterile.cxx.

Referenced by MakeDataHisto(), and MCOscillated().

00138 {
00139   std::vector<float> bins;
00140   //    bins.push_back(0.0);
00141   float low = 0.0;
00142   float high = 1.0;
00143   float width = 1.0;
00144   for(float binedge = low; binedge < high - (width/2.0); binedge += width)
00145     {
00146       bins.push_back(binedge);
00147     }
00148   low = 1.0;
00149   high = 5.0;
00150   width = 0.1;
00151   for(float binedge = low; binedge < high - (width/2.0); binedge += width)
00152     {
00153       bins.push_back(binedge);
00154     }
00155   low = 5.0;
00156   high = 20.0;
00157   width = 0.25;
00158   for(float binedge = low; binedge < high - (width/2.0); binedge += width)
00159     {
00160       bins.push_back(binedge);
00161     }
00162   low = 20.0;
00163   high = 30.0;
00164   width = 1.0;
00165   for(float binedge = low; binedge < high - (width/2.0); binedge += width)
00166     {
00167       bins.push_back(binedge);
00168     }
00169   low = 30.0;
00170   high = 50.0;
00171   width = 2.0;
00172   for(float binedge = low; binedge < high - (width/2.0); binedge += width)
00173     {
00174       bins.push_back(binedge);
00175     }
00176   bins.push_back(50.0);
00177   bins.push_back(200.0);
00178 
00179   //    cout << "binning" << endl;
00180   return bins;
00181 }

NuMMRunSterile::ClassDef ( NuMMRunSterile  ,
 
) [private]
void NuMMRunSterile::cleanup (  )  [private]

Definition at line 39 of file NuMMRunSterile.cxx.

References oscAppNue, oscAppNuTau, oscBeamNue, oscNuMu, and oscTrueNC.

Referenced by MCOscillated(), and ~NuMMRunSterile().

00040 {
00041   if(oscTrueNC)   { delete oscTrueNC;   oscTrueNC   = 0; }
00042   if(oscNuMu)     { delete oscNuMu;     oscNuMu     = 0; }
00043   if(oscBeamNue)  { delete oscBeamNue;  oscBeamNue  = 0; }
00044   if(oscAppNue)   { delete oscAppNue;   oscAppNue   = 0; }
00045   if(oscAppNuTau) { delete oscAppNuTau; oscAppNuTau = 0; }
00046 }

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

Implements NuMMRun.

Definition at line 210 of file NuMMRunSterile.cxx.

References CC, FD, FD_dataCC, FD_dataNC, fNoCC, fNoNC, GetHistos(), MCOscillated(), NC, ND, ND_dataCC, ND_dataNC, and NuMMRun::StatsLikelihood().

00211 {
00212   GetHistos();
00213 
00214   TH1D *NDOsc_NC = MCOscillated(pars, NC, ND);
00215   TH1D *FDOsc_NC = MCOscillated(pars, NC, FD);
00216   TH1D *NDOsc_CC = MCOscillated(pars, CC, ND);
00217   TH1D *FDOsc_CC = MCOscillated(pars, CC, FD);
00218 
00219   FDOsc_NC->Multiply(ND_dataNC);
00220   FDOsc_NC->Divide(NDOsc_NC);
00221   FDOsc_CC->Multiply(ND_dataCC);
00222   FDOsc_CC->Divide(NDOsc_CC);
00223 
00224   Double_t likelihood = 0.0;
00225 
00226   if (!fNoNC) likelihood += StatsLikelihood(FDOsc_NC, FD_dataNC);
00227   if (!fNoCC) likelihood += StatsLikelihood(FDOsc_CC, FD_dataCC);
00228         
00229   delete FDOsc_NC;
00230   delete FDOsc_CC;
00231 
00232   Double_t ndMCRate = 0;
00233   if(!fNoNC) ndMCRate += NDOsc_NC->Integral();
00234   if(!fNoCC) ndMCRate += NDOsc_CC->Integral();
00235   Double_t ndDataRate = 0;
00236   if(!fNoNC) ndDataRate += ND_dataNC->Integral();
00237   if(!fNoCC) ndDataRate += ND_dataCC->Integral();
00238 
00239 //  if (!fNoNC||!fNoCC) likelihood += 2*(ndMCRate - ndDataRate*(1 - log(ndDataRate/ndMCRate)));
00240 
00241 //  cout << "NC Rate: MC = " << ndMCRateNC << "; Data =  " << ndDataRateNC << endl;
00242 //  cout << "CC Rate: MC = " << ndMCRateCC << "; Data =  " << ndDataRateCC << endl;
00243 
00244   delete NDOsc_NC;
00245   delete NDOsc_CC;
00246         
00247   return likelihood;
00248 }

TH1D * NuMMRunSterile::FDPrediction ( NuXMLConfig xml_config,
whichPred  Pred 
)

Definition at line 299 of file NuMMRunSterile.cxx.

References FDPrediction(), and XMLtoParameters().

00300 {
00301   NuMMParameters pars = XMLtoParameters(xml_config);
00302   return FDPrediction(pars, Pred);
00303 }

TH1D * NuMMRunSterile::FDPrediction ( const NuMMParameters pars,
whichPred  Pred 
)

Definition at line 257 of file NuMMRunSterile.cxx.

References CC, FD, GetHistos(), MCOscillated(), NC, ND, ND_dataCC, ND_dataNC, oscAppNue, oscAppNuTau, oscBeamNue, oscNuMu, and oscTrueNC.

Referenced by FDPrediction().

00258 {
00259   GetHistos();
00260 
00261   TH1D *ND_dataE = 0;
00262   switch(Pred)
00263     {
00264     case NC:
00265       ND_dataE = ND_dataNC;
00266       break;
00267     case CC:
00268       ND_dataE = ND_dataCC;
00269       break;
00270     default:
00271       cout << "wrong pred type" << endl;
00272       break;
00273     }
00274   TH1D *cloneNDdata = (TH1D*)ND_dataE->Clone();
00275         
00276   TH1D *NDOsc_MC = MCOscillated(pars, Pred, ND);
00277   TH1D *FDOsc_MC = MCOscillated(pars, Pred, FD);
00278 
00279   //FDOsc_MC->Divide(NDOsc_MC);
00280   //FDOsc_MC->Multiply(ND_dataE);
00281 
00282   cloneNDdata->Divide(NDOsc_MC);
00283   FDOsc_MC->Multiply(cloneNDdata);
00284 
00285   oscTrueNC->Multiply(cloneNDdata);
00286   oscNuMu->Multiply(cloneNDdata);
00287   oscBeamNue->Multiply(cloneNDdata);
00288   oscAppNue->Multiply(cloneNDdata);
00289   oscAppNuTau->Multiply(cloneNDdata);
00290 
00291   delete NDOsc_MC;
00292   delete cloneNDdata;
00293 
00294   //    cout << "made pred" << endl;
00295   return FDOsc_MC;
00296 }

int NuMMRunSterile::FindBin ( float  recoE  ) 

Definition at line 184 of file NuMMRunSterile.cxx.

Referenced by MCOscillated().

00185 {
00186   int bin = -1;
00187 
00188   if(recoE<0.0) bin = 0;
00189   else if(recoE<1.0) bin = 1;
00190   else if(recoE<5.0){
00191     bin = int((recoE - 1.0)*10) + 2;
00192   }
00193   else if(recoE<20.0){
00194     bin = int((recoE - 5.0)*4) + 42;
00195   }
00196   else if(recoE<30.0){
00197     bin = int((recoE - 20.0)) + 102;
00198   }
00199   else if(recoE<50.0){
00200     bin = int((recoE - 30.0)/2) + 112;
00201   }
00202   else if(recoE<200.0)  bin = 122;
00203   else bin = 123;
00204 
00205   return bin;
00206 
00207 }

void NuMMRunSterile::GetHistos (  )  [private]

Definition at line 75 of file NuMMRunSterile.cxx.

References FD_data, FD_dataCC, FD_dataNC, FD_MC, FDCCDataEvts, FDCCMCEvts, FDNCDataEvts, FDNCMCEvts, fFDDataPOT, fFDMCPOT, fNDDataPOT, fNDMCPOT, got_histos, MakeDataHisto(), ND_data, ND_dataCC, ND_dataNC, ND_MC, NDCCDataEvts, NDCCMCEvts, NDNCDataEvts, and NDNCMCEvts.

Referenced by ComparePredWithData(), FDPrediction(), and MCOscillated().

00076 {
00077   if(got_histos) return;
00078 
00079   // GetObjects
00080   assert(FD_data);
00081   assert(ND_data);
00082   assert(ND_MC);
00083   assert(FD_MC);
00084 
00085   NDNCDataEvts = (SterileEvents*)ND_data->Get("fNCEvts"); assert(NDNCDataEvts);
00086   NDCCDataEvts = (SterileEvents*)ND_data->Get("fCCEvts"); assert(NDCCDataEvts);
00087 
00088   FDNCDataEvts = (SterileEvents*)FD_data->Get("fNCEvts"); assert(FDNCDataEvts);
00089   FDCCDataEvts = (SterileEvents*)FD_data->Get("fCCEvts"); assert(FDCCDataEvts);
00090 
00091   NDNCMCEvts = (SterileEvents*)ND_MC->Get("fNCEvts"); assert(NDNCMCEvts);
00092   NDCCMCEvts = (SterileEvents*)ND_MC->Get("fCCEvts"); assert(NDCCMCEvts);
00093 
00094   FDNCMCEvts = (SterileEvents*)FD_MC->Get("fNCEvts"); assert(FDNCMCEvts);
00095   FDCCMCEvts = (SterileEvents*)FD_MC->Get("fCCEvts"); assert(FDCCMCEvts);
00096 
00097   fNDDataPOT = ((TH1D*)ND_data->Get("hTotalPot"))->Integral();
00098   fNDMCPOT   = ((TH1D*)ND_MC->Get(  "hTotalPot"))->Integral();
00099   fFDMCPOT   = ((TH1D*)FD_MC->Get(  "hTotalPot"))->Integral();
00100 
00101   ND_dataNC = this->MakeDataHisto(NDNCDataEvts);
00102   ND_dataCC = this->MakeDataHisto(NDCCDataEvts);
00103   FD_dataNC = this->MakeDataHisto(FDNCDataEvts);
00104   FD_dataCC = this->MakeDataHisto(FDCCDataEvts);
00105 
00106   ND_dataNC->Scale(fFDDataPOT/fNDDataPOT);
00107   ND_dataCC->Scale(fFDDataPOT/fNDDataPOT);
00108 
00109   got_histos = true;
00110 
00111   //    cout << "got all histos" << endl;
00112 }

void NuMMRunSterile::LoadData ( TFile *  NDData_file,
TFile *  FDData_file 
)

Definition at line 62 of file NuMMRunSterile.cxx.

References FD_data, and ND_data.

00063 {
00064   ND_data = NDData_file;
00065   FD_data = FDData_file;
00066 }

void NuMMRunSterile::LoadHelpers ( TFile *  NDMC_file,
TFile *  FDMC_file 
)

Definition at line 55 of file NuMMRunSterile.cxx.

References FD_MC, and ND_MC.

00056 {
00057   ND_MC = NDMC_file;
00058   FD_MC = FDMC_file;
00059 }

TH1D * NuMMRunSterile::MakeDataHisto ( SterileEvents Evts  ) 

Definition at line 115 of file NuMMRunSterile.cxx.

References Binning(), nentries, and SterileEvents::Vec.

Referenced by GetHistos().

00116 {
00117 
00118   std::vector<float> binedges = Binning();
00119 
00120   TH1D* dataHisto = new TH1D("","",binedges.size()-1,binedges.data());
00121 
00122   int nentries = Evts->Vec.size();
00123 
00124   cout << "Running over " << nentries << " data events" << endl;
00125 
00126   for(int i = 0; i < nentries; i++){
00127 
00128     dataHisto->Fill(Evts->Vec[i].recoE,Evts->Vec[i].evtW);
00129 
00130   }//End tree loop
00131 
00132   return dataHisto;
00133 
00134 }

TH1D * NuMMRunSterile::MCOscillated ( NuXMLConfig xml_config,
whichPred  Pred,
whichDet  Det 
)

Definition at line 490 of file NuMMRunSterile.cxx.

References MCOscillated(), and XMLtoParameters().

00491 {
00492   NuMMParameters pars = XMLtoParameters(xml_config);
00493   return MCOscillated(pars, Pred, Det);
00494 }

TH1D * NuMMRunSterile::MCOscillated ( const NuMMParameters pars,
whichPred  Pred,
whichDet  Det 
)

Definition at line 306 of file NuMMRunSterile.cxx.

References NuMMParameters::AbsShwNC(), Binning(), CC, NuMMParameters::CCBack(), cleanup(), NuMMParameters::Delta1(), NuMMParameters::Delta2(), NuMMParameters::Delta3(), NuMMParameters::Dm221(), NuMMParameters::Dm232(), NuMMParameters::Dm243(), fBinnedOsc, FD, FDCCMCEvts, NuMMParameters::FDClean(), NuMMParameters::FDCosmic(), FDNCMCEvts, fFDDataPOT, fFDMCPOT, fFitSysts, FindBin(), fNDMCPOT, NuOscProbCalc::SterileProb::FourFlavourProbability(), GetHistos(), k1267, NC, NuMMParameters::NCBackgroundScale(), ND, NDCCMCEvts, NuMMParameters::NDClean(), NDNCMCEvts, nentries, NuMMParameters::Normalisation(), NuMMParameters::NormNC(), oscAppNue, oscAppNuTau, oscBeamNue, oscNuMu, oscTrueNC, NuMMParameters::RelShwNC(), NuOscProbCalc::SterileProb::SetFourFlavourParams(), NuMMParameters::ShwEnScale(), NuMMParameters::Theta12(), NuMMParameters::Theta13(), NuMMParameters::Theta14(), NuMMParameters::Theta23(), NuMMParameters::Theta24(), NuMMParameters::Theta34(), NuMMParameters::TrkEnScale(), and SterileEvents::Vec.

Referenced by ComparePredWithData(), FDPrediction(), and MCOscillated().

00307 {
00308 
00309   GetHistos();
00310   cleanup();
00311 
00312   std::vector<float> binedges = Binning();
00313 
00314   oscTrueNC = new TH1D("","",binedges.size()-1,binedges.data());
00315 
00316   oscNuMu     = (TH1D*) oscTrueNC->Clone();
00317   oscBeamNue  = (TH1D*) oscTrueNC->Clone();
00318   oscAppNue   = (TH1D*) oscTrueNC->Clone();
00319   oscAppNuTau = (TH1D*) oscTrueNC->Clone();
00320 
00321   SterileEvents *Evts = 0;
00322 
00323   if(Pred==NC){
00324     if(Det==ND)      Evts = NDNCMCEvts;
00325     else if(Det==FD) Evts = FDNCMCEvts;
00326   }
00327   if(Pred==CC){
00328     if(Det==ND)      Evts = NDCCMCEvts;
00329     else if(Det==FD) Evts = FDCCMCEvts;
00330   }
00331 
00332   NuOscProbCalc::SterileProb *probCalc = new NuOscProbCalc::SterileProb();
00333   probCalc->SetFourFlavourParams( pars.Dm232(),   pars.Theta23(), pars.Dm221(),
00334                                   pars.Dm243(),   pars.Theta12(), pars.Theta13(),
00335                                   pars.Theta14(), pars.Theta24(), pars.Theta34(), 
00336                                   pars.Delta1(),  pars.Delta2(),  pars.Delta3() );
00337 
00338   int nentries = Evts->Vec.size();
00339 
00340   vector<float> TrueNCArray(binedges.size()+1,0);
00341   vector<float> NuMuArray(binedges.size()+1,0);
00342   vector<float> BeamNueArray(binedges.size()+1,0);
00343   vector<float> AppNueArray(binedges.size()+1,0);
00344   vector<float> AppNuTauArray(binedges.size()+1,0);
00345 
00346   const int nbinscache = 2000;
00347 
00348   vector<float> probinit(nbinscache,1);
00349   vector< vector<float> > probcache(6,probinit);
00350 
00351   float minloe = 0;
00352   float maxloe = -1;
00353   if(Det==ND) maxloe = 4000;
00354   else        maxloe = 4e6;
00355 /*
00356   for(int i = 0; i < nentries; i++){
00357 
00358     float loe = Evts->Vec[i].trueL / Evts->Vec[i].trueE;
00359     if(loe>maxloe) maxloe = loe;
00360 
00361   }
00362 */
00363 //  cout << minloe << " - " << maxloe << endl;
00364 
00365   const double k1267 = 1.26693276;
00366   const double W = (maxloe - minloe)/nbinscache;
00367   const double arg = k1267*pars.Dm243()*W; // half-period of oscillation
00368   double sample = W/2/sqrt(3);
00369   if(arg!=0) sample = TMath::ACos(TMath::Sin(arg)/arg)/arg*W/2;
00370 
00371   for(int i = 0; i<nbinscache; i++){
00372     double loelow = minloe + W*(i+0.5) - sample;
00373     double loehigh = minloe + W*(i+0.5) + sample;
00374 
00375     for(int flvi=12;flvi<=14;flvi+=2){
00376     for(int flvf=12;flvf<=16;flvf+=2){
00377       int idx = ((flvi-12)*3+(flvf-12))/2;
00378       probcache[idx][i] = 0.5*probCalc->FourFlavourProbability(flvi,flvf,1,loelow);
00379       probcache[idx][i] += 0.5*probCalc->FourFlavourProbability(flvi,flvf,1,loehigh);
00380     }}
00381 
00382   }
00383 
00384 
00385 //  cout << "Running over " << nentries << " MC events" << endl;
00386 
00387 //  TRandom3 Rndm3(0);
00388 
00389   for(int i = 0; i < nentries; i++){
00390 
00391 //    if(Rndm3.Rndm()>2.0e5/nentries) continue;
00392 
00393     float evtW = Evts->Vec[i].evtW;
00394     float recoE = Evts->Vec[i].recoE;
00395 
00396     if(evtW<=0) continue;
00397 
00398     if(fFitSysts){
00399 
00400       if(Pred==NC){
00401         evtW *= pars.NormNC();
00402         evtW *= 1 + Evts->Vec[i].ndCleanW*pars.NDClean();
00403         evtW *= 1 + Evts->Vec[i].fdCleanW*pars.FDClean();
00404         evtW *= 1 + Evts->Vec[i].fdCosmicW*pars.FDCosmic();
00405         if(Evts->Vec[i].iaction!=0) evtW *= 1 + 0.15*pars.CCBack();
00406         recoE += Evts->Vec[i].absShwdE*pars.AbsShwNC();
00407         recoE += Evts->Vec[i].relShwdE*pars.RelShwNC();
00408       }
00409       else{
00410         evtW *= pars.Normalisation();
00411         if(Evts->Vec[i].iaction==0) evtW *= pars.NCBackgroundScale();
00412         recoE += Evts->Vec[i].shwdE*pars.ShwEnScale();
00413         recoE += Evts->Vec[i].trkdE*pars.TrkEnScale();
00414       }
00415 
00416     }
00417 
00418 
00419     if(evtW<=0) continue;
00420 
00421     int idx = ((TMath::Abs(Evts->Vec[i].inunoosc)-12)*3 + (TMath::Abs(Evts->Vec[i].inu)-12))/2;
00422 
00423 //    evtW *= probcache[idx][TMath::Min(int(((Evts->Vec[i].trueE/Evts->Vec[i].trueL) - minloe)/W),nbinscache-1)];
00424     if(fBinnedOsc) evtW *= probcache[idx][int(((Evts->Vec[i].trueL/Evts->Vec[i].trueE) - minloe)/W)];
00425     else evtW *= probCalc->FourFlavourProbability(Evts->Vec[i].inunoosc,Evts->Vec[i].inu,Evts->Vec[i].trueE,Evts->Vec[i].trueL);
00426 
00427 
00428     if(evtW<=0) continue;
00429 
00430 //    int binx = TMath::BinarySearch(binedges.size(),binedges.data(),recoE);
00431     int binx = this->FindBin(recoE);
00432 
00433 //    if(binx<0||binx>=TrueNCArray.size()){
00434 //        cout << binx << " " << recoE << endl;
00435 //        continue;
00436 //      }
00437 
00438 //    TrueNCArray[binx] += evtW;
00439 
00440     if(Evts->Vec[i].iaction==0){ TrueNCArray[binx] += evtW; }
00441     else if(TMath::Abs(Evts->Vec[i].inu)==14){ NuMuArray[binx] += evtW; }
00442     else if(TMath::Abs(Evts->Vec[i].inu)==12){
00443       if(TMath::Abs(Evts->Vec[i].inunoosc)==12){
00444         BeamNueArray[binx] += evtW;
00445       }
00446       else{
00447         AppNueArray[binx] += evtW;
00448       }
00449     }
00450     else if(TMath::Abs(Evts->Vec[i].inu)==16){ AppNuTauArray[binx] += evtW; }
00451     else{ cout << "Unidentified inu = " << Evts->Vec[i].inu << ". Not including anywhere." << endl; }
00452 
00453 
00454   }//End tree loop
00455 
00456   for(int i = 0; i<int(NuMuArray.size()); i++){
00457     oscTrueNC->SetBinContent(i,TrueNCArray[i]);
00458     oscNuMu->SetBinContent(i,NuMuArray[i]);
00459     oscBeamNue->SetBinContent(i,BeamNueArray[i]);
00460     oscAppNue->SetBinContent(i,AppNueArray[i]);
00461     oscAppNuTau->SetBinContent(i,AppNuTauArray[i]);
00462   }
00463 
00464   if(Det==ND){
00465     oscTrueNC->Scale(fFDDataPOT/fNDMCPOT);
00466     oscNuMu->Scale(fFDDataPOT/fNDMCPOT);
00467     oscBeamNue->Scale(fFDDataPOT/fNDMCPOT);
00468     oscAppNue->Scale(fFDDataPOT/fNDMCPOT);
00469     oscAppNuTau->Scale(fFDDataPOT/fNDMCPOT);
00470   }
00471   else{
00472     oscTrueNC->Scale(fFDDataPOT/fFDMCPOT);
00473     oscNuMu->Scale(fFDDataPOT/fFDMCPOT);
00474     oscBeamNue->Scale(fFDDataPOT/fFDMCPOT);
00475     oscAppNue->Scale(fFDDataPOT/fFDMCPOT);
00476     oscAppNuTau->Scale(fFDDataPOT/fFDMCPOT);
00477   }
00478 
00479   TH1D *oscSum = (TH1D*)oscTrueNC->Clone("");
00480   oscSum->Add(oscNuMu);
00481   oscSum->Add(oscBeamNue);
00482   oscSum->Add(oscAppNue);
00483   oscSum->Add(oscAppNuTau);
00484 
00485   return oscSum;
00486 
00487 }

void NuMMRunSterile::SetBinnedOsc ( bool  test = true  )  [inline]

Definition at line 59 of file NuMMRunSterile.h.

References fBinnedOsc.

00059 { fBinnedOsc = test; }

void NuMMRunSterile::SetFitSysts ( bool  test = true  )  [inline]

Definition at line 58 of file NuMMRunSterile.h.

References fFitSysts.

00058 { fFitSysts = test; }

void NuMMRunSterile::SetNoCC (  )  [inline]

Definition at line 48 of file NuMMRunSterile.h.

References fNoCC.

00048 {fNoCC = true;}

void NuMMRunSterile::SetNoNC (  )  [inline]

Definition at line 47 of file NuMMRunSterile.h.

References fNoNC.

00047 {fNoNC = true;}

void NuMMRunSterile::SetPOT ( double  POT_  ) 

Definition at line 69 of file NuMMRunSterile.cxx.

References fFDDataPOT.

00070 {
00071   fFDDataPOT = POT_;
00072 }

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

Implements NuMMRun.

Definition at line 251 of file NuMMRunSterile.cxx.

00252 {
00253   return std::vector<TH1D>();
00254 }

NuMMParameters NuMMRunSterile::XMLtoParameters ( NuXMLConfig xml_config  )  [private]

Definition at line 497 of file NuMMRunSterile.cxx.

References NuMMParameters::Delta1(), NuXMLConfig::Delta1(), NuMMParameters::Delta2(), NuXMLConfig::Delta2(), NuMMParameters::Dm2(), NuMMParameters::Dm221(), NuXMLConfig::DM221(), NuMMParameters::Dm243(), NuXMLConfig::DM243(), NuXMLConfig::DM2Nu(), NuXMLConfig::Theta12(), NuMMParameters::Theta12(), NuXMLConfig::Theta13(), NuMMParameters::Theta13(), NuXMLConfig::Theta14(), NuMMParameters::Theta14(), NuMMParameters::Theta23(), NuXMLConfig::Theta23(), NuMMParameters::Theta24(), NuXMLConfig::Theta24(), NuXMLConfig::Theta34(), and NuMMParameters::Theta34().

Referenced by FDPrediction(), and MCOscillated().

00498 {
00499   NuMMParameters pars;
00500   // set pars to xml_config
00501   pars.Dm2(     xml_config->DM2Nu());
00502   pars.Theta23( xml_config->Theta23());
00503   pars.Dm221(   xml_config->DM221());
00504   pars.Dm243(   xml_config->DM243());
00505   pars.Delta1(  xml_config->Delta1());
00506   pars.Delta2(  xml_config->Delta2());
00507   pars.Theta12( xml_config->Theta12());
00508   pars.Theta13( xml_config->Theta13());
00509   pars.Theta14( xml_config->Theta14());
00510   pars.Theta24( xml_config->Theta24());
00511   pars.Theta34( xml_config->Theta34());
00512   return pars;
00513 }


Member Data Documentation

Definition at line 63 of file NuMMRunSterile.h.

Referenced by MCOscillated(), and SetBinnedOsc().

TFile * NuMMRunSterile::FD_data [private]

Definition at line 70 of file NuMMRunSterile.h.

Referenced by GetHistos(), and LoadData().

Definition at line 56 of file NuMMRunSterile.h.

Referenced by ComparePredWithData(), and GetHistos().

Definition at line 56 of file NuMMRunSterile.h.

Referenced by ComparePredWithData(), and GetHistos().

TFile* NuMMRunSterile::FD_MC [private]

Definition at line 70 of file NuMMRunSterile.h.

Referenced by GetHistos(), and LoadHelpers().

Definition at line 78 of file NuMMRunSterile.h.

Referenced by GetHistos().

Definition at line 83 of file NuMMRunSterile.h.

Referenced by GetHistos(), and MCOscillated().

Definition at line 76 of file NuMMRunSterile.h.

Referenced by GetHistos().

Definition at line 81 of file NuMMRunSterile.h.

Referenced by GetHistos(), and MCOscillated().

double NuMMRunSterile::fFDDataPOT [private]

Definition at line 72 of file NuMMRunSterile.h.

Referenced by GetHistos(), MCOscillated(), and SetPOT().

double NuMMRunSterile::fFDMCPOT [private]

Definition at line 73 of file NuMMRunSterile.h.

Referenced by GetHistos(), and MCOscillated().

Definition at line 62 of file NuMMRunSterile.h.

Referenced by MCOscillated(), and SetFitSysts().

double NuMMRunSterile::fNDDataPOT [private]

Definition at line 72 of file NuMMRunSterile.h.

Referenced by GetHistos().

double NuMMRunSterile::fNDMCPOT [private]

Definition at line 73 of file NuMMRunSterile.h.

Referenced by GetHistos(), and MCOscillated().

bool NuMMRunSterile::fNoCC [private]

Definition at line 87 of file NuMMRunSterile.h.

Referenced by ComparePredWithData(), and SetNoCC().

bool NuMMRunSterile::fNoNC [private]

Definition at line 87 of file NuMMRunSterile.h.

Referenced by ComparePredWithData(), and SetNoNC().

Definition at line 86 of file NuMMRunSterile.h.

Referenced by GetHistos().

TFile * NuMMRunSterile::ND_data [private]

Definition at line 69 of file NuMMRunSterile.h.

Referenced by GetHistos(), and LoadData().

Definition at line 56 of file NuMMRunSterile.h.

Referenced by ComparePredWithData(), FDPrediction(), and GetHistos().

Definition at line 56 of file NuMMRunSterile.h.

Referenced by ComparePredWithData(), FDPrediction(), and GetHistos().

TFile* NuMMRunSterile::ND_MC [private]

Definition at line 69 of file NuMMRunSterile.h.

Referenced by GetHistos(), and LoadHelpers().

Definition at line 77 of file NuMMRunSterile.h.

Referenced by GetHistos().

Definition at line 82 of file NuMMRunSterile.h.

Referenced by GetHistos(), and MCOscillated().

Definition at line 75 of file NuMMRunSterile.h.

Referenced by GetHistos().

Definition at line 80 of file NuMMRunSterile.h.

Referenced by GetHistos(), and MCOscillated().

Definition at line 53 of file NuMMRunSterile.h.

Referenced by cleanup(), FDPrediction(), and MCOscillated().

Definition at line 54 of file NuMMRunSterile.h.

Referenced by cleanup(), FDPrediction(), and MCOscillated().

Definition at line 52 of file NuMMRunSterile.h.

Referenced by cleanup(), FDPrediction(), and MCOscillated().

Definition at line 51 of file NuMMRunSterile.h.

Referenced by cleanup(), FDPrediction(), and MCOscillated().

Definition at line 50 of file NuMMRunSterile.h.

Referenced by cleanup(), FDPrediction(), and MCOscillated().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1