Page MenuHomeHEPForge

No OneTemporary

diff --git a/src/T2K/T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform.cxx b/src/T2K/T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform.cxx
index 448edc5..94277b2 100644
--- a/src/T2K/T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform.cxx
+++ b/src/T2K/T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform.cxx
@@ -1,225 +1,226 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
#include "T2K_SignalDef.h"
#include "T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform.h"
//********************************************************************
T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform::T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform sample. \n" \
"Target: CH \n" \
"Flux: T2K 2.5 degree off-axis (ND280) \n" \
"Signal: CC0piNp (N>=1) with p_p>500MeV \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("P_{p} (GeV)");
fSettings.SetYTitle("cos#theta_{p}");
fSettings.SetZTitle("cos#theta_{#mu}");
//fSettings.SetZTitle("d^{2}#sigma/dP_{#mu}dcos#theta_{#mu} (cm^{2}/GeV)");
fSettings.SetAllowedTypes("FULL,DIAG/FREE,SHAPE,FIX/SYSTCOV/STATCOV","FIX/FULL");
fSettings.SetEnuRange(0.0, 10.0);
fSettings.DefineAllowedTargets("C,H");
fAnalysis = 1;
// CCQELike plot information
fSettings.SetTitle("T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform");
fSettings.DefineAllowedSpecies("numu");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
//fScaleFactor = ((GetEventHistogram()->Integral("width")/(fNEvents+0.)) * 1E-38 / (TotalIntegratedFlux()));
fScaleFactor = ((GetEventHistogram()->Integral("width")/(fNEvents+0.)) * 10 / (TotalIntegratedFlux()));
// Setup Histograms
SetHistograms();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
bool T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform::isSignal(FitEvent *event){
return SignalDef::isT2K_CC0pi1p(event, EnuMin, EnuMax);
};
void T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform::FillEventVariables(FitEvent* event){
if (event->NumFSParticle(13) == 0 || event->NumFSParticle(2212) == 0)
return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
TLorentzVector Pp = event->GetHMFSParticle(2212)->fP;
- double pmu = Pmu.Vect().Mag()/1000.;
+ //double pmu = Pmu.Vect().Mag()/1000.;
double pp = Pp.Vect().Mag()/1000.;
double CosThetaMu = cos(Pnu.Vect().Angle(Pmu.Vect()));
double CosThetaP = cos(Pnu.Vect().Angle(Pp.Vect()));
fXVar = pp;
fYVar = CosThetaP;
fZVar = CosThetaMu;
return;
};
void T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform::FillHistograms(){
Measurement1D::FillHistograms();
if (Signal){
fMCHist_Fine2D->Fill( fXVar, fYVar, Weight );
FillMCSlice( fXVar, fYVar, fZVar, Weight );
}
}
// Modification is needed after the full reconfigure to move bins around
// Otherwise this would need to be replaced by a TH2Poly which is too awkward.
void T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform::ConvertEventRates(){
for (int i = 0; i < 4; i++){
fMCHist_Slices[i]->GetSumw2();
}
// Do standard conversion.
Measurement1D::ConvertEventRates();
// First scale MC slices also by their width in Y and Z
//MCHist_Slices[0]->Scale(1.0 / 1.00);
//MCHist_Slices[1]->Scale(1.0 / 0.60);
//MCHist_Slices[2]->Scale(1.0 / 0.10);
//MCHist_Slices[3]->Scale(1.0 / 0.10);
// Now Convert into 1D list
fMCHist->Reset();
int bincount = 0;
for (int i = 0; i < 4; i++){
for (int j = 0; j < fDataHist_Slices[i]->GetNumberOfBins(); j++){
fMCHist->SetBinContent(bincount+1, fMCHist_Slices[i]->GetBinContent(j+1));
//fMCHist->SetBinError(bincount+1, fMCHist_Slices[i]->GetBinError(j+1));
bincount++;
}
}
return;
}
void T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform::FillMCSlice(double x, double y, double z, double w){
if (z >= -1.0 and z < -0.3) fMCHist_Slices[0]->Fill(y,x,w);
else if (z >= -0.3 and z < 0.3) fMCHist_Slices[1]->Fill(y,x,w);
else if (z >= 0.3 and z < 0.8) fMCHist_Slices[2]->Fill(y,x,w);
else if (z >= 0.8 and z < 1.0) fMCHist_Slices[3]->Fill(y,x,w);
}
void T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform::SetHistograms(){
// Read in 1D Data Histograms
- fInputFile = new TFile( (FitPar::GetDataBase() + "/T2K/CC0pi/multidif_3D_pcoscos.root").c_str(),"READ");
- fInputFile->ls();
+ fInputFile = new TFile( (FitPar::GetDataBase() + "/T2K/CC0pi/STV/multidif_3D_pcoscos.root").c_str(),"READ");
+ //fInputFile->ls();
// Read in 1D Data
fDataHist = (TH1D*) fInputFile->Get("LinResult");
fMCHist_Fine2D = new TH2D("T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform_Fine2D","T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform_Fine2D", 400, 0.0,30.0,100,-1.0,1.0);
SetAutoProcessTH1(fMCHist_Fine2D);
TH2D* tempcov = (TH2D*) fInputFile->Get("CovMatrix");
fFullCovar = new TMatrixDSym(fDataHist->GetNbinsX());
for (int i = 0; i < fDataHist->GetNbinsX(); i++){
for (int j = 0; j < fDataHist->GetNbinsX(); j++){
//(*fFullCovar)(i,j) = tempcov->GetBinContent(i+1, j+1);
(*fFullCovar)(i,j) = tempcov->GetBinContent(i+1,j+1)*fDataHist->GetBinContent(i+1)*fDataHist->GetBinContent(j+1);
if(i==j) fDataHist->SetBinError(i+1,sqrt((*fFullCovar)(i,j)));
- if(i==j) std::cout << "For bin " << i+1 << ", relative covariance was " << tempcov->GetBinContent(i+1,j+1);
- if(i==j) std::cout << ". Absolute covariance is now " << (*fFullCovar)(i,j) << ", linear xsec is: " << fDataHist->GetBinContent(i+1) << std::endl; }
+ //if(i==j) std::cout << "For bin " << i+1 << ", relative covariance was " << tempcov->GetBinContent(i+1,j+1);
+ //if(i==j) std::cout << ". Absolute covariance is now " << (*fFullCovar)(i,j) << ", linear xsec is: " << fDataHist->GetBinContent(i+1) << std::endl;
+ }
}
covar = StatUtils::GetInvert(fFullCovar);
fDecomp = StatUtils::GetDecomp(fFullCovar);
TH1D* linearResult = new TH1D(*fDataHist);
linearResult->SetNameTitle("T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform_data" ,"T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform_data");
SetAutoProcessTH1(linearResult, kCMD_Write);
-
+
// Read in 3D Data
-// for (int c = 0; c < 4; c++){
-// fDataPoly[c] = (TH2Poly*) fInputFile->Get(Form("dataslice_%i",c));
-// fDataPoly[c]->SetNameTitle(Form("T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform_datapoly_%i",c),Form("T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform_datapoly_%i",c));
-// SetAutoProcessTH1(fDataPoly[c], kCMD_Write);
-// fDataHist->Reset();
-// }
-
+ // for (int c = 0; c < 4; c++){
+ // fDataPoly[c] = (TH2Poly*) fInputFile->Get(Form("dataslice_%i",c));
+ // fDataPoly[c]->SetNameTitle(Form("T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform_datapoly_%i",c),Form("T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform_datapoly_%i",c));
+ // SetAutoProcessTH1(fDataPoly[c], kCMD_Write);
+ // fDataHist->Reset();
+ // }
+
// Read in 2D Data Slices and Make MC Slices
fDataHist->Reset();
int bincount = 0;
for (int i = 0; i < 4; i++){ //both y and z slices
-
+
// Get Data Histogram
- fInputFile->ls();
+ //fInputFile->ls();
fDataHist_Slices.push_back((TH2Poly*)fInputFile->Get(Form("dataslice_%i",i))->Clone());
fDataHist_Slices[i]->SetNameTitle(Form("T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform_data_Slice%i",i), (Form("T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform_data_Slice%i",i)));
for (int j = 0; j < fDataHist_Slices[i]->GetNumberOfBins(); j++){
fDataHist_Slices[i]->SetBinError(j, sqrt(tempcov->GetBinContent(bincount,bincount)));
fDataHist->SetBinContent(bincount+1, fDataHist_Slices[i]->GetBinContent(j+1));
fDataHist->SetBinError(bincount+1, fDataHist_Slices[i]->GetBinError(j+1));
bincount++;
}
// Loop over nbins and set errors from covar
-// for (int j = 0; j < fDataHist_Slices[i]->GetNbinsX(); j++){
-// for (int k = 0; k < fDataHist_Slices[i]->GetNbinsY(); k++){
-// fDataHist_Slices[i]->SetBinError(j+1, k+1, sqrt((*fFullCovar)(bincount,bincount)) * 1E-38);
-//
-// std::cout << "Setting data hist " << fDataHist_Slices[i]->GetBinContent(j+1,k+1) << " " << fDataHist_Slices[i]->GetBinError(j+1,k+1) << std::endl;
-// fDataHist->SetBinContent(bincount+1, fDataHist_Slices[i]->GetBinContent(j+1,k+1) );
-// fDataHist->SetBinError(bincount+1, fDataHist_Slices[i]->GetBinError(j+1,k+1) );
-//
-// bincount++;
-// }
-// }
+ // for (int j = 0; j < fDataHist_Slices[i]->GetNbinsX(); j++){
+ // for (int k = 0; k < fDataHist_Slices[i]->GetNbinsY(); k++){
+ // fDataHist_Slices[i]->SetBinError(j+1, k+1, sqrt((*fFullCovar)(bincount,bincount)) * 1E-38);
+ //
+ // std::cout << "Setting data hist " << fDataHist_Slices[i]->GetBinContent(j+1,k+1) << " " << fDataHist_Slices[i]->GetBinError(j+1,k+1) << std::endl;
+ // fDataHist->SetBinContent(bincount+1, fDataHist_Slices[i]->GetBinContent(j+1,k+1) );
+ // fDataHist->SetBinError(bincount+1, fDataHist_Slices[i]->GetBinError(j+1,k+1) );
+ //
+ // bincount++;
+ // }
+ // }
// Make MC Clones
fMCHist_Slices.push_back((TH2Poly*) fDataHist_Slices[i]->Clone());
fMCHist_Slices[i]->SetNameTitle(Form("T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform_MC_Slice%i",i), (Form("T2K_CC0pi1p_XSec_3DPcoscos_nu_nonuniform_MC_Slice%i",i)));
SetAutoProcessTH1(fDataHist_Slices[i],kCMD_Write);
SetAutoProcessTH1(fMCHist_Slices[i]);
fMCHist_Slices[i]->ClearBinContents();
}
return;
};
diff --git a/src/T2K/T2K_CC0pi_XSec_2DPcos_nu.cxx b/src/T2K/T2K_CC0pi_XSec_2DPcos_nu.cxx
index f333b23..5f7de04 100644
--- a/src/T2K/T2K_CC0pi_XSec_2DPcos_nu.cxx
+++ b/src/T2K/T2K_CC0pi_XSec_2DPcos_nu.cxx
@@ -1,164 +1,164 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
#include "T2K_SignalDef.h"
#include "T2K_CC0pi_XSec_2DPcos_nu.h"
//********************************************************************
T2K_CC0pi_XSec_2DPcos_nu::T2K_CC0pi_XSec_2DPcos_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "T2K_CC0pi_XSec_2DPcos_nu sample. \n" \
"Target: CH \n" \
"Flux: MINERvA Medium Energy FHC numu \n" \
"Signal: CC-inclusive with theta < 20deg \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("P_{#mu} (GeV)");
fSettings.SetYTitle("cos#theta_{#mu}");
fSettings.SetZTitle("d^{2}#sigma/dP_{#mu}dcos#theta_{#mu} (cm^{2}/GeV)");
fSettings.SetAllowedTypes("DIAG,FULL/FREE,SHAPE,FIX/SYSTCOV/STATCOV","FIX");
fSettings.SetEnuRange(0.0, 10.0);
fSettings.DefineAllowedTargets("C,H");
- if (fName == "T2K_CC0pi_XSec_2DPcos_nu_I") fAnalysis = 1;
+ if (fName == "T2K_CC0pi_XSec_2DPcos_nu_I") fAnalysis = 1;
else fAnalysis = 2;
// CCQELike plot information
fSettings.SetTitle("T2K_CC0pi_XSec_2DPcos_nu");
fSettings.DefineAllowedSpecies("numu");
forwardgoing = (fSettings.GetS("type").find("REST") != std::string::npos);
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = ((GetEventHistogram()->Integral("width")/(fNEvents+0.)) * 1E-38 / (TotalIntegratedFlux()));
// Setup Histograms
SetHistograms();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
bool T2K_CC0pi_XSec_2DPcos_nu::isSignal(FitEvent *event){
return SignalDef::isT2K_CC0pi(event, EnuMin, EnuMax, forwardgoing);
};
void T2K_CC0pi_XSec_2DPcos_nu::FillEventVariables(FitEvent* event){
if (event->NumFSParticle(13) == 0)
return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
double pmu = Pmu.Vect().Mag()/1000.;
double CosThetaMu = cos(Pnu.Vect().Angle(Pmu.Vect()));
fXVar = pmu;
fYVar = CosThetaMu;
return;
};
void T2K_CC0pi_XSec_2DPcos_nu::SetHistograms(){
fIsSystCov = fSettings.GetS("type").find("SYSTCOV") != std::string::npos;
fIsStatCov = fSettings.GetS("type").find("STATCOV") != std::string::npos;
fIsNormCov = fSettings.GetS("type").find("NORMCOV") != std::string::npos;
fNDataPointsX = 12;
fNDataPointsY = 10;
// Open file
std::string infile = FitPar::GetDataBase()+"/T2K/CC0pi/T2K_CC0PI_2DPmuCosmu_Data.root";
TFile* rootfile = new TFile(infile.c_str(), "READ");
TH2D* tempcov = NULL;
// ANALYSIS 2
if (fAnalysis == 2){
// Get Data
fDataHist = (TH2D*) rootfile->Get("analysis2_data");
fDataHist->SetDirectory(0);
fDataHist->SetNameTitle((fName + "_data").c_str(),
- (fName + "_data" + fPlotTitles).c_str());
+ (fName + "_data" + fPlotTitles).c_str());
// Get Map
fMapHist = (TH2I*) rootfile->Get("analysis2_map");
fMapHist->SetDirectory(0);
fMapHist->SetNameTitle((fName + "_map").c_str(),
- (fName + "_map" + fPlotTitles).c_str());
+ (fName + "_map" + fPlotTitles).c_str());
// Get Syst/Stat Covar
TH2D* tempsyst = (TH2D*) rootfile->Get("analysis2_systcov");
TH2D* tempstat = (TH2D*) rootfile->Get("analysis2_statcov");
TH2D* tempnorm = (TH2D*) rootfile->Get("analysis2_normcov");
// Create covar [Default is both]
tempcov = (TH2D*) tempsyst->Clone();
tempcov->Reset();
if (fIsSystCov) tempcov->Add(tempsyst);
if (fIsStatCov) tempcov->Add(tempstat);
if (fIsNormCov) tempcov->Add(tempnorm);
if (!fIsSystCov && !fIsStatCov && !fIsNormCov){
tempcov->Add(tempsyst);
tempcov->Add(tempstat);
tempcov->Add(tempnorm);
}
}
if (!tempcov){
ERR(FTL) << "TEMPCOV NOT SET" << std::endl;
throw;
}
// Setup Covar
int nbins = tempcov->GetNbinsX();
fFullCovar = new TMatrixDSym(nbins);
for (int i = 0; i < nbins; i++){
for (int j = 0; j < nbins; j++){
(*fFullCovar)(i,j) = tempcov->GetBinContent(i+1,j+1);
}
}
covar = StatUtils::GetInvert(fFullCovar);
fDecomp = StatUtils::GetDecomp(covar);
// Set Data Errors
StatUtils::SetDataErrorFromCov(fDataHist, fFullCovar, fMapHist, 1E-38);
// Remove root file
rootfile->Close();
return;
};
diff --git a/src/T2K/T2K_CC0pi_XSec_2DPcos_nu_nonuniform.cxx b/src/T2K/T2K_CC0pi_XSec_2DPcos_nu_nonuniform.cxx
index d55c194..014ed85 100644
--- a/src/T2K/T2K_CC0pi_XSec_2DPcos_nu_nonuniform.cxx
+++ b/src/T2K/T2K_CC0pi_XSec_2DPcos_nu_nonuniform.cxx
@@ -1,215 +1,215 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
#include "T2K_SignalDef.h"
#include "T2K_CC0pi_XSec_2DPcos_nu_nonuniform.h"
//********************************************************************
T2K_CC0pi_XSec_2DPcos_nu_nonuniform::T2K_CC0pi_XSec_2DPcos_nu_nonuniform(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "T2K_CC0pi_XSec_2DPcos_nu_nonuniform sample. \n" \
"Target: CH \n" \
"Flux: MINERvA Medium Energy FHC numu \n" \
"Signal: CC-inclusive with theta < 20deg \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("P_{#mu} (GeV)");
fSettings.SetYTitle("cos#theta_{#mu}");
fSettings.SetZTitle("d^{2}#sigma/dP_{#mu}dcos#theta_{#mu} (cm^{2}/GeV)");
fSettings.SetAllowedTypes("FULL,DIAG/FREE,SHAPE,FIX/SYSTCOV/STATCOV","FIX/FULL");
fSettings.SetEnuRange(0.0, 10.0);
fSettings.DefineAllowedTargets("C,H");
fAnalysis = 1;
// CCQELike plot information
fSettings.SetTitle("T2K_CC0pi_XSec_2DPcos_nu_nonuniform");
fSettings.DefineAllowedSpecies("numu");
forwardgoing = (fSettings.GetS("type").find("REST") != std::string::npos);
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = ((GetEventHistogram()->Integral("width")/(fNEvents+0.)) * 1E-38 / (TotalIntegratedFlux()));
// Setup Histograms
SetHistograms();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
bool T2K_CC0pi_XSec_2DPcos_nu_nonuniform::isSignal(FitEvent *event){
return SignalDef::isT2K_CC0pi(event, EnuMin, EnuMax, forwardgoing);
};
void T2K_CC0pi_XSec_2DPcos_nu_nonuniform::FillEventVariables(FitEvent* event){
if (event->NumFSParticle(13) == 0)
return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
double pmu = Pmu.Vect().Mag()/1000.;
double CosThetaMu = cos(Pnu.Vect().Angle(Pmu.Vect()));
fXVar = pmu;
fYVar = CosThetaMu;
return;
};
void T2K_CC0pi_XSec_2DPcos_nu_nonuniform::FillHistograms(){
Measurement1D::FillHistograms();
if (Signal){
fMCHist_Fine2D->Fill( fXVar, fYVar, Weight );
FillMCSlice( fXVar, fYVar, Weight );
}
}
// Modification is needed after the full reconfigure to move bins around
// Otherwise this would need to be replaced by a TH2Poly which is too awkward.
void T2K_CC0pi_XSec_2DPcos_nu_nonuniform::ConvertEventRates(){
for (int i = 0; i < 9; i++){
fMCHist_Slices[i]->GetSumw2();
}
// Do standard conversion.
Measurement1D::ConvertEventRates();
// First scale MC slices also by their width in Y
fMCHist_Slices[0]->Scale(1.0 / 1.00);
fMCHist_Slices[1]->Scale(1.0 / 0.60);
fMCHist_Slices[2]->Scale(1.0 / 0.10);
fMCHist_Slices[3]->Scale(1.0 / 0.10);
fMCHist_Slices[4]->Scale(1.0 / 0.05);
fMCHist_Slices[5]->Scale(1.0 / 0.05);
fMCHist_Slices[6]->Scale(1.0 / 0.04);
fMCHist_Slices[7]->Scale(1.0 / 0.04);
fMCHist_Slices[8]->Scale(1.0 / 0.02);
// Now Convert into 1D list
fMCHist->Reset();
int bincount = 0;
for (int i = 0; i < 9; i++){
for (int j = 0; j < fDataHist_Slices[i]->GetNbinsX(); j++){
fMCHist->SetBinContent(bincount+1, fMCHist_Slices[i]->GetBinContent(j+1));
fMCHist->SetBinError(bincount+1, fMCHist_Slices[i]->GetBinError(j+1));
bincount++;
}
}
return;
}
void T2K_CC0pi_XSec_2DPcos_nu_nonuniform::FillMCSlice(double x, double y, double w){
if (y >= -1.0 and y < 0.0) fMCHist_Slices[0]->Fill(x,w);
else if (y >= 0.0 and y < 0.6) fMCHist_Slices[1]->Fill(x,w);
else if (y >= 0.6 and y < 0.7) fMCHist_Slices[2]->Fill(x,w);
else if (y >= 0.7 and y < 0.8) fMCHist_Slices[3]->Fill(x,w);
else if (y >= 0.8 and y < 0.85) fMCHist_Slices[4]->Fill(x,w);
else if (y >= 0.85 and y < 0.90) fMCHist_Slices[5]->Fill(x,w);
else if (y >= 0.90 and y < 0.94) fMCHist_Slices[6]->Fill(x,w);
else if (y >= 0.94 and y < 0.98) fMCHist_Slices[7]->Fill(x,w);
else if (y >= 0.98 and y <= 1.00) fMCHist_Slices[8]->Fill(x,w);
}
void T2K_CC0pi_XSec_2DPcos_nu_nonuniform::SetHistograms(){
// Read in 1D Data Histograms
fInputFile = new TFile( (FitPar::GetDataBase() + "/T2K/CC0pi/T2K_CC0PI_2DPmuCosmu_Data.root").c_str(),"READ");
- fInputFile->ls();
+ //fInputFile->ls();
// Read in 1D Data
fDataHist = (TH1D*) fInputFile->Get("datahist");
fMCHist_Fine2D = new TH2D("T2K_CC0pi_XSec_2DPcos_nu_nonuniform_Fine2D","T2K_CC0pi_XSec_2DPcos_nu_nonuniform_Fine2D", 400, 0.0,30.0,100,-1.0,1.0);
SetAutoProcessTH1(fMCHist_Fine2D);
TH2D* tempcov = (TH2D*) fInputFile->Get("analysis1_totcov");
fFullCovar = new TMatrixDSym(fDataHist->GetNbinsX());
for (int i = 0; i < fDataHist->GetNbinsX(); i++){
for (int j = 0; j < fDataHist->GetNbinsX(); j++){
(*fFullCovar)(i,j) = tempcov->GetBinContent(i+1, j+1);
}
}
covar = StatUtils::GetInvert(fFullCovar);
fDecomp = StatUtils::GetDecomp(fFullCovar);
// Read in 2D Data
fDataPoly = (TH2Poly*) fInputFile->Get("datapoly");
fDataPoly->SetNameTitle("T2K_CC0pi_XSec_2DPcos_nu_nonuniform_datapoly","T2K_CC0pi_XSec_2DPcos_nu_nonuniform_datapoly");
SetAutoProcessTH1(fDataPoly, kCMD_Write);
fDataHist->Reset();
// Read in 2D Data Slices and Make MC Slices
int bincount = 0;
for (int i = 0; i < 9; i++){
// Get Data Histogram
- fInputFile->ls();
+ //fInputFile->ls();
fDataHist_Slices.push_back((TH1D*)fInputFile->Get(Form("dataslice_%i",i))->Clone());
fDataHist_Slices[i]->SetNameTitle(Form("T2K_CC0pi_XSec_2DPcos_nu_nonuniform_data_Slice%i",i),
(Form("T2K_CC0pi_XSec_2DPcos_nu_nonuniform_data_Slice%i",i)));
// Loop over nbins and set errors from covar
for (int j = 0; j < fDataHist_Slices[i]->GetNbinsX(); j++){
fDataHist_Slices[i]->SetBinError(j+1, sqrt((*fFullCovar)(bincount,bincount)) * 1E-38);
- std::cout << "Setting data hist " << fDataHist_Slices[i]->GetBinContent(j+1) << " " << fDataHist_Slices[i]->GetBinError(j+1) << std::endl;
+ //std::cout << "Setting data hist " << fDataHist_Slices[i]->GetBinContent(j+1) << " " << fDataHist_Slices[i]->GetBinError(j+1) << std::endl;
fDataHist->SetBinContent(bincount+1, fDataHist_Slices[i]->GetBinContent(j+1) );
fDataHist->SetBinError(bincount+1, fDataHist_Slices[i]->GetBinError(j+1) );
bincount++;
}
// Make MC Clones
fMCHist_Slices.push_back((TH1D*) fDataHist_Slices[i]->Clone());
fMCHist_Slices[i]->SetNameTitle(Form("T2K_CC0pi_XSec_2DPcos_nu_nonuniform_MC_Slice%i",i),
(Form("T2K_CC0pi_XSec_2DPcos_nu_nonuniform_MC_Slice%i",i)));
SetAutoProcessTH1(fDataHist_Slices[i],kCMD_Write);
SetAutoProcessTH1(fMCHist_Slices[i]);
// fMCHist_Slices[i]->Reset();
}
return;
};
diff --git a/src/T2K/T2K_CC0pinp_STV_XSec_1Ddat_nu.cxx b/src/T2K/T2K_CC0pinp_STV_XSec_1Ddat_nu.cxx
index 77e3b32..fd5a4a6 100644
--- a/src/T2K/T2K_CC0pinp_STV_XSec_1Ddat_nu.cxx
+++ b/src/T2K/T2K_CC0pinp_STV_XSec_1Ddat_nu.cxx
@@ -1,90 +1,90 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
#include "T2K_SignalDef.h"
#include "T2K_CC0pinp_STV_XSec_1Ddat_nu.h"
//********************************************************************
T2K_CC0pinp_STV_XSec_1Ddat_nu::T2K_CC0pinp_STV_XSec_1Ddat_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "T2K_CC0pinp_STV_XSec_1Ddat_nu sample. \n" \
"Target: CH \n" \
"Flux: T2K 2.5 degree off-axis (ND280) \n" \
- "Signal: CC0piNp (N>=1) with 450M eV < p_p < 1 GeV \n";
- " p_mu > 250 MeV \n";
- " cth_p > 0.6 \n";
+ "Signal: CC0piNp (N>=1) with 450M eV < p_p < 1 GeV \n" \
+ " p_mu > 250 MeV \n" \
+ " cth_p > 0.6 \n" \
" cth_mu > -0.4 \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("#delta#it{#alpha}_{T} (GeV c^{-1})");
fSettings.SetYTitle("#frac{d#sigma}{d#delta#it{#alpha}_{T}} (cm^{2} nucleon^{-1} rads^{-1})");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG,FULL/NORM/MASK", "FIX/DIAG");
fSettings.SetEnuRange(0.0, 50.0);
fSettings.DefineAllowedTargets("C,H");
// CCQELike plot information
fSettings.SetTitle("T2K_CC0pinp_STV_XSec_1Ddat_nu");
// fSettings.SetDataInput( GeneralUtils::GetTopLevelDir() + "/data/T2K/T2K_CC0pinp_STV_XSec_1Ddat_nu.dat");
- fSettings.SetDataInput( FitPar::GetDataBase() + "/T2K/CC0pi/datResults.root;Result" );
- fSettings.SetCovarInput( FitPar::GetDataBase() + "/T2K/CC0pi/datResults.root;Correlation_Matrix" );
+ fSettings.SetDataInput( FitPar::GetDataBase() + "/T2K/CC0pi/STV/datResults.root;Result" );
+ fSettings.SetCovarInput( FitPar::GetDataBase() + "/T2K/CC0pi/STV/datResults.root;Correlation_Matrix" );
fSettings.DefineAllowedSpecies("numu");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = GetEventHistogram()->Integral("width") * double(1E-38) /
(double(fNEvents) * TotalIntegratedFlux("width"));
// Plot Setup -------------------------------------------------------
//SetDataFromTextFile( fSettings.GetDataInput() );
//ScaleData(1E-38);
//SetCovarFromDiagonal();
SetDataFromRootFile( fSettings.GetDataInput() );
SetCorrelationFromRootFile(fSettings.GetCovarInput() );
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
void T2K_CC0pinp_STV_XSec_1Ddat_nu::FillEventVariables(FitEvent *event) {
fXVar = FitUtils::Get_STV_dalphat(event, 14, true);
return;
};
//********************************************************************
bool T2K_CC0pinp_STV_XSec_1Ddat_nu::isSignal(FitEvent *event)
//********************************************************************
{
return SignalDef::isT2K_CC0pi_STV(event, EnuMin, EnuMax);
}
diff --git a/src/T2K/T2K_CC0pinp_STV_XSec_1Ddphit_nu.cxx b/src/T2K/T2K_CC0pinp_STV_XSec_1Ddphit_nu.cxx
index fb2c25c..e14e2b6 100644
--- a/src/T2K/T2K_CC0pinp_STV_XSec_1Ddphit_nu.cxx
+++ b/src/T2K/T2K_CC0pinp_STV_XSec_1Ddphit_nu.cxx
@@ -1,88 +1,88 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
#include "T2K_SignalDef.h"
#include "T2K_CC0pinp_STV_XSec_1Ddphit_nu.h"
//********************************************************************
T2K_CC0pinp_STV_XSec_1Ddphit_nu::T2K_CC0pinp_STV_XSec_1Ddphit_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "T2K_CC0pinp_STV_XSec_1Ddphit_nu sample. \n" \
"Target: CH \n" \
"Flux: T2K 2.5 degree off-axis (ND280) \n" \
- "Signal: CC0piNp (N>=1) with 450M eV < p_p < 1 GeV \n";
- " p_mu > 250 MeV \n";
- " cth_p > 0.6 \n";
- " cth_mu > -0.4 \n";
+ "Signal: CC0piNp (N>=1) with 450M eV < p_p < 1 GeV \n"\
+ " p_mu > 250 MeV \n"\
+ " cth_p > 0.6 \n"\
+ " cth_mu > -0.4 \n";\
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("#delta#it{#phi}_{T} (GeV c^{-1})");
fSettings.SetYTitle("#frac{d#sigma}{d#delta#it{#phi}_{T}} (cm^{2} nucleon^{-1} rads^{-1})");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG,FULL/NORM/MASK", "FIX/DIAG");
fSettings.SetEnuRange(0.0, 50.0);
fSettings.DefineAllowedTargets("C,H");
// CCQELike plot information
fSettings.SetTitle("T2K_CC0pinp_STV_XSec_1Ddphit_nu");
//fSettings.SetDataInput( GeneralUtils::GetTopLevelDir() + "/data/T2K/T2K_CC0pinp_STV_XSec_1Ddphit_nu.dat");
- fSettings.SetDataInput( FitPar::GetDataBase() + "/T2K/CC0pi/dphitResults.root;Result" );
- fSettings.SetCovarInput( FitPar::GetDataBase() + "/T2K/CC0pi/dphitResults.root;Correlation_Matrix" );
+ fSettings.SetDataInput( FitPar::GetDataBase() + "/T2K/CC0pi/STV/dphitResults.root;Result" );
+ fSettings.SetCovarInput( FitPar::GetDataBase() + "/T2K/CC0pi/STV/dphitResults.root;Correlation_Matrix" );
fSettings.DefineAllowedSpecies("numu");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = GetEventHistogram()->Integral("width") * double(1E-38) /
(double(fNEvents) * TotalIntegratedFlux("width"));
// Plot Setup -------------------------------------------------------
//SetDataFromTextFile( fSettings.GetDataInput() );
//ScaleData(1E-38);
//SetCovarFromDiagonal();
SetDataFromRootFile( fSettings.GetDataInput() );
SetCorrelationFromRootFile(fSettings.GetCovarInput() );
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
void T2K_CC0pinp_STV_XSec_1Ddphit_nu::FillEventVariables(FitEvent *event) {
fXVar = FitUtils::Get_STV_dphit(event, 14, true);
return;
};
//********************************************************************
bool T2K_CC0pinp_STV_XSec_1Ddphit_nu::isSignal(FitEvent *event)
//********************************************************************
{
return SignalDef::isT2K_CC0pi_STV(event, EnuMin, EnuMax);
}
diff --git a/src/T2K/T2K_CC0pinp_STV_XSec_1Ddpt_nu.cxx b/src/T2K/T2K_CC0pinp_STV_XSec_1Ddpt_nu.cxx
index 221d35e..cc4f9ad 100644
--- a/src/T2K/T2K_CC0pinp_STV_XSec_1Ddpt_nu.cxx
+++ b/src/T2K/T2K_CC0pinp_STV_XSec_1Ddpt_nu.cxx
@@ -1,93 +1,93 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
#include "T2K_SignalDef.h"
#include "T2K_CC0pinp_STV_XSec_1Ddpt_nu.h"
//********************************************************************
T2K_CC0pinp_STV_XSec_1Ddpt_nu::T2K_CC0pinp_STV_XSec_1Ddpt_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "T2K_CC0pinp_STV_XSec_1Ddpt_nu sample. \n" \
"Target: CH \n" \
"Flux: T2K 2.5 degree off-axis (ND280) \n" \
- "Signal: CC0piNp (N>=1) with 450M eV < p_p < 1 GeV \n";
- " p_mu > 250 MeV \n";
- " cth_p > 0.6 \n";
- " cth_mu > -0.4 \n";
+ "Signal: CC0piNp (N>=1) with 450M eV < p_p < 1 GeV \n"\
+ " p_mu > 250 MeV \n"\
+ " cth_p > 0.6 \n"\
+ " cth_mu > -0.4 \n";\
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("#delta#it{p}_{T} (GeV c^{-1})");
fSettings.SetYTitle("#frac{d#sigma}{d#delta#it{p}_{T}} (cm^{2} nucleon^{-1} GeV^{-1} c)");
fSettings.SetAllowedTypes("FIX,FREE,SHAPE/DIAG,FULL/NORM/MASK", "FIX/DIAG");
fSettings.SetEnuRange(0.0, 50.0);
fSettings.DefineAllowedTargets("C,H");
// CCQELike plot information
fSettings.SetTitle("T2K_CC0pinp_STV_XSec_1Ddpt_nu");
//fSettings.SetDataInput( GeneralUtils::GetTopLevelDir() + "/data/T2K/T2K_CC0pinp_STV_XSec_1Ddpt_nu.dat");
- fSettings.SetDataInput( FitPar::GetDataBase() + "/T2K/CC0pi/dptResults.root;Result" );
- fSettings.SetCovarInput( FitPar::GetDataBase() + "/T2K/CC0pi/dptResults.root;Correlation_Matrix" );
+ fSettings.SetDataInput( FitPar::GetDataBase() + "/T2K/CC0pi/STV/dptResults.root;Result" );
+ fSettings.SetCovarInput( FitPar::GetDataBase() + "/T2K/CC0pi/STV/dptResults.root;Correlation_Matrix" );
fSettings.DefineAllowedSpecies("numu");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = GetEventHistogram()->Integral("width") * double(1E-38) /
(double(fNEvents) * TotalIntegratedFlux("width"));
// Plot Setup -------------------------------------------------------
//SetDataFromTextFile( fSettings.GetDataInput() );
//SetCovarFromDiagonal();
//ScaleData(1E-38);
SetDataFromRootFile( fSettings.GetDataInput() );
SetCorrelationFromRootFile(fSettings.GetCovarInput() );
//SetCovarianceFromRootFile(fSettings.GetCovarInput() );
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
void T2K_CC0pinp_STV_XSec_1Ddpt_nu::FillEventVariables(FitEvent *event) {
fXVar = FitUtils::Get_STV_dpt(event, 14, true) / 1000.0;
return;
};
//********************************************************************
bool T2K_CC0pinp_STV_XSec_1Ddpt_nu::isSignal(FitEvent *event)
//********************************************************************
{
return SignalDef::isT2K_CC0pi_STV(event, EnuMin, EnuMax);
}
diff --git a/src/T2K/T2K_CC0pinp_ifk_XSec_3Dinfa_nu.cxx b/src/T2K/T2K_CC0pinp_ifk_XSec_3Dinfa_nu.cxx
index 8aefd4a..151c738 100644
--- a/src/T2K/T2K_CC0pinp_ifk_XSec_3Dinfa_nu.cxx
+++ b/src/T2K/T2K_CC0pinp_ifk_XSec_3Dinfa_nu.cxx
@@ -1,208 +1,208 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
#include "T2K_SignalDef.h"
#include "T2K_CC0pinp_ifk_XSec_3Dinfa_nu.h"
//********************************************************************
T2K_CC0pinp_ifk_XSec_3Dinfa_nu::T2K_CC0pinp_ifk_XSec_3Dinfa_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "T2K_CC0pinp_ifk_XSec_3Dinfa_nu sample. \n" \
"Target: CH \n" \
"Flux: T2K 2.5 degree off-axis (ND280) \n" \
"Signal: CC0piNp (N>=1) with p_p>450MeV and cthp>0.4 \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("#Delta #theta");
fSettings.SetYTitle("p_#mu");
fSettings.SetZTitle("cos#theta_{#mu}");
//fSettings.SetZTitle("d^{2}#sigma/dP_{#mu}dcos#theta_{#mu} (cm^{2}/GeV)");
fSettings.SetAllowedTypes("FULL,DIAG/FREE,SHAPE,FIX/SYSTCOV/STATCOV","FIX/FULL");
fSettings.SetEnuRange(0.0, 10.0);
fSettings.DefineAllowedTargets("C,H");
fAnalysis = 1;
outOfBoundsMC = 0.0;
// CCQELike plot information
fSettings.SetTitle("T2K_CC0pinp_ifk_XSec_3Dinfa_nu");
fSettings.DefineAllowedSpecies("numu");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = ((GetEventHistogram()->Integral("width")/(fNEvents+0.)) / (TotalIntegratedFlux()));
//fScaleFactor = ((GetEventHistogram()->Integral("width")/(fNEvents+0.)) * 10 / (TotalIntegratedFlux()));
- fSettings.SetDataInput( FitPar::GetDataBase() + "/T2K/CC0pi/infkResults_origBin.root;result_a" );
+ fSettings.SetDataInput( FitPar::GetDataBase() + "/T2K/CC0pi/STV/infkResults_origBin.root;result_a" );
SetDataFromRootFile( fSettings.GetDataInput() );
- fSettings.SetCovarInput( FitPar::GetDataBase() + "/T2K/CC0pi/infkResults_origBin.root;cor_a" );
+ fSettings.SetCovarInput( FitPar::GetDataBase() + "/T2K/CC0pi/STV/infkResults_origBin.root;cor_a" );
SetCorrelationFromRootFile(fSettings.GetCovarInput() );
//SetCovarFromRootFile(FitPar::GetDataBase() + "/T2K/CC0pi/infkResults_origBin.root", "cov_a" );
// Setup Histograms
SetHistograms();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
bool T2K_CC0pinp_ifk_XSec_3Dinfa_nu::isSignal(FitEvent *event){
return SignalDef::isT2K_CC0pi_ifk(event, EnuMin, EnuMax);
};
void T2K_CC0pinp_ifk_XSec_3Dinfa_nu::FillEventVariables(FitEvent* event){
if (event->NumFSParticle(13) == 0 || event->NumFSParticle(2212) == 0)
return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
TLorentzVector Pp = event->GetHMFSParticle(2212)->fP;
double pmu = Pmu.Vect().Mag()/1000.;
- double pp = Pp.Vect().Mag()/1000.;
+ //double pp = Pp.Vect().Mag()/1000.;
double CosThetaMu = cos(Pnu.Vect().Angle(Pmu.Vect()));
double CosThetaP = cos(Pnu.Vect().Angle(Pp.Vect()));
double infp_CosThetaP = FitUtils::cthpInfK(Pmu, CosThetaMu, 25, true);
double delta_a = acos(CosThetaP)*180/TMath::Pi() - acos(infp_CosThetaP)*180/TMath::Pi();
// std::cout << "CosTheta P is: " << CosThetaP << std::endl;
// std::cout << "Inferred CosTheta P is: " << infp_CosThetaP << std::endl << std::endl;
/*
TVector3 tp_inf = FitUtils::tppInfK(Pmu, CosThetaMu, 25, true);
//std::cout << "Theta P is: " << (Pp.Vect()).Theta() << std::endl;
//std::cout << "Inferred Theta P is: " << tp_inf.Theta() << std::endl << std::endl;
double delta_a = (Pp.Vect()).Theta()*180/TMath::Pi() - tp_inf.Theta()*180/TMath::Pi();
*/
fXVar = delta_a;
fYVar = pmu;
fZVar = CosThetaMu;
return;
};
void T2K_CC0pinp_ifk_XSec_3Dinfa_nu::FillHistograms(){
Measurement1D::FillHistograms();
if (Signal){
FillMCSlice( fXVar, fYVar, fZVar, Weight );
}
}
void T2K_CC0pinp_ifk_XSec_3Dinfa_nu::ConvertEventRates(){
for (int i = 0; i < 7; i++){
fMCHist_Slices[i]->GetSumw2();
}
// Do standard conversion.
Measurement1D::ConvertEventRates();
// First scale MC slices also by their width in Y and Z
//MCHist_Slices[0]->Scale(1.0 / 1.00);
//MCHist_Slices[1]->Scale(1.0 / 0.60);
//MCHist_Slices[2]->Scale(1.0 / 0.10);
//MCHist_Slices[3]->Scale(1.0 / 0.10);
// Now Convert into 1D list
fMCHist->Reset();
//The first bin in the histogram in underflow, so set this and start bincount at 1
fMCHist->SetBinContent(1, outOfBoundsMC);
int bincount = 1;
for (int i = 0; i < 7; i++){
for (int j = 0; j < fDataHist_Slices[i]->GetNbinsX(); j++){
fMCHist->SetBinContent(bincount+1, fMCHist_Slices[i]->GetBinContent(j+1));
//fMCHist->SetBinError(bincount+1, fMCHist_Slices[i]->GetBinError(j+1));
bincount++;
}
}
return;
}
void T2K_CC0pinp_ifk_XSec_3Dinfa_nu::FillMCSlice(double x, double y, double z, double w){
// x is delta_a
// y is pmu
// z is CosThetaMu
if (z <= -0.6) fMCHist_Slices[0]->Fill(x,w);
else if (z >= -0.6 and z < 0.0 and y < 0.25) fMCHist_Slices[1]->Fill(x,w);
else if (z >= -0.6 and z < 0.0 and y > 0.25) fMCHist_Slices[2]->Fill(x,w);
else if (z >= 0.0 and y < 0.25) fMCHist_Slices[3]->Fill(x,w);
else if (z >= 0.0 and z < 0.8 and y >= 0.25) fMCHist_Slices[4]->Fill(x,w);
else if (z >= 0.8 and z < 1.0 and y >= 0.25 and y < 0.75) fMCHist_Slices[5]->Fill(x,w);
else if (z >= 0.8 and z < 1.0 and y >= 0.75) fMCHist_Slices[6]->Fill(x,w);
else outOfBoundsMC += w;
}
void T2K_CC0pinp_ifk_XSec_3Dinfa_nu::SetHistograms(){
// Read in 1D Data Histograms
- fInputFile = new TFile( (FitPar::GetDataBase() + "/T2K/CC0pi/infkResults_origBin.root").c_str(),"READ");
- fInputFile->ls();
+ fInputFile = new TFile( (FitPar::GetDataBase() + "/T2K/CC0pi/STV/infkResults_origBin.root").c_str(),"READ");
+ //fInputFile->ls();
// Read in 1D Data
fDataHist = (TH1D*) fInputFile->Get("result_a");
fDataHist->SetNameTitle("T2K_CC0pinp_ifk_XSec_3Dinfa_nu_data", "T2K_CC0pinp_ifk_XSec_3Dinfa_nu_data");
SetAutoProcessTH1(fDataHist,kCMD_Write);
// Read in 2D Data Slices and Make MC Slices
for (int i = 0; i < 7; i++){ //both y and z slices
// Get Data Histogram
- fInputFile->ls();
+ //fInputFile->ls();
fDataHist_Slices.push_back((TH1D*)fInputFile->Get(Form("resultBin%i_a",i))->Clone());
fDataHist_Slices[i]->SetNameTitle(Form("T2K_CC0pinp_ifk_XSec_3Dinfa_nu_data_Slice%i",i), (Form("T2K_CC0pinp_ifk_XSec_3Dinfa_nu_data_Slice%i",i)));
// Make MC Clones
fMCHist_Slices.push_back((TH1D*) fDataHist_Slices[i]->Clone());
fMCHist_Slices[i]->SetNameTitle(Form("T2K_CC0pinp_ifk_XSec_3Dinfa_nu_MC_Slice%i",i), (Form("T2K_CC0pinp_ifk_XSec_3Dinfa_nu_MC_Slice%i",i)));
SetAutoProcessTH1(fDataHist_Slices[i],kCMD_Write);
SetAutoProcessTH1(fMCHist_Slices[i]);
fMCHist_Slices[i]->Reset();
}
return;
};
diff --git a/src/T2K/T2K_CC0pinp_ifk_XSec_3Dinfip_nu.cxx b/src/T2K/T2K_CC0pinp_ifk_XSec_3Dinfip_nu.cxx
index 536d227..076d5a7 100644
--- a/src/T2K/T2K_CC0pinp_ifk_XSec_3Dinfip_nu.cxx
+++ b/src/T2K/T2K_CC0pinp_ifk_XSec_3Dinfip_nu.cxx
@@ -1,198 +1,198 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
#include "T2K_SignalDef.h"
#include "T2K_CC0pinp_ifk_XSec_3Dinfip_nu.h"
//********************************************************************
T2K_CC0pinp_ifk_XSec_3Dinfip_nu::T2K_CC0pinp_ifk_XSec_3Dinfip_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "T2K_CC0pinp_ifk_XSec_3Dinfip_nu sample. \n" \
"Target: CH \n" \
"Flux: T2K 2.5 degree off-axis (ND280) \n" \
"Signal: CC0piNp (N>=1) with p_p>450MeV and cthp>0.4 \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("|#Delta p|");
fSettings.SetYTitle("p_#mu");
fSettings.SetZTitle("cos#theta_{#mu}");
//fSettings.SetZTitle("d^{2}#sigma/dP_{#mu}dcos#theta_{#mu} (cm^{2}/GeV)");
fSettings.SetAllowedTypes("FULL,DIAG/FREE,SHAPE,FIX/SYSTCOV/STATCOV","FIX/FULL");
fSettings.SetEnuRange(0.0, 10.0);
fSettings.DefineAllowedTargets("C,H");
fAnalysis = 1;
outOfBoundsMC = 0.0;
// CCQELike plot information
fSettings.SetTitle("T2K_CC0pinp_ifk_XSec_3Dinfip_nu");
fSettings.DefineAllowedSpecies("numu");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = ((GetEventHistogram()->Integral("width")/(fNEvents+0.)) / (TotalIntegratedFlux()));
//fScaleFactor = ((GetEventHistogram()->Integral("width")/(fNEvents+0.)) * 10 / (TotalIntegratedFlux()));
- fSettings.SetDataInput( FitPar::GetDataBase() + "/T2K/CC0pi/infkResults_origBin.root;result_tp" );
+ fSettings.SetDataInput( FitPar::GetDataBase() + "/T2K/CC0pi/STV/infkResults_origBin.root;result_tp" );
SetDataFromRootFile( fSettings.GetDataInput() );
- fSettings.SetCovarInput( FitPar::GetDataBase() + "/T2K/CC0pi/infkResults_origBin.root;cor_tp" );
+ fSettings.SetCovarInput( FitPar::GetDataBase() + "/T2K/CC0pi/STV/infkResults_origBin.root;cor_tp" );
SetCorrelationFromRootFile(fSettings.GetCovarInput() );
//SetCovarFromRootFile(FitPar::GetDataBase() + "/T2K/CC0pi/infkResults_origBin.root", "cov_tp" );
// Setup Histograms
SetHistograms();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
bool T2K_CC0pinp_ifk_XSec_3Dinfip_nu::isSignal(FitEvent *event){
return SignalDef::isT2K_CC0pi_ifk(event, EnuMin, EnuMax);
};
void T2K_CC0pinp_ifk_XSec_3Dinfip_nu::FillEventVariables(FitEvent* event){
if (event->NumFSParticle(13) == 0 || event->NumFSParticle(2212) == 0)
return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
TLorentzVector Pp = event->GetHMFSParticle(2212)->fP;
double pmu = Pmu.Vect().Mag()/1000.;
double pp = Pp.Vect().Mag()/1000.;
double CosThetaMu = cos(Pnu.Vect().Angle(Pmu.Vect()));
TVector3 tp_inf = FitUtils::tppInfK(Pmu, CosThetaMu, 25, true);
TVector3 Pp_mev(Pp.X()/1000,Pp.Y()/1000,Pp.Z()/1000);
TVector3 delta_tp = tp_inf-Pp_mev;
//std::cout << "Proton 3 mom is: " << std::endl;
//(Pp.Vect()).Print("all");
//std::cout << "Inferred Proton 3 mom is: " << std::endl;
//tp_inf.Print("all");
//std::cout << " " << std::endl;
fXVar = delta_tp.Mag();
fYVar = pmu;
fZVar = CosThetaMu;
return;
};
void T2K_CC0pinp_ifk_XSec_3Dinfip_nu::FillHistograms(){
Measurement1D::FillHistograms();
if (Signal){
FillMCSlice( fXVar, fYVar, fZVar, Weight );
}
}
void T2K_CC0pinp_ifk_XSec_3Dinfip_nu::ConvertEventRates(){
for (int i = 0; i < 7; i++){
fMCHist_Slices[i]->GetSumw2();
}
// Do standard conversion.
Measurement1D::ConvertEventRates();
// First scale MC slices also by their width in Y and Z
//MCHist_Slices[0]->Scale(1.0 / 1.00);
//MCHist_Slices[1]->Scale(1.0 / 0.60);
//MCHist_Slices[2]->Scale(1.0 / 0.10);
//MCHist_Slices[3]->Scale(1.0 / 0.10);
// Now Convert into 1D list
fMCHist->Reset();
//The first bin in the histogram in underflow, so set this and start bincount at 1
fMCHist->SetBinContent(1, outOfBoundsMC);
int bincount = 1;
for (int i = 0; i < 7; i++){
for (int j = 0; j < fDataHist_Slices[i]->GetNbinsX(); j++){
fMCHist->SetBinContent(bincount+1, fMCHist_Slices[i]->GetBinContent(j+1));
//fMCHist->SetBinError(bincount+1, fMCHist_Slices[i]->GetBinError(j+1));
bincount++;
}
}
return;
}
void T2K_CC0pinp_ifk_XSec_3Dinfip_nu::FillMCSlice(double x, double y, double z, double w){
// x is delta_tp
// y is pmu
// z is CosThetaMu
if (z <= -0.6) fMCHist_Slices[0]->Fill(x,w);
else if (z >= -0.6 and z < 0.0 and y < 0.25) fMCHist_Slices[1]->Fill(x,w);
else if (z >= -0.6 and z < 0.0 and y > 0.25) fMCHist_Slices[2]->Fill(x,w);
else if (z >= 0.0 and y < 0.25) fMCHist_Slices[3]->Fill(x,w);
else if (z >= 0.0 and z < 0.8 and y >= 0.25) fMCHist_Slices[4]->Fill(x,w);
else if (z >= 0.8 and z < 1.0 and y >= 0.25 and y < 0.75) fMCHist_Slices[5]->Fill(x,w);
else if (z >= 0.8 and z < 1.0 and y >= 0.75) fMCHist_Slices[6]->Fill(x,w);
else outOfBoundsMC += w;
}
void T2K_CC0pinp_ifk_XSec_3Dinfip_nu::SetHistograms(){
// Read in 1D Data Histograms
- fInputFile = new TFile( (FitPar::GetDataBase() + "/T2K/CC0pi/infkResults_origBin.root").c_str(),"READ");
- fInputFile->ls();
+ fInputFile = new TFile( (FitPar::GetDataBase() + "/T2K/CC0pi/STV/infkResults_origBin.root").c_str(),"READ");
+ //fInputFile->ls();
// Read in 1D Data
fDataHist = (TH1D*) fInputFile->Get("result_tp");
fDataHist->SetNameTitle("T2K_CC0pinp_ifk_XSec_3Dinfip_nu_data", "T2K_CC0pinp_ifk_XSec_3Dinfip_nu_data");
SetAutoProcessTH1(fDataHist,kCMD_Write);
// Read in 2D Data Slices and Make MC Slices
for (int i = 0; i < 7; i++){ //both y and z slices
// Get Data Histogram
- fInputFile->ls();
+ //fInputFile->ls();
fDataHist_Slices.push_back((TH1D*)fInputFile->Get(Form("resultBin%i_tp",i))->Clone());
fDataHist_Slices[i]->SetNameTitle(Form("T2K_CC0pinp_ifk_XSec_3Dinfip_nu_data_Slice%i",i), (Form("T2K_CC0pinp_ifk_XSec_3Dinfip_nu_data_Slice%i",i)));
// Make MC Clones
fMCHist_Slices.push_back((TH1D*) fDataHist_Slices[i]->Clone());
fMCHist_Slices[i]->SetNameTitle(Form("T2K_CC0pinp_ifk_XSec_3Dinfip_nu_MC_Slice%i",i), (Form("T2K_CC0pinp_ifk_XSec_3Dinfip_nu_MC_Slice%i",i)));
SetAutoProcessTH1(fDataHist_Slices[i],kCMD_Write);
SetAutoProcessTH1(fMCHist_Slices[i]);
fMCHist_Slices[i]->Reset();
}
return;
};
diff --git a/src/T2K/T2K_CC0pinp_ifk_XSec_3Dinfp_nu.cxx b/src/T2K/T2K_CC0pinp_ifk_XSec_3Dinfp_nu.cxx
index b42fc2c..bd1a4a4 100644
--- a/src/T2K/T2K_CC0pinp_ifk_XSec_3Dinfp_nu.cxx
+++ b/src/T2K/T2K_CC0pinp_ifk_XSec_3Dinfp_nu.cxx
@@ -1,188 +1,188 @@
// Copyright 2016 L. Pickering, P Stowell, R. Terri, C. Wilkinson, C. Wret
/*******************************************************************************
* This file is part of NUISANCE.
*
* NUISANCE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NUISANCE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NUISANCE. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************/
#include "T2K_SignalDef.h"
#include "T2K_CC0pinp_ifk_XSec_3Dinfp_nu.h"
//********************************************************************
T2K_CC0pinp_ifk_XSec_3Dinfp_nu::T2K_CC0pinp_ifk_XSec_3Dinfp_nu(nuiskey samplekey) {
//********************************************************************
// Sample overview ---------------------------------------------------
std::string descrip = "T2K_CC0pinp_ifk_XSec_3Dinfp_nu sample. \n" \
"Target: CH \n" \
"Flux: T2K 2.5 degree off-axis (ND280) \n" \
"Signal: CC0piNp (N>=1) with p_p>450MeV and cthp>0.4 \n";
// Setup common settings
fSettings = LoadSampleSettings(samplekey);
fSettings.SetDescription(descrip);
fSettings.SetXTitle("#Delta p");
fSettings.SetYTitle("p_#mu");
fSettings.SetZTitle("cos#theta_{#mu}");
//fSettings.SetZTitle("d^{2}#sigma/dP_{#mu}dcos#theta_{#mu} (cm^{2}/GeV)");
fSettings.SetAllowedTypes("FULL,DIAG/FREE,SHAPE,FIX/SYSTCOV/STATCOV","FIX/FULL");
fSettings.SetEnuRange(0.0, 10.0);
fSettings.DefineAllowedTargets("C,H");
fAnalysis = 1;
outOfBoundsMC = 0.0;
// CCQELike plot information
fSettings.SetTitle("T2K_CC0pinp_ifk_XSec_3Dinfp_nu");
fSettings.DefineAllowedSpecies("numu");
FinaliseSampleSettings();
// Scaling Setup ---------------------------------------------------
// ScaleFactor automatically setup for DiffXSec/cm2/Nucleon
fScaleFactor = ((GetEventHistogram()->Integral("width")/(fNEvents+0.)) / (TotalIntegratedFlux()));
//fScaleFactor = ((GetEventHistogram()->Integral("width")/(fNEvents+0.)) * 10 / (TotalIntegratedFlux()));
- fSettings.SetDataInput( FitPar::GetDataBase() + "/T2K/CC0pi/infkResults_origBin.root;result_p" );
+ fSettings.SetDataInput( FitPar::GetDataBase() + "/T2K/CC0pi/STV/infkResults_origBin.root;result_p" );
SetDataFromRootFile( fSettings.GetDataInput() );
- fSettings.SetCovarInput( FitPar::GetDataBase() + "/T2K/CC0pi/infkResults_origBin.root;cor_p" );
+ fSettings.SetCovarInput( FitPar::GetDataBase() + "/T2K/CC0pi/STV/infkResults_origBin.root;cor_p" );
SetCorrelationFromRootFile(fSettings.GetCovarInput() );
//SetCovarFromRootFile(FitPar::GetDataBase() + "/T2K/CC0pi/infkResults_origBin.root", "cov_p" );
// Setup Histograms
SetHistograms();
// Final setup ---------------------------------------------------
FinaliseMeasurement();
};
bool T2K_CC0pinp_ifk_XSec_3Dinfp_nu::isSignal(FitEvent *event){
return SignalDef::isT2K_CC0pi_ifk(event, EnuMin, EnuMax);
};
void T2K_CC0pinp_ifk_XSec_3Dinfp_nu::FillEventVariables(FitEvent* event){
if (event->NumFSParticle(13) == 0 || event->NumFSParticle(2212) == 0)
return;
TLorentzVector Pnu = event->GetNeutrinoIn()->fP;
TLorentzVector Pmu = event->GetHMFSParticle(13)->fP;
TLorentzVector Pp = event->GetHMFSParticle(2212)->fP;
double pmu = Pmu.Vect().Mag()/1000.;
double pp = Pp.Vect().Mag()/1000.;
double CosThetaMu = cos(Pnu.Vect().Angle(Pmu.Vect()));
double delta_p = pp-FitUtils::ppInfK(Pmu, CosThetaMu, 25, true);
fXVar = delta_p;
fYVar = pmu;
fZVar = CosThetaMu;
return;
};
void T2K_CC0pinp_ifk_XSec_3Dinfp_nu::FillHistograms(){
Measurement1D::FillHistograms();
if (Signal){
FillMCSlice( fXVar, fYVar, fZVar, Weight );
}
}
void T2K_CC0pinp_ifk_XSec_3Dinfp_nu::ConvertEventRates(){
for (int i = 0; i < 7; i++){
fMCHist_Slices[i]->GetSumw2();
}
// Do standard conversion.
Measurement1D::ConvertEventRates();
// First scale MC slices also by their width in Y and Z
//MCHist_Slices[0]->Scale(1.0 / 1.00);
//MCHist_Slices[1]->Scale(1.0 / 0.60);
//MCHist_Slices[2]->Scale(1.0 / 0.10);
//MCHist_Slices[3]->Scale(1.0 / 0.10);
// Now Convert into 1D list
fMCHist->Reset();
//The first bin in the histogram in underflow, so set this and start bincount at 1
fMCHist->SetBinContent(1, outOfBoundsMC);
int bincount = 1;
for (int i = 0; i < 7; i++){
for (int j = 0; j < fDataHist_Slices[i]->GetNbinsX(); j++){
fMCHist->SetBinContent(bincount+1, fMCHist_Slices[i]->GetBinContent(j+1));
//fMCHist->SetBinError(bincount+1, fMCHist_Slices[i]->GetBinError(j+1));
bincount++;
}
}
return;
}
void T2K_CC0pinp_ifk_XSec_3Dinfp_nu::FillMCSlice(double x, double y, double z, double w){
// x is delta_p
// y is pmu
// z is CosThetaMu
if (z <= -0.6) fMCHist_Slices[0]->Fill(x,w);
else if (z >= -0.6 and z < 0.0 and y < 0.25) fMCHist_Slices[1]->Fill(x,w);
else if (z >= -0.6 and z < 0.0 and y > 0.25) fMCHist_Slices[2]->Fill(x,w);
else if (z >= 0.0 and y < 0.25) fMCHist_Slices[3]->Fill(x,w);
else if (z >= 0.0 and z < 0.8 and y >= 0.25) fMCHist_Slices[4]->Fill(x,w);
else if (z >= 0.8 and z < 1.0 and y >= 0.25 and y < 0.75) fMCHist_Slices[5]->Fill(x,w);
else if (z >= 0.8 and z < 1.0 and y >= 0.75) fMCHist_Slices[6]->Fill(x,w);
else outOfBoundsMC += w;
}
void T2K_CC0pinp_ifk_XSec_3Dinfp_nu::SetHistograms(){
// Read in 1D Data Histograms
- fInputFile = new TFile( (FitPar::GetDataBase() + "/T2K/CC0pi/infkResults_origBin.root").c_str(),"READ");
- fInputFile->ls();
+ fInputFile = new TFile( (FitPar::GetDataBase() + "/T2K/CC0pi/STV/infkResults_origBin.root").c_str(),"READ");
+ //fInputFile->ls();
// Read in 1D Data
fDataHist = (TH1D*) fInputFile->Get("result_p");
fDataHist->SetNameTitle("T2K_CC0pinp_ifk_XSec_3Dinfp_nu_data", "T2K_CC0pinp_ifk_XSec_3Dinfp_nu_data");
SetAutoProcessTH1(fDataHist,kCMD_Write);
// Read in 2D Data Slices and Make MC Slices
for (int i = 0; i < 7; i++){ //both y and z slices
// Get Data Histogram
- fInputFile->ls();
+ //fInputFile->ls();
fDataHist_Slices.push_back((TH1D*)fInputFile->Get(Form("resultBin%i_p",i))->Clone());
fDataHist_Slices[i]->SetNameTitle(Form("T2K_CC0pinp_ifk_XSec_3Dinfp_nu_data_Slice%i",i), (Form("T2K_CC0pinp_ifk_XSec_3Dinfp_nu_data_Slice%i",i)));
// Make MC Clones
fMCHist_Slices.push_back((TH1D*) fDataHist_Slices[i]->Clone());
fMCHist_Slices[i]->SetNameTitle(Form("T2K_CC0pinp_ifk_XSec_3Dinfp_nu_MC_Slice%i",i), (Form("T2K_CC0pinp_ifk_XSec_3Dinfp_nu_MC_Slice%i",i)));
SetAutoProcessTH1(fDataHist_Slices[i],kCMD_Write);
SetAutoProcessTH1(fMCHist_Slices[i]);
fMCHist_Slices[i]->Reset();
}
return;
};

File Metadata

Mime Type
text/x-diff
Expires
Sun, Feb 23, 2:34 PM (22 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4486646
Default Alt Text
(61 KB)

Event Timeline