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 690 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().

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

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

Definition at line 1004 of file NuFluxHelper.cxx.

References Munits::cm.

Referenced by FillMMHelpers().

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

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 MakeHelperHistos(), and 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 1063 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().

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

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

Definition at line 816 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.

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

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

Definition at line 1038 of file NuFluxHelper.cxx.

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

01039 {
01040   //create a NuCuts object
01041   static NuCuts nuCuts;
01042 
01043   //give fake values for u,v,plane,r,releaseType
01044   //since they are not needed for kCC0325Std
01045   return nuCuts.IsInFidVol(ndPoint.X(),ndPoint.Y(),ndPoint.Z(),
01046                            0,0,
01047                            0,0,
01048                            Detector::kNear,NuCuts::kCC0325Std,
01049                            0,SimFlag::kMC);
01050 
01051   //Bool_t NuCuts::IsInFidVol(Float_t x,Float_t y,Float_t z,
01052   //              Float_t u,Float_t v,
01053   //              Int_t planeTrkVtx,Float_t rTrkVtx,
01054   //              Int_t detector,Int_t anaVersion,
01055   //              Int_t releaseType,Int_t simFlag)
01056 
01057   //return nuCuts.IsInFidVolNDCC0325Std(ndPoint.X(),
01058   //                        ndPoint.Y(),
01059   //                        ndPoint.Z());
01060 }

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

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

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

Definition at line 1248 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().

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

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 1349 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().

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

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 790 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().

00791 {
00792   MSG("NuFluxHelper",Msg::kInfo)
00793     <<"Writing helper histograms to " << foutFile << endl;
00794 
00795   TFile *savefile = new TFile(foutFile.c_str(),"RECREATE");
00796   savefile->cd();
00797   fFDVsNDMatrix->Write();
00798   fFDVsNDMatrixRW->Write();
00799   fFDVsNDMatrixXSec->Write();
00800   fFDVsNDMatrixXSecRW->Write();
00801   fFDVsNDMatrixTauXSecRW->Write();
00802 
00803   fTrueEnergyNuFlux_ND->Write();
00804   fTrueEnergyNuFluxRW_ND->Write();
00805   fTrueEnergyNuFlux_FD->Write();
00806   fTrueEnergyNuFluxRW_FD->Write();
00807   fTrueEnergyCCFlux_ND->Write();
00808   fTrueEnergyCCFluxRW_ND->Write();
00809   fTrueEnergyCCFlux_FD->Write();
00810   fTrueEnergyCCFluxRW_FD->Write();
00811   savefile->Close();
00812   if (savefile) {delete savefile; savefile = 0;}
00813 }


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 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 Thu Apr 10 23:03:13 2014 for loon by  doxygen 1.4.7