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

#include <HPGECalibration.h>

Inheritance diagram for HPGECalibration:
Inheritance graph
[legend]
Collaboration diagram for HPGECalibration:
Collaboration graph
[legend]

Public Member Functions

 HPGECalibration ()
 default constructor More...
 
void loadBasicHists (string a_fname)
 
void findPeaks (double a_minHeight, int a_numPeaks)
 
void doCalibration ()
 
map< int, TH1 * > getHists ()
 
void writeToConfig ()
 writes slope/intercept to configFile More...
 
- Public Member Functions inherited from SpectrumAnalysis
 SpectrumAnalysis ()
 default constructor More...
 
void loadHists (string a_fname, int a_modID, double a_countTime=0)
 
void loadBackgroundHists (string a_fname, int a_modID, double a_countTime)
 loads GEANT4 output processed with GenAnalysis.generateSpectrumVeto() More...
 
void addHists (string a_fname, int a_modID, double a_countTime=0)
 adds spectra to previously loaded spectra More...
 
void addBackgroundHists (string a_fname, int a_modID, double a_countTime)
 
void subtractBackgroundSpectra ()
 subtract background spectra from loaded spectra More...
 
void setResolutionParameters (vector< double > a_params)
 
void fixResolution (bool a_fixRes)
 
void fixMean (bool a_fixMean)
 
void setVerbosity (int a_verbosity)
 
void rebinSpectrum (DetType a_detType, int a_detID, int a_elemID, int a_rebinFactor=2)
 rebins spectra More...
 
vector< PeakInfoFitPeaksMan (DetType a_detType, int a_detID, int a_elemID, double a_lower, double a_higher, vector< double > a_peakMeans, bool a_addBack=false, bool a_bgoVeto=false, bool a_checkPeakRes=true)
 
vector< PeakInfoFitPeaksMan (TH1F *a_hist, double a_lower, double a_higher, vector< double > a_peakMeans, int a_polyDegree=0)
 
vector< PeakInfoFitPeaksManPol1 (DetType a_detType, int a_detID, int a_elemID, double a_lower, double a_higher, vector< double > a_peakMeans, bool a_addBack=false, bool a_bgoVeto=false, bool a_checkPeakRes=true)
 same as FitPeaksMan but fit peaks with 1st degree polynomial background More...
 
void printPeakFits ()
 prints information about fitted peaks (mean, area, resolution, chi2/ndf) More...
 
vector< PeakInfoFitPeaksErf (DetType a_detType, int a_detID, int a_elemID, double a_lower, double a_higher, double a_peakMean, bool a_addBack=false, bool a_bgoVeto=false)
 
vector< PeakInfoFitPeaksErf (TH1F *a_hist, double a_lower, double a_higher, double a_peakMean)
 
vector< PeakInfoFitPeaks6111Double (TH1F *a_hist)
 
EffPeakSet Eu152Efficiency (DetType a_detType, int a_detID, int a_elemID, double a_activity, double a_countTime, double a_simBrTot=.2101, bool a_res=false, bool a_bgoVeto=false, bool a_addBack=false, bool a_draw=false)
 
EffPeakSet Eu152Efficiency (TH1F *a_hist, double a_activity, double a_countTime, double a_simBrTot=.2101, bool a_res=false, bool a_draw=false)
 
EffPeakSet Co56Efficiency (TH1F *a_hist, double a_activity, double a_countTime, double a_simBrTot=.9993999, bool a_res=false, bool a_draw=false)
 
EffPeakSet Ga66Efficiency (TH1F *a_hist, double a_activity, double a_countTime, int multi_peaking=0, double a_simBrTot=.37, bool a_res=false, bool a_draw=false)
 
EffPeakSet Cl35Efficiency (TH1F *a_hist, double a_activity, double a_countTime, bool double_peak=false, double a_simBrTot=1.0, bool a_res=false, bool a_draw=false)
 
EffPeakSet createEffPeakSet (string infilename)
 
vector< double > calcEffCurve (EffPeakSet const &a_ps, string a_fitType) const
 
void calcAddBackFactor ()
 
map< int, TH1 * > getHists ()
 returns m_hists, useful for drawing More...
 
map< int, vector< TH1 * > > getCloverHists ()
 
TH1 * getHist (DetType a_detType, int a_detID, int a_elemID=0, bool a_addBack=false, bool a_bgoVeto=false)
 
map< int, map< double, PeakInfo > > getPeakFits ()
 
vector< double > ChannelResolution (DetType a_detType, int a_detID, int a_elemID=0)
 creates plot of resolution vs energy More...
 
int autoEu152EnergyCalibration (int a_channel, int a_guess=5000)
 
int autoEu152EnergyCalibration (TH1 *a_hist, int a_guess=5000)
 
int autoEu152EnergyCalibration1408Guess (int a_channel, int a_guess)
 
int autoEu152EnergyCalibration1408Guess (TH1 *a_hist, int a_guess)
 
void removePeakFit (DetType a_detType, int a_detID, int a_elemID, double a_energy)
 removes last peak in m_peakFits More...
 
void setUpMinimizer ()
 
double fitPeakConstrained (const double *a_params)
 
std::vector< double > fitSTOFBandProjection (TH1F *a_histogram, double a_minLight, double a_maxLight, vector< double > a_peakCentroid, int a_polOrder)
 
 SpectrumAnalysis ()
 default constructor More...
 
void loadHists (string a_fname, int a_modID, double a_countTime=0)
 
void loadSimHists (string a_fname)
 loads GEANT4 output processed with GenAnalysis.generateSpectrumVeto() More...
 
void loadBackgroundHists (string a_fname, int a_modID, double a_countTime)
 loads a spectrum for background subtraction More...
 
void addHists (string a_fname, int a_modID, double a_countTime=0)
 adds spectra to previously loaded spectra More...
 
void addBackgroundHists (string a_fname, int a_modID, double a_countTime)
 
void subtractBackgroundSpectra ()
 subtract background spectra from loaded spectra More...
 
void rebinSpectrum (int a_channel, int a_rebinFactor=2, bool a_fullClover=false)
 rebins spectra More...
 
vector< PeakFitPeaksMan (int a_channel, double a_lower, double a_higher, vector< double > a_peakMeans, bool a_fullClover=false, bool a_addBack=false, bool a_checkPeakRes=true)
 
vector< PeakFitPeaksManPol1 (int a_channel, int a_lower, int a_higher, vector< double > a_peakMeans, bool a_checkPeakRes=true, bool a_fullClover=false, bool a_addBack=false)
 same as aboe but fit peaks with 1st degree polynomial background More...
 
void printPeakFits ()
 prints information about fitted peaks (mean, area, resolution, chi2/ndf) More...
 
vector< PeakFitPeaksErf (int a_channel, double a_lower, double a_higher, int a_numPeaks=1, bool a_fullClover=false, bool a_addBack=false)
 
map< double, std::pair< double, double > > Eu152Efficiency (int a_channel, double a_activity, double a_countTime, double a_simBrTot=.2101, bool a_res=false, bool a_fullClover=false, bool a_addBack=false, bool a_draw=false)
 
void calcAddBackFactor ()
 
map< double, std::pair< double, double > > U235Efficiency (int a_channel, double a_activity, double a_activityErr, double a_countTime)
 
map< int, TH1 * > getHists ()
 returns m_hists, useful for drawing More...
 
map< int, vector< TH1 * > > getCloverHists ()
 
map< int, vector< Peak > > getPeakFits ()
 
void ChannelResolution (int a_channel)
 creates plot of resolution vs energy More...
 
int autoEu152EnergyCalibration (int a_channel)
 
void removeLastPeak (int a_channel)
 removes last peak in m_peakFits More...
 
double fitPeakConstrained (const double *a_params)
 

Public Attributes

map< string, vector< vector< double > > > m_zeroCrossings
 
- Public Attributes inherited from SpectrumAnalysis
map< DetType, map< int, map< int, TH1 * > > > m_histsD
 

Additional Inherited Members

- Public Types inherited from SpectrumAnalysis
using EffPeakSet = std::map< double, std::pair< double, double > >
 Container type for efficiency outputs. More...
 
- Static Public Member Functions inherited from SpectrumAnalysis
static Double_t totalFit (Double_t *x, Double_t *par)
 https://doi.org/10.1016/S0168-9002(98)00778-5 More...
 
static Double_t fullGeFit (Double_t *x, Double_t *par)
 

Constructor & Destructor Documentation

◆ HPGECalibration()

HPGECalibration::HPGECalibration ( )

default constructor

Member Function Documentation

◆ doCalibration()

void HPGECalibration::doCalibration ( )

fits line to m_peakFits per channel adds slope,intercept to m_calibration

◆ findPeaks()

void HPGECalibration::findPeaks ( double  a_minHeight,
int  a_numPeaks 
)

fits gaussians to peak(s), adds (ADC#, Gamma Energy, chi2/ndf) to m_peakFits

◆ getHists()

map< int, TH1 * > HPGECalibration::getHists ( )

◆ loadBasicHists()

void HPGECalibration::loadBasicHists ( string  a_fname)

loads histograms from file containing histograms channels it loads currently hard-coded --> will change to look at ConfigFile

◆ writeToConfig()

void HPGECalibration::writeToConfig ( )

writes slope/intercept to configFile

Member Data Documentation

◆ m_zeroCrossings

map<string, vector<vector<double> > > HPGECalibration::m_zeroCrossings

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