107 std::unique_ptr<TMatrixD>
CalcCovMx(
const std::vector<TArrayD*> & binSets,
int firstBin=0,
int lastBin=-1);
130 double LogLikelihood(
const TH1*
exp,
const TH1* obs,
bool useOverflow =
false);
155 double Chi2CovMx(
const TVectorD*
exp,
const TVectorD* obs,
const TMatrixD* covmxinv);
158 double Chi2CovMx(
const TH1*
exp,
const TH1* obs,
const TMatrixD* covmxinv);
165 int nbinsx,
double xmin,
double xmax,
bool xlog,
166 int nbinsy,
double ymin,
double ymax,
bool ylog);
227 std::vector<std::string>
Wildcard(
const std::string& wildcardString);
234 std::vector<std::string>
LoadFileList(
const std::string& listfile);
248 const std::map<std::string, std::string>& add,
249 std::set<std::string>&
mask);
256 const std::map<std::string, std::string>& meta);
262 size_t Stride(
bool allow_default =
true);
264 size_t Offset(
bool allow_default =
true);
281 FitToFourier(TH1*
h,
double xlo,
double xhi,
int NOsc);
284 double operator()(
double *
x,
double *par)
const;
298 double xmin=0,
double xmax=-1,
299 double ymin=0,
double ymax=-1);
303 double FindQuantile(
double frac, std::vector<double>& xs);
TH2D * MakeTH2D(const char *name, const char *title, const Binning &binsx, const Binning &binsy)
Represent the binning of a Spectrum's x-axis.
process_name opflash particleana ie x
size_t Offset(bool allow_default)
TH3 * ToTH3Helper(std::unique_ptr< TH1 > h1, const Binning &binsx, const Binning &binsy, const Binning &binsz, ana::EBinType bintype)
double LogLikelihood(double e, double o)
The log-likelihood formula for a single bin.
TH2 * ToTH2Helper(std::unique_ptr< TH1 > h1, const Binning &binsx, const Binning &binsy, ana::EBinType bintype)
void CombineMetadata(std::map< std::string, std::string > &base, const std::map< std::string, std::string > &add, std::set< std::string > &mask)
Divide bin contents by bin widths.
std::vector< std::string > Wildcard(const std::string &wildcardString)
double FindQuantile(double frac, std::vector< double > &xs)
std::unique_ptr< TMatrixD > SymmMxInverse(const TMatrixD &mx)
process_name opflashCryoW ana
std::string pnfs2xrootd(std::string loc, bool unauth)
ifdh calls between construction and destruction produce no output
void EnsurePositiveDefinite(TH2 *mat)
std::string FindCAFAnaDir()
Representation of a spectrum in any variable, with associated POT.
FloatingExceptionOnNaN(bool enable=true)
process_name pandoraGausCryo1 vertexChargeCryo1 vertexStubCryo1 xmin
std::map< std::string, std::string > GetCAFMetadata(TDirectory *dir)
TH2F * ExpandedHistogram(const std::string &title, int nbinsx, double xmin, double xmax, bool xlog, int nbinsy, double ymin, double ymax, bool ylog)
constexpr mask_t< EnumType > mask(EnumType bit, OtherBits...otherBits)
Returns a mask with all specified bits set.
std::string Experiment()
$EXPERIMENT or a nice error message and abort
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.
EExposureType
For use as an argument to Spectrum::ToTH1.
void WriteCAFMetadata(TDirectory *dir, const std::map< std::string, std::string > &meta)
bool AlmostEqual(double a, double b)
TH2 * ToTH2(const Spectrum &s, double exposure, ana::EExposureType expotype, const Binning &binsx, const Binning &binsy, ana::EBinType bintype)
Represent the ratio between two spectra.
TH1D * MakeTH1D(const char *name, const char *title, const Binning &bins)
size_t Stride(bool allow_default)
then echo File list $list not found else cat $list while read file do echo $file sed s
std::string SAMExperiment()
$SAM_EXPERIMENT or a nice error message and abort
static void SetError(double e)
Alter floating-point exception flag.
~FloatingExceptionOnNaN()
std::vector< std::string > LoadFileList(const std::string &listfile)
Prevent histograms being added to the current directory.
TH3 * ToTH3(const Spectrum &s, double exposure, ana::EExposureType expotype, const Binning &binsx, const Binning &binsy, const Binning &binsz, ana::EBinType bintype)
TH1 * GetMaskHist(const Spectrum &s, double xmin, double xmax, double ymin, double ymax)
std::string UniqueName()
Return a different string each time, for creating histograms.
double Chi2CovMx(const TVectorD *e, const TVectorD *o, const TMatrixD *covmxinv)