MultiExperiment.cxx
Go to the documentation of this file.
2 
8 
9 #include <TGraph.h>
10 
11 namespace fnex{
12 
13  //----------------------------------------------------------------------
14  bool orderByExperimentShortName(std::unique_ptr<fnex::Experiment> a, std::unique_ptr<fnex::Experiment> b)
15  {
16  // order Numu < nue
17 
18  size_t numuIndxA = a->ShortName().find("Numu");
19  size_t numuIndxB = b->ShortName().find("Numu");
20 
21  // if neither is numu, then they are both nue
22  if(numuIndxA == std::string::npos &&
23  numuIndxB == std::string::npos){
24 
25  std::vector<bool> selAOpts({a->ShortName().find("Low") != std::string::npos,
26  a->ShortName().find("Mid") != std::string::npos,
27  a->ShortName().find("Hig") != std::string::npos,
28  a->ShortName().find("Per") != std::string::npos});
29 
30  std::vector<bool> selBOpts({b->ShortName().find("Low") != std::string::npos,
31  b->ShortName().find("Mid") != std::string::npos,
32  b->ShortName().find("Hig") != std::string::npos,
33  b->ShortName().find("Per") != std::string::npos});
34 
35  // order them as Low --> Mid --> High --> Peripheral
36  if(selAOpts[0]) return true;
37  else if(selAOpts[1]){
38  if(selBOpts[0]) return false;
39  else return true;
40  }
41  else if(selAOpts[2]){
42  if(selBOpts[3]) return true;
43  else return false;
44  }
45  else if(selAOpts[3]) return false;
46  }
47  else if(numuIndxA != std::string::npos &&
48  numuIndxB == std::string::npos) return true;
49  else if(numuIndxA == std::string::npos &&
50  numuIndxB != std::string::npos) return false;
51  // both are numu, order by quantiles
52  else if(numuIndxA != std::string::npos &&
53  numuIndxB != std::string::npos){
54 
55  int aNum = 0;
56  int bNum = 0;
57  size_t numA = a->ShortName().find("Q");
58  size_t numB = b->ShortName().find("Q");
59  if(numA != std::string::npos) aNum = std::atoi(a->ShortName().substr(numA + 1, numA + 1).c_str());
60  if(numB != std::string::npos) bNum = std::atoi(b->ShortName().substr(numB + 1, numB + 1).c_str());
61 
62  return aNum < bNum;
63  }
64 
65  return false;
66  }
67 
68 
69  //----------------------------------------------------------------------------
71  : fIsConfigured (false)
72  , fNuisanceExMade(false)
73  {
74  this->Reconfigure(pset);
75  }
76 
77  //----------------------------------------------------------------------------
78  // Use the NuisanceParameters singleton to identify which parameters we need to
79  // turn into NuisanceParameter_experiments for this multiexperiment.
81  {
82  if(fNuisanceExMade) return;
83 
85 
86  for(auto const& itr : nuisancePars){
87 
88  LOG_VERBATIM("MultiExperiment")
89  << "Adding NuisanceParameter_experiment "
90  << "NP_" + itr.first;
91 
92  // make the parameter set for this NuisanceParameter_experiment
93  // and then add the experiment to the collection of experiments
95  pset.put("ShortName", "NP_" + itr.first );
96  pset.put("VarKey", itr.first );
97  pset.put("CentralValue", itr.second.fCentralValue);
98  pset.put("Variance", itr.second.fVariance );
99 
100  fExperiments.push_back(std::make_unique<fnex::NuisanceParameter_Experiment>(pset));
101  }
102 
103  fNuisanceExMade = true;
104 
105  return;
106  }
107 
108  //----------------------------------------------------------------------------
109  bool MultiExperiment::SetEventListMap(EventListMap const& pEventListMap){
110  // Keep track of an errors along the way
111  bool noerror = true;
112  // Pass this event list to all experiments; each experiment is responsible
113  // for choosing which it needs, and complaining if it does not find them
114  for(auto & experiment : fExperiments){
115  noerror = noerror && experiment->SetEventListMap(pEventListMap);
116  }
117  return noerror;
118  }
119 
120 
121  //----------------------------------------------------------------------------
123 
124  // Find block of Experiment psets
125  fhicl::ParameterSet const& experiments_pset = pset.get< fhicl::ParameterSet >("Experiments");
126  std::vector< std::string > experiments_keys = experiments_pset.get_names();
127 
128  // Construct a new Experiment object for each, and pass each its respective pset.
129  // Store in the combined std::vector< Experiment > fExperiments
130  fExperiments.resize(experiments_keys.size());
131  unsigned int curExp = 0;
132  for(auto& it: experiments_keys){
133  LOG_VERBATIM("MultiExperiment")
134  << "Getting experiment "
135  << it;
136 
137  auto exPSet = experiments_pset.get< fhicl::ParameterSet >(it);
138  auto type = exPSet.get<std::string>("ExperimentType");
139 
140  if(type != "NOvA"){
141  LOG_WARNING("MultiExperiment")
142  << "Requesting experiment type "
143  << type
144  << " in MultiExperiment configuration, but only NOvA type is recognized."
145  << " Ignoring this experiment.";
146  continue;
147  }
148 
149  fExperiments[curExp] = std::make_unique<NOvA_Experiment>(exPSet);
150 
151  ++curExp;
152  }
153 
154  // sort the experiments for display purposes
155  //std::sort(fExperiments.begin(), fExperiments.end(), orderByExperimentShortName);
156 
157  // Get the correlations
158  fCorrelations = std::make_unique<Correlations>(pset.get< fhicl::ParameterSet >("Correlations"));
159 
160  // Test correlations are registered
161  fCorrelations->Print();
162 
163  // Configuration done
164  fIsConfigured = true;
165 
166  }
167 
168  //----------------------------------------------------------------------------
170  {
171  // first attempt to make the Nuisance parameter experiments. The Create
172  // function returns if the fNuisanceExMade data member is true
174 
175  // Keep track of what the fitter is doing by making a vector of each
176  // input point and chi^2 value. Fill the chi^2 value in the FitValue method
177  // That method is called nearly right after this one, so the point and chi^2
178  // values should not get out of sync with each other
179  fIterations.emplace_back(pInputPoint, 0.);
180 
181 
182  // Create fExperiments.size() copies of this pInputPoint
183  StringPointMap tempStringPointMap;
184  for(auto & exp : fExperiments)
185  tempStringPointMap.emplace(exp->ShortName(), pInputPoint);
186 
187  // Apply correlations between them
188  this->ApplyCorrelations(tempStringPointMap);
189 
190  // Apply correlated point to each experiment
191  for(auto& it : fExperiments){
192  if(!it->IsConfigured()) continue;
193 
194  // we now have the next iteration, so update the shifter and weighter info
195  fnex::ShifterAndWeighter::Instance()->SetCurrentVals(tempStringPointMap[it->ShortName()]);
196 
197  it->ApplyPoint(tempStringPointMap[it->ShortName()]);
198  }
199 
200  // We're done here
201  return;
202 
203  }
204 
205  //----------------------------------------------------------------------------
207 
208  //std::cout << " About to apply correlations \n";
209  //std::cout << pInputPoint << std::endl;
210  //this->ApplyCorrelations(pInputPoint);
211  //std::cout << " Already applied correlations \n";
212  //std::cout << pInputPoint << std::endl;
213 
214  fCorrelations->ApplyCorrelations(pStringPointMap);
215  return true;
216  }
217 
218 
219  //----------------------------------------------------------------------------
221  {
222 
223  // Add together values of fit value for all attached
224  // Experiment objects (added linearly for now)
225  LOG_VERBATIM("MultiExperiment")
226  << std::setw(40)
227  << "Experiment"
228  << std::setw(20)
229  << "ChiSq";
230 
231  double chisq = 0.0;
232  for(auto& it : fExperiments){
233  chisq += it->FitValue();
234  LOG_VERBATIM("MultiExperiment")
235  << std::setw(40)
236  << it->ToString()
237  << std::setw(20)
238  << it->FitValue();
239  }
240 
241  LOG_VERBATIM("MultiExperiment")
242  << std::setw(40)
243  << "TOTAL"
244  << std::setw(20)
245  << chisq;
246 
247  // set the last entered input point in the Iteration collection
248  // to have this chi^2 The two functions are called one after the other,
249  // so there should not be a risk of getting out of sync
250  fIterations.back().chiSqr = chisq;
251 
252  // We're done here
253  return chisq;
254 
255  }
256 
257  //----------------------------------------------------------------------------
259  {
260 
261  // Call DrawPlots( ) for each individual experiment
262  art::TFileDirectory mexpDir = plotDir->mkdir( "MultiExperiment" );
263  for(auto & experiment : this->ListExperiments()){
264  experiment->DrawPlots(&mexpDir);
265  }
266 
267  // Now output the contributions to ChiSq from each experiment
268  TCanvas *can = nullptr;
269  can = mexpDir.make<TCanvas>("Experiment ChiSq Contributions", "Experiment ChiSq Contributions", 800, 800);
270  can->cd(1);
271 
272  // Make contributions legend
273  TPaveText chisqContributionLegend(0.1, 0.1, 0.9, 0.9);
274  chisqContributionLegend.SetBorderSize(1);
275  chisqContributionLegend.SetFillColor(0);
276  std::stringstream ss_chi;
277  ss_chi << "Contribution" << " : " << "Fit Value";
278  chisqContributionLegend.AddText(ss_chi.str().data());
279  for(auto & experiment : this->ListExperiments()){
280  ss_chi.str("");
281  ss_chi << experiment->ToString() << " : " << experiment->FitValue();
282  chisqContributionLegend.AddText(ss_chi.str().data());
283  }
284 
285  // We're done here. Draw the canvas describing par / syst space
286  // and update the canvas
287  chisqContributionLegend.Draw();
288  can->Update();
289 
290  // Save the canvas to file
291  can->Write();
292 
293  return;
294  }
295 
296  //----------------------------------------------------------------------------
297  // TODO: Uncomment out the dir argument when this function is ready to go
299  {
300  art::TFileDirectory itrDir = plotDir->mkdir( "MultiExperimentIterations" );
301 
302  std::string canvasname = "NOvAExperiment_";
303 
304  // get the lists of oscillation and systematic parameters
306  auto oscParDets = fIterations[0].point.FitParameters();
307  auto sysParDets = fIterations[0].point.FitSystematics();
308 
309  // first make the collections of TGraphs for oscillation and systematic
310  // parameters
311  std::map<ParameterDet, TGraph*> grMap;
312  for(auto itr : oscParDets){
313 
314  // do nothing if this parameter is not in the FD
315  if( itr.second != fd ) continue;
316 
317  grMap[itr] = itrDir.make<TGraph>(fIterations.size());
318  grMap[itr]->SetName((itr.first + "IterGraph").c_str());
319  grMap[itr]->SetTitle(itr.first.c_str());
320  grMap[itr]->SetMarkerStyle(20);
321  }
322  for(auto itr : sysParDets){
323 
324  // do nothing if this parameter is not in the FD
325  if( itr.second != fd ) continue;
326 
327  grMap[itr] = itrDir.make<TGraph>(fIterations.size());
328  grMap[itr]->SetName((itr.first + "IterGraph").c_str());
329  grMap[itr]->SetTitle(itr.first.c_str());
330  grMap[itr]->SetMarkerStyle(20);
331  }
332 
333  // Make the TGraph for the chi^2 values
334  TGraph* chisq_graph = itrDir.make<TGraph>(fIterations.size());
335  chisq_graph->SetName("IterGraphChiSqr");
336  chisq_graph->SetTitle("#chi^{2}");
337  chisq_graph->SetMarkerStyle(20);
338 
339  //loop over the iterations to fill the graphs
340  double parVal = 0.;
341  for(size_t i = 0; i < fIterations.size(); ++i){
342 
343  // get the value for each parameter we care about and put it into its
344  // graph
345  for(auto mapItr : grMap){
346  parVal = fIterations[i].point.ParameterValue(mapItr.first);
347 
348  mapItr.second->SetPoint(i, i * 1., parVal);
349  }
350  //TODO: remove following lines once you figure out that why the last point has a 0 chisq value.
351  //Print out some values of the chisq to find out that why there is an extra last entry
352  //with zero value of the chisq
353  LOG_DEBUG("MultiExperiment")
354  << "Fit Iteration step: "
355  << i
356  << " "
357  << " chisq value: "
358  << fIterations[i].chiSqr;
359 
360  // fill the chi^2 graph
361  chisq_graph->SetPoint(i, i * 1., fIterations[i].chiSqr);
362  } // end loop over iterations
363 
364  // now loop over the graphs and create a canvas for each
365  TCanvas* can = nullptr;
366 
367  for(auto mapItr : grMap){
368  canvasname = "ParameterIterationCanv_" + mapItr.first.first;
369  can = itrDir.make<TCanvas>(canvasname.data(), canvasname.data(), 800, 800);
370 
371  mapItr.second->Draw("ACP");
372 
373  // Save the canvas to file
374  can->Update();
375  can->Write();
376 
377  }//end of loop over canvases
378 
379  // now for the chi^2 iterations
380  can = itrDir.make<TCanvas>("chisq_can", "chisq", 800, 800);
381  chisq_graph->Draw("ACP");
382 
383  can->Update();
384 
385  // Save the canvas to file
386  can->Write();
387 
388  return;
389  }
390 
391  //----------------------------------------------------------------------------
393  {
394 
395  // Now output the contributions to ChiSq from each experiment
396 
397  // How many are NOvA_Experiments? How many are NP experiments?
398 
399  int countOfNOvAExps = 0;
400  int countOfNuisExps = 0;
401 
402  std::vector<std::string> exp_names;
403  std::vector<double> exp_chisq;
404  std::vector<int> exp_ndof;
405  std::vector<std::unique_ptr<TCanvas>> exp_cans_nd;
406  std::vector<std::unique_ptr<TCanvas>> exp_cans_fd;
407  std::vector<std::unique_ptr<TCanvas>> exp_cans_nd_oscpars;
408  std::vector<std::unique_ptr<TCanvas>> exp_cans_fd_oscpars;
409  std::vector<std::unique_ptr<TCanvas>> exp_cans_nd_systs;
410  std::vector<std::unique_ptr<TCanvas>> exp_cans_fd_systs;
411 
412  std::vector<std::string> np_names;
413  std::vector<double> np_chisq;
414  std::vector<int> np_ndof;
415 
418 
419  for(auto & experiment : this->ListExperiments()){
420 
421  if(NOvA_Experiment * nova_experiment = dynamic_cast<NOvA_Experiment*>(&(*experiment))) {
422  ++countOfNOvAExps;
423  std::string expname = nova_experiment->ShortName();
424 
425  LOG_VERBATIM("MultiExperiment")
426  << " Found a NOvA Experiment named: "
427  << expname
428  << "\n With chisq/dof = "
429  << nova_experiment->FitValue()
430  << " / "
431  << nova_experiment->NDOF();
432 
433  exp_names .push_back(expname);
434  exp_chisq .push_back(nova_experiment->FitValue());
435  exp_ndof .push_back(nova_experiment->NDOF());
436  exp_cans_nd .push_back( nova_experiment->fCorrectedSpectrum->GetCorrectedStacksCanvasCopy(det_nd, expname) );
437  exp_cans_fd .push_back( nova_experiment->fCorrectedSpectrum->GetCorrectedStacksCanvasCopy(det_fd, expname) );
438  exp_cans_nd_oscpars.push_back( nova_experiment->fCorrectedSpectrum->GetOscParCanvasCopy(det_nd, expname) );
439  exp_cans_fd_oscpars.push_back( nova_experiment->fCorrectedSpectrum->GetOscParCanvasCopy(det_fd, expname) );
440  exp_cans_nd_systs .push_back( nova_experiment->fCorrectedSpectrum->GetSystCanvasCopy(det_nd, expname) );
441  exp_cans_fd_systs .push_back( nova_experiment->fCorrectedSpectrum->GetSystCanvasCopy(det_fd, expname) );
442  }
443 
444  if(NuisanceParameter_Experiment * np_experiment = dynamic_cast<NuisanceParameter_Experiment*>(&(*experiment))) {
445  ++countOfNuisExps;
446  std::string expname = np_experiment->ShortName();
447  std::cout << " Found a Nuisance Parameter Experiment named: " << expname << "\n";
448  std::cout << " With chisq/dof = " << np_experiment->FitValue() << " / " << np_experiment->NDOF() << "\n";
449  np_names.push_back(expname);
450  np_chisq.push_back(np_experiment->FitValue());
451  np_ndof.push_back(np_experiment->NDOF());
452  }
453 
454  }
455 
456 
457  if(countOfNOvAExps <= 0) return;
458 
459  // Order exp vectors by chisq
460  // (exp_index now holds the indices, sorted by
461  // decreasing chisq)
462  std::vector<unsigned int> exp_index(exp_chisq.size(), 0);
463  for (unsigned int i = 0 ; i != exp_index.size() ; i++) {
464  exp_index[i] = i;
465  }
466  sort(exp_index.begin(), exp_index.end(),
467  [&](const int& a, const int& b) {
468  return (exp_chisq[a] > exp_chisq[b]);
469  }
470  );
471 
472  // Order np vectors by chisq
473  // (np_index now holds the indices, sorted by
474  // decreasing chisq)
475  std::vector<unsigned int> np_index(np_chisq.size(), 0);
476  for (unsigned int i = 0 ; i != np_index.size() ; i++) {
477  np_index[i] = i;
478  }
479  sort(np_index.begin(), np_index.end(),
480  [&](const int& a, const int& b) {
481  return (np_chisq[a] > np_chisq[b]);
482  }
483  );
484 
485  // Now that we know this, let's make the side-by-side canvases,
486  // for each the ND and FD
487 
488 
489  art::TFileDirectory mexpDir = plotDir->mkdir( "MultiExperimentParallel" );
490 
491  for(int i=0; i<2; i++){
492 
494  if(i==0) det = novadaq::cnv::kFARDET;
495  if(i==1) det = novadaq::cnv::kNEARDET;
496 
497  std::string canvasname = "NOvAExperimentContributions_";
498  std::string detname = (det == novadaq::cnv::kFARDET) ? "FD" : "ND";
499  canvasname.append(detname);
500 
501  // Make the side-by-side canvas
502  TCanvas * canmain = nullptr;
503  if(countOfNOvAExps==3){
504  canmain = mexpDir.make<TCanvas>(canvasname.data(), canvasname.data(), 2400, 1600);
505  canmain->Divide(3,2);
506  }
507  else if(countOfNOvAExps == 1){
508  canmain = mexpDir.make<TCanvas>(canvasname.data(), canvasname.data(), 1600, 1600);
509  canmain->Divide(2,2);
510  }
511  else if(countOfNOvAExps == 4){
512  canmain = mexpDir.make<TCanvas>(canvasname.data(), canvasname.data(), 3200, 1600);
513  canmain->Divide(4,2);
514  }
515  else if(countOfNOvAExps > 4 && countOfNOvAExps < 13){
516  canmain = mexpDir.make<TCanvas>(canvasname.data(), canvasname.data(), 3200, 3200);
517  canmain->Divide(4,3);
518  }
519  else if(countOfNOvAExps > 13 && countOfNOvAExps < 15){
520  canmain = mexpDir.make<TCanvas>(canvasname.data(), canvasname.data(), 4800, 3200);
521  canmain->Divide(5,4);
522  }
523 
524  // Loop through the experiments and draw their spectra to the joint canvas
525  int curCanvas=1;
526  std::vector<TPaveText *> expLegend(exp_index.size());
527  for(auto i : exp_index){
528  canmain->cd(curCanvas);
529  if(det == novadaq::cnv::kNEARDET) exp_cans_nd[i]->DrawClonePad();
530  else exp_cans_fd[i]->DrawClonePad();
531  //expLegend[i] = new TPaveText(0.525, 0.7, 0.875, 0.9);
532  //expLegend[i]->SetBorderSize(1);
533  //expLegend[i]->SetFillColor(0);
534  //expLegend[i]->AddText(exp_names[exp_index[i]].data());
535  //expLegend[i]->Draw("SAME");
536  ++curCanvas;
537  }
538 
539  // Add the ChiSq canvas (each 'normal' exp + sum of all nuisance par contributions)
540  // Then can even put non-zero individual nuisance par contributions below this
541  // Make parameter legend
542 
543  canmain->cd(curCanvas);
544  TPaveText pointLegend(0.1, 0.1, 0.9, 0.9);
545  pointLegend.SetBorderSize(1);
546  pointLegend.SetFillColor(0);
547 
548  // Get chisq and number of degrees of freedom (ndof)
549  int nFreeOscPars = 0;
550  int nFreeSystPars = 0;
551  int nFreePars = 0;
552  for(auto & experiment : this->ListExperiments()){
553  if(NOvA_Experiment * nova_experiment = dynamic_cast<NOvA_Experiment*>(&(*experiment))) {
554  nFreeOscPars =
555  nova_experiment->fCorrectedSpectrum->RefInputPoint().ParameterSpaceLocation(det).size() -
556  nova_experiment->fCorrectedSpectrum->RefInputPoint().FixedParameters(det).size();
557  nFreeSystPars =
558  nova_experiment->fCorrectedSpectrum->RefInputPoint().SystematicPulls(det).size() -
559  nova_experiment->fCorrectedSpectrum->RefInputPoint().FixedSystematics(det).size();
560  nFreePars = nFreeOscPars + nFreeSystPars;
561  break;
562  }
563  }
564 
565  // All experiments chisq
566  int ndof_all = 0;
567  double chisq_all = 0;
568  for(unsigned int i=0; i<exp_index.size(); i++){
569  ndof_all += exp_ndof[exp_index[i]];
570  chisq_all += exp_chisq[exp_index[i]];
571  }
572 
573  // Total nuisance parameter ChiSq and NDOF
574  int np_ndof_tot = 0;
575  double np_chisq_tot = 0;
576  for(unsigned int i=0; i<np_index.size(); i++){
577  np_ndof_tot += np_ndof[np_index[i]];
578  np_chisq_tot += np_chisq[np_index[i]];
579  }
580 
581 
582  std::stringstream all_chi;
583  all_chi << "MultiExperiment "
584  << "#chi^{2} / NDOF = " << chisq_all + np_chisq_tot << " / " << ndof_all + np_ndof_tot - nFreePars;
585  pointLegend.AddText(all_chi.str().data());
586  std::stringstream free_info;
587  free_info << "NDOF Adj By " << nFreeOscPars << " Free Oscillation Parameters ";
588  pointLegend.AddText(free_info.str().data());
589 
590  // Individual experiment ChiSq
591  pointLegend.AddText("");
592  for(unsigned int i=0; i<exp_index.size(); i++){
593  std::stringstream ss_chi;
594  ss_chi << exp_names[exp_index[i]] << " "
595  << "#chi^{2} / NDOF = " << exp_chisq[exp_index[i]] << " / " << exp_ndof[exp_index[i]];
596  pointLegend.AddText(ss_chi.str().data());
597  }
598 
599 
600  std::stringstream np_chi;
601  np_chi << "All Nuisance Pars "
602  << "#chi^{2} / NDOF = " << np_chisq_tot << " / " << np_ndof_tot;
603  pointLegend.AddText(np_chi.str().data());
604 
605  // Individual nuisance parameter ChiSq NDOF
606  pointLegend.AddText("");
607  for(unsigned int i=0; i<np_index.size(); i++){
608  std::stringstream ss_chi;
609  ss_chi << np_names[np_index[i]] << " "
610  << "#chi^{2} / NDOF = " << np_chisq[np_index[i]] << " / " << np_ndof[np_index[i]];
611  pointLegend.AddText(ss_chi.str().data());
612  }
613 
614  //Total chisq Multiexperiment + Nuisance parameters contribution
615  pointLegend.AddText("");
616  std::stringstream ss_chi_total;
617  ss_chi_total
618  << "Total #chi^{2} / NDOF = "
619  << chisq_all + np_chisq_tot
620  << "/"
621  << ndof_all + np_ndof_tot;
622  pointLegend.AddText(ss_chi_total.str().data());
623 
624  pointLegend.Draw();
625 
626 
627  // Add the oscillation parameter canvas
628  ++curCanvas;
629  canmain->cd(curCanvas);
630  if(det == novadaq::cnv::kNEARDET) exp_cans_nd_oscpars[0]->DrawClonePad();
631  else exp_cans_fd_oscpars[0]->DrawClonePad();
632 
633 
634  // Add the systematics parameter canvas
635  ++curCanvas;
636  canmain->cd(curCanvas);
637  if(det == novadaq::cnv::kNEARDET) exp_cans_nd_systs[0]->DrawClonePad();
638  else exp_cans_fd_systs[0]->DrawClonePad();
639 
640 
641  // Save the canvas to file
642  canmain->Update();
643  canmain->Write();
644 
645  }
646 
647 
648  }
649 
650 
651 
652 
653 }
void SetCurrentVals(fnex::InputPoint const &curPoint)
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
void CreateNuisanceParameterExperiments()
set< int >::iterator it
void put(std::string const &key)
std::unique_ptr< Correlations > fCorrelations
TFileDirectory mkdir(std::string const &dir, std::string const &descr="")
std::map< fnex::MetaData, fnex::EventList > EventListMap
Definition: Event.h:186
Create a list of fnex::Events to be used in fits.
static ShifterAndWeighter * Instance()
bool orderByExperimentShortName(std::unique_ptr< fnex::Experiment > a, std::unique_ptr< fnex::Experiment > b)
bool SetEventListMap(EventListMap const &pEventListMap)
std::vector< FitIteration > fIterations
Attempted point and chi^2 for each iteration of the fit.
Far Detector at Ash River, MN.
std::vector< std::unique_ptr< Experiment > > fExperiments
MultiExperiment(fhicl::ParameterSet const &pset)
bool ApplyCorrelations(StringPointMap &pStringPointMap)
const double a
T get(std::string const &key) const
Definition: ParameterSet.h:231
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
const std::vector< std::unique_ptr< Experiment > > & ListExperiments() const
Near Detector in the NuMI cavern.
void ApplyPoint(InputPoint &pInputPoint)
std::vector< std::string > get_names() const
void DrawParallelPlots(art::TFileDirectory *plotDir) const
#define LOG_WARNING(category)
OStream cout
Definition: OStream.cxx:6
bool fIsConfigured
has the object been configured?
std::map< std::string, InputPoint > StringPointMap
Definition: Correlations.h:23
T * make(ARGS...args) const
void DrawFitterProgressGraphs(art::TFileDirectory *plotDir) const
void DrawPlots(art::TFileDirectory *plotDir) const
bool fNuisanceExMade
have the NuisanceParameterExperiments been made?
const hit & b
Definition: hits.cxx:21
void Reconfigure(fhicl::ParameterSet const &pset)
std::map< std::string, NPInfo > const & NuisanceParameterInfo() const
#define LOG_VERBATIM(category)
static NuisanceParameters * Instance()
enum BeamMode string