CMFFitFeldmanCousinsPoint_plugin.cc
Go to the documentation of this file.
1 //
2 // Created by Brian Rebel on 4/27/20.
3 //
4 // Plugin to fit the random universes produced at a single
5 // point in parameter space for obtaining confidence intervals with
6 // the Unified Approach of Feldman and Cousins
7 //
8 
9 #include <memory>
10 #include <string>
11 #include <vector>
12 #include <map>
13 
14 // Framework includes
18 #include "art_root_io/TFileService.h"
19 #include "art_root_io/TFileDirectory.h"
21 #include "fhiclcpp/ParameterSet.h"
23 
24 // NOvA includes
38 
39 #include "TFile.h"
40 #include "TH1.h"
41 #include "TH2.h"
42 #include "TRandom3.h"
43 
44 // ROOT includes
45 #include "TCanvas.h"
46 #include "TH1.h"
47 #include "TH2.h"
48 #include "TStopwatch.h"
49 
50 namespace cmf {
51 
53  public:
54  explicit FitFeldmanCousinsPoint(fhicl::ParameterSet const& pset);
55  virtual ~FitFeldmanCousinsPoint();
56 
57  // Plugins should not be copied or assigned.
62 
63  void readResults (art::Results const& r) override;
64  void writeResults(art::Results & r) override;
65  void clear() override;
66  void beginJob() override;
67  void reconfigure(fhicl::ParameterSet const& p);
68 
69  private:
70 
71  void FillHistograms(size_t const& u,
72  double const& chiSqrInput,
73  cmf::OscillationParameterMap const& oscParMap,
74  cmf::PointResult const& pr);
75  void MakeCanvases();
76 
77  fhicl::ParameterSet fManipulatorPars; ///< parameters to make object for deserializing events
78  unsigned int fStartUniverse; ///< which universe to start?
79  unsigned int fNumUniverses; ///< which universe to start?
80  cmf::FCUniverseCollection fFakeUniverses; ///< the input fake universes
81  fhicl::ParameterSet fChiSqrCalcPars; ///< parameters for the ChiSqrCalculator singleton
82  fhicl::ParameterSet fHelperPars; ///< covariance fit helper parameters
83  fhicl::ParameterSet fMinimizerPars; ///< ROOT minimizer configuration
84  fhicl::ParameterSet fSAWPars; ///< ShifterAndWeighter configuration
85  std::vector<cmf::OscParamPoint> fPredictionLib; ///< library of predictions
86  std::string fPredictionModule; ///< label for module containing the prediction point library
87  cmf::ChiSqrCalc_t fChiSqrToUse; ///< chi^2 calculation methods to use for fitting
88  std::string fInputUniverseLabel; ///< module label where we get the random universes
89  cmf::OscParm_t fXParameter; ///< oscillation parameter defining the x axis of the grid
90  cmf::OscParm_t fYParameter; ///< oscillation parameter defining the y axis of the grid
91  float fXVal; ///< x value for the point in space
92  float fYVal; ///< y value for the point in space
93  TH1D* fFitStatus; ///< fit status for each universe
94  TH1D* fDeltaChiSqrInput; ///< difference in the chi^2 from the fit vs the input location
95  TH2D* fDeltaChiSqrVsInput; ///< difference in the chi^2 from the fit vs the input location
96  std::map<cmf::OscParm_t, TH2D*> fDeltaFitOscVals; ///< differences between the input and fit values
97  std::map<cmf::OscParm_t, TH2D*> fFitVsInputOscVals; ///< the input and fit values
98 
99  };
100 
101  //......................................................................
103  : fManipulatorPars(pset.get<fhicl::ParameterSet>("EventListManipulator") )
104  , fChiSqrCalcPars (pset.get<fhicl::ParameterSet>("ChiSqrCalculationParameters") )
105  , fHelperPars (pset.get<fhicl::ParameterSet>("FitHelperParameters") )
106  , fMinimizerPars (pset.get<fhicl::ParameterSet>("ROOTMinimizerParameters") )
107  , fSAWPars (pset.get<fhicl::ParameterSet>("ShifterAndWeighterParameters"))
108  {
109  this->reconfigure(pset);
110 
111  // Produce the best fit point for each universe and the spectrum for
112  // that universe
113  produces< std::vector<cmf::FCResultCollection> >();
114  }
115 
116  //......................................................................
118  = default;
119 
120  //......................................................................
122  {
127 
128  fChiSqrToUse = cmf::StringToChiSqrType(p.get<std::string>("ChiSqrCalcToUse"));
129  fStartUniverse = p.get<unsigned int>("StartUniverse" );
130  fNumUniverses = p.get<unsigned int>("NumberOfUniverses" );
131  fInputUniverseLabel = p.get<std::string >("InputUniverseModule" );
132  fPredictionModule = p.get<std::string >("PredictionLibraryModule", std::string());
133 
134  // figure out the point in the grid we want
135  fXVal = p.get<float>("GridXVal", cmf::kGarbageFloat);
136  fYVal = p.get<float>("GridYVal", cmf::kGarbageFloat);
137  fXParameter = cmf::StringToOscParmType(p.get<std::string>("XParameter", "Th23" ));
138  fYParameter = cmf::StringToOscParmType(p.get<std::string>("YParameter", "Dmsq32"));
139 
141  }
142 
143  //......................................................................
145  {
146  // make some histograms
148 
149  fFitStatus = tfs->make<TH1D>("FitStatus",
150  ";Universe;Fit Status",
153  fStartUniverse + fNumUniverses);
154 
155  fDeltaChiSqrInput = tfs->make<TH1D>("DeltaChiSqrInput",
156  ";Universe;#chi^{2}_{Best Fit} - #chi^{2}_{Input}",
157  fStartUniverse + fNumUniverses,
159  fStartUniverse + fNumUniverses);
160 
161  fDeltaChiSqrVsInput = tfs->make<TH2D>("DeltaChiSqrVsInputChiSqr",
162  ";#chi^{2}_{Input};#chi^{2}_{Best Fit} - #chi^{2}_{Input}",
163  200,
164  50,
165  250,
166  40,
167  -10,
168  10);
169 
170  // make histograms of the difference between the input and best fit
171  // values for each oscillation parameter that is fit
173 
174  std::string histName1;
175  std::string histName2;
176  std::string histTitle1;
177  std::string histTitle2;
178  double lowVal;
179  double highVal;
181  // We only need to loop over the FD values as the oscillation parameters
182  // are the same in the two detectors except for the length, and that doesn't
183  // change in the fit.
184  for(auto const& itr : loc.OscillationParameters()){
185  if(itr.IsFixed()) continue;
186 
187  par = (cmf::OscParm_t)itr.Key();
188 
189  // remember the range of the histogram is for the difference from the input
190  // value, so taking the max excursion from 0 as being the difference between
191  // the upper and lower bounds for the parameter makes sense.
192  highVal = (itr.UpperBound() - itr.LowerBound()) * cmf::cOscParams_Scales[par];
193  lowVal = -1. * highVal;
194 
195  histName1 = "Delta_" + itr.Name();
196  histTitle1 = ";" + cmf::cOscParams_Strings_Latex[par] + " (Input)" + cmf::cOscParams_LatexScales[par];
197  histTitle1 += ";#Delta(" + cmf::cOscParams_Strings_Latex[par] + ")";
198  histTitle1 += cmf::cOscParams_LatexScales[par];
199 
200  histName2 = "FitVsInput_" + itr.Name();
201  histTitle2 = ";" + cmf::cOscParams_Strings_Latex[par] + " (Input)";
202  histTitle2 += cmf::cOscParams_LatexScales[par];
203  histTitle2 += ";" + cmf::cOscParams_Strings_Latex[par] + " (Fit)";
204  histTitle2 += cmf::cOscParams_LatexScales[par];
205  if(cmf::IsAngleParameter(par)){
206  histTitle1 = ";sin^{2}(" + cmf::cOscParams_Strings_Latex[par] + ") (Input)";
207  histTitle1 += ";#Delta(sin^{2}(" + cmf::cOscParams_Strings_Latex[par] + "));";
208 
209  histTitle2 = ";sin^{2}(" + cmf::cOscParams_Strings_Latex[par] + ") (Input)";
210  histTitle2 += ";sin^{2}(" + cmf::cOscParams_Strings_Latex[par] + ") (Fit)";
211  }
212 
213  fDeltaFitOscVals.emplace(par,
214  tfs->make<TH2D>(histName1.c_str(),
215  histTitle1.c_str(),
216  50,
217  itr.LowerBound() * cmf::cOscParams_Scales[par],
218  itr.UpperBound() * cmf::cOscParams_Scales[par],
219  50,
220  lowVal,
221  highVal));
222 
223  lowVal = itr.LowerBound() * cmf::cOscParams_Scales[par];
224  highVal = itr.UpperBound() * cmf::cOscParams_Scales[par];
225  fFitVsInputOscVals.emplace(par,
226  tfs->make<TH2D>(histName2.c_str(),
227  histTitle2.c_str(),
228  50,
229  lowVal,
230  highVal,
231  50,
232  lowVal,
233  highVal));
234  }
235 
236  // Initialize the FitHelper - if we are only looping over the
237  // library predictions we don't need the ELM parameters
238  if(!fPredictionModule.empty()){
240  }
241  else{
246  fSAWPars);
247  }
248  }
249 
250  //......................................................................
252  {
253 
254  }
255 
256  //......................................................................
258  {
259  std::vector<cmf::FCUniverseCollection> fcCol;
261  MF_LOG_VERBATIM("FitFeldmanCousinsPoint")
262  << "Valid handle to std::vector<cmf::FCUniverseCollection> "
263  << "objects found in "
265  << " vector size "
266  << fcCol.size();
267 
268  // now look for the grid point we want to fit
269  auto itr = std::find(fcCol.begin(), fcCol.end(), fFakeUniverses);
270 
271  if(itr != fcCol.end()){
272  for(auto const& uni : itr->FakeUniverseVec()) fFakeUniverses.AppendFakeUniverse(uni);
273  }
274  else
275  MF_LOG_WARNING("FitFeldmanCousinsPoint")
276  << "no collection of universes found for point "
277  << fFakeUniverses;
278  }
279 
280  // look to see if we have a prediction library to read in
281  if(fPredictionModule.empty()) return;
282 
284  MF_LOG_VERBATIM("CovarianceMatrixFitter")
285  << "Valid handle to std::vector<cmf::OscParamPoint> "
286  << "objects found in "
288  << " "
289  << " vector size "
290  << fPredictionLib.size();
291  }
292  }
293 
294  //......................................................................
296  double const& chiSqrInput,
297  cmf::OscillationParameterMap const& oscParMap,
298  cmf::PointResult const& pr)
299  {
300  fFitStatus ->Fill(u, pr.FitStatus() );
301  fDeltaChiSqrInput ->Fill(u, pr.ChiSqr() - chiSqrInput);
302  fDeltaChiSqrVsInput->Fill(chiSqrInput, pr.ChiSqr() - chiSqrInput);
303 
304  double diff;
305  double fitVal;
306  double inputVal;
307  for(auto const& oscItr : pr.ParameterSpaceLocation()){
308  if(fDeltaFitOscVals.count(oscItr.first)){
309  fitVal = oscItr.second * cmf::cOscParams_Scales[oscItr.first];
310  inputVal = oscParMap.find(oscItr.first)->second * cmf::cOscParams_Scales[oscItr.first];
311  if(cmf::IsAngleParameter(oscItr.first)){
312  fitVal = std::pow(std::sin(fitVal), 2.);
313  inputVal = std::pow(std::sin(inputVal), 2.);
314  }
315  diff = (fitVal - inputVal);
316  fDeltaFitOscVals .find(oscItr.first)->second->Fill(inputVal, diff );
317  fFitVsInputOscVals.find(oscItr.first)->second->Fill(inputVal, fitVal);
318  }
319  } // end loop over oscillation parameters
320  }
321 
322  //......................................................................
324  {
326 
327  auto tfd = tfs->mkdir("Fit_Input_Comparisons");
328 
329  auto deltaVsInputCanv = tfd.make<TCanvas>("DeltaVsInputCanv",
330  "DeltaVsInputCanv",
331  1200,
332  1200);
333 
334  auto fitVsInputCanv = tfd.make<TCanvas>("FitVsInputCanv",
335  "FitVsInputCanv",
336  1200,
337  1200);
338 
339  int numDivs = std::ceil(fDeltaFitOscVals.size() * 0.5);
340  deltaVsInputCanv->Divide(numDivs, numDivs);
341  fitVsInputCanv ->Divide(numDivs, numDivs);
342 
343  numDivs = 1;
344  for(auto const& itr : fDeltaFitOscVals){
345 
346  deltaVsInputCanv->cd(numDivs);
347  itr.second->Draw("colz");
348  deltaVsInputCanv->Update();
349 
350  fitVsInputCanv->cd(numDivs);
351  fFitVsInputOscVals.find(itr.first)->second->Draw("colz");
352  fitVsInputCanv->Update();
353 
354  ++numDivs;
355  }
356 
357  deltaVsInputCanv->Write();
358  fitVsInputCanv->Write();
359 
360  auto statusCanv = tfd.make<TCanvas>("ChiSqrCanv",
361  "ChiSqrCanv",
362  1200,
363  1200);
364 
365  statusCanv->Divide(2, 2);
366  statusCanv->cd(1);
367  fFitStatus->Draw();
368  statusCanv->cd(2);
369  fDeltaChiSqrInput->Draw();
370  statusCanv->cd(3);
371  fDeltaChiSqrVsInput->Draw("colz");
372 
373  statusCanv->Update();
374  statusCanv->Write();
375  }
376 
377  //......................................................................
379  {
380  // make the vectors we are going to write to the file
381  std::unique_ptr<std::vector<cmf::FCResultCollection> > resVec = std::make_unique<std::vector<cmf::FCResultCollection>>();
382 
383  if(!fFakeUniverses.FakeUniverseVec().empty()){
384  // loop over the input universes and fit the ones we want
385  MF_LOG_VERBATIM("FitFeldmanCousinsPoint")
386  << "Begin fitting universes "
387  << fStartUniverse
388  << " to "
390  << " at point "
391  << fFakeUniverses
392  << " out of "
393  << fFakeUniverses.FakeUniverseVec().size()
394  << " possible universes";
395 
396  // check that the number of bins in the predicted spectra and fake
397  // universes match the expectation for the job
398  size_t totConfigBins = cmf::CovarianceBinUtility::Instance()->TotalBins();
399  if(fPredictionLib.front().PredictedSpectrum().size() != totConfigBins)
400  throw cet::exception("ContourFromLibrary")
401  << "The predicted spectra have "
402  << fPredictionLib.front().PredictedSpectrum().size()
403  << " bins while the configuration expects "
404  << totConfigBins;
405 
406  if(fFakeUniverses.FakeUniverseVec().front().AsimovSpectrum().size() != totConfigBins)
407  throw cet::exception("ContourFromLibrary")
408  << "The predicted spectra have "
409  << fFakeUniverses.FakeUniverseVec().front().AsimovSpectrum().size()
410  << " bins while the configuration expects "
411  << totConfigBins;
412 
413  double chiSqrInput;
414 
416 
417  bool loadSpectrumFromEventLists = false;
418 
420 
422  throw cet::exception("FFCP")
423  << "requested start universe "
424  << fStartUniverse
425  << " is larger than FakeUniverseVec size "
426  << fFakeUniverses.FakeUniverseVec().size()
427  << ", so we cannot proceed.";
428  }
429 
430  size_t endU = fStartUniverse + fNumUniverses;
431  if(endU > fFakeUniverses.FakeUniverseVec().size() ){
432  MF_LOG_WARNING("FFCP")
433  << "asking to fit universes "
434  << fStartUniverse
435  << " to "
436  << endU
437  << " but only "
438  << fFakeUniverses.FakeUniverseVec().size()
439  << " universes are available, stop there";
440 
441  endU = fFakeUniverses.FakeUniverseVec().size();
442  }
443 
444  double totalTime = 0.;
445  for(size_t u = fStartUniverse; u < endU; ++u){
446 
447  MF_LOG_VERBATIM("FitFeldmanCousinsPoint")
448  << "universe "
449  << u
450  << " has input location of "
452 
453  // set the data spectrum for this universe
455 
456  oscParMap = fFakeUniverses.FakeUniverseVec()[u].OscParMap();
457 
458  // set the MC spectrum to the input Asimov spectrum to find the chi^2 for this universe
459  // compared to the known input values
461  chiSqrInput = cmf::ChiSqrCalculator::Instance()->ChiSqr(fChiSqrToUse, oscParMap);
462 
463  TStopwatch ts;
464  ts.Start();
465 
466  if(fPredictionLib.size() > 0){
468  }
469  else{
471  loadSpectrumFromEventLists = true;
472  }
473 
474  totalTime += ts.RealTime();
475 
476  // we have a best fit, let's grab it.
477  pr = *(cmf::CovarianceFitHelper::Instance()->Result(loadSpectrumFromEventLists));
478 
479  MF_LOG_VERBATIM("FitFeldmanCousinsPoint")
480  << "Universe "
481  << u
482  << " best fit: "
483  << pr
484  << " compared to chi^2: "
485  << chiSqrInput
486  << "\n"
488 
489  // fill the histograms comparing this result to the input values
490  this->FillHistograms(u,
491  chiSqrInput,
492  oscParMap,
493  pr);
494 
495  // now get the expected spectrum at the best fit point
496  resVec->emplace_back(fFakeUniverses.X(),
497  fFakeUniverses.Y(),
499  fFakeUniverses.YPar());
500  resVec->back().AppendPointResultAndSpectrum(pr,
501  cmf::CovarianceFitHelper::Instance()->BestFitSpectrum(loadSpectrumFromEventLists));
502 
503  // create plots showing the minimizer progress, the false says don't use
504  // event lists to make any plots
505  cmf::CovarianceFitHelper::Instance()->MakeResultPlots("FitResults_Universe_",
506  std::to_string(u),
507  loadSpectrumFromEventLists);
508  }
509 
510  // make canvases for the histograms
511  this->MakeCanvases();
512 
513  MF_LOG_VERBATIM("FitFeldmanCousinsPoint")
514  << "Time to fit "
515  << endU - fStartUniverse
516  << " universes: "
517  << totalTime
518  << " or "
519  << totalTime / (1. * (endU - fStartUniverse))
520  << " per universe";
521 
522  } // end if we have fake universes
523 
524  // put the output into the file
525  r.put(std::move(resVec));
526  }
527 
529 
530 } // end cmf namespace
enum cmf::osc_params OscParm_t
cmf::OscParm_t fXParameter
oscillation parameter defining the x axis of the grid
void FillHistograms(size_t const &u, double const &chiSqrInput, cmf::OscillationParameterMap const &oscParMap, cmf::PointResult const &pr)
int const & FitStatus() const
Definition: PointResult.h:59
std::vector< cmf::OscParamPoint > fPredictionLib
library of predictions
std::vector< cmf::FakeUniverse > const & FakeUniverseVec() const
void Initialize(fhicl::ParameterSet const &pset)
fhicl::ParameterSet fHelperPars
covariance fit helper parameters
cmf::FCUniverseCollection fFakeUniverses
the input fake universes
const char * p
Definition: xmltok.h:285
constexpr T pow(T x)
Definition: pow.h:72
Int_t par
Definition: SimpleIterate.C:24
static SelectionUtility * Instance()
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
const std::vector< std::string > cOscParams_LatexScales({" (m)"," (g/cc)"," (#times10^{-5} eV^{2})"," (#times10^{-3} eV^{2})","","",""," (#pi rad)","","","","(eV^{2})"," (#pi rad)","","","","","","","","",""})
TH1D * fDeltaChiSqrInput
difference in the chi^2 from the fit vs the input location
fhicl::ParameterSet fMinimizerPars
ROOT minimizer configuration.
OscillationParameterMap const & ParameterSpaceLocation() const
Definition: PointResult.h:60
unsigned int fNumUniverses
which universe to start?
unsigned int fStartUniverse
which universe to start?
static bool IsAngleParameter(cmf::OscParm_t const &par)
Definition: StaticFuncs.h:354
std::map< cmf::OscParm_t, TH2D * > fDeltaFitOscVals
differences between the input and fit values
static bool readVectorResults(art::Results const &r, std::string const &module, std::string const &instance, std::vector< T > &resvec, bool clearResVec=true)
FitFeldmanCousinsPoint & operator=(FitFeldmanCousinsPoint const &)=delete
float fXVal
x value for the point in space
fhicl::ParameterSet fManipulatorPars
parameters to make object for deserializing events
static ParameterUtility * Instance()
TH1D * fFitStatus
fit status for each universe
void Minimize(cmf::ChiSqrCalc_t const &chiSqrCalc=cmf::kCovMat)
cmf::OscParm_t fYParameter
oscillation parameter defining the y axis of the grid
const std::vector< std::string > cOscParams_Strings_Latex({"L","#rho","#Delta m^{2}_{21}","#Delta m^{2}_{32}","#theta_{12}","#theta_{13}","#theta_{23}","#delta_{CP}","#theta_{14}","#theta_{24}","#theta_{34}","#Delta m^{2}_{41}","#delta_{24}","#epsilon_{ee}","#epsilon_{e#mu}","#epsilon_{e#tau}","#epsilon_{#mu#mu}","#epsilon_{#mu#tau}","#epsilon_{#tau#tau}","#delta_{e#mu}","#delta_{e#tau}","#delta_{#mu#tau}"})
std::map< cmf::OscParm_t, float > OscillationParameterMap
Definition: Constants.h:748
static const float kGarbageFloat
Definition: Constants.h:19
#define DEFINE_ART_RESULTS_PLUGIN(klass)
T get(std::string const &key) const
Definition: ParameterSet.h:231
void FindInitialGuess(std::vector< cmf::OscParamPoint > const &library)
void Initialize(fhicl::ParameterSet const &pset)
void AppendFakeUniverse(cmf::FakeUniverse const &fakeU)
void Initialize(fhicl::ParameterSet const &plottingPars)
float const & X() const
std::map< cmf::OscParm_t, TH2D * > fFitVsInputOscVals
the input and fit values
static cmf::ChiSqrCalculator * Instance()
double ChiSqr(cmf::ChiSqrCalc_t const &chiSqrCalc, std::vector< std::string > const &pars, const double *vals)
static CovarianceFitHelper * Instance()
FitFeldmanCousinsPoint(fhicl::ParameterSet const &pset)
size_t TotalBins(bool allSels=false)
fhicl::ParameterSet fChiSqrCalcPars
parameters for the ChiSqrCalculator singleton
static cmf::ChiSqrCalc_t StringToChiSqrType(std::string const &str)
Module to combine a set of results into a single file currently only does one data product type at a ...
Definition: Event.cxx:24
void writeResults(art::Results &r) override
void MakeResultPlots(std::string const &dirBaseName, std::string const &uniqueID=std::string(), bool fillFromLists=true)
void readResults(art::Results const &r) override
T sin(T number)
Definition: d0nt_math.hpp:132
cmf::OscParm_t const & XPar() const
std::string fPredictionModule
label for module containing the prediction point library
#define MF_LOG_VERBATIM(category)
void Initialize(fhicl::ParameterSet const &helperPars, fhicl::ParameterSet const &chiSqrCalcPars, fhicl::ParameterSet const &manipulatorPars, fhicl::ParameterSet const &minimizerPars, fhicl::ParameterSet const &sawPars)
float const & Y() const
static PlotUtilities * Instance()
cmf::Location ParametersAsLocation()
TRandom3 r(0)
fhicl::ParameterSet fSAWPars
ShifterAndWeighter configuration.
double const & ChiSqr() const
Definition: PointResult.h:58
const std::vector< double > cOscParams_Scales({1., 1., 1.e5, 1.e3, 1., 1., 1., 1./3.14159, 1., 1., 1., 1., 1./3.14159, 1., 1., 1., 1., 1., 1., 1., 1., 1.})
#define MF_LOG_WARNING(category)
void Initialize(fhicl::ParameterSet const &pset)
void FillDataSpectrum(cmf::EventListColl const &eventLists)
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
Definition: DataViewImpl.h:730
cmf::OscParm_t const & YPar() const
std::unique_ptr< cmf::PointResult > Result(bool loadFromEventList=true)
float fYVal
y value for the point in space
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
static cmf::OscParm_t StringToOscParmType(std::string const &str)
TH2D * fDeltaChiSqrVsInput
difference in the chi^2 from the fit vs the input location
void reconfigure(fhicl::ParameterSet const &p)
enum cmf::chisqr_type ChiSqrCalc_t
std::string fInputUniverseLabel
module label where we get the random universes
void SetSpectrum(cmf::Spectrum const &spectrum, bool isData)
static CovarianceBinUtility * Instance()
enum BeamMode string
cmf::ChiSqrCalc_t fChiSqrToUse
chi^2 calculation methods to use for fitting