Berkeley Nuclear Data Software
Public Member Functions | Public Attributes | List of all members
GenEfficiencyAnalysis Class Reference

#include <GenEfficiencyAnalysis.h>

Collaboration diagram for GenEfficiencyAnalysis:
Collaboration graph
[legend]

Public Member Functions

 GenEfficiencyAnalysis ()
 
 GenEfficiencyAnalysis (string a_configFileName)
 
void setRNGSeed (int a_seed)
 
void addConfigFile (string a_configFileName)
 loads in a config file More...
 
void loadSimulationEvents (string a_simFileName, int a_numEvents)
 loads simulation, needs total number of events simulated More...
 
void addLYCovarianceData (string a_fileName)
 
void generateResampledConfig ()
 modifies the stored GenesisConfig using the LY covariances More...
 
void processSimData (bool a_useExpTimeRes=false, double a_timeResolution=1., bool a_useLYResolution=true, bool a_resampleLYCalib=false, double a_minLight=-1)
 
void loadSinglesData (string a_singlesFileName, double a_countingTime, double a_minTime=0)
 loads hists from GENESISPostProcessing::accumulateSinglesQuantities() More...
 
void loadCoincidenceData (string a_coinFileName, double a_countingTime, double a_minTime=0)
 loads hists from GenCoinAnalysis::buildOutgoingTOFHist() More...
 
void loadExpGammaGammaData (string a_ggFileName)
 loads gamma-gamma experimental data and prepares slices of TOF in light More...
 
int loadCoincidenceTreeData (string a_coinFileName, double a_countingTime)
 load experimental n/g scint-scint coincidence tree More...
 
void prepareCoinTreeData (bool a_useADC=false)
 make the experimental tof vs light histograms More...
 
TH2F * getExpTOFLightHist (int a_detID)
 get tof vs light hist for given detector More...
 
TH2F * getTotalCoinHist (int a_detID, string a_histNameRoot)
 sums up histograms from each loaded coincidence data file More...
 
double calcAverageGammaEff (int a_detID, double a_minEnergyBin=1, double a_maxEnergyBin=-1)
 correction for coin data by spectrum-average LaBr efficiency More...
 
vector< double > plotTOFCf252Comparison (int a_detNum, bool a_normalize=false)
 plot sim and exp TOF plots More...
 
vector< TH2F * > plotEDepCf252Comparison (int a_detNum)
 
void calcMeanTOF (int a_meanSigma=0)
 
map< double, double > respKDE1DInt (double a_mean, double a_sig, double a_nbins, double a_max)
 
void calcCompEff ()
 
vector< double > plotSliceEDep (vector< TH2F * > a_hists, int a_bin, bool a_normalize=false)
 takes output of plotEDepCf252Comparison {sim, exp} and plots time-slices More...
 
void plotSinglesComparison ()
 
TCanvas * plotCumulativeEDepSlice (vector< TH2F * > a_hists, int a_detNum)
 
TCanvas * plotCumulativeEDepSlice (int a_detNum)
 same as above but compares across chunks of experimental data More...
 
void plotCumulativeEDepSliceAllDet (int a_simExp)
 
vector< double > plotPISingles (int a_detNum, bool a_draw=false)
 
map< int, std::pair< double, double > > plotSinglesComparison (int a_xAxisType)
 
void plotChi2SliceEDep (vector< TH2F * > a_hists, int a_detNum)
 
void plotExpSinglesEff (int a_xAxisType)
 
map< double, std::pair< double, double > > plotRelativeEnergyEff (int a_detNum, bool a_drawSim=true, std::pair< double, double > a_singlesEffs={1., 5.})
 
TH1F * interpolateCf252Spectrum (vector< double > a_binEdges, vector< double > a_flux, double a_numNeutrons, bool a_draw=false)
 get Cf252 spectrum interpolated for correct TOF bins More...
 
double calcWattIntegral (double a_lowerE, double a_upperE)
 
TH2F * getSimHist (int a_detNum)
 returns simulation histogram: tof vs light More...
 
map< double, std::pair< double, double > > calcUniformEfficiency (int a_detNum, double a_lowEnergy, double a_upperEnergy)
 
TH2F * buildResponseFunction (int a_detNum)
 return neutron energy vs light 2d histogram – built in processSimData More...
 

Public Attributes

map< int, Eigen::MatrixXf > m_respFuncs
 

Detailed Description

class to analyze Cf-252 Efficiency data and facilitate comparisons with processed GEANT4 data J. Gordon 2020 fully refactored

Constructor & Destructor Documentation

◆ GenEfficiencyAnalysis() [1/2]

GenEfficiencyAnalysis::GenEfficiencyAnalysis ( )
Here is the call graph for this function:

◆ GenEfficiencyAnalysis() [2/2]

GenEfficiencyAnalysis::GenEfficiencyAnalysis ( string  a_configFileName)
Here is the call graph for this function:

Member Function Documentation

◆ addConfigFile()

void GenEfficiencyAnalysis::addConfigFile ( string  a_configFileName)

loads in a config file

Here is the call graph for this function:

◆ addLYCovarianceData()

void GenEfficiencyAnalysis::addLYCovarianceData ( string  a_fileName)

load in file with detector ID and covariances i.e. for Light = a*ADC + b with Dietze-Klein params Ec, E1, E2 0 Cov(a,a) Cov(a,b) Cov(a,Ec) Cov(a,E1) Cov(a,E2) Cov(b,a) Cov(b,b)

Here is the call graph for this function:

◆ buildResponseFunction()

TH2F * GenEfficiencyAnalysis::buildResponseFunction ( int  a_detNum)

return neutron energy vs light 2d histogram – built in processSimData

◆ calcAverageGammaEff()

double GenEfficiencyAnalysis::calcAverageGammaEff ( int  a_detID,
double  a_minEnergyBin = 1,
double  a_maxEnergyBin = -1 
)

correction for coin data by spectrum-average LaBr efficiency

hard-coded GEANT4-determined LaBr efficiency, strictly valid >590 keV

from iron-target calibration

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calcCompEff()

void GenEfficiencyAnalysis::calcCompEff ( )

compute integrated efficiency for simulation and experiment using coincidence data (integrated over LY and a TOF range)

Here is the call graph for this function:

◆ calcMeanTOF()

void GenEfficiencyAnalysis::calcMeanTOF ( int  a_meanSigma = 0)

compute mean TOF of all detectors for sim and exp a_meanSigma = 0 : computes mean TOF a_meanSigma = 1 : computes TOF std. dev

Here is the call graph for this function:

◆ calcUniformEfficiency()

map< double, std::pair< double, double > > GenEfficiencyAnalysis::calcUniformEfficiency ( int  a_detNum,
double  a_lowEnergy,
double  a_upperEnergy 
)

calculate efficiency from a simulation with a uniform spectrum between lower and upper energies returns <low edge energy, <efficiency, error>>

◆ calcWattIntegral()

double GenEfficiencyAnalysis::calcWattIntegral ( double  a_lowerE,
double  a_upperE 
)

calculates the number of neutron in given energy range from Cf252 spectrum using fits from Mannhart uses Monte-carlo integration (closed form would be better) spectrum is normalized to 1

◆ generateResampledConfig()

void GenEfficiencyAnalysis::generateResampledConfig ( )

modifies the stored GenesisConfig using the LY covariances

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getExpTOFLightHist()

TH2F * GenEfficiencyAnalysis::getExpTOFLightHist ( int  a_detID)

get tof vs light hist for given detector

◆ getSimHist()

TH2F * GenEfficiencyAnalysis::getSimHist ( int  a_detNum)

returns simulation histogram: tof vs light

◆ getTotalCoinHist()

TH2F * GenEfficiencyAnalysis::getTotalCoinHist ( int  a_detID,
string  a_histNameRoot 
)

sums up histograms from each loaded coincidence data file

Here is the caller graph for this function:

◆ interpolateCf252Spectrum()

TH1F * GenEfficiencyAnalysis::interpolateCf252Spectrum ( vector< double >  a_binEdges,
vector< double >  a_flux,
double  a_numNeutrons,
bool  a_draw = false 
)

get Cf252 spectrum interpolated for correct TOF bins

◆ loadCoincidenceData()

void GenEfficiencyAnalysis::loadCoincidenceData ( string  a_coinFileName,
double  a_countingTime,
double  a_minTime = 0 
)

loads hists from GenCoinAnalysis::buildOutgoingTOFHist()

◆ loadCoincidenceTreeData()

int GenEfficiencyAnalysis::loadCoincidenceTreeData ( string  a_coinFileName,
double  a_countingTime 
)

load experimental n/g scint-scint coincidence tree

◆ loadExpGammaGammaData()

void GenEfficiencyAnalysis::loadExpGammaGammaData ( string  a_ggFileName)

loads gamma-gamma experimental data and prepares slices of TOF in light

Here is the call graph for this function:

◆ loadSimulationEvents()

void GenEfficiencyAnalysis::loadSimulationEvents ( string  a_simFileName,
int  a_numEvents 
)

loads simulation, needs total number of events simulated

◆ loadSinglesData()

void GenEfficiencyAnalysis::loadSinglesData ( string  a_singlesFileName,
double  a_countingTime,
double  a_minTime = 0 
)

loads hists from GENESISPostProcessing::accumulateSinglesQuantities()

◆ plotChi2SliceEDep()

void GenEfficiencyAnalysis::plotChi2SliceEDep ( vector< TH2F * >  a_hists,
int  a_detNum 
)

compute Chi2/NDF between sim/exp for all eDep slices in TOF from 1% to 95% of exp eDep CDF

Here is the call graph for this function:

◆ plotCumulativeEDepSlice() [1/2]

TCanvas * GenEfficiencyAnalysis::plotCumulativeEDepSlice ( int  a_detNum)

same as above but compares across chunks of experimental data

Here is the call graph for this function:

◆ plotCumulativeEDepSlice() [2/2]

TCanvas * GenEfficiencyAnalysis::plotCumulativeEDepSlice ( vector< TH2F * >  a_hists,
int  a_detNum 
)

compute LY CDF and plot the LY at the 95% of the CDF compares sim and experiment - {sim, experiment}

Here is the call graph for this function:

◆ plotCumulativeEDepSliceAllDet()

void GenEfficiencyAnalysis::plotCumulativeEDepSliceAllDet ( int  a_simExp)

simExp = 0 – simulations simExp > 0 – exp coins (index in m_coinFilesNames + 1)

Here is the call graph for this function:

◆ plotEDepCf252Comparison()

vector< TH2F * > GenEfficiencyAnalysis::plotEDepCf252Comparison ( int  a_detNum)

returns vector of 2D hists TOF vs. Light or ADC - {sim, experiment} use these for gain/resolution calibration

◆ plotExpSinglesEff()

void GenEfficiencyAnalysis::plotExpSinglesEff ( int  a_xAxisType)
Here is the call graph for this function:

◆ plotPISingles()

vector< double > GenEfficiencyAnalysis::plotPISingles ( int  a_detNum,
bool  a_draw = false 
)

plot simulated and experimental pulse integral spectra singles data with resolution on sim data

Here is the call graph for this function:
Here is the caller graph for this function:

◆ plotRelativeEnergyEff()

map< double, std::pair< double, double > > GenEfficiencyAnalysis::plotRelativeEnergyEff ( int  a_detNum,
bool  a_drawSim = true,
std::pair< double, double >  a_singlesEffs = {1.,5.} 
)

plots experimental/simulated integral normalized TOF spectra returns {tof, {norm'd exp, norm'd exp uncertainty}}

ener_sig[i]);

Here is the call graph for this function:

◆ plotSinglesComparison() [1/2]

void GenEfficiencyAnalysis::plotSinglesComparison ( )

copmute integrated efficiency for simulation and experiment using singles epxeriment data (integrated only over LY)

Here is the call graph for this function:

◆ plotSinglesComparison() [2/2]

map< int, std::pair< double, double > > GenEfficiencyAnalysis::plotSinglesComparison ( int  a_xAxisType)

singles efficiency integrated from [1,3.5] MeV using plotPISingles xAxisType = 0 – detID xAxisType = 1 – polar angle xAxisType = 2 – distance returns detID : experiment Efficiency, GEANT4 efficiency

Here is the call graph for this function:

◆ plotSliceEDep()

vector< double > GenEfficiencyAnalysis::plotSliceEDep ( vector< TH2F * >  a_hists,
int  a_bin,
bool  a_normalize = false 
)

takes output of plotEDepCf252Comparison {sim, exp} and plots time-slices

Here is the call graph for this function:
Here is the caller graph for this function:

◆ plotTOFCf252Comparison()

vector< double > GenEfficiencyAnalysis::plotTOFCf252Comparison ( int  a_detNum,
bool  a_normalize = false 
)

plot sim and exp TOF plots

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prepareCoinTreeData()

void GenEfficiencyAnalysis::prepareCoinTreeData ( bool  a_useADC = false)

make the experimental tof vs light histograms

Here is the call graph for this function:

◆ processSimData()

void GenEfficiencyAnalysis::processSimData ( bool  a_useExpTimeRes = false,
double  a_timeResolution = 1.,
bool  a_useLYResolution = true,
bool  a_resampleLYCalib = false,
double  a_minLight = -1 
)

prepares simulated data into 2D tof vs light histograms for each detector uses EnCut from Config and gCal to compute a Light threshold can do tof-broadening by sample experimental gamma/gamma distributions if no experimental g/g time available, broadens with 1 ns sigma gaussian can include Light yield resolution from Config can use new gain / resolution parameters is covariances present set a_minLight to use different threshold than EnCut in config file

Here is the call graph for this function:

◆ respKDE1DInt()

map< double, double > GenEfficiencyAnalysis::respKDE1DInt ( double  a_mean,
double  a_sig,
double  a_nbins,
double  a_max 
)

does 1D KDE re-sampling for simulation data a_nbins and a_max set the bin width of the data

Here is the caller graph for this function:

◆ setRNGSeed()

void GenEfficiencyAnalysis::setRNGSeed ( int  a_seed)

sets seed for random number generator for light yield resampling constructors set seed to 0 by default

Here is the call graph for this function:

Member Data Documentation

◆ m_respFuncs

map<int, Eigen::MatrixXf> GenEfficiencyAnalysis::m_respFuncs

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