Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
cmf::CovarianceBinUtility Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N21-02-25/CovarianceMatrixFit/utilities/CovarianceBinUtility.h"

Public Member Functions

void Initialize (fhicl::ParameterSet const &pset)
 
double const & NuMuLowEdge ()
 
double const & NuELowEdge (cmf::MetaData const &md)
 
double const & NCLowEdge (cmf::DetType_t const &det)
 
double const & SelectionLowEdge (cmf::MetaData const &md)
 
std::map< double, int > const & NuMuHighEdges ()
 
std::map< double, int > const & NuEHighEdges (cmf::DetType_t const &det)
 
std::map< double, int > const & NCHighEdges (cmf::DetType_t const &det)
 
std::map< double, int > const & SelectionHighEdges (cmf::MetaData const &md)
 
std::map< double, int > const & SelectionHighEdges (long const &key)
 
void SelectionHistBinning (cmf::MetaData const &md, std::vector< double > &bins)
 
int KeyToOffset (long const &key, bool allSels=false)
 
int EnergyToHistogramBin (double const &energy, cmf::MetaData const &md)
 
int EnergyToBin (double const &energy, cmf::MetaData const &md)
 
double BinToEnergy (int const &bin, bool allSels=false)
 
cmf::DetType_t BinToDetector (int const &bin, bool allSels=false)
 
cmf::SelectionType_t BinToSelection (int const &bin, bool allSels=false)
 
cmf::BeamType_t BinToBeamType (int const &bin, bool allSels=false)
 
long BinToKey (int const &bin, bool allSels=false)
 
size_t TotalBins (bool allSels=false)
 
std::vector< intEmptyBins (TMatrixD mat)
 
TMatrixD CompactMatrix (TMatrixD mat, std::vector< int > emptyBins)
 

Static Public Member Functions

static CovarianceBinUtilityInstance ()
 

Private Member Functions

 CovarianceBinUtility ()
 
 ~CovarianceBinUtility ()
 
std::map< double, intEnergyBinMap (std::vector< double > const &vec)
 
void SetBinning (fhicl::ParameterSet const &fBinConfig, cmf::SelectionType_t const &selType)
 
void FillOffsetAndBinMaps (std::map< long, int > &offsetMap, std::vector< long > &binMap, cmf::SelectionUtility::DetBeamSelSet const &detBeamSelSet)
 
int NumSelectionBins (cmf::SelectionType_t const &selType, cmf::DetType_t const &detType)
 
int KeyToOffset (long const &key, std::map< long, int > const &offsetMap)
 
std::map< int, double > const & SelectionBinToEnergy (long key)
 

Static Private Member Functions

static void FillBinToEnergyMap (std::map< double, int > const &selectionHighEdges, std::map< int, double > &selectionBinToEnergy, double lowestBound)
 

Private Attributes

double fNuMuLowEdge
 low side of the first numu bin More...
 
std::map< double, intfNuMuHighEdges
 high side of the numu bins More...
 
double fNuENDLowEdge
 low side of the first nue bin in ND More...
 
std::map< double, intfNuENDHighEdges
 high side of the nue bins in ND More...
 
double fNuEFDLowEdge
 low side of the first nune bin in FD More...
 
std::map< double, intfNuEFDHighEdges
 high side of the nue bins in FD More...
 
double fNuEPeriphLowEdge
 low side of the first nue bin in FD More...
 
std::map< double, intfNuEPeriphHighEdges
 high side of the nue bins in FD More...
 
double fNCLowEdge
 low side of the first nc bin More...
 
std::map< double, intfNCHighEdges
 high side of the nc bins More...
 
double fNCNDLowEdge
 low side of the first nc bin in ND More...
 
std::map< double, intfNCNDHighEdges
 high side of the nc bins in ND (2020ana) More...
 
double fNCFDLowEdge
 low side of the first nc bin in FD More...
 
std::map< double, intfNCFDHighEdges
 high side of the nc bins in FD (2020ana) More...
 
std::map< int, double > fNuMuBinToEnergy
 map energy bin to central value More...
 
std::map< int, double > fNuENDBinToEnergy
 map energy bin to central value More...
 
std::map< int, double > fNuEFDBinToEnergy
 map energy bin to central value More...
 
std::map< int, double > fNuEPeriphBinToEnergy
 map energy bin to central value More...
 
std::map< int, double > fNCNDBinToEnergy
 map energy bin to central value (2020ana) More...
 
std::map< int, double > fNCFDBinToEnergy
 map energy bin to central value (2020ana) More...
 
std::map< long, intfOffsetMap
 map of keys to offset for different samples More...
 
std::map< long, intfAllSelsOffsetMap
 map of keys to offset for different samples More...
 
std::vector< long > fBinToKey
 map bin numbers to keys for different samples More...
 
std::vector< long > fAllSelsBinToKey
 map bin numbers to keys for different samples More...
 

Detailed Description

Definition at line 22 of file CovarianceBinUtility.h.

Constructor & Destructor Documentation

cmf::CovarianceBinUtility::CovarianceBinUtility ( )
private

Definition at line 26 of file CovarianceBinUtility.cxx.

Referenced by Instance(), and NuMuHighEdges().

27  {
28 
29  }
cmf::CovarianceBinUtility::~CovarianceBinUtility ( )
private

Definition at line 223 of file CovarianceBinUtility.cxx.

References fAllSelsBinToKey, fAllSelsOffsetMap, fBinToKey, fNCFDBinToEnergy, fNCFDHighEdges, fNCHighEdges, fNCNDBinToEnergy, fNCNDHighEdges, fNuEFDBinToEnergy, fNuEFDHighEdges, fNuENDBinToEnergy, fNuENDHighEdges, fNuEPeriphBinToEnergy, fNuEPeriphHighEdges, fNuMuBinToEnergy, fNuMuHighEdges, and fOffsetMap.

Referenced by NuMuHighEdges().

224  {
225  fNuMuHighEdges .clear();
226  fNuENDHighEdges .clear();
227  fNuEFDHighEdges .clear();
228  fNCHighEdges .clear();
229  fNCNDHighEdges .clear();
230  fNCFDHighEdges .clear();
231  fAllSelsOffsetMap.clear();
232  fOffsetMap .clear();
233  fBinToKey .clear();
234  fAllSelsBinToKey .clear();
235 
236  fNuEPeriphHighEdges .clear();
237  fNuMuBinToEnergy .clear();
238  fNuENDBinToEnergy .clear();
239  fNuEFDBinToEnergy .clear();
240  fNuEPeriphBinToEnergy.clear();
241  fNCNDBinToEnergy .clear();
242  fNCFDBinToEnergy .clear();
243 
244  }
std::map< double, int > fNuMuHighEdges
high side of the numu bins
std::map< double, int > fNCHighEdges
high side of the nc bins
std::map< int, double > fNuEPeriphBinToEnergy
map energy bin to central value
std::map< int, double > fNuMuBinToEnergy
map energy bin to central value
std::vector< long > fAllSelsBinToKey
map bin numbers to keys for different samples
std::map< int, double > fNCNDBinToEnergy
map energy bin to central value (2020ana)
std::map< double, int > fNuEPeriphHighEdges
high side of the nue bins in FD
std::map< double, int > fNCFDHighEdges
high side of the nc bins in FD (2020ana)
std::vector< long > fBinToKey
map bin numbers to keys for different samples
std::map< double, int > fNuEFDHighEdges
high side of the nue bins in FD
std::map< double, int > fNuENDHighEdges
high side of the nue bins in ND
std::map< long, int > fAllSelsOffsetMap
map of keys to offset for different samples
std::map< int, double > fNuENDBinToEnergy
map energy bin to central value
std::map< long, int > fOffsetMap
map of keys to offset for different samples
std::map< int, double > fNuEFDBinToEnergy
map energy bin to central value
std::map< int, double > fNCFDBinToEnergy
map energy bin to central value (2020ana)
std::map< double, int > fNCNDHighEdges
high side of the nc bins in ND (2020ana)

Member Function Documentation

cmf::BeamType_t cmf::CovarianceBinUtility::BinToBeamType ( int const &  bin,
bool  allSels = false 
)

Definition at line 536 of file CovarianceBinUtility.cxx.

References BinToKey(), and cmf::KeyToBeamType().

Referenced by NuMuHighEdges().

538  {
539  return cmf::KeyToBeamType(this->BinToKey(bin, allSels));
540  }
long BinToKey(int const &bin, bool allSels=false)
static cmf::BeamType_t KeyToBeamType(long const &key)
Definition: StaticFuncs.h:132
float bin[41]
Definition: plottest35.C:14
cmf::DetType_t cmf::CovarianceBinUtility::BinToDetector ( int const &  bin,
bool  allSels = false 
)

Definition at line 522 of file CovarianceBinUtility.cxx.

References BinToKey(), and cmf::KeyToDetectorType().

Referenced by NuMuHighEdges(), and cmf::RandomUniverses::writeResults().

524  {
525  return cmf::KeyToDetectorType(this->BinToKey(bin, allSels));
526  }
long BinToKey(int const &bin, bool allSels=false)
static cmf::DetType_t KeyToDetectorType(long const &key)
Definition: StaticFuncs.h:66
float bin[41]
Definition: plottest35.C:14
double cmf::CovarianceBinUtility::BinToEnergy ( int const &  bin,
bool  allSels = false 
)

Definition at line 551 of file CovarianceBinUtility.cxx.

References BinToKey(), findDuplicateFiles::key, KeyToOffset(), cmf::KeyToString(), LOG_DEBUG, PandAna.reco_validation.add_data::offset, and SelectionBinToEnergy().

Referenced by cmf::CovarianceMatrixMaker::FillSpectrum(), cmf::PlotUtilities::MakeEnergySpectraFromBins(), and NuMuHighEdges().

553  {
554  auto key = this->BinToKey (bin, allSels);
555  int offset = this->KeyToOffset(key, allSels);
556 
557  auto const& binToEnergy = this->SelectionBinToEnergy(key);
558 
559  auto const btoEItr = binToEnergy.find(bin - offset);
560 
561  if(btoEItr == binToEnergy.end())
562  throw cet::exception("CovarianceBinUtility")
563  << "bin "
564  << bin
565  << " offset "
566  << offset
567  << " "
568  << bin - offset
569  << " is not in bin to energy map for key "
570  << key
571  << " "
572  << cmf::KeyToString(key);
573 
574  LOG_DEBUG("CovarianceBinUtility")
575  << "BinToEnergy: "
577  << " bin is "
578  << bin
579  << " offset "
580  << offset
581  << " energy "
582  << btoEItr->second;
583 
584  return btoEItr->second;
585  }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
std::map< int, double > const & SelectionBinToEnergy(long key)
int KeyToOffset(long const &key, bool allSels=false)
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
long BinToKey(int const &bin, bool allSels=false)
float bin[41]
Definition: plottest35.C:14
static std::string KeyToString(long const &key)
Definition: StaticFuncs.h:224
long cmf::CovarianceBinUtility::BinToKey ( int const &  bin,
bool  allSels = false 
)

Definition at line 543 of file CovarianceBinUtility.cxx.

References bin, fAllSelsBinToKey, and fBinToKey.

Referenced by BinToBeamType(), BinToDetector(), BinToEnergy(), BinToSelection(), cmf::CovarianceMatrixMaker::FillSpectrum(), cmf::ChiSqrCalculator::FindReducedMatrixBin(), and NuMuHighEdges().

545  {
546  if(allSels) return fAllSelsBinToKey[bin];
547  return fBinToKey[bin];
548  }
std::vector< long > fAllSelsBinToKey
map bin numbers to keys for different samples
std::vector< long > fBinToKey
map bin numbers to keys for different samples
float bin[41]
Definition: plottest35.C:14
cmf::SelectionType_t cmf::CovarianceBinUtility::BinToSelection ( int const &  bin,
bool  allSels = false 
)

Definition at line 529 of file CovarianceBinUtility.cxx.

References BinToKey(), and cmf::KeyToSelectionType().

Referenced by NuMuHighEdges().

531  {
532  return cmf::KeyToSelectionType(this->BinToKey(bin, allSels));
533  }
long BinToKey(int const &bin, bool allSels=false)
float bin[41]
Definition: plottest35.C:14
static cmf::SelectionType_t KeyToSelectionType(long const &key)
Definition: StaticFuncs.h:166
TMatrixD cmf::CovarianceBinUtility::CompactMatrix ( TMatrixD  mat,
std::vector< int emptyBins 
)

Definition at line 608 of file CovarianceBinUtility.cxx.

References MECModelEnuComparisons::i, and calib::j.

Referenced by NuMuHighEdges().

608  {
609 
610  int nRowsAndColumns = mat.GetNcols() - emptyBins.size();
611  TMatrixD compactMatrix(nRowsAndColumns, nRowsAndColumns);
612  TMatrixD semiCompactMatrix(nRowsAndColumns, mat.GetNcols());
613 
614  // correct in i
615  int itest = 0;
616  for (int i = 0; i < nRowsAndColumns; ++i){
617 
618  bool isXEmptyBin = false;
619  for (size_t ieb = 0; ieb < emptyBins.size(); ++ieb){
620  if (emptyBins.at(ieb) == itest)
621  isXEmptyBin = true;
622  }
623 
624  for (int j = 0; j < mat.GetNcols(); ++j){
625  semiCompactMatrix(i,j) = mat(itest, j);
626  }
627 
628  if (isXEmptyBin)
629  --i;
630 
631  ++itest;
632 
633  }
634 
635  // correct in i
636  int jtest = 0;
637  for (int j = 0; j < nRowsAndColumns; ++j){
638 
639  bool isYEmptyBin = false;
640  for (size_t ieb = 0; ieb < emptyBins.size(); ++ieb){
641  if (emptyBins.at(ieb) == jtest)
642  isYEmptyBin = true;
643  }
644 
645  for (int i = 0; i < semiCompactMatrix.GetNrows(); ++i){
646  compactMatrix(i,j) = semiCompactMatrix(i, jtest);
647  }
648 
649  if (isYEmptyBin)
650  --j;
651 
652  ++jtest;
653 
654  }
655 
656  return compactMatrix;
657 
658  }
const double j
Definition: BetheBloch.cxx:29
Eigen::MatrixXd mat
std::vector< int > cmf::CovarianceBinUtility::EmptyBins ( TMatrixD  mat)

Definition at line 588 of file CovarianceBinUtility.cxx.

References std::abs(), MECModelEnuComparisons::i, and calib::j.

Referenced by NuMuHighEdges().

588  {
589 
590  std::vector<int> emptyBins;
591 
592  for (int i = 0; i < mat.GetNrows(); i++){
593 
594  // for every column, check every row is above some
595  // tolerance. If it's not, count it as an empty bin
596  double rowsum = 0;
597  for (int j = 0; j < mat.GetNcols(); j++)
598  rowsum += std::abs(mat(i,j));
599 
600  if (rowsum == 0)
601  emptyBins.push_back(i);
602  }
603 
604  return emptyBins;
605  }
float abs(float number)
Definition: d0nt_math.hpp:39
const double j
Definition: BetheBloch.cxx:29
Eigen::MatrixXd mat
std::map< double, int > cmf::CovarianceBinUtility::EnergyBinMap ( std::vector< double > const &  vec)
private

Definition at line 107 of file CovarianceBinUtility.cxx.

References MECModelEnuComparisons::i.

Referenced by NuMuHighEdges(), and SetBinning().

108  {
109  std::map<double, int> ebMap;
110  for (size_t i = 0; i < vec.size(); ++i)
111  ebMap[vec.at(i)] = i;
112 
113  return ebMap;
114  }
Eigen::VectorXd vec
int cmf::CovarianceBinUtility::EnergyToBin ( double const &  energy,
cmf::MetaData const &  md 
)

Definition at line 480 of file CovarianceBinUtility.cxx.

References SelectionHighEdges().

Referenced by EnergyToHistogramBin(), cmf::ShifterAndWeighter::FileSystWeight(), cmf::FillSpectrumFromSingleList(), and NuMuHighEdges().

482  {
483  auto const& edgeMap = this->SelectionHighEdges(md);
484 
485  auto const& itr = edgeMap.upper_bound(energy);
486  if(itr != edgeMap.end()) return itr->second;
487 
488  return 0;
489  }
double energy
Definition: plottest35.C:25
std::map< double, int > const & SelectionHighEdges(cmf::MetaData const &md)
int cmf::CovarianceBinUtility::EnergyToHistogramBin ( double const &  energy,
cmf::MetaData const &  md 
)

Definition at line 473 of file CovarianceBinUtility.cxx.

References EnergyToBin().

Referenced by NuMuHighEdges().

475  {
476  return this->EnergyToBin(energy, md) + 1;
477  }
int EnergyToBin(double const &energy, cmf::MetaData const &md)
double energy
Definition: plottest35.C:25
void cmf::CovarianceBinUtility::FillBinToEnergyMap ( std::map< double, int > const &  selectionHighEdges,
std::map< int, double > &  selectionBinToEnergy,
double  lowestBound 
)
staticprivate

Definition at line 247 of file CovarianceBinUtility.cxx.

References LOG_DEBUG.

Referenced by Initialize(), and NuMuHighEdges().

250  {
251  // fill the bin to energy maps for fast look up
252  double lowerBound = lowestBound;
253  for(auto const& itr : selectionHighEdges){
254  selectionBinToEnergy[itr.second] = lowerBound + (itr.first - lowerBound) * 0.5;
255 
256  LOG_DEBUG("CovarianceBinUtility")
257  << "FillBinToEnergyMap energy "
258  << itr.first
259  << " bin "
260  << itr.second
261  << " bin to energy "
262  << selectionBinToEnergy.find(itr.second)->second;
263 
264  lowerBound = itr.first;
265  }
266  }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
void cmf::CovarianceBinUtility::FillOffsetAndBinMaps ( std::map< long, int > &  offsetMap,
std::vector< long > &  binMap,
cmf::SelectionUtility::DetBeamSelSet const &  detBeamSelSet 
)
private

Definition at line 55 of file CovarianceBinUtility.cxx.

References b, bins, cmf::DetectorBeamSelectionTypesToKey(), findDuplicateFiles::key, cmf::KeyToString(), cmf::kNEARDET, cmf::kNuESelectionPeripheral, LOG_DEBUG, NumSelectionBins(), and PandAna.reco_validation.add_data::offset.

Referenced by Initialize(), and NuMuHighEdges().

58  {
59  long key;
60  int offset = 0;
61  int bins;
62 
63  binMap .clear();
64  offsetMap.clear();
65 
66  // loop over detectors, beam type and selection to fill the maps
67  for(auto const& dbsItr : detBeamSelSet){
68  for(auto const& selItr : dbsItr.Selections() ){
69 
70  // there is no MidPID selection for nues any more and no nue peripheral
71  // selection in the nd
72  if(dbsItr.Detector() == cmf::kNEARDET &&
74  continue;
75 
76  // set the file type to 0 so that it does not contribute to the
77  // key value in this case
78  key = DetectorBeamSelectionTypesToKey(dbsItr.Detector(),
79  dbsItr.BeamType(),
80  selItr);
81 
82  offsetMap[key] = offset;
83 
84  bins = this->NumSelectionBins(selItr, dbsItr.Detector());
85  for(int b = offset; b < bins + offset; ++b){
86  binMap.emplace_back(key);
87  LOG_DEBUG("CovarianceBinUtility")
88  << cmf::KeyToString(key)
89  << " key "
90  << key
91  << " offset "
92  << offsetMap.find(key)->second
93  << " "
94  << b
95  << " "
96  << binMap[b];
97  }
98 
99  offset += bins;
100  } // end loop over selection types
101  } // end loop over input DetBeamSels
102 
103  }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
static long DetectorBeamSelectionTypesToKey(cmf::DetType_t const &det, cmf::BeamType_t const &bt, cmf::SelectionType_t const &sel)
Definition: StaticFuncs.h:58
const Binning bins
const hit & b
Definition: hits.cxx:21
int NumSelectionBins(cmf::SelectionType_t const &selType, cmf::DetType_t const &detType)
static std::string KeyToString(long const &key)
Definition: StaticFuncs.h:224
void cmf::CovarianceBinUtility::Initialize ( fhicl::ParameterSet const &  pset)

Definition at line 151 of file CovarianceBinUtility.cxx.

References fAllSelsBinToKey, fAllSelsOffsetMap, fBinToKey, FillBinToEnergyMap(), FillOffsetAndBinMaps(), fNCFDBinToEnergy, fNCFDHighEdges, fNCFDLowEdge, fNCNDBinToEnergy, fNCNDHighEdges, fNCNDLowEdge, fNuEFDBinToEnergy, fNuEFDHighEdges, fNuEFDLowEdge, fNuENDBinToEnergy, fNuENDHighEdges, fNuENDLowEdge, fNuEPeriphBinToEnergy, fNuEPeriphHighEdges, fNuEPeriphLowEdge, fNuMuBinToEnergy, fNuMuHighEdges, fNuMuLowEdge, fOffsetMap, fhicl::ParameterSet::get(), cmf::SelectionUtility::Instance(), cmf::kNCSelection, cmf::kNuESelection, cmf::kNuMuSelection, LOG_DEBUG, LOG_VERBATIM, and SetBinning().

Referenced by cmf::PredictionLibraryMaker::PredictionLibraryMaker(), cmf::CMFSpectraMaker::reconfigure(), cmf::CovarianceMatrixFitter::reconfigure(), cmf::CovarianceMatrixMaker::reconfigure(), cmf::RandomUniverses::reconfigure(), cmf::FitFeldmanCousinsPoint::reconfigure(), and cmf::ContourFromLibrary::reconfigure().

152  {
153 
154  // grab configurations from parameter set
155  auto fNuMuEdgeConfig = pset.get< fhicl::ParameterSet >("numu_bin_edges");
156  auto fNuEEdgeConfig = pset.get< fhicl::ParameterSet >("nue_bin_edges");
157  auto fNCEdgeConfig = pset.get< fhicl::ParameterSet >("nc_bin_edges");
158 
159  // using the pre-existing selection enum, doesn't matter
160  // since we just need to differentiate between numu nue and nc
161  this->SetBinning(fNuMuEdgeConfig, cmf::kNuMuSelection);
162  this->SetBinning(fNuEEdgeConfig , cmf::kNuESelection);
163  this->SetBinning(fNCEdgeConfig , cmf::kNCSelection);
164 
165  LOG_DEBUG("CovarianceBinUtility")
166  << "\nnum NuMuBins: " << fNuMuHighEdges.size()
167  << "\nnum NuENDBins: " << fNuENDHighEdges.size()
168  << "\nnum NuEFDBins: " << fNuEFDHighEdges.size()
169  << "\nnum NuEPeriphBins:" << fNuEPeriphHighEdges.size()
170  << "\nnum NCNDBins: " << fNCNDHighEdges.size()
171  << "\nnum NCFDBins: " << fNCFDHighEdges.size();
172 
175  fNuMuLowEdge);
176 
179  fNuENDLowEdge);
180 
183  fNuEFDLowEdge);
184 
188 
191  fNCNDLowEdge);
192 
195  fNCFDLowEdge);
196 
197  // call the function to check that the mapping from
198  // energy to bin and back again is consistent
199  //this->CheckBinToEnergyMapping();
200 
201  LOG_DEBUG("CovarianceBinUtility")
202  << "Fill All Selection Offset and Bin maps";
203 
206  cmf::SelectionUtility::Instance()->AllAvailSelections());
207 
208  LOG_DEBUG("CovarianceBinUtility")
209  << "Fill run time Selection Offset and Bin maps";
210 
212  fBinToKey,
213  cmf::SelectionUtility::Instance()->SelectionsToUse());
214 
215  LOG_VERBATIM("CovarianceBinUtility")
216  << "Using "
217  << fBinToKey.size()
218  << " bins for analysis out of a possible "
219  << fAllSelsBinToKey.size();
220  }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
std::map< double, int > fNuMuHighEdges
high side of the numu bins
double fNuEFDLowEdge
low side of the first nune bin in FD
double fNuMuLowEdge
low side of the first numu bin
static SelectionUtility * Instance()
void FillOffsetAndBinMaps(std::map< long, int > &offsetMap, std::vector< long > &binMap, cmf::SelectionUtility::DetBeamSelSet const &detBeamSelSet)
std::map< int, double > fNuEPeriphBinToEnergy
map energy bin to central value
std::map< int, double > fNuMuBinToEnergy
map energy bin to central value
void SetBinning(fhicl::ParameterSet const &fBinConfig, cmf::SelectionType_t const &selType)
double fNCNDLowEdge
low side of the first nc bin in ND
std::vector< long > fAllSelsBinToKey
map bin numbers to keys for different samples
std::map< int, double > fNCNDBinToEnergy
map energy bin to central value (2020ana)
std::map< double, int > fNuEPeriphHighEdges
high side of the nue bins in FD
std::map< double, int > fNCFDHighEdges
high side of the nc bins in FD (2020ana)
std::vector< long > fBinToKey
map bin numbers to keys for different samples
T get(std::string const &key) const
Definition: ParameterSet.h:231
std::map< double, int > fNuEFDHighEdges
high side of the nue bins in FD
std::map< double, int > fNuENDHighEdges
high side of the nue bins in ND
std::map< long, int > fAllSelsOffsetMap
map of keys to offset for different samples
std::map< int, double > fNuENDBinToEnergy
map energy bin to central value
double fNuEPeriphLowEdge
low side of the first nue bin in FD
std::map< long, int > fOffsetMap
map of keys to offset for different samples
std::map< int, double > fNuEFDBinToEnergy
map energy bin to central value
std::map< int, double > fNCFDBinToEnergy
map energy bin to central value (2020ana)
std::map< double, int > fNCNDHighEdges
high side of the nc bins in ND (2020ana)
static void FillBinToEnergyMap(std::map< double, int > const &selectionHighEdges, std::map< int, double > &selectionBinToEnergy, double lowestBound)
#define LOG_VERBATIM(category)
double fNuENDLowEdge
low side of the first nue bin in ND
double fNCFDLowEdge
low side of the first nc bin in FD
CovarianceBinUtility * cmf::CovarianceBinUtility::Instance ( )
static

Definition at line 18 of file CovarianceBinUtility.cxx.

References CovarianceBinUtility(), and cmf::gCovBinUtil.

Referenced by cmf::CovarianceMatrixMaker::beginJob(), cmf::RandomUniverses::beginJob(), cmf::ChiSqrCalculator::ChiSqrCalculator(), cmf::CMFDecorrelator::CMFDecorrelator(), cmf::CovarianceFitHelper::CovarianceFitHelper(), cmf::ContourFromLibrary::endJob(), cmf::ShifterAndWeighter::FileSystWeight(), cmf::CovarianceMatrixMaker::FillSpectrum(), cmf::FillSpectrum(), cmf::FillSpectrumFromSingleList(), cmf::ChiSqrCalculator::FindReducedMatrixBin(), cmf::ChiSqrCalculator::InitializeCovarianceMatrix(), cmf::CovarianceFitHelper::Make1DSpectra(), cmf::CovarianceFitHelper::MakeDataMCCanv(), cmf::PlotUtilities::MakeEnergySpectraFromBins(), cmf::SpectrumPredictionMaker::MakeHiddenParameterHistograms(), makeInitialDecorrelatedErrorPlot(), cmf::CovarianceFitHelper::MakeResultPlots(), cmf::RandomUniverseUtility::PoissonSpectrumBinByBin(), cmf::PredictionLibraryMaker::PredictionLibraryMaker(), cmf::CMFSpectraMaker::reconfigure(), cmf::CovarianceMatrixFitter::reconfigure(), cmf::CovarianceMatrixMaker::reconfigure(), cmf::RandomUniverses::reconfigure(), cmf::FitFeldmanCousinsPoint::reconfigure(), cmf::ContourFromLibrary::reconfigure(), cmf::CMFDecorrelator::SetComponentNameAndOffsets(), cmf::CMFDecorrelator::SetTemplateMatrix(), cmf::RandomUniverses::writeResults(), and cmf::FitFeldmanCousinsPoint::writeResults().

19  {
20  if(gCovBinUtil == nullptr) gCovBinUtil = new CovarianceBinUtility();
21 
22  return gCovBinUtil;
23  }
static CovarianceBinUtility * gCovBinUtil
int cmf::CovarianceBinUtility::KeyToOffset ( long const &  key,
bool  allSels = false 
)

Definition at line 446 of file CovarianceBinUtility.cxx.

References fAllSelsOffsetMap, and fOffsetMap.

Referenced by BinToEnergy(), cmf::FillSpectrumFromSingleList(), cmf::PlotUtilities::MakeEnergySpectraFromBins(), makeInitialDecorrelatedErrorPlot(), NuMuHighEdges(), and cmf::CMFDecorrelator::SetComponentNameAndOffsets().

448  {
449  if(allSels) return this->KeyToOffset(key, fAllSelsOffsetMap);
450  return this->KeyToOffset(key, fOffsetMap);
451  }
int KeyToOffset(long const &key, bool allSels=false)
std::map< long, int > fAllSelsOffsetMap
map of keys to offset for different samples
std::map< long, int > fOffsetMap
map of keys to offset for different samples
int cmf::CovarianceBinUtility::KeyToOffset ( long const &  key,
std::map< long, int > const &  offsetMap 
)
private

Definition at line 454 of file CovarianceBinUtility.cxx.

References cmf::cBeamType_Strings, cmf::cDetType_Strings, cmf::cSelectionType_Strings, cmf::KeyToBeamType(), cmf::KeyToDetectorType(), and cmf::KeyToSelectionType().

456  {
457 
458  if(offsetMap.count(key) < 1)
459  throw cet::exception("CovarianceBinUtility")
460  << "could not find offset in map for key "
461  << key
462  << " "
464  << " "
466  << " "
468 
469  return offsetMap.find(key)->second;
470  }
const std::string cSelectionType_Strings[12]
Definition: Constants.h:93
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
static cmf::BeamType_t KeyToBeamType(long const &key)
Definition: StaticFuncs.h:132
static cmf::DetType_t KeyToDetectorType(long const &key)
Definition: StaticFuncs.h:66
static cmf::SelectionType_t KeyToSelectionType(long const &key)
Definition: StaticFuncs.h:166
const std::string cDetType_Strings[5]
Definition: Constants.h:29
const std::string cBeamType_Strings[4]
Definition: Constants.h:51
std::map< double, int > const & cmf::CovarianceBinUtility::NCHighEdges ( cmf::DetType_t const &  det)

Definition at line 396 of file CovarianceBinUtility.cxx.

References fNCFDHighEdges, fNCNDHighEdges, and cmf::kNEARDET.

Referenced by NuMuHighEdges(), and SelectionHighEdges().

397  {
398  if(det == cmf::kNEARDET) return fNCNDHighEdges;
399 
400  return fNCFDHighEdges;
401  }
std::map< double, int > fNCFDHighEdges
high side of the nc bins in FD (2020ana)
std::map< double, int > fNCNDHighEdges
high side of the nc bins in ND (2020ana)
double const & cmf::CovarianceBinUtility::NCLowEdge ( cmf::DetType_t const &  det)

Definition at line 380 of file CovarianceBinUtility.cxx.

References fNCFDLowEdge, fNCNDLowEdge, and cmf::kNEARDET.

Referenced by NuMuLowEdge(), and SelectionLowEdge().

381  {
382  if(det == cmf::kNEARDET) return fNCNDLowEdge;
383 
384  return fNCFDLowEdge;
385  }
double fNCNDLowEdge
low side of the first nc bin in ND
double fNCFDLowEdge
low side of the first nc bin in FD
std::map< double, int > const & cmf::CovarianceBinUtility::NuEHighEdges ( cmf::DetType_t const &  det)

Definition at line 388 of file CovarianceBinUtility.cxx.

References fNuEFDHighEdges, fNuENDHighEdges, and cmf::kNEARDET.

Referenced by NuMuHighEdges(), and SelectionHighEdges().

389  {
390  if(det == cmf::kNEARDET) return fNuENDHighEdges;
391 
392  return fNuEFDHighEdges;
393  }
std::map< double, int > fNuEFDHighEdges
high side of the nue bins in FD
std::map< double, int > fNuENDHighEdges
high side of the nue bins in ND
double const & cmf::CovarianceBinUtility::NuELowEdge ( cmf::MetaData const &  md)

Definition at line 371 of file CovarianceBinUtility.cxx.

References cmf::MetaData::detector, fNuEFDLowEdge, fNuENDLowEdge, fNuEPeriphLowEdge, cmf::kNEARDET, cmf::kNuESelectionPeripheral, and cmf::MetaData::selectionType.

Referenced by NuMuLowEdge(), and SelectionLowEdge().

372  {
373  if(md.detector == cmf::kNEARDET) return fNuENDLowEdge;
374  if(md.selectionType == cmf::kNuESelectionPeripheral) return fNuEPeriphLowEdge;
375 
376  return fNuEFDLowEdge;
377  }
double fNuEFDLowEdge
low side of the first nune bin in FD
double fNuEPeriphLowEdge
low side of the first nue bin in FD
double fNuENDLowEdge
low side of the first nue bin in ND
int cmf::CovarianceBinUtility::NumSelectionBins ( cmf::SelectionType_t const &  selType,
cmf::DetType_t const &  detType 
)
private

Definition at line 32 of file CovarianceBinUtility.cxx.

References fNCFDHighEdges, fNCNDHighEdges, fNuEFDHighEdges, fNuENDHighEdges, fNuEPeriphHighEdges, fNuMuHighEdges, cmf::IsNuESelected(), cmf::IsNuMuSelected(), cmf::kNCSelection, cmf::kNEARDET, and cmf::kNuESelectionPeripheral.

Referenced by FillOffsetAndBinMaps(), and NuMuHighEdges().

34  {
35  if(cmf::IsNuESelected(selType)){
36  if(selType == cmf::kNuESelectionPeripheral) return fNuEPeriphHighEdges.size();
37  return (detType == cmf::kNEARDET) ? fNuENDHighEdges.size() : fNuEFDHighEdges.size();
38  }
39  else if(cmf::IsNuMuSelected(selType)){
40  return fNuMuHighEdges.size();
41  }
42  else if(selType == cmf::kNCSelection){
43  return (detType == cmf::kNEARDET) ? fNCNDHighEdges.size() : fNCFDHighEdges.size();
44  }
45 
46  throw cet::exception("CovarianceBinUtility")
47  << "selection type "
48  << selType
49  << " is not recognized";
50 
51  return 0;
52  }
std::map< double, int > fNuMuHighEdges
high side of the numu bins
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
static bool IsNuESelected(cmf::SelectionType_t const &sel)
Definition: StaticFuncs.h:372
static bool IsNuMuSelected(cmf::SelectionType_t const &sel)
Definition: StaticFuncs.h:358
std::map< double, int > fNuEPeriphHighEdges
high side of the nue bins in FD
std::map< double, int > fNCFDHighEdges
high side of the nc bins in FD (2020ana)
std::map< double, int > fNuEFDHighEdges
high side of the nue bins in FD
std::map< double, int > fNuENDHighEdges
high side of the nue bins in ND
std::map< double, int > fNCNDHighEdges
high side of the nc bins in ND (2020ana)
std::map<double, int> const& cmf::CovarianceBinUtility::NuMuHighEdges ( )
inline
double const& cmf::CovarianceBinUtility::NuMuLowEdge ( )
inline

Definition at line 30 of file CovarianceBinUtility.h.

References fillBadChanDBTables::det, fNuMuLowEdge, fetch_tb_beamline_files::md, NCLowEdge(), NuELowEdge(), and SelectionLowEdge().

Referenced by SelectionLowEdge().

30 { return fNuMuLowEdge; }
double fNuMuLowEdge
low side of the first numu bin
std::map< int, double > const & cmf::CovarianceBinUtility::SelectionBinToEnergy ( long  key)
private

Definition at line 492 of file CovarianceBinUtility.cxx.

References cmf::cDetType_Strings, cmf::cSelectionType_Strings, fillBadChanDBTables::det, fNCFDBinToEnergy, fNCNDBinToEnergy, fNuEFDBinToEnergy, fNuENDBinToEnergy, fNuEPeriphBinToEnergy, fNuMuBinToEnergy, cmf::IsNuESelected(), cmf::IsNuMuSelected(), cmf::KeyToDetectorType(), cmf::KeyToSelectionType(), cmf::kNEARDET, cmf::kNuESelectionPeripheral, cmf::kUnknownDet, and cmf::kUnknownSelection.

Referenced by BinToEnergy(), and NuMuHighEdges().

493  {
494  auto sel = cmf::KeyToSelectionType(key);
496 
497  if(sel == cmf::kUnknownSelection ||
498  det == cmf::kUnknownDet )
499  throw cet::exception("Unknown Key")
500  << "key "
501  << key
502  << "corresponds to "
504  << " and "
506 
507  if(cmf::IsNuESelected(sel)){
509  if(det == cmf::kNEARDET) return fNuENDBinToEnergy;
510  return fNuEFDBinToEnergy;
511  }
512  else if(cmf::IsNuMuSelected(sel)){
513  return fNuMuBinToEnergy;
514  }
515  else{
516  if (det == cmf::kNEARDET) return fNCNDBinToEnergy;
517  else return fNCFDBinToEnergy;
518  }
519  }
const std::string cSelectionType_Strings[12]
Definition: Constants.h:93
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
std::map< int, double > fNuEPeriphBinToEnergy
map energy bin to central value
std::map< int, double > fNuMuBinToEnergy
map energy bin to central value
static bool IsNuESelected(cmf::SelectionType_t const &sel)
Definition: StaticFuncs.h:372
std::map< int, double > fNCNDBinToEnergy
map energy bin to central value (2020ana)
static bool IsNuMuSelected(cmf::SelectionType_t const &sel)
Definition: StaticFuncs.h:358
static cmf::DetType_t KeyToDetectorType(long const &key)
Definition: StaticFuncs.h:66
std::map< int, double > fNuENDBinToEnergy
map energy bin to central value
std::map< int, double > fNuEFDBinToEnergy
map energy bin to central value
std::map< int, double > fNCFDBinToEnergy
map energy bin to central value (2020ana)
static cmf::SelectionType_t KeyToSelectionType(long const &key)
Definition: StaticFuncs.h:166
const std::string cDetType_Strings[5]
Definition: Constants.h:29
std::map< double, int > const & cmf::CovarianceBinUtility::SelectionHighEdges ( cmf::MetaData const &  md)

Definition at line 404 of file CovarianceBinUtility.cxx.

References cmf::MetaData::detector, fNuEPeriphHighEdges, cmf::MetaData::IsNuESelected(), cmf::MetaData::IsNuMuSelected(), cmf::kNuESelectionPeripheral, NCHighEdges(), NuEHighEdges(), NuMuHighEdges(), and cmf::MetaData::selectionType.

Referenced by cmf::CovarianceMatrixMaker::beginJob(), EnergyToBin(), cmf::PlotUtilities::MakeEnergySpectraFromBins(), NuMuHighEdges(), SelectionHistBinning(), and cmf::CMFDecorrelator::SetTemplateMatrix().

405  {
406  if(md.IsNuMuSelected())
407  return this->NuMuHighEdges();
408  else if(md.IsNuESelected()){
409  if(md.selectionType == cmf::kNuESelectionPeripheral) return fNuEPeriphHighEdges;
410  return this->NuEHighEdges(md.detector);
411  }
412 
413  return this->NCHighEdges(md.detector);
414  }
std::map< double, int > const & NuMuHighEdges()
std::map< double, int > fNuEPeriphHighEdges
high side of the nue bins in FD
std::map< double, int > const & NCHighEdges(cmf::DetType_t const &det)
std::map< double, int > const & NuEHighEdges(cmf::DetType_t const &det)
std::map< double, int > const & cmf::CovarianceBinUtility::SelectionHighEdges ( long const &  key)

Definition at line 417 of file CovarianceBinUtility.cxx.

References fillBadChanDBTables::det, fNuEPeriphHighEdges, cmf::IsNuESelected(), cmf::IsNuMuSelected(), cmf::KeyToDetectorType(), cmf::KeyToSelectionType(), cmf::kNuESelectionPeripheral, NCHighEdges(), NuEHighEdges(), and NuMuHighEdges().

418  {
419  auto sel = cmf::KeyToSelectionType(key);
421 
422  if(cmf::IsNuMuSelected(sel))
423  return this->NuMuHighEdges();
424  else if(cmf::IsNuESelected(sel)){
426  return this->NuEHighEdges(det);
427  }
428 
429  return this->NCHighEdges(det);
430  }
std::map< double, int > const & NuMuHighEdges()
static bool IsNuESelected(cmf::SelectionType_t const &sel)
Definition: StaticFuncs.h:372
static bool IsNuMuSelected(cmf::SelectionType_t const &sel)
Definition: StaticFuncs.h:358
std::map< double, int > fNuEPeriphHighEdges
high side of the nue bins in FD
static cmf::DetType_t KeyToDetectorType(long const &key)
Definition: StaticFuncs.h:66
std::map< double, int > const & NCHighEdges(cmf::DetType_t const &det)
static cmf::SelectionType_t KeyToSelectionType(long const &key)
Definition: StaticFuncs.h:166
std::map< double, int > const & NuEHighEdges(cmf::DetType_t const &det)
void cmf::CovarianceBinUtility::SelectionHistBinning ( cmf::MetaData const &  md,
std::vector< double > &  bins 
)

Definition at line 433 of file CovarianceBinUtility.cxx.

References SelectionHighEdges(), SelectionLowEdge(), and std::swap().

Referenced by cmf::CovarianceFitHelper::Make1DSpectra(), cmf::PlotUtilities::MakeEnergySpectraFromBins(), and NuMuHighEdges().

435  {
436  std::vector<double> tmpbins;
437  auto const& highEdgeMap = this->SelectionHighEdges(md);
438  tmpbins.push_back(this->SelectionLowEdge(md));
439 
440  for(auto const& itr : highEdgeMap) tmpbins.push_back(itr.first);
441 
442  std::swap(tmpbins, bins);
443  }
double const & SelectionLowEdge(cmf::MetaData const &md)
void swap(art::HLTGlobalStatus &lhs, art::HLTGlobalStatus &rhs)
const Binning bins
std::map< double, int > const & SelectionHighEdges(cmf::MetaData const &md)
double const & cmf::CovarianceBinUtility::SelectionLowEdge ( cmf::MetaData const &  md)

Definition at line 359 of file CovarianceBinUtility.cxx.

References cmf::MetaData::detector, cmf::MetaData::IsNuESelected(), cmf::MetaData::IsNuMuSelected(), NCLowEdge(), NuELowEdge(), and NuMuLowEdge().

Referenced by cmf::CovarianceMatrixMaker::beginJob(), NuMuLowEdge(), and SelectionHistBinning().

360  {
361  if(md.IsNuMuSelected())
362  return this->NuMuLowEdge();
363  else if(md.IsNuESelected()){
364  return this->NuELowEdge(md);
365  }
366 
367  return this->NCLowEdge(md.detector);
368  }
double const & NuELowEdge(cmf::MetaData const &md)
double const & NCLowEdge(cmf::DetType_t const &det)
void cmf::CovarianceBinUtility::SetBinning ( fhicl::ParameterSet const &  fBinConfig,
cmf::SelectionType_t const &  selType 
)
private

Definition at line 118 of file CovarianceBinUtility.cxx.

References EnergyBinMap(), fNCFDHighEdges, fNCFDLowEdge, fNCNDHighEdges, fNCNDLowEdge, fNuEFDHighEdges, fNuEFDLowEdge, fNuENDHighEdges, fNuENDLowEdge, fNuEPeriphHighEdges, fNuEPeriphLowEdge, fNuMuHighEdges, fNuMuLowEdge, fhicl::ParameterSet::get(), cmf::IsNuESelected(), and cmf::IsNuMuSelected().

Referenced by Initialize(), and NuMuHighEdges().

119  {
120  auto ndConfig = fBinConfig.get<fhicl::ParameterSet>("nd");
121  auto fdConfig = fBinConfig.get<fhicl::ParameterSet>("fd");
122 
123  // numu selection has the same binning in nd and fd
124  // TODO if the numu selection is ever not the same in the detectors we
125  // need to update this
126  if(cmf::IsNuMuSelected(selType)){
127  fNuMuLowEdge = ndConfig.get<double>("low_edge");
128  fNuMuHighEdges = this->EnergyBinMap(ndConfig.get<std::vector<double>>("high_edges"));
129  }
130  else if (cmf::IsNuESelected(selType)){
131  fNuENDLowEdge = ndConfig.get<double>("low_edge");
132  fNuENDHighEdges = this->EnergyBinMap(ndConfig.get<std::vector<double>>("high_edges"));
133  fNuEFDLowEdge = fdConfig.get<double>("low_edge");
134  fNuEFDHighEdges = this->EnergyBinMap(fdConfig.get<std::vector<double>>("high_edges"));
135 
136  // nue selection also has peripheral sample at the FD
137  auto peConfig = fBinConfig.get<fhicl::ParameterSet>("peripheral");
138  fNuEPeriphLowEdge = peConfig.get<double>("low_edge");
139  fNuEPeriphHighEdges = this->EnergyBinMap(peConfig.get<std::vector<double>>("high_edges"));
140  }
141  else {
142  fNCNDLowEdge = ndConfig.get<double>("low_edge");
143  fNCNDHighEdges = this->EnergyBinMap(ndConfig.get<std::vector<double>>("high_edges"));
144  fNCFDLowEdge = fdConfig.get<double>("low_edge");
145  fNCFDHighEdges = this->EnergyBinMap(fdConfig.get<std::vector<double>>("high_edges"));
146  }
147 
148  }
std::map< double, int > fNuMuHighEdges
high side of the numu bins
double fNuEFDLowEdge
low side of the first nune bin in FD
double fNuMuLowEdge
low side of the first numu bin
std::map< double, int > EnergyBinMap(std::vector< double > const &vec)
static bool IsNuESelected(cmf::SelectionType_t const &sel)
Definition: StaticFuncs.h:372
double fNCNDLowEdge
low side of the first nc bin in ND
static bool IsNuMuSelected(cmf::SelectionType_t const &sel)
Definition: StaticFuncs.h:358
std::map< double, int > fNuEPeriphHighEdges
high side of the nue bins in FD
std::map< double, int > fNCFDHighEdges
high side of the nc bins in FD (2020ana)
T get(std::string const &key) const
Definition: ParameterSet.h:231
std::map< double, int > fNuEFDHighEdges
high side of the nue bins in FD
std::map< double, int > fNuENDHighEdges
high side of the nue bins in ND
double fNuEPeriphLowEdge
low side of the first nue bin in FD
std::map< double, int > fNCNDHighEdges
high side of the nc bins in ND (2020ana)
double fNuENDLowEdge
low side of the first nue bin in ND
double fNCFDLowEdge
low side of the first nc bin in FD
size_t cmf::CovarianceBinUtility::TotalBins ( bool  allSels = false)

Definition at line 330 of file CovarianceBinUtility.cxx.

References fAllSelsBinToKey, fBinToKey, fNCFDHighEdges, fNCNDHighEdges, fNuEFDHighEdges, fNuENDHighEdges, fNuEPeriphHighEdges, fNuMuHighEdges, and LOG_DEBUG.

Referenced by cmf::CovarianceMatrixMaker::beginJob(), cmf::RandomUniverses::beginJob(), cmf::ChiSqrCalculator::ChiSqrCalculator(), cmf::CMFDecorrelator::CMFDecorrelator(), cmf::ContourFromLibrary::endJob(), cmf::ChiSqrCalculator::InitializeCovarianceMatrix(), cmf::SpectrumPredictionMaker::MakeHiddenParameterHistograms(), cmf::CovarianceFitHelper::MakeResultPlots(), NuMuHighEdges(), and cmf::FitFeldmanCousinsPoint::writeResults().

331  {
332 
333  LOG_DEBUG("CovarianceBinUtility")
334  << " there are numu (each quartile): "
335  << fNuMuHighEdges.size()
336  << " nue low: "
337  << fNuENDHighEdges.size()
338  << " nue high: "
339  << fNuEFDHighEdges.size()
340  << " nue peripheral: "
341  << fNuEPeriphHighEdges.size()
342  << " nc ND: "
343  << fNCNDHighEdges.size()
344  << " nc FD: "
345  << fNCFDHighEdges.size()
346  << " total bins for all selections: "
347  << fAllSelsBinToKey.size()
348  << " total bins for run time selections: "
349  << fBinToKey.size()
350  << " "
351  << allSels;
352 
353  if(allSels) return fAllSelsBinToKey.size();
354 
355  return fBinToKey.size();
356  }
#define LOG_DEBUG(stream)
Definition: Messenger.h:149
std::map< double, int > fNuMuHighEdges
high side of the numu bins
std::vector< long > fAllSelsBinToKey
map bin numbers to keys for different samples
std::map< double, int > fNuEPeriphHighEdges
high side of the nue bins in FD
std::map< double, int > fNCFDHighEdges
high side of the nc bins in FD (2020ana)
std::vector< long > fBinToKey
map bin numbers to keys for different samples
std::map< double, int > fNuEFDHighEdges
high side of the nue bins in FD
std::map< double, int > fNuENDHighEdges
high side of the nue bins in ND
std::map< double, int > fNCNDHighEdges
high side of the nc bins in ND (2020ana)

Member Data Documentation

std::vector<long> cmf::CovarianceBinUtility::fAllSelsBinToKey
private

map bin numbers to keys for different samples

Definition at line 120 of file CovarianceBinUtility.h.

Referenced by BinToKey(), Initialize(), TotalBins(), and ~CovarianceBinUtility().

std::map<long, int> cmf::CovarianceBinUtility::fAllSelsOffsetMap
private

map of keys to offset for different samples

Definition at line 118 of file CovarianceBinUtility.h.

Referenced by Initialize(), KeyToOffset(), and ~CovarianceBinUtility().

std::vector<long> cmf::CovarianceBinUtility::fBinToKey
private

map bin numbers to keys for different samples

Definition at line 119 of file CovarianceBinUtility.h.

Referenced by BinToKey(), Initialize(), TotalBins(), and ~CovarianceBinUtility().

std::map<int, double> cmf::CovarianceBinUtility::fNCFDBinToEnergy
private

map energy bin to central value (2020ana)

Definition at line 116 of file CovarianceBinUtility.h.

Referenced by Initialize(), SelectionBinToEnergy(), and ~CovarianceBinUtility().

std::map<double, int> cmf::CovarianceBinUtility::fNCFDHighEdges
private

high side of the nc bins in FD (2020ana)

Definition at line 110 of file CovarianceBinUtility.h.

Referenced by Initialize(), NCHighEdges(), NumSelectionBins(), SetBinning(), TotalBins(), and ~CovarianceBinUtility().

double cmf::CovarianceBinUtility::fNCFDLowEdge
private

low side of the first nc bin in FD

Definition at line 109 of file CovarianceBinUtility.h.

Referenced by Initialize(), NCLowEdge(), and SetBinning().

std::map<double, int> cmf::CovarianceBinUtility::fNCHighEdges
private

high side of the nc bins

Definition at line 106 of file CovarianceBinUtility.h.

Referenced by ~CovarianceBinUtility().

double cmf::CovarianceBinUtility::fNCLowEdge
private

low side of the first nc bin

Definition at line 105 of file CovarianceBinUtility.h.

std::map<int, double> cmf::CovarianceBinUtility::fNCNDBinToEnergy
private

map energy bin to central value (2020ana)

Definition at line 115 of file CovarianceBinUtility.h.

Referenced by Initialize(), SelectionBinToEnergy(), and ~CovarianceBinUtility().

std::map<double, int> cmf::CovarianceBinUtility::fNCNDHighEdges
private

high side of the nc bins in ND (2020ana)

Definition at line 108 of file CovarianceBinUtility.h.

Referenced by Initialize(), NCHighEdges(), NumSelectionBins(), SetBinning(), TotalBins(), and ~CovarianceBinUtility().

double cmf::CovarianceBinUtility::fNCNDLowEdge
private

low side of the first nc bin in ND

Definition at line 107 of file CovarianceBinUtility.h.

Referenced by Initialize(), NCLowEdge(), and SetBinning().

std::map<int, double> cmf::CovarianceBinUtility::fNuEFDBinToEnergy
private

map energy bin to central value

Definition at line 113 of file CovarianceBinUtility.h.

Referenced by Initialize(), SelectionBinToEnergy(), and ~CovarianceBinUtility().

std::map<double, int> cmf::CovarianceBinUtility::fNuEFDHighEdges
private

high side of the nue bins in FD

Definition at line 102 of file CovarianceBinUtility.h.

Referenced by Initialize(), NuEHighEdges(), NumSelectionBins(), SetBinning(), TotalBins(), and ~CovarianceBinUtility().

double cmf::CovarianceBinUtility::fNuEFDLowEdge
private

low side of the first nune bin in FD

Definition at line 101 of file CovarianceBinUtility.h.

Referenced by Initialize(), NuELowEdge(), and SetBinning().

std::map<int, double> cmf::CovarianceBinUtility::fNuENDBinToEnergy
private

map energy bin to central value

Definition at line 112 of file CovarianceBinUtility.h.

Referenced by Initialize(), SelectionBinToEnergy(), and ~CovarianceBinUtility().

std::map<double, int> cmf::CovarianceBinUtility::fNuENDHighEdges
private

high side of the nue bins in ND

Definition at line 100 of file CovarianceBinUtility.h.

Referenced by Initialize(), NuEHighEdges(), NumSelectionBins(), SetBinning(), TotalBins(), and ~CovarianceBinUtility().

double cmf::CovarianceBinUtility::fNuENDLowEdge
private

low side of the first nue bin in ND

Definition at line 99 of file CovarianceBinUtility.h.

Referenced by Initialize(), NuELowEdge(), and SetBinning().

std::map<int, double> cmf::CovarianceBinUtility::fNuEPeriphBinToEnergy
private

map energy bin to central value

Definition at line 114 of file CovarianceBinUtility.h.

Referenced by Initialize(), SelectionBinToEnergy(), and ~CovarianceBinUtility().

std::map<double, int> cmf::CovarianceBinUtility::fNuEPeriphHighEdges
private

high side of the nue bins in FD

Definition at line 104 of file CovarianceBinUtility.h.

Referenced by Initialize(), NumSelectionBins(), SelectionHighEdges(), SetBinning(), TotalBins(), and ~CovarianceBinUtility().

double cmf::CovarianceBinUtility::fNuEPeriphLowEdge
private

low side of the first nue bin in FD

Definition at line 103 of file CovarianceBinUtility.h.

Referenced by Initialize(), NuELowEdge(), and SetBinning().

std::map<int, double> cmf::CovarianceBinUtility::fNuMuBinToEnergy
private

map energy bin to central value

Definition at line 111 of file CovarianceBinUtility.h.

Referenced by Initialize(), SelectionBinToEnergy(), and ~CovarianceBinUtility().

std::map<double, int> cmf::CovarianceBinUtility::fNuMuHighEdges
private

high side of the numu bins

Definition at line 98 of file CovarianceBinUtility.h.

Referenced by Initialize(), NumSelectionBins(), NuMuHighEdges(), SetBinning(), TotalBins(), and ~CovarianceBinUtility().

double cmf::CovarianceBinUtility::fNuMuLowEdge
private

low side of the first numu bin

Definition at line 97 of file CovarianceBinUtility.h.

Referenced by Initialize(), NuMuLowEdge(), and SetBinning().

std::map<long, int> cmf::CovarianceBinUtility::fOffsetMap
private

map of keys to offset for different samples

Definition at line 117 of file CovarianceBinUtility.h.

Referenced by Initialize(), KeyToOffset(), and ~CovarianceBinUtility().


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