NuFluxHelper Class Reference

#include <NuFluxHelper.h>

List of all members.

Public Member Functions

 NuFluxHelper (SKZPWeightCalculator::ERunPeriod=SKZPWeightCalculator::kNone, Bool_t _doRW=true)
 NuFluxHelper (const TString &xmlFile)
virtual ~NuFluxHelper ()
virtual void BeamType (const BeamType::BeamType_t beamType)
virtual BeamType::BeamType_t BeamType () const
virtual void RunPeriod (const SKZPWeightCalculator::RunPeriod_t runPeriod)
virtual SKZPWeightCalculator::RunPeriod_t RunPeriod () const
virtual const TVector3 ConvertNDToBeamCoOrdinates (const TVector3 &ndCoordinates) const
virtual void CrossSectionFile (const char *xSecFile)
virtual void DoSKZP (const Bool_t doSKZP)
virtual Bool_t DoSKZP () const
virtual void OutputFilename (const char *outFile)
virtual void MakeHelperHistos (const char *fileList)
virtual void ConcatenateHelpers (const char *fileList)
virtual void NDTrueEBins (const std::vector< Double_t > ndtruebins)
virtual void FDTrueEBins (const std::vector< Double_t > fdtruebins)
virtual Bool_t IsNDFiducial (const TVector3 &ndPoint) const
virtual void ReweightVersion (const SKZPWeightCalculator::SKZPConfig_t reweightVersion)
virtual SKZPWeightCalculator::SKZPConfig_t ReweightVersion () const
virtual void SystematicBeamShift (const Bool_t doShift, const Double_t numSigma)
virtual void SystematicScrapingShift (const Bool_t doShift, const Double_t scaleFactor)
virtual void ParticleToExtrapolate (const NuParticle::NuParticleType_t particle)
virtual void ParticlesToExtrapolate (const std::vector< NuParticle::NuParticleType_t > particleList)
virtual void ParticlesToExtrapolate (int flavour)
virtual void SetBatch (Bool_t set)

Private Member Functions

virtual Bool_t CreateHistos ()
virtual Double_t CrossSection (const NuParticle::NuParticleType_t particle, const Double_t energy) const
virtual Double_t TauCrossSection (const NuParticle::NuParticleType_t particle, const Double_t energy) const
virtual void FillMMHelpers (const NuFluxChain *fluxChain, const Int_t flukaEntry) const
virtual void FillNonMMHelpers (const NuFluxChain *fluxChain, const Int_t flukaEntry) const
virtual Bool_t IsParticleToExtrapolate (const NuParticle::NuParticleType_t particle) const
virtual void NormaliseHistos () const
virtual const ArrAy NuWte (const Double_t XDET, const Double_t YDET, const Double_t ZDET, const NuFluxChain *fluxChain, const Int_t flukaEntry) const
virtual void WriteHistos () const

Private Attributes

Bool_t fdoSKZP
Bool_t fdoBeamShift
Bool_t fdoScrapingShift
Bool_t batchRunning
Int_t fNNDTrueEBins
Int_t fNFDTrueEBins
Double_t * fNDTrueEBinEdges
Double_t * fFDTrueEBinEdges
NuBinningScheme::NuBinningScheme_t fbinningScheme
Double_t fbeamShiftAsSigma
Double_t fscrapingScaleFactor
std::vector< NuParticle::NuParticleType_tfparticlesToExtrapolate
std::string foutFile
std::string fxSecFile
SKZPWeightCalculator::RunPeriod_t frunPeriod
SKZPWeightCalculator::SKZPConfig_t freweightVersion
BeamType::BeamType_t fbeamType
NuZBeamReweightfzarko
TGraph * fxSecGraphNuMuCC
TGraph * fxSecGraphNuMuBarCC
TGraph * fxSecGraphNuTauCC
TGraph * fxSecGraphNuTauBarCC
TH2D * fFDVsNDMatrix
TH2D * fFDVsNDMatrixRW
TH2D * fFDVsNDMatrixXSec
TH2D * fFDVsNDMatrixXSecRW
TH2D * fFDVsNDMatrixTauXSecRW
TH1D * fTrueEnergyNuFlux_ND
TH1D * fTrueEnergyNuFluxRW_ND
TH1D * fTrueEnergyNuFlux_FD
TH1D * fTrueEnergyNuFluxRW_FD
TH1D * fTrueEnergyCCFlux_ND
TH1D * fTrueEnergyCCFluxRW_ND
TH1D * fTrueEnergyCCFlux_FD
TH1D * fTrueEnergyCCFluxRW_FD
TRandom3 * frandom3


Detailed Description

Definition at line 37 of file NuFluxHelper.h.


Constructor & Destructor Documentation

NuFluxHelper::NuFluxHelper ( SKZPWeightCalculator::ERunPeriod  = SKZPWeightCalculator::kNone,
Bool_t  _doRW = true 
)

Definition at line 49 of file NuFluxHelper.cxx.

References NuBinningScheme::kUnknown, SKZPWeightCalculator::kUnknown, BeamType::kUnknown, and NuUtilities::TrueBins().

00050 {
00051   batchRunning = false;
00052   fzarko = 0;
00053   DoSKZP(_doRW);
00054   frunPeriod = rp;
00055   fbeamType = BeamType::kUnknown; // Now pulled from file by default
00056   freweightVersion = SKZPWeightCalculator::kUnknown; // Set when determining file version
00057 
00058   fdoBeamShift = false;
00059   fdoScrapingShift = false;
00060   fbeamShiftAsSigma = 0.0;
00061   fscrapingScaleFactor = 0.0;
00062 
00063   fbinningScheme = NuBinningScheme::kUnknown;
00064   const NuUtilities utils;
00065   const vector<Double_t> trueBins = utils.TrueBins(fbinningScheme);
00066   fNNDTrueEBins = trueBins.size()-1;
00067   fNDTrueEBinEdges=new Double_t[fNNDTrueEBins+1];
00068   {
00069     Int_t i=0;
00070     for (vector<Double_t>::const_iterator itBin = trueBins.begin();
00071          itBin != trueBins.end();
00072          ++itBin, ++i){
00073       fNDTrueEBinEdges[i] = *itBin;
00074     }
00075   }
00076   fNFDTrueEBins = fNNDTrueEBins;
00077   fFDTrueEBinEdges = fNDTrueEBinEdges;
00078 
00079   foutFile = "";
00080   fxSecFile = "";
00081 
00082   fxSecGraphNuMuCC = 0;
00083   fxSecGraphNuMuBarCC = 0;
00084   fxSecGraphNuTauCC = 0;
00085   fxSecGraphNuTauBarCC = 0;
00086 
00087   fFDVsNDMatrix = 0;
00088   fFDVsNDMatrixRW = 0;
00089   fFDVsNDMatrixXSec = 0;
00090   fFDVsNDMatrixXSecRW = 0;
00091   fFDVsNDMatrixTauXSecRW = 0;
00092 
00093   fTrueEnergyNuFlux_ND = 0;
00094   fTrueEnergyNuFluxRW_ND = 0;
00095   fTrueEnergyNuFlux_FD = 0;
00096   fTrueEnergyNuFluxRW_FD = 0;
00097   fTrueEnergyCCFlux_ND = 0;
00098   fTrueEnergyCCFluxRW_ND = 0;
00099   fTrueEnergyCCFlux_FD = 0;
00100   fTrueEnergyCCFluxRW_FD = 0;
00101 
00102   frandom3 = new TRandom3();
00103 }

NuFluxHelper::NuFluxHelper ( const TString &  xmlFile  ) 

Definition at line 106 of file NuFluxHelper.cxx.

References batchRunning, NuXMLConfig::BinningScheme(), DoSKZP(), fbeamType, fbinningScheme, fFDTrueEBinEdges, fFDVsNDMatrix, fFDVsNDMatrixRW, fFDVsNDMatrixTauXSecRW, fFDVsNDMatrixXSec, fFDVsNDMatrixXSecRW, fNDTrueEBinEdges, fNFDTrueEBins, fNNDTrueEBins, foutFile, frandom3, freweightVersion, frunPeriod, fTrueEnergyCCFlux_FD, fTrueEnergyCCFlux_ND, fTrueEnergyCCFluxRW_FD, fTrueEnergyCCFluxRW_ND, fTrueEnergyNuFlux_FD, fTrueEnergyNuFlux_ND, fTrueEnergyNuFluxRW_FD, fTrueEnergyNuFluxRW_ND, fxSecFile, fxSecGraphNuMuBarCC, fxSecGraphNuMuCC, fxSecGraphNuTauBarCC, fxSecGraphNuTauCC, fzarko, SKZPWeightCalculator::kNone, SKZPWeightCalculator::kUnknown, BeamType::kUnknown, NuXMLConfig::Name(), NuXMLConfig::Shift(), SystematicBeamShift(), SystematicScrapingShift(), and NuXMLConfig::UseBeamWeight().

00107 {
00108   cout << "Beginning to construct NuFluxHelper(" << xmlFile << ")" << endl;
00109   fzarko = 0;
00110   batchRunning = false;
00111 
00112   NuXMLConfig xmlConfig(xmlFile);
00113   if (xmlConfig.UseBeamWeight()){
00114     frunPeriod = SKZPWeightCalculator::kNone;
00115     this->DoSKZP(true);
00116   }
00117   else{
00118     frunPeriod = SKZPWeightCalculator::kNone;
00119     this->DoSKZP(false);
00120     cout << "NOT doing SKZP." << endl;
00121   }
00122 
00123   fbeamType = BeamType::kUnknown; // Now pulled from file by default
00124   freweightVersion = SKZPWeightCalculator::kUnknown; // Set when determining file version
00125 
00126   if (xmlConfig.Name().Contains("Beam",TString::kIgnoreCase) ||
00127       xmlConfig.Name().Contains("SKZP",TString::kIgnoreCase) ||
00128       xmlConfig.Name().Contains("Flux",TString::kIgnoreCase)){
00129     this->SystematicBeamShift(true,xmlConfig.Shift());
00130   }
00131   else{
00132     this->SystematicBeamShift(false, 0.0);
00133   }
00134   if (xmlConfig.Name().Contains("Scraping",TString::kIgnoreCase) ||
00135       xmlConfig.Name().Contains("DecayPipe",TString::kIgnoreCase)){
00136     this->SystematicScrapingShift(true,xmlConfig.Shift());
00137   }
00138   else{
00139     this->SystematicScrapingShift(false, 0.0);
00140   }
00141   cout << "Read other things from the xml file" << endl;
00142 
00143   fbinningScheme = static_cast<NuBinningScheme::NuBinningScheme_t>(xmlConfig.BinningScheme());
00144   const NuUtilities utils;
00145 
00146   const vector<Double_t> trueBins = utils.TrueBins(fbinningScheme);
00147   fNNDTrueEBins = trueBins.size()-1;
00148   fNDTrueEBinEdges=new Double_t[fNNDTrueEBins+1];
00149   {
00150     Int_t i=0;
00151     for (vector<Double_t>::const_iterator itBin = trueBins.begin();
00152          itBin != trueBins.end();
00153          ++itBin, ++i){
00154       fNDTrueEBinEdges[i] = *itBin;
00155     }
00156   }
00157   fNFDTrueEBins = fNNDTrueEBins;
00158   fFDTrueEBinEdges = fNDTrueEBinEdges;
00159 
00160   cout << "Constructed bins" << endl;
00161 
00162   foutFile = "";
00163   fxSecFile = "";
00164 
00165   fxSecGraphNuMuCC = 0;
00166   fxSecGraphNuMuBarCC = 0;
00167   fxSecGraphNuTauCC = 0;
00168   fxSecGraphNuTauBarCC = 0;
00169 
00170   fFDVsNDMatrix = 0;
00171   fFDVsNDMatrixRW = 0;
00172   fFDVsNDMatrixXSec = 0;
00173   fFDVsNDMatrixXSecRW = 0;
00174   fFDVsNDMatrixTauXSecRW = 0;
00175 
00176   fTrueEnergyNuFlux_ND = 0;
00177   fTrueEnergyNuFluxRW_ND = 0;
00178   fTrueEnergyNuFlux_FD = 0;
00179   fTrueEnergyNuFluxRW_FD = 0;
00180   fTrueEnergyCCFlux_ND = 0;
00181   fTrueEnergyCCFluxRW_ND = 0;
00182   fTrueEnergyCCFlux_FD = 0;
00183   fTrueEnergyCCFluxRW_FD = 0;
00184 
00185   frandom3 = new TRandom3();
00186 
00187   cout << "Initialized objects" << endl;
00188 }

NuFluxHelper::~NuFluxHelper (  )  [virtual]

Definition at line 203 of file NuFluxHelper.cxx.

References fFDTrueEBinEdges, fFDVsNDMatrix, fFDVsNDMatrixRW, fFDVsNDMatrixTauXSecRW, fFDVsNDMatrixXSec, fFDVsNDMatrixXSecRW, fNDTrueEBinEdges, frandom3, fTrueEnergyCCFlux_FD, fTrueEnergyCCFlux_ND, fTrueEnergyCCFluxRW_FD, fTrueEnergyCCFluxRW_ND, fTrueEnergyNuFlux_FD, fTrueEnergyNuFlux_ND, fTrueEnergyNuFluxRW_FD, fTrueEnergyNuFluxRW_ND, fxSecGraphNuMuBarCC, fxSecGraphNuMuCC, fxSecGraphNuTauBarCC, fxSecGraphNuTauCC, and fzarko.

00204 {
00205   if (fFDVsNDMatrix)
00206     {delete fFDVsNDMatrix; fFDVsNDMatrix = 0;}
00207   if (fFDVsNDMatrixRW)
00208     {delete fFDVsNDMatrixRW; fFDVsNDMatrixRW = 0;}
00209   if (fFDVsNDMatrixXSec)
00210     {delete fFDVsNDMatrixXSec; fFDVsNDMatrixXSec = 0;}
00211   if (fFDVsNDMatrixXSecRW)
00212     {delete fFDVsNDMatrixXSecRW; fFDVsNDMatrixXSecRW = 0;}
00213   if (fFDVsNDMatrixTauXSecRW)
00214     {delete fFDVsNDMatrixTauXSecRW; fFDVsNDMatrixTauXSecRW = 0;}
00215 
00216   if (fTrueEnergyNuFlux_ND)
00217     {delete fTrueEnergyNuFlux_ND; fTrueEnergyNuFlux_ND = 0;}
00218   if (fTrueEnergyNuFluxRW_ND)
00219     {delete fTrueEnergyNuFluxRW_ND; fTrueEnergyNuFluxRW_ND = 0;}
00220   if (fTrueEnergyNuFlux_FD)
00221     {delete fTrueEnergyNuFlux_FD; fTrueEnergyNuFlux_FD = 0;}
00222   if (fTrueEnergyNuFluxRW_FD)
00223     {delete fTrueEnergyNuFluxRW_FD; fTrueEnergyNuFluxRW_FD = 0;}
00224   if (fTrueEnergyCCFlux_ND)
00225     {delete fTrueEnergyCCFlux_ND; fTrueEnergyCCFlux_ND = 0;}
00226   if (fTrueEnergyCCFluxRW_ND)
00227     {delete fTrueEnergyCCFluxRW_ND; fTrueEnergyCCFluxRW_ND = 0;}
00228   if (fTrueEnergyCCFlux_FD)
00229     {delete fTrueEnergyCCFlux_FD; fTrueEnergyCCFlux_FD = 0;}
00230   if (fTrueEnergyCCFluxRW_FD)
00231     {delete fTrueEnergyCCFluxRW_FD; fTrueEnergyCCFluxRW_FD = 0;}
00232 
00233   if (fFDTrueEBinEdges) {delete[] fFDTrueEBinEdges; fFDTrueEBinEdges=0;}
00234   if (fNDTrueEBinEdges) {delete[] fNDTrueEBinEdges; fNDTrueEBinEdges=0;}
00235 
00236   if (fzarko) {delete fzarko; fzarko = 0;}
00237 
00238   if (fxSecGraphNuMuCC) {delete fxSecGraphNuMuCC; fxSecGraphNuMuCC = 0;}
00239   if (fxSecGraphNuMuBarCC) {delete fxSecGraphNuMuBarCC; fxSecGraphNuMuBarCC = 0;}
00240   if (fxSecGraphNuTauCC) {delete fxSecGraphNuTauCC; fxSecGraphNuTauCC = 0;}
00241   if (fxSecGraphNuTauBarCC) {delete fxSecGraphNuTauBarCC; fxSecGraphNuTauBarCC = 0;}
00242 
00243   if (frandom3) {delete frandom3; frandom3 = 0;}
00244 }


Member Function Documentation

virtual BeamType::BeamType_t NuFluxHelper::BeamType (  )  const [inline, virtual]

Definition at line 45 of file NuFluxHelper.h.

References fbeamType.

Referenced by FillMMHelpers(), FillNonMMHelpers(), and MakeHelperHistos().

00046     {return fbeamType;};

virtual void NuFluxHelper::BeamType ( const BeamType::BeamType_t  beamType  )  [inline, virtual]

Definition at line 43 of file NuFluxHelper.h.

References fbeamType.

00044     {fbeamType = beamType;};

void NuFluxHelper::ConcatenateHelpers ( const char *  fileList  )  [virtual]

Definition at line 700 of file NuFluxHelper.cxx.

References fFDVsNDMatrix, fFDVsNDMatrixRW, fFDVsNDMatrixTauXSecRW, fFDVsNDMatrixXSec, fFDVsNDMatrixXSecRW, fTrueEnergyCCFlux_FD, fTrueEnergyCCFlux_ND, fTrueEnergyCCFluxRW_FD, fTrueEnergyCCFluxRW_ND, fTrueEnergyNuFlux_FD, fTrueEnergyNuFlux_ND, fTrueEnergyNuFluxRW_FD, fTrueEnergyNuFluxRW_ND, NuUtilities::GetListOfFilesInDir(), Msg::kError, Msg::kInfo, MSG, NormaliseHistos(), and WriteHistos().

00701 {
00702   vector<TString> vFiles = NuUtilities::GetListOfFilesInDir(fileList);
00703   if (vFiles.size() <= 0) {
00704     MSG("NuFluxHelper",Msg::kInfo) << "Cannot find any files in " << fileList << endl;
00705   }
00706 
00707   MSG("NuFluxHelper",Msg::kInfo) << "Concatenating " << vFiles.size()
00708   << " flux helper files." << endl;
00709 
00710   TFile *f;
00711 
00712   MSG("NuFluxHelper",Msg::kInfo) << "Reading from " << vFiles[0] << endl;
00713   f = new TFile(vFiles[0]);
00714   if (!f->IsOpen()) {
00715     MSG("NuFluxHelper",Msg::kError) << "File not opened.  Bailing" << endl;
00716     assert(false);
00717   }
00718   f->ls();
00719 
00720   fFDVsNDMatrix = (TH2D*)f->Get("FDVsNDMatrix");
00721   fFDVsNDMatrixRW = (TH2D*)f->Get("FDVsNDMatrixRW");
00722   fFDVsNDMatrixXSec = (TH2D*)f->Get("FDVsNDMatrixXSec");
00723   fFDVsNDMatrixXSecRW = (TH2D*)f->Get("FDVsNDMatrixXSecRW");
00724   fFDVsNDMatrixTauXSecRW = (TH2D*)f->Get("FDVsNDMatrixTauXSecRW");
00725 
00726   fTrueEnergyNuFlux_ND = (TH1D*)f->Get("TrueEnergyNuFlux_ND");
00727   fTrueEnergyNuFluxRW_ND = (TH1D*)f->Get("TrueEnergyNuFluxRW_ND");
00728   fTrueEnergyNuFlux_FD = (TH1D*)f->Get("TrueEnergyNuFlux_FD");
00729   fTrueEnergyNuFluxRW_FD = (TH1D*)f->Get("TrueEnergyNuFluxRW_FD");
00730   fTrueEnergyCCFlux_ND = (TH1D*)f->Get("TrueEnergyCCFlux_ND");
00731   fTrueEnergyCCFluxRW_ND = (TH1D*)f->Get("TrueEnergyCCFluxRW_ND");
00732   fTrueEnergyCCFlux_FD = (TH1D*)f->Get("TrueEnergyCCFlux_FD");
00733   fTrueEnergyCCFluxRW_FD = (TH1D*)f->Get("TrueEnergyCCFluxRW_FD");
00734 
00735   fFDVsNDMatrix->SetDirectory(0);
00736   fFDVsNDMatrixRW->SetDirectory(0);
00737   fFDVsNDMatrixXSec->SetDirectory(0);
00738   fFDVsNDMatrixXSecRW->SetDirectory(0);
00739   fFDVsNDMatrixTauXSecRW->SetDirectory(0);
00740 
00741   fTrueEnergyNuFlux_ND->SetDirectory(0);
00742   fTrueEnergyNuFluxRW_ND->SetDirectory(0);
00743   fTrueEnergyNuFlux_FD->SetDirectory(0);
00744   fTrueEnergyNuFluxRW_FD->SetDirectory(0);
00745   fTrueEnergyCCFlux_ND->SetDirectory(0);
00746   fTrueEnergyCCFluxRW_ND->SetDirectory(0);
00747   fTrueEnergyCCFlux_FD->SetDirectory(0);
00748   fTrueEnergyCCFluxRW_FD->SetDirectory(0);
00749   f->Close();
00750 
00751 
00752   for (unsigned int i = 1; i < vFiles.size(); i++) {
00753     MSG("NuFluxHelper",Msg::kInfo) << "Reading from " << vFiles[i] << endl;
00754     f = new TFile(vFiles[i]);
00755     if (!f->IsOpen()) {
00756       MSG("NuFluxHelper",Msg::kError) << "File not opened.  Bailing" << endl;
00757       assert(false);
00758     }
00759 
00760     TH2D* tmp_fFDVsNDMatrix = (TH2D*)f->Get("FDVsNDMatrix");
00761     TH2D* tmp_fFDVsNDMatrixRW = (TH2D*)f->Get("FDVsNDMatrixRW");
00762     TH2D* tmp_fFDVsNDMatrixXSec = (TH2D*)f->Get("FDVsNDMatrixXSec");
00763     TH2D* tmp_fFDVsNDMatrixXSecRW = (TH2D*)f->Get("FDVsNDMatrixXSecRW");
00764     TH2D* tmp_fFDVsNDMatrixTauXSecRW = (TH2D*)f->Get("FDVsNDMatrixTauXSecRW");
00765 
00766     TH1D* tmp_fTrueEnergyNuFlux_ND = (TH1D*)f->Get("TrueEnergyNuFlux_ND");
00767     TH1D* tmp_fTrueEnergyNuFluxRW_ND = (TH1D*)f->Get("TrueEnergyNuFluxRW_ND");
00768     TH1D* tmp_fTrueEnergyNuFlux_FD = (TH1D*)f->Get("TrueEnergyNuFlux_FD");
00769     TH1D* tmp_fTrueEnergyNuFluxRW_FD = (TH1D*)f->Get("TrueEnergyNuFluxRW_FD");
00770     TH1D* tmp_fTrueEnergyCCFlux_ND = (TH1D*)f->Get("TrueEnergyCCFlux_ND");
00771     TH1D* tmp_fTrueEnergyCCFluxRW_ND = (TH1D*)f->Get("TrueEnergyCCFluxRW_ND");
00772     TH1D* tmp_fTrueEnergyCCFlux_FD = (TH1D*)f->Get("TrueEnergyCCFlux_FD");
00773     TH1D* tmp_fTrueEnergyCCFluxRW_FD = (TH1D*)f->Get("TrueEnergyCCFluxRW_FD");
00774 
00775     fFDVsNDMatrix->Add(tmp_fFDVsNDMatrix);
00776     fFDVsNDMatrixRW->Add(tmp_fFDVsNDMatrixRW);
00777     fFDVsNDMatrixXSec->Add(tmp_fFDVsNDMatrixXSec);
00778     fFDVsNDMatrixXSecRW->Add(tmp_fFDVsNDMatrixXSecRW);
00779     fFDVsNDMatrixTauXSecRW->Add(tmp_fFDVsNDMatrixTauXSecRW);
00780 
00781     fTrueEnergyNuFlux_ND->Add(tmp_fTrueEnergyNuFlux_ND);
00782     fTrueEnergyNuFluxRW_ND->Add(tmp_fTrueEnergyNuFluxRW_ND);
00783     fTrueEnergyNuFlux_FD->Add(tmp_fTrueEnergyNuFlux_FD);
00784     fTrueEnergyNuFluxRW_FD->Add(tmp_fTrueEnergyNuFluxRW_FD);
00785     fTrueEnergyCCFlux_ND->Add(tmp_fTrueEnergyCCFlux_ND);
00786     fTrueEnergyCCFluxRW_ND->Add(tmp_fTrueEnergyCCFluxRW_ND);
00787     fTrueEnergyCCFlux_FD->Add(tmp_fTrueEnergyCCFlux_FD);
00788     fTrueEnergyCCFluxRW_FD->Add(tmp_fTrueEnergyCCFluxRW_FD);
00789 
00790     f->Close();
00791   }
00792 
00793   this->NormaliseHistos();
00794   this->WriteHistos();
00795 
00796   return;
00797 }

const TVector3 NuFluxHelper::ConvertNDToBeamCoOrdinates ( const TVector3 &  ndCoordinates  )  const [virtual]

Definition at line 1014 of file NuFluxHelper.cxx.

References Munits::cm.

Referenced by FillMMHelpers().

01015 {
01016   //Give it a point in ND co-ordinates.
01017   //Returns the same point in beam co-ordinates.
01018 
01019   // beam center (0,0) in detector coord system:
01020   // (148.844,13.97)
01021   // z offset is 104000
01022   // beamdydz = -0.0581
01023   Double_t beamCenterXDet = 148.28*Munits::cm;
01024   Double_t beamCenterYDet = 23.84*Munits::cm;
01025   Double_t beamAngle = 3.323155*TMath::DegToRad();
01026   Double_t detZ0InBeamCoOrds = 103648.837*Munits::cm;
01027 
01028   Double_t beamX = ndCoordinates.X() - beamCenterXDet;
01029   Double_t beamY =
01030     (ndCoordinates.Y()-beamCenterYDet)
01031     *TMath::Cos(beamAngle) +
01032     ndCoordinates.Z()*TMath::Sin(beamAngle);
01033   Double_t beamZ =
01034     detZ0InBeamCoOrds +
01035     (ndCoordinates.Z()*TMath::Cos(beamAngle) -
01036      ndCoordinates.Y()*TMath::Sin(beamAngle));
01037   //N.B. beamz should have a term beamCenterYDet*TMath::Sin(3.23155)
01038   //assuming the 104000 cm is measured along the beam axis.
01039   //But this term's small.
01040 
01041   TVector3 beamCoordinates(beamX,
01042                            beamY,
01043                            beamZ);
01044   return beamCoordinates;
01045 }

Bool_t NuFluxHelper::CreateHistos (  )  [private, virtual]

Definition at line 277 of file NuFluxHelper.cxx.

References fFDTrueEBinEdges, fFDVsNDMatrix, fFDVsNDMatrixRW, fFDVsNDMatrixTauXSecRW, fFDVsNDMatrixXSec, fFDVsNDMatrixXSecRW, fNDTrueEBinEdges, fNFDTrueEBins, fNNDTrueEBins, fTrueEnergyCCFlux_FD, fTrueEnergyCCFlux_ND, fTrueEnergyCCFluxRW_FD, fTrueEnergyCCFluxRW_ND, fTrueEnergyNuFlux_FD, fTrueEnergyNuFlux_ND, fTrueEnergyNuFluxRW_FD, fTrueEnergyNuFluxRW_ND, Msg::kError, and MSG.

Referenced by MakeHelperHistos().

00278 {
00279   if (fFDVsNDMatrix)
00280     {delete fFDVsNDMatrix; fFDVsNDMatrix = 0;}
00281   if (fFDVsNDMatrixRW)
00282     {delete fFDVsNDMatrixRW; fFDVsNDMatrixRW = 0;}
00283   if (fFDVsNDMatrixXSec)
00284     {delete fFDVsNDMatrixXSec; fFDVsNDMatrixXSec = 0;}
00285   if (fFDVsNDMatrixXSecRW)
00286     {delete fFDVsNDMatrixXSecRW; fFDVsNDMatrixXSecRW = 0;}
00287   if (fFDVsNDMatrixTauXSecRW)
00288     {delete fFDVsNDMatrixTauXSecRW; fFDVsNDMatrixTauXSecRW = 0;}
00289 
00290   if (fTrueEnergyNuFlux_ND)
00291     {delete fTrueEnergyNuFlux_ND; fTrueEnergyNuFlux_ND = 0;}
00292   if (fTrueEnergyNuFluxRW_ND)
00293     {delete fTrueEnergyNuFluxRW_ND; fTrueEnergyNuFluxRW_ND = 0;}
00294   if (fTrueEnergyNuFlux_FD)
00295     {delete fTrueEnergyNuFlux_FD; fTrueEnergyNuFlux_FD = 0;}
00296   if (fTrueEnergyNuFluxRW_FD)
00297     {delete fTrueEnergyNuFluxRW_FD; fTrueEnergyNuFluxRW_FD = 0;}
00298   if (fTrueEnergyCCFlux_ND)
00299     {delete fTrueEnergyCCFlux_ND; fTrueEnergyCCFlux_ND = 0;}
00300   if (fTrueEnergyCCFluxRW_ND)
00301     {delete fTrueEnergyCCFluxRW_ND; fTrueEnergyCCFluxRW_ND = 0;}
00302   if (fTrueEnergyCCFlux_FD)
00303     {delete fTrueEnergyCCFlux_FD; fTrueEnergyCCFlux_FD = 0;}
00304   if (fTrueEnergyCCFluxRW_FD)
00305     {delete fTrueEnergyCCFluxRW_FD; fTrueEnergyCCFluxRW_FD = 0;}
00306 
00307   if (!fNNDTrueEBins){
00308     MSG("NuFluxHelper",Msg::kError)
00309       <<"Number of ND true energy bins not set " <<endl;
00310     return false;
00311   }
00312   if (!fNFDTrueEBins){
00313     MSG("NuFluxHelper",Msg::kError)
00314       <<"Number of FD true energy bins not set " <<endl;
00315     return false;
00316   }
00317   if (!fNDTrueEBinEdges){
00318     MSG("NuFluxHelper",Msg::kError)
00319       <<"ND true energy bin edges not set " <<endl;
00320     return false;
00321   }
00322   if (!fFDTrueEBinEdges){
00323     MSG("NuFluxHelper",Msg::kError)
00324       <<"FD true energy bin edges not set " <<endl;
00325     return false;
00326   }
00327 
00328   fFDVsNDMatrix = new
00329     TH2D("FDVsNDMatrix",
00330          "Number of FD Vs ND Events with True Energy",
00331          fNNDTrueEBins,fNDTrueEBinEdges,
00332          fNFDTrueEBins,fFDTrueEBinEdges);
00333   fFDVsNDMatrix->Sumw2();
00334   fFDVsNDMatrixRW = new
00335     TH2D("FDVsNDMatrixRW",
00336          "Number of FD Vs ND Events with True Energy (with Near Reweight)",
00337          fNNDTrueEBins,fNDTrueEBinEdges,
00338          fNFDTrueEBins,fFDTrueEBinEdges);
00339   fFDVsNDMatrixRW->Sumw2();
00340   fFDVsNDMatrixXSec = new
00341     TH2D("FDVsNDMatrixXSec",
00342          "Number of FD Vs ND Events with True Energy (with XSec)",
00343          fNNDTrueEBins,fNDTrueEBinEdges,
00344          fNFDTrueEBins,fFDTrueEBinEdges);
00345   fFDVsNDMatrixXSec->Sumw2();
00346   fFDVsNDMatrixXSecRW = new
00347     TH2D("FDVsNDMatrixXSecRW",
00348          "Number of FD Vs ND Events with True Energy (with XSec + Near Reweight)",
00349          fNNDTrueEBins,fNDTrueEBinEdges,
00350          fNFDTrueEBins,fFDTrueEBinEdges);
00351   fFDVsNDMatrixXSecRW->Sumw2();
00352   fFDVsNDMatrixTauXSecRW = new
00353     TH2D("FDVsNDMatrixTauXSecRW",
00354          "Number of FD Vs ND Events with True Energy (with FD Tau XSec + Near Reweight)",
00355          fNNDTrueEBins,fNDTrueEBinEdges,
00356          fNFDTrueEBins,fFDTrueEBinEdges);
00357 
00358   fTrueEnergyNuFlux_ND = new
00359     TH1D("TrueEnergyNuFlux_ND",
00360          "Neutrino Flux with True Energy (NearDet)",
00361          fNNDTrueEBins,fNDTrueEBinEdges);
00362   fTrueEnergyNuFlux_ND->Sumw2();
00363   fTrueEnergyNuFluxRW_ND = new
00364     TH1D("TrueEnergyNuFluxRW_ND",
00365          "Neutrino Flux with True Energy (NearDet with Reweighting)",
00366          fNNDTrueEBins,fNDTrueEBinEdges);
00367   fTrueEnergyNuFlux_FD = new
00368     TH1D("TrueEnergyNuFlux_FD",
00369          "Neutrino Flux with True Energy (FarDet)",
00370          fNFDTrueEBins,fFDTrueEBinEdges);
00371   fTrueEnergyNuFlux_FD->Sumw2();
00372   fTrueEnergyNuFluxRW_FD = new
00373     TH1D("TrueEnergyNuFluxRW_FD",
00374          "Neutrino Flux with True Energy (FarDet with Reweighting)",
00375          fNFDTrueEBins,fFDTrueEBinEdges);
00376   fTrueEnergyNuFluxRW_FD->Sumw2();
00377   fTrueEnergyCCFlux_ND = new
00378     TH1D("TrueEnergyCCFlux_ND",
00379          "NuMu CC Flux with True Energy (NearDet)",
00380          fNNDTrueEBins,fNDTrueEBinEdges);
00381   fTrueEnergyCCFlux_ND->Sumw2();
00382   fTrueEnergyCCFluxRW_ND = new
00383     TH1D("TrueEnergyCCFluxRW_ND",
00384          "NuMu CC Flux with True Energy with (NearDet with Reweighting)",
00385          fNNDTrueEBins,fNDTrueEBinEdges);
00386   fTrueEnergyCCFluxRW_ND->Sumw2();
00387   fTrueEnergyCCFlux_FD = new
00388     TH1D("TrueEnergyCCFlux_FD",
00389          "NuMu CC Flux with True Energy (FarDet)",
00390          fNFDTrueEBins,fFDTrueEBinEdges);
00391   fTrueEnergyCCFlux_FD->Sumw2();
00392   fTrueEnergyCCFluxRW_FD = new
00393     TH1D("TrueEnergyCCFluxRW_FD",
00394          "NuMu CC Flux with True Energy (FarDet with Reweighing)",
00395          fNFDTrueEBins,fFDTrueEBinEdges);
00396   fTrueEnergyCCFluxRW_FD->Sumw2();
00397 
00398   return true;
00399 }

virtual Double_t NuFluxHelper::CrossSection ( const NuParticle::NuParticleType_t  particle,
const Double_t  energy 
) const [private, virtual]

Referenced by FillMMHelpers(), and FillNonMMHelpers().

void NuFluxHelper::CrossSectionFile ( const char *  xSecFile  )  [virtual]

Definition at line 402 of file NuFluxHelper.cxx.

References fxSecFile, fxSecGraphNuMuBarCC, fxSecGraphNuMuCC, fxSecGraphNuTauBarCC, and fxSecGraphNuTauCC.

00403 {
00404   fxSecFile = xSecFile;
00405 
00406   if (fxSecGraphNuMuCC){
00407     delete fxSecGraphNuMuCC;
00408     fxSecGraphNuMuCC = 0;
00409   }
00410   if (fxSecGraphNuMuBarCC){
00411     delete fxSecGraphNuMuBarCC;
00412     fxSecGraphNuMuBarCC = 0;
00413   }
00414   if (fxSecGraphNuTauCC){
00415     delete fxSecGraphNuTauCC;
00416     fxSecGraphNuTauCC = 0;
00417   }
00418   if (fxSecGraphNuTauBarCC){
00419     delete fxSecGraphNuTauBarCC;
00420     fxSecGraphNuTauBarCC = 0;
00421   }
00422 
00423   //Get the cross-section information from the histogram in the file.
00424   //Put it into an array.
00425   TFile *mikeFile=new TFile(fxSecFile.c_str(),"READ");
00426 
00427   //Put the numu CC cross sections into an array
00428   TH1F* XSec_NuMuCC = (TH1F*) mikeFile->Get("h_numu_cc_tot");
00429   XSec_NuMuCC->SetDirectory(0);
00430   Float_t* x = new Float_t[XSec_NuMuCC->GetNbinsX()];
00431   Float_t* y = new Float_t[XSec_NuMuCC->GetNbinsX()];
00432   for(int i=0;i<XSec_NuMuCC->GetNbinsX();i++) {
00433     x[i] = XSec_NuMuCC->GetBinCenter(i+1);
00434     y[i] = XSec_NuMuCC->GetBinContent(i+1);
00435   }
00436   //Turn the array into a graph.
00437   fxSecGraphNuMuCC = new TGraph(XSec_NuMuCC->GetNbinsX(),x,y);
00438 
00439   //Clean up ready for the next set of cross sections
00440   if (x) {delete x; x=0;}
00441   if (y) {delete y; y=0;}
00442 
00443   //Put the numubar CC cross sections into an array
00444   TH1F* XSec_NuMuBarCC = (TH1F*) mikeFile->Get("h_numubar_cc_tot");
00445   XSec_NuMuBarCC->SetDirectory(0);
00446   x = new Float_t[XSec_NuMuBarCC->GetNbinsX()];
00447   y = new Float_t[XSec_NuMuBarCC->GetNbinsX()];
00448   for(int i=0;i<XSec_NuMuBarCC->GetNbinsX();i++) {
00449     x[i] = XSec_NuMuBarCC->GetBinCenter(i+1);
00450     y[i] = XSec_NuMuBarCC->GetBinContent(i+1);
00451   }
00452   //Turn the array into a graph.
00453   fxSecGraphNuMuBarCC = new TGraph(XSec_NuMuBarCC->GetNbinsX(),x,y);
00454 
00455   //Clean up ready for the next set of cross sections:
00456   if (x) {delete x; x=0;}
00457   if (y) {delete y; y=0;}
00458 
00459   //Put the nutau CC cross sections into an array
00460   TH1F* XSec_NuTauCC = (TH1F*) mikeFile->Get("h_nutau_cc_tot");
00461   XSec_NuTauCC->SetDirectory(0);
00462   x = new Float_t[XSec_NuTauCC->GetNbinsX()];
00463   y = new Float_t[XSec_NuTauCC->GetNbinsX()];
00464   for(int i=0;i<XSec_NuTauCC->GetNbinsX();i++) {
00465     x[i] = XSec_NuTauCC->GetBinCenter(i+1);
00466     y[i] = XSec_NuTauCC->GetBinContent(i+1);
00467   }
00468   //Turn the array into a graph.
00469   fxSecGraphNuTauCC = new TGraph(XSec_NuTauCC->GetNbinsX(),x,y);
00470 
00471   //Clean up ready for the next set of cross sections
00472   if (x) {delete x; x=0;}
00473   if (y) {delete y; y=0;}
00474 
00475   //Put the nutaubar CC cross sections into an array
00476   TH1F* XSec_NuTauBarCC = (TH1F*) mikeFile->Get("h_nutaubar_cc_tot");
00477   XSec_NuTauBarCC->SetDirectory(0);
00478   x = new Float_t[XSec_NuTauBarCC->GetNbinsX()];
00479   y = new Float_t[XSec_NuTauBarCC->GetNbinsX()];
00480   for(int i=0;i<XSec_NuTauBarCC->GetNbinsX();i++) {
00481     x[i] = XSec_NuTauBarCC->GetBinCenter(i+1);
00482     y[i] = XSec_NuTauBarCC->GetBinContent(i+1);
00483   }
00484   //Turn the array into a graph.
00485   fxSecGraphNuTauBarCC = new TGraph(XSec_NuTauBarCC->GetNbinsX(),x,y);
00486 
00487   //Clean up memory:
00488   if (x) {delete x; x=0;}
00489   if (y) {delete y; y=0;}
00490 
00491   mikeFile->Close();
00492   if (mikeFile) {delete mikeFile; mikeFile = 0;}
00493 }

virtual Bool_t NuFluxHelper::DoSKZP (  )  const [inline, virtual]

Definition at line 55 of file NuFluxHelper.h.

References fdoSKZP.

Referenced by NuFluxHelper().

00055 {return fdoSKZP;};

void NuFluxHelper::DoSKZP ( const Bool_t  doSKZP  )  [virtual]

Definition at line 191 of file NuFluxHelper.cxx.

References fdoSKZP, and fzarko.

00192 {
00193   fdoSKZP=doSKZP;
00194   if (fdoSKZP && !fzarko) {
00195     fzarko = new NuZBeamReweight();
00196   }
00197   if (!fdoSKZP && fzarko){
00198     delete fzarko; fzarko = 0;
00199   }
00200 }

virtual void NuFluxHelper::FDTrueEBins ( const std::vector< Double_t >  fdtruebins  )  [virtual]

void NuFluxHelper::FillMMHelpers ( const NuFluxChain fluxChain,
const Int_t  flukaEntry 
) const [private, virtual]

Definition at line 1073 of file NuFluxHelper.cxx.

References BeamType(), NuEvent::beamType, NuEvent::beamWeight, Munits::cm, ConvertNDToBeamCoOrdinates(), CrossSection(), NuEvent::detector, fbeamShiftAsSigma, fdoBeamShift, fdoScrapingShift, fdoSKZP, fFDVsNDMatrixRW, fFDVsNDMatrixTauXSecRW, fFDVsNDMatrixXSecRW, NuEvent::fluxErr, frandom3, fscrapingScaleFactor, fTrueEnergyCCFluxRW_FD, fTrueEnergyCCFluxRW_ND, fTrueEnergyNuFluxRW_FD, fTrueEnergyNuFluxRW_ND, fzarko, NuZBeamReweight::GetBeamWeightsOnly(), NuEvent::iaction, NuEvent::inu, DDS::kError, Detector::kFar, Msg::kInfo, BeamType::kL010z185i, BeamType::kL250z200i, SimFlag::kMC, Detector::kNear, MSG, NuEvent::neuEnMC, ArrAy::new_ene, ArrAy::new_weight, NuFluxChain::NuImportanceWeight(), NuFluxChain::NuParticleAsPDGCode(), NuFluxChain::NuType(), NuWte(), NuFluxChain::ParentParticleType(), NuFluxChain::ParentProdVtxX(), NuFluxChain::ParentProdVtxY(), NuFluxChain::ParentProdVtxZ(), ReweightVersion(), NuEvent::reweightVersion, RunPeriod(), NuEvent::runPeriod, NuEvent::simFlag, NuFluxChain::TargetParentPX(), NuFluxChain::TargetParentPY(), NuFluxChain::TargetParentPZ(), TauCrossSection(), NuEvent::tptype, NuEvent::tpx, NuEvent::tpy, NuEvent::tpz, and MinosMaterial::Z().

Referenced by MakeHelperHistos().

01075 {
01076   //Get the fluka variables I'm going to need
01077   NuParticleType_t Ntype = fluxChain->NuType(flukaEntry);
01078   Int_t tptype = fluxChain->ParentParticleType(flukaEntry);
01079   Double_t tpx = fluxChain->TargetParentPX(flukaEntry);
01080   Double_t tpy = fluxChain->TargetParentPY(flukaEntry);
01081   Double_t tpz = fluxChain->TargetParentPZ(flukaEntry);
01082   Double_t Nimpwt = fluxChain->NuImportanceWeight(flukaEntry);
01083 
01084   //Higher-level fluka variables
01085   Double_t pt = 0;
01086   Double_t pt2 = tpx*tpx + tpy*tpy;
01087   if (0 < pt2){pt = sqrt(pt2);}
01088 
01089   //Loop over the neutrinos 10 times to spread out importance weights
01090   for(int subLoop=0;subLoop<10;subLoop++){
01091 
01092     //Make a vector ready to hold random detector points
01093     TVector3 vDetPoint(0,0,0);
01094 
01095     //Keep creating random points until one falls within the
01096     //fiducial volume.
01097     do {
01098       vDetPoint.SetX(frandom3->Uniform(-300,300)*Munits::cm);
01099       vDetPoint.SetY(frandom3->Uniform(-300,300)*Munits::cm);
01100       vDetPoint.SetZ(frandom3->Uniform(0,600)*Munits::cm);
01101     } while (!this->IsNDFiducial(vDetPoint));
01102 
01103     TVector3 vBeamPoint = this->ConvertNDToBeamCoOrdinates(vDetPoint);
01104 
01105     Double_t X = vBeamPoint.X()/Munits::cm;
01106     Double_t Y = vBeamPoint.Y()/Munits::cm;
01107     Double_t Z = vBeamPoint.Z()/Munits::cm;
01108 
01109     //Get the ND weight and energy:
01110     ArrAy newvals_nd = this->NuWte(X,Y,Z,fluxChain,flukaEntry);
01111     //get new fd weight and energy:
01112     ArrAy newvals_fd = this->NuWte(0,0,73534000.,fluxChain,flukaEntry);
01113 
01114     //Calculate SKZP parameters for the new neutrino energies
01115     //Make NuEvents to get the beam weights into.
01116     NuEvent nearEvent;
01117     nearEvent.reweightVersion = this->ReweightVersion();
01118     nearEvent.simFlag = SimFlag::kMC;
01119     nearEvent.beamType = this->BeamType();
01120     nearEvent.runPeriod = this->RunPeriod();
01121     nearEvent.neuEnMC = newvals_nd.new_ene;
01122     nearEvent.inu=fluxChain->NuParticleAsPDGCode(Ntype);
01123     nearEvent.tptype = tptype;
01124     nearEvent.tpz = tpz;
01125     nearEvent.tpy = tpy;
01126     nearEvent.tpx = tpx;
01127     nearEvent.detector = Detector::kNear;
01128     nearEvent.beamWeight = 1.0;
01129     nearEvent.fluxErr = 1.0;
01130     
01131     NuEvent farEvent;
01132     farEvent.reweightVersion = this->ReweightVersion();
01133     farEvent.simFlag = SimFlag::kMC;
01134     farEvent.beamType = this->BeamType();
01135     farEvent.runPeriod = this->RunPeriod();
01136     farEvent.neuEnMC = newvals_fd.new_ene;
01137     farEvent.inu=fluxChain->NuParticleAsPDGCode(Ntype);
01138     farEvent.iaction=1;//CC
01139     farEvent.tptype = tptype;
01140     farEvent.tpz = tpz;
01141     farEvent.tpy = tpy;
01142     farEvent.tpx = tpx;
01143     farEvent.detector = Detector::kFar;
01144     farEvent.beamWeight = 1.0;
01145     farEvent.fluxErr = 1.0;
01146     
01147     //Get the SKZP weights
01148     Double_t flux_weight_near = 1.0;
01149     Double_t flux_weight_far = 1.0;
01150 
01151     if (fdoSKZP){
01152       //Reweight the NuEvents
01153       fzarko->GetBeamWeightsOnly(nearEvent);
01154       fzarko->GetBeamWeightsOnly(farEvent);
01155       
01156       flux_weight_near = nearEvent.beamWeight;
01157       flux_weight_far = farEvent.beamWeight;
01158     }
01159     if (fdoBeamShift){
01160       {
01161         static Int_t messageCounter = 0;
01162         if (messageCounter < 5){
01163           MSG("NuFluxHelper",Msg::kInfo)
01164             << "Performing beam shift "
01165             << fbeamShiftAsSigma << " sigma"
01166             << endl;
01167           ++messageCounter;
01168         }
01169       }
01170       flux_weight_near *= 1.0 + fbeamShiftAsSigma*(nearEvent.fluxErr - 1.0);
01171       flux_weight_far *= 1.0 + fbeamShiftAsSigma*(farEvent.fluxErr - 1.0);
01172     }
01173     if (fdoScrapingShift){
01174       Double_t ppvx = fluxChain->ParentProdVtxX(flukaEntry);
01175       Double_t ppvy = fluxChain->ParentProdVtxY(flukaEntry);
01176       Double_t ppvz = fluxChain->ParentProdVtxZ(flukaEntry);
01177       Float_t ppvr = sqrt(ppvx*ppvx + ppvy*ppvy);
01178       Float_t Znom = 52.06; // -187.06 for HE
01179       if (BeamType::kL250z200i == this->BeamType()){
01180         Znom = -187.06;
01181       }
01182       else if (BeamType::kL010z185i == this->BeamType()){
01183         Znom = 52.06;
01184       }
01185       else{
01186         MSG("NuFluxHelper", kError)
01187           << "Trying to do a scraping shift with an unrecognised beam type "
01188           << "is probably a bad idea."
01189           << endl;
01190         Znom = 52.06;
01191         assert(false);
01192       }
01193 
01194       Bool_t shouldIShift = true;
01195       if (ppvr < 1.65 && TMath::Abs(ppvz - Znom) < 0.1){
01196         shouldIShift = false;
01197       }
01198       if (TMath::Abs(ppvr - 1.51) < 0.11 && ppvz < Znom){
01199         shouldIShift = false; // Target Side
01200       }
01201       // Chase (z < 4500) or Decay Pipe (z > 4500)
01202       if (shouldIShift){
01203         flux_weight_near *= fscrapingScaleFactor;
01204         flux_weight_far *= fscrapingScaleFactor;
01205       }
01206     }
01207 
01208     //Calculate cross-sections for the new neutrino energies
01209     Double_t xsec_nd = this->CrossSection(Ntype,newvals_nd.new_ene);
01210     if(xsec_nd<=0.0) xsec_nd = 0.0;
01211     Double_t xsec_fd = this->CrossSection(Ntype,newvals_fd.new_ene);
01212     if(xsec_fd<=0.0) xsec_fd = 0.0;
01213     //Tau cross section:
01214     Double_t tauXsec_fd = this->TauCrossSection(Ntype,newvals_fd.new_ene);
01215     if (tauXsec_fd<=0.0) tauXsec_fd = 0.0;
01216 
01217     //Fill the beam matrix:
01218     fFDVsNDMatrixXSecRW->Fill(newvals_nd.new_ene,
01219                               newvals_fd.new_ene,
01220                               Nimpwt*newvals_fd.new_weight*
01221                               xsec_fd*flux_weight_far);
01222 
01223     //Fill the numu->nutau beam matrix:
01224     fFDVsNDMatrixTauXSecRW->Fill(newvals_nd.new_ene,
01225                                  newvals_fd.new_ene,
01226                                  Nimpwt*newvals_fd.new_weight*
01227                                  tauXsec_fd*flux_weight_far);
01228 
01229 
01230     //Fill the beam matrix without cross-sections:
01231     fFDVsNDMatrixRW->Fill(newvals_nd.new_ene,
01232                           newvals_fd.new_ene,
01233                           Nimpwt*newvals_fd.new_weight*
01234                           flux_weight_far);
01235 
01236     //Needed to normalise fFDVsNDMatrixRW:
01237     fTrueEnergyNuFluxRW_ND->Fill(newvals_nd.new_ene,
01238                                  Nimpwt*newvals_nd.new_weight*
01239                                  flux_weight_near);
01240     //Not needed:
01241     fTrueEnergyNuFluxRW_FD->Fill(newvals_fd.new_ene,
01242                                  Nimpwt*newvals_fd.new_weight*
01243                                  flux_weight_far);
01244 
01245     //Needed to normalise fFDVsNDMatrixXSecRW and fFDVsNDMatrixTauXSecRW:
01246     fTrueEnergyCCFluxRW_ND->Fill(newvals_nd.new_ene,
01247                                  Nimpwt*newvals_nd.new_weight*
01248                                  xsec_nd*flux_weight_near);
01249     //Not needed:
01250     fTrueEnergyCCFluxRW_FD->Fill(newvals_fd.new_ene,
01251                                  Nimpwt*newvals_fd.new_weight*
01252                                  xsec_fd*flux_weight_far);
01253 
01254   } //End x10 loop over fluka neutrinos
01255 }

void NuFluxHelper::FillNonMMHelpers ( const NuFluxChain fluxChain,
const Int_t  flukaEntry 
) const [private, virtual]

Definition at line 826 of file NuFluxHelper.cxx.

References BeamType(), NuEvent::beamType, NuEvent::beamWeight, CrossSection(), NuEvent::detector, fbeamShiftAsSigma, fdoBeamShift, fdoScrapingShift, fdoSKZP, fFDVsNDMatrix, fFDVsNDMatrixXSec, NuEvent::fluxErr, fscrapingScaleFactor, fTrueEnergyCCFlux_FD, fTrueEnergyCCFlux_ND, fTrueEnergyNuFlux_FD, fTrueEnergyNuFlux_ND, fzarko, NuZBeamReweight::GetBeamWeightsOnly(), NuEvent::inu, DDS::kError, Detector::kFar, Msg::kInfo, BeamType::kL010z185i, BeamType::kL250z200i, SimFlag::kMC, Detector::kNear, MSG, NuEvent::neuEnMC, NuFluxChain::NeutrinoFDEnergy(), NuFluxChain::NeutrinoNDEnergy(), NuFluxChain::NuFDWeight(), NuFluxChain::NuImportanceWeight(), NuFluxChain::NuNDWeight(), NuFluxChain::NuParticleAsPDGCode(), NuFluxChain::NuType(), NuFluxChain::ParentParticleType(), NuFluxChain::ParentProdVtxX(), NuFluxChain::ParentProdVtxY(), NuFluxChain::ParentProdVtxZ(), ReweightVersion(), NuEvent::reweightVersion, RunPeriod(), NuEvent::runPeriod, NuEvent::simFlag, NuFluxChain::TargetParentPX(), NuFluxChain::TargetParentPY(), NuFluxChain::TargetParentPZ(), NuEvent::tptype, NuEvent::tpx, NuEvent::tpy, and NuEvent::tpz.

00828 {
00829   //Get the fluka variables I'm going to need
00830   NuParticleType_t Ntype = fluxChain->NuType(flukaEntry);
00831   Int_t tptype = fluxChain->ParentParticleType(flukaEntry);
00832   Double_t tpx = fluxChain->TargetParentPX(flukaEntry);
00833   Double_t tpy = fluxChain->TargetParentPY(flukaEntry);
00834   Double_t tpz = fluxChain->TargetParentPZ(flukaEntry);
00835   Double_t Nenergyn = fluxChain->NeutrinoNDEnergy(flukaEntry);
00836   Double_t Nenergyf = fluxChain->NeutrinoFDEnergy(flukaEntry);
00837   Double_t Nimpwt = fluxChain->NuImportanceWeight(flukaEntry);
00838   Double_t Nwtnear = fluxChain->NuNDWeight(flukaEntry);
00839   Double_t Nwtfar = fluxChain->NuFDWeight(flukaEntry);
00840 
00841   //Higher-level fluka variables
00842   Double_t pt = 0;
00843   Double_t pt2 = tpx*tpx + tpy*tpy;
00844   if (0 < pt2){pt = sqrt(pt2);}
00845 
00846   //Make NuEvents to get the beam weights into.
00847   NuEvent nearEvent;
00848   nearEvent.reweightVersion = this->ReweightVersion();
00849   nearEvent.simFlag = SimFlag::kMC;
00850   nearEvent.beamType = this->BeamType();
00851   nearEvent.runPeriod = this->RunPeriod();
00852   nearEvent.neuEnMC = Nenergyn;
00853   nearEvent.inu=fluxChain->NuParticleAsPDGCode(Ntype);
00854   nearEvent.tptype = tptype;
00855   nearEvent.tpz = tpz;
00856   nearEvent.tpy = tpy;
00857   nearEvent.tpx = tpx;
00858   nearEvent.detector = Detector::kNear;
00859   nearEvent.beamWeight = 1.0;
00860   nearEvent.fluxErr = 1.0;
00861 
00862   NuEvent farEvent;
00863   farEvent.reweightVersion = this->ReweightVersion();
00864   farEvent.simFlag = SimFlag::kMC;
00865   farEvent.beamType = this->BeamType();
00866   farEvent.runPeriod = this->RunPeriod();
00867   farEvent.neuEnMC = Nenergyf;
00868   farEvent.inu=fluxChain->NuParticleAsPDGCode(Ntype);
00869   farEvent.tptype = tptype;
00870   farEvent.tpz = tpz;
00871   farEvent.tpy = tpy;
00872   farEvent.tpx = tpx;
00873   farEvent.detector = Detector::kFar;
00874   farEvent.beamWeight = 1.0;
00875   farEvent.fluxErr = 1.0;
00876 
00877   //Get the SKZP weights
00878   Double_t flux_weight_near = 1.0;
00879   Double_t flux_weight_far = 1.0;
00880 
00881   if (fdoSKZP){
00882     //Reweight the NuEvents
00883     fzarko->GetBeamWeightsOnly(nearEvent);
00884     fzarko->GetBeamWeightsOnly(farEvent);
00885     
00886     flux_weight_near = nearEvent.beamWeight;
00887     flux_weight_far = farEvent.beamWeight;
00888   }
00889   else{
00890     static Int_t messageCounter = 0;
00891     if (messageCounter < 5){
00892       MSG("NuFluxHelper",Msg::kInfo)
00893         << "No SKZP reweighting" << endl;
00894       ++messageCounter;
00895     }
00896   }
00897   if (fdoBeamShift){
00898     {
00899       static Int_t messageCounter = 0;
00900       if (messageCounter < 5){
00901         MSG("NuFluxHelper",Msg::kInfo)
00902           << "Performing beam shift "
00903           << fbeamShiftAsSigma << " sigma"
00904           << endl;
00905         ++messageCounter;
00906       }
00907     }
00908     flux_weight_near *= 1.0 + fbeamShiftAsSigma*(nearEvent.fluxErr - 1.0);
00909     flux_weight_far *= 1.0 + fbeamShiftAsSigma*(farEvent.fluxErr - 1.0);
00910   }
00911   if (fdoScrapingShift){
00912     Double_t ppvx = fluxChain->ParentProdVtxX(flukaEntry);
00913     Double_t ppvy = fluxChain->ParentProdVtxY(flukaEntry);
00914     Double_t ppvz = fluxChain->ParentProdVtxZ(flukaEntry);
00915     Float_t ppvr = sqrt(ppvx*ppvx + ppvy*ppvy);
00916     Float_t Znom = 52.06; // -187.06 for HE
00917     if (BeamType::kL250z200i == this->BeamType()){
00918       Znom = -187.06;
00919     }
00920     else if (BeamType::kL010z185i == this->BeamType()){
00921       Znom = 52.06;
00922     }
00923     else{
00924       MSG("NuFluxHelper", kError)
00925         << "Trying to do a scraping shift with an unrecognised beam type "
00926         << "is probably a bad idea."
00927         << endl;
00928       Znom = 52.06;
00929       assert(false);
00930     }
00931 
00932     Bool_t shouldIShift = true;
00933     if (ppvr < 1.65 && TMath::Abs(ppvz - Znom) < 0.1){
00934       shouldIShift = false;
00935     }
00936     if (TMath::Abs(ppvr - 1.51) < 0.11 && ppvz < Znom){
00937       shouldIShift = false; // Target Side
00938     }
00939     // Chase (z < 4500) or Decay Pipe (z > 4500)
00940     if (shouldIShift){
00941       flux_weight_near *= fscrapingScaleFactor;
00942       flux_weight_far *= fscrapingScaleFactor;
00943     }
00944   }
00945 
00946   //What's the cross-section of my neutrino?
00947   //Only needed for filling XSec-reweighted plots
00948   Double_t xsec_nd = this->CrossSection(Ntype,Nenergyn);
00949   Double_t xsec_fd = this->CrossSection(Ntype,Nenergyf);
00950   if(xsec_nd<=0.0) xsec_nd = 0.0;
00951   if(xsec_fd<=0.0) xsec_fd = 0.0;
00952 
00953   //Fill the beam matrix without MM reweighting or cross-sections:
00954   //(Does this reduce down to the N/F method?)
00955   fFDVsNDMatrix->Fill(Nenergyn,
00956                       Nenergyf,
00957                       Nimpwt*Nwtfar*flux_weight_far);
00958 
00959   //Fill the beam matrix without MM reweighting but with cross-sections:
00960   fFDVsNDMatrixXSec->Fill(Nenergyn,
00961                           Nenergyf,
00962                           Nimpwt*Nwtfar*xsec_fd*flux_weight_far);
00963 
00964   //Needed to normalise fFDVsNDMatrix:
00965   fTrueEnergyNuFlux_ND->Fill(Nenergyn,
00966                              Nimpwt*Nwtnear*flux_weight_near);
00967 
00968   //Not needed:
00969   fTrueEnergyNuFlux_FD->Fill(Nenergyf,
00970                              Nimpwt*Nwtfar*flux_weight_far);
00971 
00972   //Needed to normalise fFDVsNDMatrixXSec:
00973   fTrueEnergyCCFlux_ND->Fill(Nenergyn,
00974                              Nimpwt*Nwtnear*xsec_nd*flux_weight_near);
00975 
00976   //Not needed:
00977   fTrueEnergyCCFlux_FD->Fill(Nenergyf,
00978                              Nimpwt*Nwtfar*xsec_fd*flux_weight_far);
00979 
00980   return;
00981 }

Bool_t NuFluxHelper::IsNDFiducial ( const TVector3 &  ndPoint  )  const [virtual]

Definition at line 1048 of file NuFluxHelper.cxx.

References NuCuts::IsInFidVol(), NuCuts::kCC0325Std, SimFlag::kMC, and Detector::kNear.

01049 {
01050   //create a NuCuts object
01051   static NuCuts nuCuts;
01052 
01053   //give fake values for u,v,plane,r,releaseType
01054   //since they are not needed for kCC0325Std
01055   return nuCuts.IsInFidVol(ndPoint.X(),ndPoint.Y(),ndPoint.Z(),
01056                            0,0,
01057                            0,0,
01058                            Detector::kNear,NuCuts::kCC0325Std,
01059                            0,SimFlag::kMC);
01060 
01061   //Bool_t NuCuts::IsInFidVol(Float_t x,Float_t y,Float_t z,
01062   //              Float_t u,Float_t v,
01063   //              Int_t planeTrkVtx,Float_t rTrkVtx,
01064   //              Int_t detector,Int_t anaVersion,
01065   //              Int_t releaseType,Int_t simFlag)
01066 
01067   //return nuCuts.IsInFidVolNDCC0325Std(ndPoint.X(),
01068   //                        ndPoint.Y(),
01069   //                        ndPoint.Z());
01070 }

virtual Bool_t NuFluxHelper::IsParticleToExtrapolate ( const NuParticle::NuParticleType_t  particle  )  const [private, virtual]

void NuFluxHelper::MakeHelperHistos ( const char *  fileList  )  [virtual]

Definition at line 546 of file NuFluxHelper.cxx.

References BeamType::AsString(), batchRunning, BeamType(), CreateHistos(), FillMMHelpers(), frandom3, freweightVersion, frunPeriod, fxSecGraphNuMuBarCC, fxSecGraphNuMuCC, fxSecGraphNuTauBarCC, fxSecGraphNuTauCC, NuFluxChain::GetBeamType(), NuFluxChain::GetEntries(), NuUtilities::GetListOfFilesInDir(), NuFluxChain::GetRunPeriod(), SKZPWeightCalculator::kDetXs, SKZPWeightCalculator::kDogwood5_Daikon07_2012, Msg::kError, Msg::kInfo, BeamType::kM000z200i_nova, BeamType::kM000z200i_nova_rev, SKZPWeightCalculator::kMINOSplus_2014, SKZPWeightCalculator::kNone, SKZPWeightCalculator::kRunXI, BeamType::kUnknown, MSG, NormaliseHistos(), NuFluxChain::NuType(), RunPeriod(), and WriteHistos().

00547 {
00548   const NuFluxChain* fluxChain = 0;
00549   vector<TString> vFiles = NuUtilities::GetListOfFilesInDir(fileList);
00550   TString tmp = vFiles[0];
00551   if (tmp.Contains("flugg")){
00552     MSG("NuFluxHelper",Msg::kInfo)  << "USING FLUGG CHAIN" << endl;
00553     fluxChain = new NuFluggChain(fileList);
00554     // Reset the reweight version only for Flugg
00555     freweightVersion = SKZPWeightCalculator::kDogwood5_Daikon07_2012;
00556   }
00557   else{
00558     MSG("NuFluxHelper",Msg::kInfo) << "USING GNUMI CHAIN" << endl;
00559     fluxChain = new NuGnumiChain(fileList);
00560     freweightVersion = SKZPWeightCalculator::kDetXs;
00561   }
00562   //if medium energy beam use the new weights
00563   if (tmp.Contains("mn")){
00564     MSG("NuFluxHelper",Msg::kInfo)  << "USING FLUGG CHAIN" << endl;
00565     fluxChain = new NuFluggChain(fileList);
00566     // Reset the reweight version only for Flugg
00567     freweightVersion = SKZPWeightCalculator::kMINOSplus_2014;
00568   }
00569 
00570   TString num = tmp(tmp.Last('_')+1, 3);
00571   if (!num.IsDigit()) {
00572     MSG("NuFluxHelper",Msg::kInfo) << "Cannot determine run number for file: " << tmp
00573     << " (got " << num << ") so random seed will not be reproducible." << endl;
00574     frandom3->SetSeed(0);
00575   }
00576   else {
00577     MSG("NuFluxHelper",Msg::kInfo) << "Setting random seed to " << num << "." << endl;
00578     frandom3->SetSeed(num.Atoi());
00579   }
00580 
00581 
00582 
00583   // Double check the beam type
00584   // If our beam type is not yet known, fill it with type from fluxChain
00585   // If fluxChain type is not known, trust our beam type
00586   // If we have both types, check that they match
00587   if (fluxChain->GetBeamType() != BeamType::kUnknown) {
00588     if (BeamType() == BeamType::kUnknown) BeamType(fluxChain->GetBeamType());
00589     if (BeamType() != fluxChain->GetBeamType()) {
00590       MSG("NuFluxHelper",Msg::kError) << "Beam types do not match.  "
00591                                       << "Type from fluxFiles: " << BeamType::AsString(fluxChain->GetBeamType())
00592                                       << ", Type from FluxHelper: " << BeamType::AsString(BeamType()) << endl;
00593       return;
00594     }
00595   }
00596 
00597 
00598 
00599   // Double check the Run Period
00600   // If our run period is not yet known, fill it with type from fluxChain
00601   // If fluxChain run period is not known, trust our run period
00602   // If we have both types, check that they match
00603   if (fluxChain->GetRunPeriod() != SKZPWeightCalculator::kNone) {
00604     if (RunPeriod() == SKZPWeightCalculator::kNone) RunPeriod(fluxChain->GetRunPeriod());
00605     if (RunPeriod() != fluxChain->GetRunPeriod()) {
00606       MSG("NuFluxHelper",Msg::kError) << "Run Periods do not match.  "
00607                                       << "Period from fluxFiles: " << static_cast<int>(fluxChain->GetRunPeriod())
00608                                       << ", Period from FluxHelper: " << static_cast<int>(RunPeriod()) << endl;
00609       return;
00610     }
00611   }
00612   //if "nova" period beam, run period is 11
00613   if (BeamType() == BeamType::kM000z200i_nova ||
00614       BeamType() == BeamType::kM000z200i_nova_rev){
00615     frunPeriod = SKZPWeightCalculator::kRunXI;
00616     //}
00617     //if (RunPeriod() != SKZPWeightCalculator::kNone){
00618     //MSG("NuFluxHelper",Msg::kError)
00619     //<< "You are using NOvA-era flux files, but the run period "
00620     //<< "is not set to 0"
00621     //<< endl;
00622     // return;
00623     //}
00624   
00625   //if (DoSKZP()){
00626   // MSG("NuFluxHelper",Msg::kWarning)
00627   //  << endl
00628   //  << "   This is NOvA-era beam, for which no SKZP weights exist,"
00629   //  << endl
00630   //  << "   but you have requested SKZP reweighting."
00631   //  << endl
00632   //  << "   SKZP weighting is being switched off."
00633   //  << endl;
00634   //this->DoSKZP(false);
00635   //}
00636   }
00637   
00638   MSG("NuFluxHelper",Msg::kInfo) << "Make flux helpers with " << BeamType::AsString(BeamType())
00639                                  << " and run period " << static_cast<int>(RunPeriod()) << endl;
00640 
00641   //Make the histograms if possible:
00642   Bool_t histosReady = this->CreateHistos();
00643   if (!histosReady){return;}
00644 
00645   if (!fxSecGraphNuMuCC){
00646     MSG("NuFluxHelper",Msg::kError)
00647       <<"No numu CC cross-section graph supplied." <<endl;
00648     return;
00649   }
00650   if (!fxSecGraphNuMuBarCC){
00651     MSG("NuFluxHelper",Msg::kError)
00652       <<"No numubar CC cross-section graph supplied." <<endl;
00653     return;
00654   }
00655   if (!fxSecGraphNuTauCC){
00656     MSG("NuFluxHelper",Msg::kError)
00657       <<"No nutau CC cross-section graph supplied." <<endl;
00658     return;
00659   }
00660   if (!fxSecGraphNuTauBarCC){
00661     MSG("NuFluxHelper",Msg::kError)
00662       <<"No nutaubar CC cross-section graph supplied." <<endl;
00663     return;
00664   }
00665 
00666   //Loop over the entries in the fluka files.
00667   Int_t numFlukaEntries = fluxChain->GetEntries();
00668   for(int flukaEntry=0;flukaEntry<numFlukaEntries;++flukaEntry){
00669     if(flukaEntry%10000==0){
00670       MSG("NuFluxHelper",Msg::kInfo)
00671         <<"Processing fluka entry " << flukaEntry
00672         << " of " << numFlukaEntries <<endl;
00673     }
00674 
00675     //Is this the correct particle?
00676     if (!this->IsParticleToExtrapolate(fluxChain->NuType(flukaEntry))){
00677       continue;
00678     }
00679     /*
00680     this->FillNonMMHelpers(fluxChain,
00681                            flukaEntry);
00682     */
00683     this->FillMMHelpers(fluxChain,
00684                         flukaEntry);
00685 
00686   } //End loop over flukaChain
00687 
00688   if (!batchRunning) {
00689     this->NormaliseHistos();
00690   }
00691   this->WriteHistos();
00692 
00693   if (fluxChain){delete fluxChain; fluxChain=0;}
00694 
00695   return;
00696 }

virtual void NuFluxHelper::NDTrueEBins ( const std::vector< Double_t >  ndtruebins  )  [virtual]

void NuFluxHelper::NormaliseHistos (  )  const [private, virtual]

Definition at line 1258 of file NuFluxHelper.cxx.

References BeamData::error(), fFDVsNDMatrix, fFDVsNDMatrixRW, fFDVsNDMatrixTauXSecRW, fFDVsNDMatrixXSec, fFDVsNDMatrixXSecRW, fNFDTrueEBins, fNNDTrueEBins, fTrueEnergyCCFlux_ND, fTrueEnergyCCFluxRW_ND, fTrueEnergyNuFlux_ND, fTrueEnergyNuFluxRW_ND, Msg::kInfo, and MSG.

Referenced by ConcatenateHelpers(), and MakeHelperHistos().

01259 {
01260   MSG("NuFluxHelper",Msg::kInfo)
01261     <<"Normalising histograms" << endl;
01262 
01263   //Loop over the bins of the beam matrices:
01264   for(int i=1;i<=fNNDTrueEBins;i++){
01265     for(int j=1;j<=fNFDTrueEBins;j++){
01266       //Renormalise the un-MM-reweighted, un-XSec-reweighted beam matrix
01267       if(fTrueEnergyNuFlux_ND->GetBinContent(i)>0 &&
01268          fFDVsNDMatrix->GetBinContent(i,j)>0 ) {
01269         Float_t error = TMath::Power(fFDVsNDMatrix->GetBinError(i,j) /
01270                                      fFDVsNDMatrix->GetBinContent(i,j),2);
01271         error = TMath::Sqrt(error);
01272         fFDVsNDMatrix->SetBinContent(i,j,
01273                                      fFDVsNDMatrix->GetBinContent(i,j)/
01274                                      fTrueEnergyNuFlux_ND->GetBinContent(i));
01275         fFDVsNDMatrix->SetBinError(i,j,error *
01276                                    fFDVsNDMatrix->GetBinContent(i,j));
01277       }
01278       else {
01279         fFDVsNDMatrix->SetBinContent(i,j,0.);
01280         fFDVsNDMatrix->SetBinError(i,j,0.);
01281       }
01282 
01283       //Renormalise the MM-reweighted, un-XSec-reweighted beam matrix
01284       if( fTrueEnergyNuFluxRW_ND->GetBinContent(i)>0 &&
01285           fFDVsNDMatrixRW->GetBinContent(i,j)>0 ) {
01286         Float_t error = TMath::Power(fFDVsNDMatrixRW->GetBinError(i,j) /
01287                                      fFDVsNDMatrixRW->GetBinContent(i,j),2);
01288         error = TMath::Sqrt(error);
01289         fFDVsNDMatrixRW->SetBinContent(i,j,
01290                                        fFDVsNDMatrixRW->GetBinContent(i,j)/
01291                                        fTrueEnergyNuFluxRW_ND->GetBinContent(i));
01292         fFDVsNDMatrixRW->SetBinError(i,j,error *
01293                                      fFDVsNDMatrixRW->GetBinContent(i,j));
01294       }
01295       else {
01296         fFDVsNDMatrixRW->SetBinContent(i,j,0.);
01297         fFDVsNDMatrixRW->SetBinError(i,j,0.);
01298       }
01299 
01300       //Renormalise the un-MM-reweighted, XSec-reweighted beam matrix
01301       if( fTrueEnergyCCFlux_ND->GetBinContent(i)>0 &&
01302           fFDVsNDMatrixXSec->GetBinContent(i,j)>0 ) {
01303         Float_t error = TMath::Power(fFDVsNDMatrixXSec->GetBinError(i,j) /
01304                                      fFDVsNDMatrixXSec->GetBinContent(i,j),2);
01305         error = TMath::Sqrt(error);
01306         fFDVsNDMatrixXSec->SetBinContent(i,j,
01307                                          fFDVsNDMatrixXSec->GetBinContent(i,j)/
01308                                          fTrueEnergyCCFlux_ND->GetBinContent(i));
01309         fFDVsNDMatrixXSec->SetBinError(i,j,error *
01310                                        fFDVsNDMatrixXSec->GetBinContent(i,j));
01311       }
01312       else {
01313         fFDVsNDMatrixXSec->SetBinContent(i,j,0.);
01314         fFDVsNDMatrixXSec->SetBinError(i,j,0.);
01315       }
01316 
01317       //Renormalise the MM-reweighted, XSec-reweighted beam matrix
01318       if( fTrueEnergyCCFluxRW_ND->GetBinContent(i)>0 &&
01319           fFDVsNDMatrixXSecRW->GetBinContent(i,j)>0 ) {
01320         Float_t error = TMath::Power(fFDVsNDMatrixXSecRW->GetBinError(i,j) /
01321                                      fFDVsNDMatrixXSecRW->GetBinContent(i,j),2);
01322         error = TMath::Sqrt(error);
01323         fFDVsNDMatrixXSecRW->SetBinContent(i,j,
01324                                            fFDVsNDMatrixXSecRW->GetBinContent(i,j)/
01325                                            fTrueEnergyCCFluxRW_ND->GetBinContent(i));
01326         fFDVsNDMatrixXSecRW->SetBinError(i,j,error *
01327                                          fFDVsNDMatrixXSecRW->GetBinContent(i,j));
01328       }
01329       else {
01330         fFDVsNDMatrixXSecRW->SetBinContent(i,j,0.);
01331         fFDVsNDMatrixXSecRW->SetBinError(i,j,0.);
01332       }
01334 
01335       //Renormalise the MM-reweighted, tauXSec-reweighted beam matrix
01336       if( fTrueEnergyCCFluxRW_ND->GetBinContent(i)>0 &&
01337           fFDVsNDMatrixTauXSecRW->GetBinContent(i,j)>0 ) {
01338         Float_t error = TMath::Power(fFDVsNDMatrixTauXSecRW->GetBinError(i,j) /
01339                                      fFDVsNDMatrixTauXSecRW->GetBinContent(i,j),2);
01340         error = TMath::Sqrt(error);
01341         fFDVsNDMatrixTauXSecRW->SetBinContent(i,j,
01342                                               fFDVsNDMatrixTauXSecRW->GetBinContent(i,j)/
01343                                               fTrueEnergyCCFluxRW_ND->GetBinContent(i));
01344         fFDVsNDMatrixTauXSecRW->SetBinError(i,j,error *
01345                                             fFDVsNDMatrixTauXSecRW->GetBinContent(i,j));
01346       }
01347       else {
01348         fFDVsNDMatrixTauXSecRW->SetBinContent(i,j,0.);
01349         fFDVsNDMatrixTauXSecRW->SetBinError(i,j,0.);
01350       }
01352 
01353     } //End loop over matrix columns
01354   } //End loop over matrix rows
01355   return;
01356 }

const ArrAy NuFluxHelper::NuWte ( const Double_t  XDET,
const Double_t  YDET,
const Double_t  ZDET,
const NuFluxChain fluxChain,
const Int_t  flukaEntry 
) const [private, virtual]

Definition at line 1359 of file NuFluxHelper.cxx.

References Munits::cm, NuFluxChain::MuonParentEnergy(), NuFluxChain::MuonParentPX(), NuFluxChain::MuonParentPY(), NuFluxChain::MuonParentPZ(), ArrAy::new_ene, ArrAy::new_weight, NueConvention::nue, NuFluxChain::NuECofM(), NueConvention::numu, NuFluxChain::NuType(), NuFluxChain::ParentDecayVtxX(), NuFluxChain::ParentDecayVtxY(), NuFluxChain::ParentDecayVtxZ(), NuFluxChain::ParentProdDXDZ(), NuFluxChain::ParentProdDYDZ(), NuFluxChain::ParentProdEnergy(), NuFluxChain::ParentProdPZ(), NuFluxChain::ParentPX(), NuFluxChain::ParentPY(), NuFluxChain::ParentPZ(), and NuFluxChain::ParentType().

Referenced by FillMMHelpers().

01364 {
01365   ArrAy   newvars,empty;
01366   empty.new_ene   =-1;
01367   empty.new_weight=-1.;
01368 
01369   Int_t Ntype = fluxChain->NuType(flukaEntry);
01370   Double_t Vx = fluxChain->ParentDecayVtxX(flukaEntry)/Munits::cm;
01371   Float_t Vy = fluxChain->ParentDecayVtxY(flukaEntry)/Munits::cm;
01372   Float_t Vz = fluxChain->ParentDecayVtxZ(flukaEntry)/Munits::cm;
01373   Float_t pdpx = fluxChain->ParentPX(flukaEntry);
01374   Float_t pdpy = fluxChain->ParentPY(flukaEntry);
01375   Float_t pdpz = fluxChain->ParentPZ(flukaEntry);
01376   Float_t ppdxdz = fluxChain->ParentProdDXDZ(flukaEntry);
01377   Float_t ppdydz = fluxChain->ParentProdDYDZ(flukaEntry);
01378   Float_t pppz = fluxChain->ParentProdPZ(flukaEntry);
01379   Float_t ppenergy = fluxChain->ParentProdEnergy(flukaEntry);
01380   Int_t ptype = fluxChain->ParentType(flukaEntry);
01381   Float_t muparpx = fluxChain->MuonParentPX(flukaEntry);
01382   Float_t muparpy = fluxChain->MuonParentPY(flukaEntry);
01383   Float_t muparpz = fluxChain->MuonParentPZ(flukaEntry);
01384   Float_t mupare = fluxChain->MuonParentEnergy(flukaEntry);
01385   Float_t Necm = fluxChain->NuECofM(flukaEntry);
01386 
01387   //    -----------------fixed parameters
01388   Double_t pimass, kmass, k0mass, mumass, omegamass;
01389   pimass=0.13957; kmass=0.49368;
01390   k0mass=0.49767; mumass=0.105658389;
01391   omegamass=1.67245;
01392   Int_t nue, nuebar, numu, numubar, muplus, muminus;
01393   nue=53; nuebar=52; numu=56; numubar=55;
01394   muplus=5;  muminus=6;
01395   //      set to flux per 1 meter radius
01396   Double_t RDET =100.;
01397   //
01398 
01399 
01400 //    -----------------ADAMO style variables
01401       Double_t Neutrino_type;
01402       Double_t Vertex_x,           Vertex_y,          Vertex_z;
01403       Double_t Neutrino_parentpx,  Neutrino_parentpy, Neutrino_parentpz;
01404       Double_t Particle_dxdz,      Particle_dydz,     Particle_pz;
01405       Double_t Particle_energy,    Particle_type;
01406       Double_t Muparent_px,        Muparent_py,       Muparent_pz;
01407       Double_t Muparent_energy;
01408       Double_t Neutrino_ecm;
01409 
01410 //    -----------------rest of local variables
01411       Double_t eneu, WGT;
01412       double ENUZR, gamma, beta[3], SANGDET, RAD, EMRAT;
01413       double beta_mag, gamma_sqr;
01414       double parent_energy, parent_mass, parentp, partial;
01415       double costh_pardet, THETA_pardet,costh;
01416       Double_t P_dcm_nu[4], P_nu[3], P_pcm_mp[3];
01417       Double_t P_pcm, wt_ratio, xnu;
01418 //======================================================================
01419 
01420 //    switch to ADAMO variables to maintain compatibility with internal GNUMI
01421       Neutrino_type = Ntype;
01422       Vertex_x = Vx;
01423       Vertex_y = Vy;
01424       Vertex_z = Vz;
01425       Neutrino_parentpx = pdpx;
01426       Neutrino_parentpy = pdpy;
01427       Neutrino_parentpz = pdpz;
01428       Particle_dxdz   = ppdxdz;
01429       Particle_dydz   = ppdydz;
01430       Particle_pz     = pppz;
01431       Particle_energy = ppenergy;
01432       Particle_type   = ptype;
01433       Muparent_px = muparpx;
01434       Muparent_py = muparpy;
01435       Muparent_pz = muparpz;
01436       Muparent_energy = mupare;
01437       Neutrino_ecm = Necm;
01438 
01439 //    >=t gamma of muon parent particle at point of decay to neutrino
01440 
01441       if(Particle_type==8||Particle_type==9)        parent_mass = pimass;
01442       else if(Particle_type==11||Particle_type==12) parent_mass = kmass;
01443       else if(Particle_type==10||Particle_type==16) parent_mass = k0mass;
01444       else if(Particle_type==5||Particle_type==6)   parent_mass = mumass;
01445       else if(Particle_type==24||Particle_type==32) parent_mass = omegamass;
01446       else{
01447         cout << "NUWEIGHT unknown particle type STOP" << endl;
01448         return empty;
01449       }
01450       parent_energy = sqrt(double(Neutrino_parentpx)*double(Neutrino_parentpx)
01451        + double(Neutrino_parentpy)*double(Neutrino_parentpy)
01452        + double(Neutrino_parentpz)*double(Neutrino_parentpz) + parent_mass*parent_mass);
01453       gamma = parent_energy / parent_mass;
01454       gamma_sqr = gamma*gamma;
01455       beta_mag  = sqrt( (gamma_sqr-1.)/gamma_sqr );
01456 
01457 //    >=t the neutrino energy in the parent decay cm
01458 
01459 //    :::ARBITRARY LORENTZ TRANSFORM
01460 //    :::     EtP = PCX * BGX + PCY * BGY + PCZ * BGZ
01461 //    :::     E  = GA * E//+ EtP
01462 //    :::     PtE = EtP / (GA + 1e0) + EC
01463 //    :::     PX = PCX + BGX * PtE
01464 //    :::     PY = PCY + BGY * PtE
01465 //    :::     PZ = PCZ + BGZ * PtE
01466 //    :::     P  = SQRT (PX * PX + PY * PY + PZ * PZ)
01467       ENUZR = Neutrino_ecm;
01468 
01469 //    >=t angle from parent line of flight to detector in lab frame
01470 
01471       RAD =pow((double(XDET)-double(Vertex_x)),2)+pow((double(YDET)-double(Vertex_y)),2)
01472         +pow((double(ZDET)-double(Vertex_z)),2);
01473       RAD = sqrt(RAD);
01474       parentp =  double(Neutrino_parentpx)*double(Neutrino_parentpx) +
01475        double(Neutrino_parentpy)*double(Neutrino_parentpy) + double(Neutrino_parentpz)* double(Neutrino_parentpz);
01476       parentp = sqrt(parentp);
01477       costh_pardet = ( Neutrino_parentpx*(double(XDET)-Vertex_x)
01478        + Neutrino_parentpy*(double(YDET)-Vertex_y)
01479        + Neutrino_parentpz*(double(ZDET)-Vertex_z) )
01480        / ( parentp * RAD );
01481       if(fabs(costh_pardet)>1.){
01482         if(costh_pardet<0) costh_pardet = -1.;
01483         if(costh_pardet>0) costh_pardet =  1;
01484       }
01485       THETA_pardet = acos(costh_pardet);
01486 
01487 //    weighted neutrino energy in lab, approx, good for small theta
01488 //I'VE WORKED THIS OUT AND I DON'T THINK IT'S APPROXIMATE:
01489 //I THINK IT'S EXACT --JE
01490       EMRAT = 1. / (gamma * (1. - beta_mag * cos(THETA_pardet)));
01491       eneu=EMRAT*ENUZR;
01492 
01493 //    >=t solid angle/4pi for detector element
01494       SANGDET = (   RDET*RDET/((ZDET-Vertex_z)*(ZDET-Vertex_z)))/(4.0   );
01495 
01496 //    weight for solid angle and lorentz boost
01497       WGT = SANGDET * (EMRAT*EMRAT);
01498 //    weight weighted by approx neutrino cross section
01499 //    WGTE=0.67*ENEU*WGT
01500 
01501 //    done for all except polarized muon decay, ==================
01502 //    in which case need to modify weight
01503 //    (Warning: This section may need more double precision)
01504       if(Particle_type==muplus||Particle_type==muminus) {
01505 
01506 //      boost new neutrino to mu decay cm
01507 //      boost new neutrino to mu decay cm
01508         beta[0] = Neutrino_parentpx / parent_energy;
01509         beta[1] = Neutrino_parentpy / parent_energy;
01510         beta[2] = Neutrino_parentpz / parent_energy;
01511         P_nu[0] = (XDET-Vertex_x)*eneu/RAD;
01512         P_nu[1] = (YDET-Vertex_y)*eneu/RAD;
01513         P_nu[2] = (ZDET-Vertex_z)*eneu/RAD;
01514         partial =gamma*(beta[0]*P_nu[0]+beta[1]*P_nu[1]+beta[2]*P_nu[2]);
01515         partial = eneu - partial /(gamma+1.);
01516         P_dcm_nu[0] = P_nu[0] - beta[0]*gamma*partial;
01517         P_dcm_nu[1] = P_nu[1] - beta[1]*gamma*partial;
01518         P_dcm_nu[2] = P_nu[2] - beta[2]*gamma*partial;
01519         P_dcm_nu[3] = sqrt(P_dcm_nu[0]*P_dcm_nu[0]+P_dcm_nu[1]*+P_dcm_nu[1]+P_dcm_nu[2]*P_dcm_nu[2]);
01520 
01521 //      boost parent of mu to mu production cm
01522         gamma = Particle_energy/parent_mass;
01523         beta[0] = Particle_dxdz*Particle_pz/Particle_energy;
01524         beta[1] = Particle_dydz*Particle_pz/Particle_energy;
01525         beta[2] =               Particle_pz/Particle_energy;
01526         partial = gamma * ( beta[0]*Muparent_px +
01527          beta[1]*Muparent_py + beta[2]*Muparent_pz);
01528         partial = Muparent_energy - partial /(gamma+1.);
01529         P_pcm_mp[0] = Muparent_px - beta[0]*gamma*partial;
01530         P_pcm_mp[1] = Muparent_py - beta[1]*gamma*partial;
01531         P_pcm_mp[2] = Muparent_pz - beta[2]*gamma*partial;
01532         P_pcm = sqrt(P_pcm_mp[0]*P_pcm_mp[0] + P_pcm_mp[1]* P_pcm_mp[1] + P_pcm_mp[2]* P_pcm_mp[2]);
01533 
01534 //      cal//new  decay angle w.r.t. (anti)spin direction
01535         if(P_dcm_nu[3]*P_pcm!=0) {
01536           costh  = ( P_dcm_nu[0]*P_pcm_mp[0] + P_dcm_nu[1]*P_pcm_mp[1]
01537                      + P_dcm_nu[2]*P_pcm_mp[2] ) / (P_dcm_nu[3]*P_pcm);
01538         }
01539         else costh = 0;
01540         if(fabs(costh)>=1.) {
01541          if(costh<0.) costh = -1. ;
01542          if(costh>0.) costh=  1.  ;
01543         }
01544 //      cal//relative weight due to angle difference
01545         if( Neutrino_type==nue || Neutrino_type==nuebar ) {
01546           wt_ratio = 1.-costh;
01547         }
01548         else if( Neutrino_type==numu|| Neutrino_type==numubar) {
01549           xnu = 2. * ENUZR / mumass;
01550           wt_ratio = ( (3.-2.*xnu) - (1.-2.*xnu)*costh ) / (3.-2.*xnu);
01551          }
01552         else {
01553           cout << "NUWEIGHT bad neutrino type" << endl;
01554           return empty;
01555         }
01556 
01557         WGT = WGT * wt_ratio;
01558       }
01559       Double_t ene_wei[2];
01560       ene_wei[0]=eneu;
01561       ene_wei[1]=WGT;
01562       newvars.new_ene    = eneu;
01563       newvars.new_weight = WGT;
01564       return newvars;
01565 }

virtual void NuFluxHelper::OutputFilename ( const char *  outFile  )  [inline, virtual]

Definition at line 56 of file NuFluxHelper.h.

References foutFile.

00057     {foutFile = outFile;}

void NuFluxHelper::ParticlesToExtrapolate ( int  flavour  )  [virtual]

Definition at line 497 of file NuFluxHelper.cxx.

References NuParticle::kNuMu, NuParticle::kNuMuBar, and ParticlesToExtrapolate().

00498 {
00499   //Configure the particles to extrapolate
00500   vector<NuParticle::NuParticleType_t> particles;
00501   if (0==flavour){
00502     particles.push_back(NuParticle::kNuMu);
00503     particles.push_back(NuParticle::kNuMuBar);
00504   }
00505   if (1==flavour){
00506     particles.push_back(NuParticle::kNuMu);
00507   }
00508   if (2==flavour){
00509     particles.push_back(NuParticle::kNuMuBar);
00510   }
00511 
00512   this->ParticlesToExtrapolate(particles);
00513 }

virtual void NuFluxHelper::ParticlesToExtrapolate ( const std::vector< NuParticle::NuParticleType_t particleList  )  [virtual]

Referenced by ParticlesToExtrapolate().

virtual void NuFluxHelper::ParticleToExtrapolate ( const NuParticle::NuParticleType_t  particle  )  [virtual]

virtual SKZPWeightCalculator::SKZPConfig_t NuFluxHelper::ReweightVersion (  )  const [inline, virtual]

Definition at line 67 of file NuFluxHelper.h.

References freweightVersion.

Referenced by FillMMHelpers(), and FillNonMMHelpers().

00068     {return freweightVersion;}

virtual void NuFluxHelper::ReweightVersion ( const SKZPWeightCalculator::SKZPConfig_t  reweightVersion  )  [inline, virtual]

Definition at line 65 of file NuFluxHelper.h.

References freweightVersion.

00066     {freweightVersion = reweightVersion;};

virtual SKZPWeightCalculator::RunPeriod_t NuFluxHelper::RunPeriod (  )  const [inline, virtual]

Definition at line 49 of file NuFluxHelper.h.

References frunPeriod.

Referenced by FillMMHelpers(), FillNonMMHelpers(), and MakeHelperHistos().

00050     {return frunPeriod;};

virtual void NuFluxHelper::RunPeriod ( const SKZPWeightCalculator::RunPeriod_t  runPeriod  )  [inline, virtual]

Definition at line 47 of file NuFluxHelper.h.

References frunPeriod.

00048     {frunPeriod = runPeriod;};

virtual void NuFluxHelper::SetBatch ( Bool_t  set  )  [inline, virtual]

Definition at line 88 of file NuFluxHelper.h.

References batchRunning.

00088 { batchRunning = set; };

virtual void NuFluxHelper::SystematicBeamShift ( const Bool_t  doShift,
const Double_t  numSigma 
) [inline, virtual]

Definition at line 69 of file NuFluxHelper.h.

References fbeamShiftAsSigma, and fdoBeamShift.

Referenced by NuFluxHelper().

00071     {
00072       fdoBeamShift = doShift;
00073       if (doShift){fbeamShiftAsSigma = numSigma;}
00074     }

virtual void NuFluxHelper::SystematicScrapingShift ( const Bool_t  doShift,
const Double_t  scaleFactor 
) [inline, virtual]

Definition at line 75 of file NuFluxHelper.h.

References fdoScrapingShift, and fscrapingScaleFactor.

Referenced by NuFluxHelper().

00077     {
00078       fdoScrapingShift = doShift;
00079       if (doShift){fscrapingScaleFactor = scaleFactor;}
00080     }

virtual Double_t NuFluxHelper::TauCrossSection ( const NuParticle::NuParticleType_t  particle,
const Double_t  energy 
) const [private, virtual]

Referenced by FillMMHelpers().

void NuFluxHelper::WriteHistos (  )  const [private, virtual]

Definition at line 800 of file NuFluxHelper.cxx.

References fFDVsNDMatrix, fFDVsNDMatrixRW, fFDVsNDMatrixTauXSecRW, fFDVsNDMatrixXSec, fFDVsNDMatrixXSecRW, foutFile, fTrueEnergyCCFlux_FD, fTrueEnergyCCFlux_ND, fTrueEnergyCCFluxRW_FD, fTrueEnergyCCFluxRW_ND, fTrueEnergyNuFlux_FD, fTrueEnergyNuFlux_ND, fTrueEnergyNuFluxRW_FD, fTrueEnergyNuFluxRW_ND, Msg::kInfo, and MSG.

Referenced by ConcatenateHelpers(), and MakeHelperHistos().

00801 {
00802   MSG("NuFluxHelper",Msg::kInfo)
00803     <<"Writing helper histograms to " << foutFile << endl;
00804 
00805   TFile *savefile = new TFile(foutFile.c_str(),"RECREATE");
00806   savefile->cd();
00807   fFDVsNDMatrix->Write();
00808   fFDVsNDMatrixRW->Write();
00809   fFDVsNDMatrixXSec->Write();
00810   fFDVsNDMatrixXSecRW->Write();
00811   fFDVsNDMatrixTauXSecRW->Write();
00812 
00813   fTrueEnergyNuFlux_ND->Write();
00814   fTrueEnergyNuFluxRW_ND->Write();
00815   fTrueEnergyNuFlux_FD->Write();
00816   fTrueEnergyNuFluxRW_FD->Write();
00817   fTrueEnergyCCFlux_ND->Write();
00818   fTrueEnergyCCFluxRW_ND->Write();
00819   fTrueEnergyCCFlux_FD->Write();
00820   fTrueEnergyCCFluxRW_FD->Write();
00821   savefile->Close();
00822   if (savefile) {delete savefile; savefile = 0;}
00823 }


Member Data Documentation

Bool_t NuFluxHelper::batchRunning [private]

Definition at line 94 of file NuFluxHelper.h.

Referenced by MakeHelperHistos(), NuFluxHelper(), and SetBatch().

Double_t NuFluxHelper::fbeamShiftAsSigma [private]

Definition at line 104 of file NuFluxHelper.h.

Referenced by FillMMHelpers(), FillNonMMHelpers(), and SystematicBeamShift().

BeamType::BeamType_t NuFluxHelper::fbeamType [private]

Definition at line 114 of file NuFluxHelper.h.

Referenced by BeamType(), and NuFluxHelper().

NuBinningScheme::NuBinningScheme_t NuFluxHelper::fbinningScheme [private]

Definition at line 101 of file NuFluxHelper.h.

Referenced by NuFluxHelper().

Bool_t NuFluxHelper::fdoBeamShift [private]

Definition at line 92 of file NuFluxHelper.h.

Referenced by FillMMHelpers(), FillNonMMHelpers(), and SystematicBeamShift().

Bool_t NuFluxHelper::fdoScrapingShift [private]

Definition at line 93 of file NuFluxHelper.h.

Referenced by FillMMHelpers(), FillNonMMHelpers(), and SystematicScrapingShift().

Bool_t NuFluxHelper::fdoSKZP [private]

Definition at line 88 of file NuFluxHelper.h.

Referenced by DoSKZP(), FillMMHelpers(), and FillNonMMHelpers().

Double_t* NuFluxHelper::fFDTrueEBinEdges [private]

Definition at line 100 of file NuFluxHelper.h.

Referenced by CreateHistos(), NuFluxHelper(), and ~NuFluxHelper().

TH2D* NuFluxHelper::fFDVsNDMatrix [private]

Definition at line 124 of file NuFluxHelper.h.

Referenced by ConcatenateHelpers(), CreateHistos(), FillNonMMHelpers(), NormaliseHistos(), NuFluxHelper(), WriteHistos(), and ~NuFluxHelper().

TH2D* NuFluxHelper::fFDVsNDMatrixRW [private]

Definition at line 125 of file NuFluxHelper.h.

Referenced by ConcatenateHelpers(), CreateHistos(), FillMMHelpers(), NormaliseHistos(), NuFluxHelper(), WriteHistos(), and ~NuFluxHelper().

TH2D* NuFluxHelper::fFDVsNDMatrixTauXSecRW [private]

Definition at line 132 of file NuFluxHelper.h.

Referenced by ConcatenateHelpers(), CreateHistos(), FillMMHelpers(), NormaliseHistos(), NuFluxHelper(), WriteHistos(), and ~NuFluxHelper().

TH2D* NuFluxHelper::fFDVsNDMatrixXSec [private]

Definition at line 127 of file NuFluxHelper.h.

Referenced by ConcatenateHelpers(), CreateHistos(), FillNonMMHelpers(), NormaliseHistos(), NuFluxHelper(), WriteHistos(), and ~NuFluxHelper().

TH2D* NuFluxHelper::fFDVsNDMatrixXSecRW [private]

Definition at line 129 of file NuFluxHelper.h.

Referenced by ConcatenateHelpers(), CreateHistos(), FillMMHelpers(), NormaliseHistos(), NuFluxHelper(), WriteHistos(), and ~NuFluxHelper().

Double_t* NuFluxHelper::fNDTrueEBinEdges [private]

Definition at line 99 of file NuFluxHelper.h.

Referenced by CreateHistos(), NuFluxHelper(), and ~NuFluxHelper().

Int_t NuFluxHelper::fNFDTrueEBins [private]

Definition at line 98 of file NuFluxHelper.h.

Referenced by CreateHistos(), NormaliseHistos(), and NuFluxHelper().

Int_t NuFluxHelper::fNNDTrueEBins [private]

Definition at line 97 of file NuFluxHelper.h.

Referenced by CreateHistos(), NormaliseHistos(), and NuFluxHelper().

std::string NuFluxHelper::foutFile [private]

Definition at line 109 of file NuFluxHelper.h.

Referenced by NuFluxHelper(), OutputFilename(), and WriteHistos().

std::vector<NuParticle::NuParticleType_t> NuFluxHelper::fparticlesToExtrapolate [private]

Definition at line 107 of file NuFluxHelper.h.

TRandom3* NuFluxHelper::frandom3 [private]

Definition at line 145 of file NuFluxHelper.h.

Referenced by FillMMHelpers(), MakeHelperHistos(), NuFluxHelper(), and ~NuFluxHelper().

SKZPWeightCalculator::SKZPConfig_t NuFluxHelper::freweightVersion [private]

Definition at line 113 of file NuFluxHelper.h.

Referenced by MakeHelperHistos(), NuFluxHelper(), and ReweightVersion().

SKZPWeightCalculator::RunPeriod_t NuFluxHelper::frunPeriod [private]

Definition at line 112 of file NuFluxHelper.h.

Referenced by MakeHelperHistos(), NuFluxHelper(), and RunPeriod().

Double_t NuFluxHelper::fscrapingScaleFactor [private]

Definition at line 105 of file NuFluxHelper.h.

Referenced by FillMMHelpers(), FillNonMMHelpers(), and SystematicScrapingShift().

TH1D* NuFluxHelper::fTrueEnergyCCFlux_FD [private]

Definition at line 141 of file NuFluxHelper.h.

Referenced by ConcatenateHelpers(), CreateHistos(), FillNonMMHelpers(), NuFluxHelper(), WriteHistos(), and ~NuFluxHelper().

TH1D* NuFluxHelper::fTrueEnergyCCFlux_ND [private]

Definition at line 139 of file NuFluxHelper.h.

Referenced by ConcatenateHelpers(), CreateHistos(), FillNonMMHelpers(), NormaliseHistos(), NuFluxHelper(), WriteHistos(), and ~NuFluxHelper().

TH1D* NuFluxHelper::fTrueEnergyCCFluxRW_FD [private]

Definition at line 142 of file NuFluxHelper.h.

Referenced by ConcatenateHelpers(), CreateHistos(), FillMMHelpers(), NuFluxHelper(), WriteHistos(), and ~NuFluxHelper().

TH1D* NuFluxHelper::fTrueEnergyCCFluxRW_ND [private]

Definition at line 140 of file NuFluxHelper.h.

Referenced by ConcatenateHelpers(), CreateHistos(), FillMMHelpers(), NormaliseHistos(), NuFluxHelper(), WriteHistos(), and ~NuFluxHelper().

TH1D* NuFluxHelper::fTrueEnergyNuFlux_FD [private]

Definition at line 137 of file NuFluxHelper.h.

Referenced by ConcatenateHelpers(), CreateHistos(), FillNonMMHelpers(), NuFluxHelper(), WriteHistos(), and ~NuFluxHelper().

TH1D* NuFluxHelper::fTrueEnergyNuFlux_ND [private]

Definition at line 135 of file NuFluxHelper.h.

Referenced by ConcatenateHelpers(), CreateHistos(), FillNonMMHelpers(), NormaliseHistos(), NuFluxHelper(), WriteHistos(), and ~NuFluxHelper().

TH1D* NuFluxHelper::fTrueEnergyNuFluxRW_FD [private]

Definition at line 138 of file NuFluxHelper.h.

Referenced by ConcatenateHelpers(), CreateHistos(), FillMMHelpers(), NuFluxHelper(), WriteHistos(), and ~NuFluxHelper().

TH1D* NuFluxHelper::fTrueEnergyNuFluxRW_ND [private]

Definition at line 136 of file NuFluxHelper.h.

Referenced by ConcatenateHelpers(), CreateHistos(), FillMMHelpers(), NormaliseHistos(), NuFluxHelper(), WriteHistos(), and ~NuFluxHelper().

std::string NuFluxHelper::fxSecFile [private]

Definition at line 110 of file NuFluxHelper.h.

Referenced by CrossSectionFile(), and NuFluxHelper().

TGraph* NuFluxHelper::fxSecGraphNuMuBarCC [private]

Definition at line 119 of file NuFluxHelper.h.

Referenced by CrossSectionFile(), MakeHelperHistos(), NuFluxHelper(), and ~NuFluxHelper().

TGraph* NuFluxHelper::fxSecGraphNuMuCC [private]

Definition at line 118 of file NuFluxHelper.h.

Referenced by CrossSectionFile(), MakeHelperHistos(), NuFluxHelper(), and ~NuFluxHelper().

TGraph* NuFluxHelper::fxSecGraphNuTauBarCC [private]

Definition at line 121 of file NuFluxHelper.h.

Referenced by CrossSectionFile(), MakeHelperHistos(), NuFluxHelper(), and ~NuFluxHelper().

TGraph* NuFluxHelper::fxSecGraphNuTauCC [private]

Definition at line 120 of file NuFluxHelper.h.

Referenced by CrossSectionFile(), MakeHelperHistos(), NuFluxHelper(), and ~NuFluxHelper().

NuZBeamReweight* NuFluxHelper::fzarko [private]

Definition at line 115 of file NuFluxHelper.h.

Referenced by DoSKZP(), FillMMHelpers(), FillNonMMHelpers(), NuFluxHelper(), and ~NuFluxHelper().


The documentation for this class was generated from the following files:
Generated on Wed Sep 10 22:51:43 2014 for loon by  doxygen 1.4.7