80 std::unique_ptr<TMatrixD>
CalcCovMx(
const std::vector<TArrayD*> & binSets,
int firstBin=0,
int lastBin=-1);
94 double LogLikelihood(
const TH1*
exp,
const TH1* obs,
bool useOverflow =
false);
113 template <
typename T,
typename U,
114 typename std::enable_if_t<std::is_convertible_v<double, T> && std::is_convertible_v<double, U>,
int> = 0>
119 const double minexp = 1
e-40;
129 return 2*obs*((exp-obs)/obs +
log1p((obs-exp)/
exp));
136 return 2*(exp-obs + obs*
log(obs/exp));
150 int nbinsy,
double ymin,
double ymax,
bool ylog);
175 const std::map<std::string, std::string>&
add,
176 std::set<std::string>&
mask);
183 const std::map<std::string, std::string>&
meta);
196 size_t Stride(
bool allow_default =
true);
198 size_t Offset(
bool allow_default =
true);
216 double operator()(
double *
x,
double *
par)
const;
227 std::size_t
Hash(
const std::vector<std::size_t> &vals);
Det_t
Which NOvA detector?
size_t JobNumber()
What's the process number for a grid job?
Cuts and Vars for the 2020 FD DiF Study.
std::map< std::string, double > xmax
bool RunningOnGrid()
Is this a grid (condor) job?
Proxy for caf::StandardRecord.
void CombineMetadata(std::map< std::string, std::string > &base, const std::map< std::string, std::string > &add, std::set< std::string > &mask)
base += add
ifdh calls between construction and destruction produce no output
double LogLikelihood(const Eigen::ArrayXd &ea, const Eigen::ArrayXd &oa, bool useOverflow)
The log-likelihood formula from the PDG.
std::string FindCAFAnaDir()
const XML_Char int const XML_Char int const XML_Char * base
TVectorT< double > TVectorD
TH2F * ExpandedHistogram(const std::string &title, int nbinsx, double xmin, double xmax, bool xlog, int nbinsy, double ymin, double ymax, bool ylog)
Internal helper for Surface and FCSurface.
std::vector< std::string > LoadFileList(const std::string &listfile)
Read list of input files from a text file, one per line.
int Limit()
Value passed to –limit, or -1 if not specified.
std::unique_ptr< TMatrixD > CalcCovMx(const std::vector< TArrayD * > &binSets, int firstBin, int lastBin)
Compute bin-to-bin covariance matrix from a collection of sets of bin contents.
fvar< T > exp(const fvar< T > &x)
void WriteCAFMetadata(TDirectory *dir, const std::map< std::string, std::string > &meta)
Write map of metadata parameters into a CAF file.
size_t Stride(bool allow_default)
Value passed to –stride, or 1 if not specified.
TMatrixT< double > TMatrixD
std::string FindPackageDir(std::string Dir)
std::size_t Hash(const std::vector< std::size_t > &vals)
Generate a unique hash from a sequence of integers.
size_t Offset(bool allow_default)
Value passed to –offset, or 0 if not specified.
bool SAMDefinitionExists(const std::string &def)
std::map< std::string, std::string > GetCAFMetadata(TDirectory *dir)
Extract map of metadata parameters from a CAF file.
assert(nhit_max >=nhit_nbins)
fvar< T > log1p(const fvar< T > &x)
TVector3 NuMIBeamDirection(caf::Det_t det)
Average direction of NuMI neutrinos in a given detector This function is a copy of geo::GeometryBase:...
Alter floating-point exception flag.
add("abs", expr_type(int_type()), expr_type(int_type()))