Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
ana::Prod3CalibShapeLoaders Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-11-30/CAFAna/Analysis/Prod3Loaders.h"

Inheritance diagram for ana::Prod3CalibShapeLoaders:
ana::Prod3DataLoaders ana::Prod3LoadersBase ana::Loaders

Public Types

enum  DataMC { kData, kMC }
 
enum  SwappingConfig { kNonSwap, kFluxSwap, kTauSwap }
 
enum  FluxType { kFHC, kRHC }
 

Public Member Functions

 Prod3CalibShapeLoaders (ECAFType type, std::string WhichPeriod="full", std::string WhichNDPeriod="full")
 
virtual std::string GetSystString () const
 
void SetLoaderPath (const std::string &path, caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
 Configure loader via wildcard path. More...
 
std::string GetLoaderPath (caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap) const
 
std::vector< std::stringGetLoaderFiles (caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap) const
 
void SetLoaderFiles (const std::vector< std::string > &files, caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
 Configure loader via explicit file list. More...
 
void DisableLoader (caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
 
void SetSpillCut (const SpillCut &cut)
 
void SetND (bool nd)
 
bool GetND ()
 
SpectrumLoaderBaseGetLoader (caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
 Retrieve a specific loader. More...
 
void Go ()
 Call Go() on all the loaders. More...
 

Protected Types

typedef std::tuple< caf::Det_t, DataMC, DataSource, SwappingConfigKey_t
 

Protected Member Functions

void SetLoaderPaths (const std::string &fdmc_nonswap, const std::string &fdmc_fluxswap, const std::string &fdmc_tauswap="", const std::string &ndmc="", const std::string &nddata="")
 
void SetLoaderFDMCPaths (const std::string &prefix, const std::string &suffix)
 
void SetLoaderNDMCPath (const std::string &ndmc)
 

Protected Attributes

std::map< Key_t, std::stringfLoaderPaths
 
std::map< Key_t, std::vector< std::string > > fLoaderFiles
 
std::map< Key_t, SpectrumLoader * > fLoaders
 
const SpillCutfSpillCut
 
NullLoader fNull
 We give this back when a loader isn't set for some configuration. More...
 
bool fND
 Bool to set loader for near detector instead of far detector. More...
 

Detailed Description

Definition at line 74 of file Prod3Loaders.h.

Member Typedef Documentation

typedef std::tuple<caf::Det_t, DataMC, DataSource, SwappingConfig> ana::Loaders::Key_t
protectedinherited

Definition at line 78 of file Loaders.h.

Member Enumeration Documentation

enum ana::Loaders::DataMC
inherited
Enumerator
kData 
kMC 

Definition at line 26 of file Loaders.h.

enum ana::Loaders::FluxType
inherited
Enumerator
kFHC 
kRHC 

Definition at line 28 of file Loaders.h.

Enumerator
kNonSwap 
kFluxSwap 
kTauSwap 

Definition at line 27 of file Loaders.h.

Constructor & Destructor Documentation

ana::Prod3CalibShapeLoaders::Prod3CalibShapeLoaders ( ECAFType  type,
std::string  WhichPeriod = "full",
std::string  WhichNDPeriod = "full" 
)

Definition at line 208 of file Prod3Loaders.cxx.

References om::cerr, ana::ECAFTypeToString(), allTimeWatchdog::endl, ana::kDecaf, ana::kFullCAF, ana::kNueConcat, ana::kNumuConcat, ana::kNusConcat, ana::Prod3LoadersBase::SetLoaderFDMCPaths(), ana::Prod3LoadersBase::SetLoaderNDMCPath(), and string.

210  : Prod3DataLoaders(type, WhichPeriod, WhichNDPeriod)
211  {
212  const std::string caftype = ECAFTypeToString(type);
213 
214  if(type == kNueConcat || type == kNumuConcat || type == kNusConcat){
215  SetLoaderFDMCPaths("prod_sumdecaf_R17-03-01-prod3reco.l_fd_genie",
216  "fhc_nova_v08_" + WhichPeriod + "_calib-shift-fd-func_v1_" + caftype);
217  SetLoaderNDMCPath ("prod_sumdecaf_R17-03-01-prod3reco.j_nd_genie_nonswap_fhc_nova_v08_" +
218  WhichNDPeriod + "_calib-shift-nd-func_v1_" + caftype);
219  }
220 
221  if(type == kDecaf){
222  std::cerr << "\nWARNING: Don't use decaf loaders if you need the nue FD peripheral bin\n"
223  << std::endl;
224  SetLoaderFDMCPaths("prod_decaf_R17-03-01-prod3reco.l_fd_genie",
225  "fhc_nova_v08_" + WhichPeriod +
226  "_calib-shift-fd-func_" + caftype + "_v1");
227  SetLoaderNDMCPath ("prod_decaf_R17-03-01-prod3reco.j_nd_genie_nonswap_fhc_nova_v08_" +
228  WhichNDPeriod + "_calib-shift-nd-func_" + caftype + "_v1");
229  }
230 
231  if(type == kFullCAF){
232  SetLoaderFDMCPaths("prod_caf_R17-03-01-prod3reco.l_fd_genie",
233  "fhc_nova_v08_" + WhichPeriod + "_calib-shift-fd-func_v1");
234  SetLoaderNDMCPath ("prod_caf_R17-03-01-prod3reco.j_nd_genie_nonswap_fhc_nova_v08_" +
235  WhichNDPeriod + "_calib-shift-nd-func_v1");
236  }
237  }
void SetLoaderNDMCPath(const std::string &ndmc)
OStream cerr
Definition: OStream.cxx:7
const std::string ECAFTypeToString(ECAFType type)
void SetLoaderFDMCPaths(const std::string &prefix, const std::string &suffix)
Prod3DataLoaders(ECAFType type, std::string WhichPeriod="full", std::string WhichNDPeriod="full", FluxType flux=kFHC)
enum BeamMode string

Member Function Documentation

void ana::Loaders::DisableLoader ( caf::Det_t  det,
DataMC  datamc,
DataSource  src = kBeam,
SwappingConfig  swap = kNonSwap 
)
inherited

Definition at line 65 of file Loaders.cxx.

References ana::assert(), ana::Loaders::fLoaderFiles, ana::Loaders::fLoaderPaths, ana::Loaders::fLoaders, ana::Loaders::fND, it, ana::kBeam, findDuplicateFiles::key, caf::kFARDET, ana::Loaders::kMC, caf::kNEARDET, and ana::Loaders::kNonSwap.

Referenced by GenFile(), GetLoaders2017(), GetLoaders2018(), load_files(), ana::Loaders::SetLoaderFiles(), ana::Loaders::SetLoaderPath(), setPathsRHC(), and test_ana().

69  {
70  assert(datamc == kMC || swap == kNonSwap);
71  if (!fND) assert(det == caf::kFARDET || swap == kNonSwap);
72  else assert(det == caf::kNEARDET || swap == kNonSwap);
73  assert(src == kBeam || swap == kNonSwap);
74 
75  const Key_t key(det, datamc, src, swap);
76 
77  // Clear out the current one if possible
78  auto it = fLoaders.find(key);
79  if(it != fLoaders.end()){
80  delete it->second;
81  fLoaders.erase(it);
82  }
83 
84  fLoaderPaths.erase(key);
85  fLoaderFiles.erase(key);
86  }
Near Detector underground.
Definition: SREnums.h:10
std::map< Key_t, std::string > fLoaderPaths
Definition: Loaders.h:81
std::tuple< caf::Det_t, DataMC, DataSource, SwappingConfig > Key_t
Definition: Loaders.h:78
Far Detector at Ash River.
Definition: SREnums.h:11
set< int >::iterator it
bool datamc
Definition: fnexvscaf.C:20
assert(nhit_max >=nhit_nbins)
std::map< Key_t, std::vector< std::string > > fLoaderFiles
Definition: Loaders.h:82
std::map< Key_t, SpectrumLoader * > fLoaders
Definition: Loaders.h:84
bool fND
Bool to set loader for near detector instead of far detector.
Definition: Loaders.h:91
SpectrumLoaderBase & ana::Loaders::GetLoader ( caf::Det_t  det,
DataMC  datamc,
DataSource  src = kBeam,
SwappingConfig  swap = kNonSwap 
)
inherited

Retrieve a specific loader.

Definition at line 129 of file Loaders.cxx.

References ana::assert(), ana::Loaders::fLoaderFiles, ana::Loaders::fLoaderPaths, ana::Loaders::fLoaders, ana::Loaders::fND, ana::Loaders::fNull, ana::Loaders::fSpillCut, ana::kBeam, findDuplicateFiles::key, caf::kFARDET, ana::Loaders::kMC, caf::kNEARDET, and ana::Loaders::kNonSwap.

Referenced by NDPredictionHandler::AddVar(), BlessedPlotsLoad(), DataMCLoad(), DataMCNDLoad_nus17(), demoSysts(), ana::FDExtrap::FDExtrap_c(), ana::SterileGenerator::Generate(), generate_fd_fake_events(), ana::Loaders::GetND(), MakeDecomp(), MakeMap(), MakeNus2019CovMxSysts(), MakePPFXRatios(), MakeSystRatios(), MakeSysts(), mec_tuning(), mec_tuning_preds_2020(), ana::ModularExtrapSterile::NCDisappearance(), ana::NDExtrap::NDExtrap_c(), ReifyLoaders(), sterile_demo(), SystsAcceptanceLoad17(), SystsBeamLoad(), SystsBeamTranspLoad17(), SystsGENIELoad(), SystsGENIELoad17(), SystsNDRockLoad(), ana::ModularExtrapSterile::TrivialExtrapNC(), TrueNCSpectrum(), and TrueSpectrumFromKaons().

133  {
134  assert(datamc == kMC || swap == kNonSwap);
135  if (!fND) assert(det == caf::kFARDET || swap == kNonSwap);
136  else assert(det == caf::kNEARDET || swap == kNonSwap);
137  assert(src == kBeam || swap == kNonSwap);
138 
139  const Key_t key(det, datamc, src, swap);
140 
141  // Look up and return. Use fNull if no loader is set for this config
142  auto itLoader = fLoaders.find(key);
143  if(itLoader != fLoaders.end()) return *itLoader->second;
144 
145  auto itPath = fLoaderPaths.find(key);
146  if(itPath != fLoaderPaths.end()){
147  fLoaders[key] = new SpectrumLoader(itPath->second);
148  if(fSpillCut) fLoaders[key]->SetSpillCut(*fSpillCut);
149  return *fLoaders[key];
150  }
151  auto itFiles = fLoaderFiles.find(key);
152  if(itFiles != fLoaderFiles.end()){
153  fLoaders[key] = new SpectrumLoader(itFiles->second);
154  if(fSpillCut) fLoaders[key]->SetSpillCut(*fSpillCut);
155  return *fLoaders[key];
156  }
157 
158  return fNull;
159  }
Near Detector underground.
Definition: SREnums.h:10
std::map< Key_t, std::string > fLoaderPaths
Definition: Loaders.h:81
const SpillCut * fSpillCut
Definition: Loaders.h:86
std::tuple< caf::Det_t, DataMC, DataSource, SwappingConfig > Key_t
Definition: Loaders.h:78
Far Detector at Ash River.
Definition: SREnums.h:11
bool datamc
Definition: fnexvscaf.C:20
NullLoader fNull
We give this back when a loader isn&#39;t set for some configuration.
Definition: Loaders.h:89
assert(nhit_max >=nhit_nbins)
std::map< Key_t, std::vector< std::string > > fLoaderFiles
Definition: Loaders.h:82
std::map< Key_t, SpectrumLoader * > fLoaders
Definition: Loaders.h:84
bool fND
Bool to set loader for near detector instead of far detector.
Definition: Loaders.h:91
std::vector< std::string > ana::Loaders::GetLoaderFiles ( caf::Det_t  det,
DataMC  datamc,
DataSource  src = kBeam,
SwappingConfig  swap = kNonSwap 
) const
inherited

Definition at line 105 of file Loaders.cxx.

References ana::assert(), ana::Loaders::fLoaderFiles, ana::Loaders::fND, ana::kBeam, findDuplicateFiles::key, caf::kFARDET, ana::Loaders::kMC, caf::kNEARDET, and ana::Loaders::kNonSwap.

109  {
110  assert(datamc == kMC || swap == kNonSwap);
111  if (!fND) assert(det == caf::kFARDET || swap == kNonSwap);
112  else assert(det == caf::kNEARDET || swap == kNonSwap);
113  assert(src == kBeam || swap == kNonSwap);
114 
115  const Key_t key(det, datamc, src, swap);
116 
117  return fLoaderFiles.at(key);
118  }
Near Detector underground.
Definition: SREnums.h:10
std::tuple< caf::Det_t, DataMC, DataSource, SwappingConfig > Key_t
Definition: Loaders.h:78
Far Detector at Ash River.
Definition: SREnums.h:11
bool datamc
Definition: fnexvscaf.C:20
assert(nhit_max >=nhit_nbins)
std::map< Key_t, std::vector< std::string > > fLoaderFiles
Definition: Loaders.h:82
bool fND
Bool to set loader for near detector instead of far detector.
Definition: Loaders.h:91
std::string ana::Loaders::GetLoaderPath ( caf::Det_t  det,
DataMC  datamc,
DataSource  src = kBeam,
SwappingConfig  swap = kNonSwap 
) const
inherited

Definition at line 89 of file Loaders.cxx.

References ana::assert(), ana::Loaders::fLoaderPaths, ana::Loaders::fND, ana::kBeam, findDuplicateFiles::key, caf::kFARDET, ana::Loaders::kMC, caf::kNEARDET, and ana::Loaders::kNonSwap.

Referenced by generate_fd_fake_events(), GetLoaders2017(), GetLoaders2017FakeData(), GetLoaders2018(), GetLoaders2020(), getPredictions(), Nus18SystsLLMethodLoad(), PrintLoaderPaths(), and SwapNDDataLoader().

93  {
94  assert(datamc == kMC || swap == kNonSwap);
95  if (!fND) assert(det == caf::kFARDET || swap == kNonSwap);
96  else assert(det == caf::kNEARDET || swap == kNonSwap);
97  assert(src == kBeam || swap == kNonSwap);
98 
99  const Key_t key(det, datamc, src, swap);
100 
101  return fLoaderPaths.at(key);
102  }
Near Detector underground.
Definition: SREnums.h:10
std::map< Key_t, std::string > fLoaderPaths
Definition: Loaders.h:81
std::tuple< caf::Det_t, DataMC, DataSource, SwappingConfig > Key_t
Definition: Loaders.h:78
Far Detector at Ash River.
Definition: SREnums.h:11
bool datamc
Definition: fnexvscaf.C:20
assert(nhit_max >=nhit_nbins)
bool fND
Bool to set loader for near detector instead of far detector.
Definition: Loaders.h:91
bool ana::Loaders::GetND ( )
inlineinherited

Definition at line 66 of file Loaders.h.

References ana::Loaders::fND, ana::Loaders::GetLoader(), ana::Loaders::Go(), ana::kBeam, ana::Loaders::kNonSwap, and plot_timing_data::swap.

66 { return fND; }
bool fND
Bool to set loader for near detector instead of far detector.
Definition: Loaders.h:91
virtual std::string ana::Prod3CalibShapeLoaders::GetSystString ( ) const
inlinevirtual

Reimplemented from ana::Prod3DataLoaders.

Definition at line 79 of file Prod3Loaders.h.

79 {return "CalibShape";}
void ana::Loaders::Go ( )
inherited

Call Go() on all the loaders.

Definition at line 162 of file Loaders.cxx.

References ana::Loaders::fLoaders, and it.

Referenced by BlessedPlotsLoad(), cc(), Compare_NoExtrap(), ComparisonPlots_MC(), CutFlow_MC(), CutTableLoad(), DataMCLoad(), DataMCNDLoad_nus17(), demo_flat(), demoSysts(), efficiency(), efficiencySA(), ExampleCode(), FD_Data_PosComp(), FD_plots(), FDDataMCSystBandLoad(), fiducial_accounting(), FitSystEffectsLoad(), futureSig_getNueNumuSyst(), generate_fd_fake_events(), GenFile(), genie_preds_make(), get_fdmc_spectra(), get_spectra_2dplots(), ana::Loaders::GetND(), getPredictions(), getPredictions_updatedAna(), load_files(), make_DataMCComp_numu(), make_extrap_figure_hists(), make_nue_xsec_pred(), make_nueFDprediction_kinematics_FHC(), make_nueFDprediction_kinematics_FHC_pTExtrap(), make_nueFDprediction_kinematics_FHC_REW(), make_nueFDprediction_kinematics_FHC_REW_pTExtrap(), make_nueFDprediction_kinematics_RHC(), make_nueFDprediction_kinematics_RHC_pTExtrap(), make_nueFDprediction_kinematics_RHC_REW(), make_nueFDprediction_kinematics_RHC_REW_pTExtrap(), make_prediction(), make_prediction_extrap(), make_prediction_noextrap(), make_prediction_rhc(), make_rockpred(), MakeCovarSim(), MakeNus17PredictionSysts(), MakeNus18CovarSim(), MakeNus18ExtrapPred(), MakeNus18SidebandPred(), MakeNus18Systs(), MakeNus2019CovMxSysts(), MakeNusPredictionSystsAna01(), MakePPFXRatios(), makePred(), MakePrediction(), MakePredictionNoOsc_FHC_FD(), MakePredictionNoOsc_FHC_ND(), MakePredictionNoOsc_RHC_FD(), MakePredictionNoOsc_RHC_ND(), MakeSystRatios(), MakeSysts(), MakeUnoscPlots(), mec_tuning(), mec_tuning_preds_2020(), NoExtrap(), NueExtrap(), NuMu2019_BasicPIDPlots_FD(), NuMu2020_BasicPIDPlots_FD(), NumuExtrap(), nus17_fd_cut_tables2D(), Nus18SystsBeamTranspLoad(), Nus18SystsCalibAbsLoad(), Nus18SystsCalibRelLoad(), Nus18SystsGENIELoad(), Nus18SystsKaonLoad(), Nus18SystsLightLevelLoad(), Nus18SystsLLMethodLoad(), Nus18SystsNeutronLoad(), Nus18SystsPPFXLoad(), Nus18SystsTauLoad(), Nus18SystsXSecOnOffLoad(), resolution2018(), savePrediction_addExpt(), savePrediction_complete(), savePrediction_extrap(), savePrediction_simple(), savePrediction_systs(), sterile_demo(), syst_test(), SystsAcceptanceLoad17(), SystsBeamLoad(), SystsBeamTranspLoad17(), SystsDecompLoad(), SystsDecompLoad17(), SystsFidContLoad(), SystsGENIELoad(), SystsGENIELoad17(), SystsMCStatsLoad(), SystsNDRockLoad(), template_GENIE_systs(), template_nonGENIE_systs(), test_ana(), test_numu_summed_genie_systs(), test_prediction_interp(), TrueNCSpectrum(), TrueSpectrumFromKaons(), and xsec_extrap_plots().

163  {
164  for(auto it: fLoaders)
165  {
166  if (!it.second->Gone())
167  it.second->Go();
168  }
169  }
set< int >::iterator it
std::map< Key_t, SpectrumLoader * > fLoaders
Definition: Loaders.h:84
void ana::Prod3LoadersBase::SetLoaderFDMCPaths ( const std::string prefix,
const std::string suffix 
)
protectedinherited

Definition at line 22 of file Prod3Loaders.cxx.

References ana::Prod3LoadersBase::SetLoaderPaths().

Referenced by ana::Prod3AbsCalibLoaders::Prod3AbsCalibLoaders(), Prod3CalibShapeLoaders(), ana::Prod3CherenkovLoaders::Prod3CherenkovLoaders(), ana::Prod3LightLevelLoaders::Prod3LightLevelLoaders(), and ana::Prod3NomLoaders::Prod3NomLoaders().

24  {
25  SetLoaderPaths(prefix+"_nonswap_"+suffix,
26  prefix+"_fluxswap_"+suffix,
27  prefix+"_tau_"+suffix);
28  }
const XML_Char * prefix
Definition: expat.h:380
void SetLoaderPaths(const std::string &fdmc_nonswap, const std::string &fdmc_fluxswap, const std::string &fdmc_tauswap="", const std::string &ndmc="", const std::string &nddata="")
Definition: Prod3Loaders.cxx:8
void ana::Loaders::SetLoaderFiles ( const std::vector< std::string > &  files,
caf::Det_t  det,
DataMC  datamc,
DataSource  src = kBeam,
SwappingConfig  swap = kNonSwap 
)
inherited

Configure loader via explicit file list.

Definition at line 45 of file Loaders.cxx.

References ana::assert(), ana::Loaders::DisableLoader(), compareCafs::files, ana::Loaders::fLoaderFiles, ana::Loaders::fND, ana::kBeam, findDuplicateFiles::key, caf::kFARDET, ana::Loaders::kMC, caf::kNEARDET, and ana::Loaders::kNonSwap.

Referenced by FDDataMCSystBandLoad(), FitSystEffectsLoad(), MakeNusPredictionSystsAna01(), and setPathsFNALP123b().

50  {
51  assert(datamc == kMC || swap == kNonSwap);
52  if (!fND) assert(det == caf::kFARDET || swap == kNonSwap);
53  else assert(det == caf::kNEARDET || swap == kNonSwap);
54  assert(src == kBeam || swap == kNonSwap);
55 
56  const Key_t key(det, datamc, src, swap);
57 
58  // Clear out the old one if necessary
59  DisableLoader(det, datamc, src, swap);
60 
62  }
Near Detector underground.
Definition: SREnums.h:10
std::tuple< caf::Det_t, DataMC, DataSource, SwappingConfig > Key_t
Definition: Loaders.h:78
Far Detector at Ash River.
Definition: SREnums.h:11
void DisableLoader(caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
Definition: Loaders.cxx:65
bool datamc
Definition: fnexvscaf.C:20
assert(nhit_max >=nhit_nbins)
std::map< Key_t, std::vector< std::string > > fLoaderFiles
Definition: Loaders.h:82
bool fND
Bool to set loader for near detector instead of far detector.
Definition: Loaders.h:91
void ana::Prod3LoadersBase::SetLoaderNDMCPath ( const std::string ndmc)
protectedinherited

Definition at line 31 of file Prod3Loaders.cxx.

References ana::Prod3LoadersBase::SetLoaderPaths().

Referenced by ana::Prod3AbsCalibLoaders::Prod3AbsCalibLoaders(), Prod3CalibShapeLoaders(), ana::Prod3CherenkovLoaders::Prod3CherenkovLoaders(), ana::Prod3LightLevelLoaders::Prod3LightLevelLoaders(), and ana::Prod3NomLoaders::Prod3NomLoaders().

32  {
33  SetLoaderPaths("", "", "", ndmc);
34  }
void SetLoaderPaths(const std::string &fdmc_nonswap, const std::string &fdmc_fluxswap, const std::string &fdmc_tauswap="", const std::string &ndmc="", const std::string &nddata="")
Definition: Prod3Loaders.cxx:8
void ana::Loaders::SetLoaderPath ( const std::string path,
caf::Det_t  det,
DataMC  datamc,
DataSource  src = kBeam,
SwappingConfig  swap = kNonSwap 
)
inherited

Configure loader via wildcard path.

Definition at line 25 of file Loaders.cxx.

References ana::assert(), ana::Loaders::DisableLoader(), ana::Loaders::fLoaderPaths, ana::Loaders::fND, ana::kBeam, findDuplicateFiles::key, caf::kFARDET, ana::Loaders::kMC, caf::kNEARDET, ana::Loaders::kNonSwap, and path.

Referenced by BlessedPlotsLoad(), CutTableLoad(), DataMCLoad(), DataMCNDLoad_nus17(), demo_flat(), efficiency(), efficiencySA(), FD_plots(), FDDataMCSystBandLoad(), fiducial_accounting(), FitSystEffectsLoad(), generate_fd_fake_events(), genie_preds_make(), get_spectra_2dplots(), GetLoaders2017(), GetLoaders2017FakeData(), GetLoaders2018(), GetLoaders2020(), getPredictions(), getPredictions_updatedAna(), make_extrap_figure_hists(), make_prediction(), make_prediction_rhc(), make_rockpred(), MakeNus17PredictionSysts(), MakeNusPredictionSystsAna01(), mec_tuning(), mec_tuning_preds_2020(), NueExtrap(), NuMu2019_BasicPIDPlots_FD(), NuMu2020_BasicPIDPlots_FD(), NumuExtrap(), nus17_fd_cut_tables2D(), Nus18SystsLLMethodLoad(), ana::Prod3DataLoaders::Prod3DataLoaders(), ana::Prod4DataLoaders::Prod4DataLoaders(), ana::Prod5DataLoaders::Prod5DataLoaders(), savePrediction_addExpt(), savePrediction_complete(), savePrediction_extrap(), savePrediction_simple(), savePrediction_systs(), set_loaders_ana2018(), ana::Prod3LoadersBase::SetLoaderPaths(), ana::Prod4LoadersBase::SetLoaderPaths(), ana::Prod5LoadersBase::SetLoaderPaths(), SetLoaderPaths2017(), setLoadersPathNumu2017(), setPathsFNALP123b(), setPathsFNALP3c(), setPathsRHC(), sterile_demo(), SwapNDDataLoader(), syst_test(), SystsAcceptanceLoad17(), SystsBeamLoad(), SystsBeamTranspLoad17(), SystsDecompLoad(), SystsDecompLoad17(), SystsFidContLoad(), SystsGENIELoad(), SystsGENIELoad17(), SystsMCStatsLoad(), SystsNDRockLoad(), template_GENIE_systs(), template_nonGENIE_systs(), test_numu_summed_genie_systs(), and test_prediction_interp().

30  {
31  assert(datamc == kMC || swap == kNonSwap);
32  if (!fND) assert(det == caf::kFARDET || swap == kNonSwap);
33  else assert(det == caf::kNEARDET || swap == kNonSwap);
34  assert(src == kBeam || swap == kNonSwap);
35 
36  const Key_t key(det, datamc, src, swap);
37 
38  // Clear out the old one if necessary
39  DisableLoader(det, datamc, src, swap);
40 
42  }
Near Detector underground.
Definition: SREnums.h:10
std::map< Key_t, std::string > fLoaderPaths
Definition: Loaders.h:81
std::tuple< caf::Det_t, DataMC, DataSource, SwappingConfig > Key_t
Definition: Loaders.h:78
Far Detector at Ash River.
Definition: SREnums.h:11
void DisableLoader(caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
Definition: Loaders.cxx:65
bool datamc
Definition: fnexvscaf.C:20
const std::string path
Definition: plot_BEN.C:43
assert(nhit_max >=nhit_nbins)
bool fND
Bool to set loader for near detector instead of far detector.
Definition: Loaders.h:91
void ana::Prod3LoadersBase::SetLoaderPaths ( const std::string fdmc_nonswap,
const std::string fdmc_fluxswap,
const std::string fdmc_tauswap = "",
const std::string ndmc = "",
const std::string nddata = "" 
)
protectedinherited

Definition at line 8 of file Prod3Loaders.cxx.

References ana::kBeam, ana::Loaders::kData, caf::kFARDET, ana::Loaders::kFluxSwap, ana::Loaders::kMC, caf::kNEARDET, ana::Loaders::kNonSwap, ana::Loaders::kTauSwap, and ana::Loaders::SetLoaderPath().

Referenced by ana::Prod3LoadersBase::SetLoaderFDMCPaths(), and ana::Prod3LoadersBase::SetLoaderNDMCPath().

13  {
14  if(!fdmc_nonswap.empty()) SetLoaderPath(fdmc_nonswap, caf::kFARDET, Loaders::kMC, ana::kBeam, Loaders::kNonSwap);
15  if(!fdmc_fluxswap.empty()) SetLoaderPath(fdmc_fluxswap, caf::kFARDET, Loaders::kMC, ana::kBeam, Loaders::kFluxSwap);
16  if(!fdmc_tauswap.empty()) SetLoaderPath(fdmc_tauswap, caf::kFARDET, Loaders::kMC, ana::kBeam, Loaders::kTauSwap);
19  }
Near Detector underground.
Definition: SREnums.h:10
Far Detector at Ash River.
Definition: SREnums.h:11
void SetLoaderPath(const std::string &path, caf::Det_t det, DataMC datamc, DataSource src=kBeam, SwappingConfig swap=kNonSwap)
Configure loader via wildcard path.
Definition: Loaders.cxx:25
void ana::Loaders::SetND ( bool  nd)
inlineinherited
void ana::Loaders::SetSpillCut ( const SpillCut cut)
inherited

Definition at line 121 of file Loaders.cxx.

References ana::Loaders::fLoaders, ana::Loaders::fSpillCut, and it.

Referenced by BlessedPlotsLoad(), Compare_NoExtrap(), ComparisonPlots_MC(), CutFlow_MC(), CutTableLoad(), DataMCLoad(), DataMCNDLoad_nus17(), demoSysts(), efficiency(), efficiencySA(), ExampleCode(), FD_plots(), FDDataMCSystBandLoad(), fiducial_accounting(), FitSystEffectsLoad(), futureSig_getNueNumuSyst(), generate_fd_fake_events(), genie_preds_make(), get_fdmc_spectra(), get_spectra_2dplots(), getPredictions(), getPredictions_updatedAna(), make_DataMCComp_numu(), make_extrap_figure_hists(), make_nueFDprediction_kinematics_FHC(), make_nueFDprediction_kinematics_FHC_pTExtrap(), make_nueFDprediction_kinematics_FHC_REW(), make_nueFDprediction_kinematics_FHC_REW_pTExtrap(), make_nueFDprediction_kinematics_RHC(), make_nueFDprediction_kinematics_RHC_pTExtrap(), make_nueFDprediction_kinematics_RHC_REW(), make_nueFDprediction_kinematics_RHC_REW_pTExtrap(), make_prediction(), make_prediction_extrap(), make_prediction_noextrap(), make_prediction_rhc(), make_rockpred(), MakeCovarSim(), MakeNus17PredictionSysts(), MakeNus18CovarSim(), MakeNus18ExtrapPred(), MakeNus18SidebandPred(), MakeNus18Systs(), MakeNus2019CovMxSysts(), MakeNusPredictionSystsAna01(), MakePPFXRatios(), makePred(), MakePrediction(), MakePredictionNoOsc_FHC_FD(), MakePredictionNoOsc_FHC_ND(), MakePredictionNoOsc_RHC_FD(), MakePredictionNoOsc_RHC_ND(), MakeSystRatios(), MakeSysts(), MakeUnoscPlots(), mec_tuning(), mec_tuning_preds_2020(), NoExtrap(), NueExtrap(), NuMu2019_BasicPIDPlots_FD(), NuMu2020_BasicPIDPlots_FD(), NumuExtrap(), nus17_fd_cut_tables2D(), Nus18SystsBeamTranspLoad(), Nus18SystsCalibAbsLoad(), Nus18SystsCalibRelLoad(), Nus18SystsGENIELoad(), Nus18SystsKaonLoad(), Nus18SystsLightLevelLoad(), Nus18SystsLLMethodLoad(), Nus18SystsNeutronLoad(), Nus18SystsPPFXLoad(), Nus18SystsTauLoad(), Nus18SystsXSecOnOffLoad(), savePrediction_addExpt(), savePrediction_complete(), savePrediction_extrap(), savePrediction_simple(), savePrediction_systs(), SystsAcceptanceLoad17(), SystsBeamLoad(), SystsBeamTranspLoad17(), SystsDecompLoad(), SystsDecompLoad17(), SystsFidContLoad(), SystsGENIELoad(), SystsGENIELoad17(), SystsMCStatsLoad(), SystsNDRockLoad(), test_numu_summed_genie_systs(), TrueNCSpectrum(), TrueSpectrumFromKaons(), and xsec_extrap_plots().

122  {
123  for(auto it: fLoaders) it.second->SetSpillCut(cut);
124  if(fSpillCut) delete fSpillCut;
125  fSpillCut = new SpillCut(cut);
126  }
const SpillCut * fSpillCut
Definition: Loaders.h:86
set< int >::iterator it
_Cut< caf::SRSpillProxy > SpillCut
Equivalent of Cut acting on caf::SRSpill. For use in spill-by-spill data quality cuts.
Definition: Cut.h:100
const Cut cut
Definition: exporter_fd.C:30
std::map< Key_t, SpectrumLoader * > fLoaders
Definition: Loaders.h:84

Member Data Documentation

std::map<Key_t, std::vector<std::string> > ana::Loaders::fLoaderFiles
protectedinherited
std::map<Key_t, std::string> ana::Loaders::fLoaderPaths
protectedinherited
std::map<Key_t, SpectrumLoader*> ana::Loaders::fLoaders
protectedinherited
bool ana::Loaders::fND
protectedinherited
NullLoader ana::Loaders::fNull
protectedinherited

We give this back when a loader isn't set for some configuration.

Definition at line 89 of file Loaders.h.

Referenced by ana::Loaders::GetLoader().

const SpillCut* ana::Loaders::fSpillCut
protectedinherited

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