Public Member Functions | Public Attributes | List of all members
ana::PredictionInterp::ShiftedPreds Struct Reference

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

Public Member Functions

double Stride () const
 
void FillRemaps ()
 

Public Attributes

std::string systName
 What systematic we're interpolating. More...
 
std::vector< double > shifts
 Shift values sampled. More...
 
std::vector< IPrediction * > preds
 
int nCoeffs
 
std::vector< std::vector< std::vector< Coeffs > > > fits
 Indices: [type][histogram bin][shift bin]. More...
 
std::vector< std::vector< std::vector< Coeffs > > > fitsNubar
 Will be filled if signs are separated, otherwise not. More...
 
std::vector< std::vector< std::vector< Coeffs > > > fitsRemap
 
std::vector< std::vector< std::vector< Coeffs > > > fitsNubarRemap
 

Detailed Description

Definition at line 176 of file PredictionInterp.h.

Member Function Documentation

void ana::PredictionInterp::ShiftedPreds::FillRemaps ( )

Definition at line 32 of file PredictionInterp.cxx.

References fits, fitsNubar, fitsNubarRemap, fitsRemap, MECModelEnuComparisons::i, it, calib::j, and gen_flatrecord::size.

Referenced by ana::PredictionSystJoint2018::AddNormSyst(), ana::PredictionSystJointDemo::AddNormSyst(), ana::PredictionSyst3Flavor2020::AddNormSyst(), ana::PredictionSystNue2017::AddNormSysts(), ana::PredictionSystNumu2017::AddNormSysts(), and ana::PredictionInterp::InitFits().

33  {
34  // Copy fits into the remapped indexing order. TODO this is very ugly. Best
35  // would be to generate things in this order natively.
36 
37  for(bool nubar: {false, true}){
38  const auto& from = nubar ? fitsNubar : fits;
39  auto& to = nubar ? fitsNubarRemap : fitsRemap;
40 
41  // Allocate the space
42  to.resize(from.size());
43  for(auto& it: to){
44  it.resize(from[0][0].size());
45  for(auto& it2: it) it2.resize(from[0].size(), Coeffs(0, 0, 0, 0));
46  }
47 
48  // And copy with the transposed indices
49  for(unsigned int i = 0; i < to.size(); ++i)
50  for(unsigned int j = 0; j < to[i].size(); ++j)
51  for(unsigned int k = 0; k < to[i][j].size(); ++k)
52  to[i][j][k] = from[i][k][j];
53 
54  } // end for nubar
55  }
set< int >::iterator it
std::vector< std::vector< std::vector< Coeffs > > > fitsNubarRemap
std::vector< std::vector< std::vector< Coeffs > > > fitsNubar
Will be filled if signs are separated, otherwise not.
const double j
Definition: BetheBloch.cxx:29
std::vector< std::vector< std::vector< Coeffs > > > fitsRemap
std::vector< std::vector< std::vector< Coeffs > > > fits
Indices: [type][histogram bin][shift bin].
double ana::PredictionInterp::ShiftedPreds::Stride ( ) const
inline

Definition at line 178 of file PredictionInterp.h.

Referenced by ana::PredictionInterp::ShiftBins().

178 {return shifts.size() > 1 ? shifts[1]-shifts[0] : 1;}
std::vector< double > shifts
Shift values sampled.

Member Data Documentation

std::vector<std::vector<std::vector<Coeffs> > > ana::PredictionInterp::ShiftedPreds::fits
std::vector<std::vector<std::vector<Coeffs> > > ana::PredictionInterp::ShiftedPreds::fitsNubar
std::vector<std::vector<std::vector<Coeffs> > > ana::PredictionInterp::ShiftedPreds::fitsNubarRemap

Definition at line 196 of file PredictionInterp.h.

Referenced by FillRemaps(), and ana::PredictionInterp::ShiftBins().

std::vector<std::vector<std::vector<Coeffs> > > ana::PredictionInterp::ShiftedPreds::fitsRemap

Definition at line 195 of file PredictionInterp.h.

Referenced by FillRemaps(), and ana::PredictionInterp::ShiftBins().

int ana::PredictionInterp::ShiftedPreds::nCoeffs
std::vector<IPrediction*> ana::PredictionInterp::ShiftedPreds::preds
std::vector<double> ana::PredictionInterp::ShiftedPreds::shifts
std::string ana::PredictionInterp::ShiftedPreds::systName

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