Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
fnex::VarBinning Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/FNEX/core/VarBinning.h"

Public Member Functions

fnex::Binning const * BinInfo (std::string const &varName)
 

Static Public Member Functions

static VarBinningInstance ()
 

Private Member Functions

 VarBinning ()
 
 ~VarBinning ()
 

Private Attributes

std::unordered_map< unsigned int, std::unique_ptr< fnex::Binning > > fBinningMap
 

Detailed Description

Definition at line 17 of file VarBinning.h.

Constructor & Destructor Documentation

fnex::VarBinning::VarBinning ( )
private

Definition at line 23 of file VarBinning.cxx.

References fBinningMap, and fnex::VarNameToKey().

Referenced by Instance().

24  {
25 
26  // fill the binning information for each variable
27  fBinningMap[fnex::VarNameToKey("XSecCVPPFX_Weight") ] = std::make_unique<fnex::FixedBinning>( 100, 0, 10);
28  fBinningMap[fnex::VarNameToKey("RPACCQE_Weight") ] = std::make_unique<fnex::FixedBinning>( 100, 0, 2);
29  fBinningMap[fnex::VarNameToKey("Fake_Weight") ] = std::make_unique<fnex::FixedBinning>( 100, 0, 50);
30  fBinningMap[fnex::VarNameToKey("Lep_RecoE") ] = std::make_unique<fnex::FixedBinning>( 10, 0, 5);
31  fBinningMap[fnex::VarNameToKey("Had_RecoE") ] = std::make_unique<fnex::FixedBinning>( 10, 0, 5);
32  fBinningMap[fnex::VarNameToKey("Nu_RecoE") ] = std::make_unique<fnex::FixedBinning>( 10, 0, 5);
33  fBinningMap[fnex::VarNameToKey("NuE_CVN") ] = std::make_unique<fnex::FixedBinning>( 20, -1, 1);
34  fBinningMap[fnex::VarNameToKey("NuE_NumMichel") ] = std::make_unique<fnex::FixedBinning>( 10, 0, 10);
35  fBinningMap[fnex::VarNameToKey("TrueE") ] = std::make_unique<fnex::FixedBinning>( 10, 0, 5);
36  fBinningMap[fnex::VarNameToKey("TrueIntType") ] = std::make_unique<fnex::FixedBinning>(1200, -100, 1100);
37  fBinningMap[fnex::VarNameToKey("TruePDG") ] = std::make_unique<fnex::FixedBinning>( 40, -20, 20);
38  fBinningMap[fnex::VarNameToKey("TruePDGOrig") ] = std::make_unique<fnex::FixedBinning>( 40, -20, 20);
39  fBinningMap[fnex::VarNameToKey("TrueCCNC") ] = std::make_unique<fnex::FixedBinning>( 2, 0, 2);
40  fBinningMap[fnex::VarNameToKey("TrueParentPDG") ] = std::make_unique<fnex::FixedBinning>( 100, -500, 500);
41  fBinningMap[fnex::VarNameToKey("TrueParentDecay") ] = std::make_unique<fnex::FixedBinning>( 20, 0, 20);
42  fBinningMap[fnex::VarNameToKey("TrueParentTargetPDG")] = std::make_unique<fnex::FixedBinning>( 100, -500, 500);
43  fBinningMap[fnex::VarNameToKey("TrueParentPT") ] = std::make_unique<fnex::FixedBinning>( 400, -200, 200);
44  fBinningMap[fnex::VarNameToKey("TrueParentPZ") ] = std::make_unique<fnex::FixedBinning>( 400, -200, 200);
45 
46  // binning specific to the UBL fit
47  fBinningMap[fnex::VarNameToKey("Lep_RecoE_UBL") ] = std::make_unique<fnex::FixedBinning>( 360, 0, 30);
48  fBinningMap[fnex::VarNameToKey("Had_RecoE_UBL") ] = std::make_unique<fnex::FixedBinning>( 360, 0, 30);
49  fBinningMap[fnex::VarNameToKey("Nu_RecoE_UBL") ] = std::make_unique<fnex::FixedBinning>( 360, 0, 30);
50 
51  // binning for the 2017 analysis
52  std::vector<double> lowEdges({0., 0.75, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2., 2.25, 2.5, 2.75, 3, 3.5, 4., 5., 10.});
53  fBinningMap[fnex::VarNameToKey("Nu_RecoE_Quantiles_NuMu") ] = std::make_unique<fnex::VariableBinning>(lowEdges);
54 
55  fBinningMap[fnex::VarNameToKey("Nu_RecoE_NuE_Peripheral") ] = std::make_unique<fnex::FixedBinning>( 10, 0, 5);
56  }
unsigned char VarNameToKey(std::string const &name)
Definition: VarVals.h:279
std::unordered_map< unsigned int, std::unique_ptr< fnex::Binning > > fBinningMap
Definition: VarBinning.h:30
fnex::VarBinning::~VarBinning ( )
private

Definition at line 59 of file VarBinning.cxx.

60  {
61 
62  }

Member Function Documentation

fnex::Binning const * fnex::VarBinning::BinInfo ( std::string const &  varName)

Definition at line 65 of file VarBinning.cxx.

References fBinningMap, and fnex::VarNameToKey().

Referenced by fnex::EventListManipulator::CreatePoissonFakeData(), fnex::CorrSpec_SimpleNuMuExtrap::GenerateSpectrumList(), fnex::CorrSpec_MichelDecomp::GenerateSpectrumList(), fnex::CorrSpec_BENDecomp::GenerateSpectrumList(), and fnex::CorrectedSpectrum::SpectrumBinning().

66  {
67  return fBinningMap.at(fnex::VarNameToKey(varName)).get();
68  }
unsigned char VarNameToKey(std::string const &name)
Definition: VarVals.h:279
std::unordered_map< unsigned int, std::unique_ptr< fnex::Binning > > fBinningMap
Definition: VarBinning.h:30
VarBinning * fnex::VarBinning::Instance ( )
static

Member Data Documentation

std::unordered_map<unsigned int, std::unique_ptr<fnex::Binning> > fnex::VarBinning::fBinningMap
private

Definition at line 30 of file VarBinning.h.

Referenced by BinInfo(), and VarBinning().


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