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 setPSDThreshold (double a_PSDThreshold)
 changes the PSD threshold for accumulating sim data 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 ()
 
void processSimData (bool a_useExpTimeRes=false, double a_enThreshold=-1, double a_timeResolution=1., bool a_useLYResolution=true, bool a_resampleLYCalib=false)
 
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 ()
 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)
 returns vector of 2D hists - {sim, experiment} More...
 
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, double a_enThreshold=.2, bool a_drawSim=true, std::pair< double, double > a_singlesEffs={1., 1.})
 
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)

modifies the stored GenesisConfig load in file with detector ID and covariances

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

Here is the caller graph for this function:

◆ generateResampledConfig()

void GenEfficiencyAnalysis::generateResampledConfig ( )
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 - {sim, experiment}

◆ 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,
double  a_enThreshold = .2,
bool  a_drawSim = true,
std::pair< double, double >  a_singlesEffs = {1.,1.} 
)

uses known Cf252 spectrum to calculate neutron eff vs. energy from TOF returns {energy, efficiency, lower energy bin edge, upper bin edge, sigma_eff} a_singlesEff is from plotSinglesComparison -> spectra are normalized to the singles efficiency (or 1.)

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 ( )

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_enThreshold = -1,
double  a_timeResolution = 1.,
bool  a_useLYResolution = true,
bool  a_resampleLYCalib = false 
)

prepares simulated data into 2D tof vs light histograms for each detector uses energy threshold from config by default does tof-broadening by sample experimental gamma/gamma distributions if no experimental g/g time available, broadens with 1 ns sigma gaussian

make the histograms - TOF vs Light

det ID : {maxLight, encut, minlight, dist, gtime}

reform the config file then do the rest

call to some function to change the LY resolution and gain

get calibration infor

for sampling new sim lights

for light broadening

for tof broadening

find if experimental gamma/gamma distribution has been added

get new sim light from resolution

fill hists

get light dependent gamma-gamma time distribution

get new sim time

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:

◆ setPSDThreshold()

void GenEfficiencyAnalysis::setPSDThreshold ( double  a_PSDThreshold)

changes the PSD threshold for accumulating sim data

◆ 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: