 |
ATLAS Offline Software
|
#include <ZDCPulseAnalyzer.h>
|
| enum | {
PulseBit = 0,
LowGainBit = 1,
FailBit = 2,
HGOverflowBit = 3,
HGUnderflowBit = 4,
PSHGOverUnderflowBit = 5,
LGOverflowBit = 6,
LGUnderflowBit = 7,
PrePulseBit = 8,
PostPulseBit = 9,
FitFailedBit = 10,
BadChisqBit = 11,
BadT0Bit = 12,
ExcludeEarlyLGBit = 13,
ExcludeLateLGBit = 14,
preExpTailBit = 15,
FitMinAmpBit = 16,
RepassPulseBit = 17,
ArmSumIncludeBit = 18,
FailSigCutBit = 19,
N_STATUS_BITS
} |
| |
| enum | LowGainMode { LGModeNormal = 0,
LGModeForceLG,
LGModeRefitLG
} |
| |
| enum | TimingCorrMode { NoTimingCorr = 0,
TimingCorrLin,
TimingCorrLog
} |
| |
| using | JSON = ZDCJSONConfig::JSON |
| |
|
| | ZDCPulseAnalyzer (ZDCMsg::MessageFunctionPtr msgFunc_p, const std::string &tag, int Nsample, float deltaTSample, size_t preSampleIdx, int pedestal, const std::string &fitFunction, int peak2ndDerivMinSample, float peak2DerivMinThreshHG, float peak2DerivMinThreshLG) |
| |
| | ZDCPulseAnalyzer (ZDCMsg::MessageFunctionPtr msgFunc_p, const JSON &configJSON) |
| |
| | ~ZDCPulseAnalyzer () |
| |
| void | setFitOPtions (const std::string &fitOptions) |
| |
| void | saveFitFunc () |
| |
| bool | quietFits () const |
| |
| void | setQuietFits () |
| |
| void | setUnquietFits () |
| |
| void | enableDelayed (float deltaT, float pedestalShift, bool fixedBaseline=false) |
| |
| void | enableRepass (float peak2ndDerivMinRepassHG, float peak2ndDerivMinRepassLG) |
| |
| void | enableTimeSigCut (bool AND, float sigCut, const std::string &TF1String, const std::vector< double > &parsHG, const std::vector< double > &parsLG) |
| |
| void | enablePreExclusion (unsigned int maxSamplesExcl, unsigned int HGADCThresh, unsigned int LGADCThresh) |
| |
| void | enablePostExclusion (unsigned int maxSamplesExcl, unsigned int HGADCThresh, unsigned int LGADCThresh) |
| |
| void | SetPeak2ndDerivMinTolerance (size_t tolerance) |
| |
| void | setLGMode (unsigned int mode) |
| |
| unsigned int | getLGMode () const |
| |
| void | set2ndDerivStep (size_t step) |
| |
| void | SetCutValues (float chisqDivAmpCutHG, float chisqDivAmpCutLG, float deltaT0MinHG, float deltaT0MaxHG, float deltaT0MinLG, float deltaT0MaxLG) |
| |
| void | SetNoiseSigmas (float noiseSigHG, float noiseSigLG) |
| |
| void | SetGainFactorsHGLG (float gainFactorHG, float gainFactorLG) |
| |
| void | SetFitMinMaxAmp (float minAmpHG, float minAmpLG, float maxAmpHG, float maxAmpLG) |
| |
| void | setMinimumSignificance (float sigMinHG, float sigMinLG) |
| |
| void | SetTauT0Values (bool fixTau1, bool fixTau2, float tau1, float tau2, float t0HG, float t0LG) |
| |
| void | SetADCOverUnderflowValues (int HGOverflowADC, int HGUnderflowADC, int LGOverflowADC) |
| |
| void | SetTimingCorrParams (TimingCorrMode mode, float refADC, float refScale, const std::vector< float > &HGT0CorrParams, const std::vector< float > &LGT0CorrParams) |
| |
| void | SetFitTimeMax (float tmax) |
| |
| void | SetNonlinCorrParams (float refADC, float refScale, const std::vector< float > ¶msHG, const std::vector< float > ¶msLG) |
| |
| void | enableFADCCorrections (bool correctPerSample, std::unique_ptr< const TH1 > &correHistHG, std::unique_ptr< const TH1 > &correHistLG) |
| |
| void | disableFADCCorrections () |
| |
| bool | LoadAndAnalyzeData (const std::vector< float > &ADCSamplesHG, const std::vector< float > &ADCSamplesLG) |
| |
| bool | LoadAndAnalyzeData (const std::vector< float > &ADCSamplesHG, const std::vector< float > &ADCSamplesLG, const std::vector< float > &ADCSamplesHGDelayed, const std::vector< float > &ADCSamplesLGDelayed) |
| |
| bool | ReanalyzeData () |
| |
| bool | HaveData () const |
| |
| bool | havePulse () const |
| |
| bool | useLowGain () const |
| |
| bool | failed () const |
| |
| bool | HGOverflow () const |
| |
| bool | HGUnderflow () const |
| |
| bool | PSHGOverUnderflow () const |
| |
| bool | LGOverflow () const |
| |
| bool | LGUnderflow () const |
| |
| bool | prePulse () const |
| |
| bool | postPulse () const |
| |
| bool | fitFailed () const |
| |
| bool | badChisq () const |
| |
| bool | badT0 () const |
| |
| bool | excludeEarlyLG () const |
| |
| bool | excludeLateLG () const |
| |
| bool | preExpTail () const |
| |
| bool | fitMinimumAmplitude () const |
| |
| bool | repassPulse () const |
| |
| bool | armSumInclude () const |
| |
| bool | failSigCut () const |
| |
| float | GetFitAmplitude () const |
| |
| float | GetFitT0 () const |
| |
| float | GetT0Sub () const |
| |
| float | GetT0Corr () const |
| |
| float | getTimeSig () const |
| |
| float | GetChisq () const |
| |
| float | GetFitTau1 () const |
| |
| float | GetFitTau2 () const |
| |
| float | GetFitPreT0 () const |
| |
| float | GetFitPreAmp () const |
| |
| float | GetFitPostT0 () const |
| |
| float | GetFitPostAmp () const |
| |
| float | GetFitExpAmp () const |
| |
| float | GetAmpNoNonLin () const |
| |
| float | GetAmplitude () const |
| |
| float | GetAmpError () const |
| |
| float | GetPreExpAmp () const |
| |
| float | getRefitLGAmp () const |
| |
| float | getRefitLGFitAmp () const |
| |
| float | getRefitLGAmpCorr () const |
| |
| float | getRefitLGChisq () const |
| |
| float | getRefitLGTime () const |
| |
| float | getRefitLGTimeSub () const |
| |
| float | getPresample () const |
| |
| float | getMaxADCHG () const |
| |
| float | getMaxADCLG () const |
| |
| float | getMinADCHG () const |
| |
| float | getMinADCLG () const |
| |
| float | getMaxADCSub () const |
| |
| float | getMinADCSub () const |
| |
| int | getMaxADCSampleHG () const |
| |
| int | getMinADCSampleHG () const |
| |
| int | getMaxADCSampleLG () const |
| |
| int | getMinADCSampleLG () const |
| |
| float | getADCPeakHG () const |
| |
| float | getADCPeakLG () const |
| |
| float | GetMaxDelta () const |
| |
| float | GetMinDelta () const |
| |
| float | GetFitTMax () const |
| |
| float | GetFitTMin () const |
| |
| float | GetdelayBS () const |
| |
| float | GetMinDeriv2nd () const |
| |
| float | GetMinDeriv2ndIndex () const |
| |
| unsigned int | GetStatusMask () const |
| |
| float | GetPreSampleAmp () const |
| |
| float | GetBkgdMaxFraction () const |
| |
| float | GetDelayedBaselineShiftFit () const |
| |
| float | GetDelayedBaselineCorr () const |
| |
| const TH1 * | GetHistogramPtr (bool refitLG=false) |
| |
| std::shared_ptr< TGraphErrors > | GetCombinedGraph (bool forceLG=false) |
| |
| std::shared_ptr< TGraphErrors > | GetGraph (bool forceLG=false) |
| |
| std::vector< float > | GetFitPulls (bool forceLG=false) const |
| |
| void | dump () const |
| |
| void | dumpConfiguration () const |
| |
| void | dumpTF1 (const TF1 *) const |
| |
| const std::vector< float > & | GetSamplesSub () const |
| |
| const std::vector< float > & | GetSamplesDeriv2nd () const |
| |
|
| typedef std::vector< float >::const_iterator | SampleCIter |
| |
|
| void | Reset (bool reanalyze=false) |
| |
| void | SetDefaults () |
| |
| std::pair< bool, std::string > | ValidateJSONConfig (const JSON &config) |
| |
| std::pair< bool, std::string > | ConfigFromJSON (const JSON &config) |
| |
| void | SetupFitFunctions () |
| |
| bool | DoAnalysis (bool repass) |
| |
| bool | ScanAndSubtractSamples () |
| |
| bool | AnalyzeData (size_t nSamples, size_t preSample, const std::vector< float > &samples, const std::vector< bool > &useSamples, float peak2ndDerivMinThresh, float noiseSig, const std::vector< float > &toCorrParams, float maxChisqDivAmp, float minT0Corr, float maxT0Corr) |
| |
| double | getAmplitudeCorrection (bool highGain) |
| |
| void | prepareLGRefit (const std::vector< float > &samplesLG, const std::vector< float > &samplesSig, const std::vector< bool > &useSamples) |
| |
| void | FillHistogram (bool refitLG) |
| |
| void | checkTF1Limits (TF1 *func) |
| |
| void | DoFit (bool refitLG=false) |
| |
| void | DoFitCombined (bool refitLG=false) |
| |
| void | UpdateFitterTimeLimits (TFitter *fitter, ZDCFitWrapper *wrapper, bool prePulse) |
| |
Definition at line 23 of file ZDCPulseAnalyzer.h.
◆ JSON
◆ SampleCIter
◆ anonymous enum
| Enumerator |
|---|
| PulseBit | |
| LowGainBit | |
| FailBit | |
| HGOverflowBit | |
| HGUnderflowBit | |
| PSHGOverUnderflowBit | |
| LGOverflowBit | |
| LGUnderflowBit | |
| PrePulseBit | |
| PostPulseBit | |
| FitFailedBit | |
| BadChisqBit | |
| BadT0Bit | |
| ExcludeEarlyLGBit | |
| ExcludeLateLGBit | |
| preExpTailBit | |
| FitMinAmpBit | |
| RepassPulseBit | |
| ArmSumIncludeBit | |
| FailSigCutBit | |
| N_STATUS_BITS | |
Definition at line 28 of file ZDCPulseAnalyzer.h.
◆ LowGainMode
| Enumerator |
|---|
| LGModeNormal | |
| LGModeForceLG | |
| LGModeRefitLG | |
Definition at line 55 of file ZDCPulseAnalyzer.h.
◆ TimingCorrMode
| Enumerator |
|---|
| NoTimingCorr | |
| TimingCorrLin | |
| TimingCorrLog | |
Definition at line 61 of file ZDCPulseAnalyzer.h.
◆ ZDCPulseAnalyzer() [1/2]
| ZDCPulseAnalyzer::ZDCPulseAnalyzer |
( |
ZDCMsg::MessageFunctionPtr |
msgFunc_p, |
|
|
const std::string & |
tag, |
|
|
int |
Nsample, |
|
|
float |
deltaTSample, |
|
|
size_t |
preSampleIdx, |
|
|
int |
pedestal, |
|
|
const std::string & |
fitFunction, |
|
|
int |
peak2ndDerivMinSample, |
|
|
float |
peak2DerivMinThreshHG, |
|
|
float |
peak2DerivMinThreshLG |
|
) |
| |
◆ ZDCPulseAnalyzer() [2/2]
Definition at line 172 of file ZDCPulseAnalyzer.cxx.
181 (*m_msgFunc_p)(
ZDCMsg::Debug,
"ConfigFromJSON produced result: "+ resultString2);
193 std::string histNameLGRefit =
"ZDCFitHist" +
m_tag +
"_LGRefit";
◆ ~ZDCPulseAnalyzer()
| ZDCPulseAnalyzer::~ZDCPulseAnalyzer |
( |
| ) |
|
|
inline |
◆ AnalyzeData()
| bool ZDCPulseAnalyzer::AnalyzeData |
( |
size_t |
nSamples, |
|
|
size_t |
preSample, |
|
|
const std::vector< float > & |
samples, |
|
|
const std::vector< bool > & |
useSamples, |
|
|
float |
peak2ndDerivMinThresh, |
|
|
float |
noiseSig, |
|
|
const std::vector< float > & |
toCorrParams, |
|
|
float |
maxChisqDivAmp, |
|
|
float |
minT0Corr, |
|
|
float |
maxT0Corr |
|
) |
| |
|
private |
Definition at line 1123 of file ZDCPulseAnalyzer.cxx.
1143 bool haveFirst =
false;
1144 unsigned int lastUsed = 0;
1204 std::ostringstream baselineMsg;
1205 baselineMsg <<
"Delayed samples baseline correction = " <<
m_baselineCorr << std::endl;
1211 for (
size_t isample = 0; isample <
nSamples; isample++) {
1222 std::for_each(
m_samplesSub.begin(),
m_samplesSub.end(), [ = ] (
float & adcUnsub) {return adcUnsub -= m_preSample;} );
1295 if (derivPresampleSig < -5) {
1301 if (!useSample[isample])
continue;
1303 float sampleSig = -
m_samplesSub[isample]/(std::sqrt(2.0)*noiseSig);
1319 float maxPrepulseSig = 0;
1320 unsigned int maxPrepulseSample = 0;
1322 for (
int isample = loopStart; isample <= loopLimit; isample++) {
1323 if (!useSample[isample])
continue;
1339 if (prePulseSig > maxPrepulseSig) {
1340 maxPrepulseSig = prePulseSig;
1341 maxPrepulseSample = isample;
1376 for (
int isample = postStartIdx; isample < (
int)
nSamples - 1; isample++) {
1377 if (!useSample.at(isample))
continue;
1408 float derivSig = deriv/(std::sqrt(2)*noiseSig);
1417 if (std::abs(deriv2ndTest) > 0.15) {
1430 if (deriv2ndSig > 5 && deriv2ndTest < -0.1) {
1441 std::ostringstream ostrm;
1442 ostrm <<
"Post pulse found, m_maxSampleEvt = " <<
m_maxSampleEvt;
1460 std::ostringstream ostrm;
1479 for (
unsigned int ipow = 0; ipow < t0CorrParams.size(); ipow++) {
1488 bool failFixedCut = m_fitTimeCorr < minT0Corr || m_fitTimeCorr > maxT0Corr;
1498 double timeResolution = 0;
1510 if (failFixedCut)
m_badT0 =
true;
◆ armSumInclude()
| bool ZDCPulseAnalyzer::armSumInclude |
( |
| ) |
const |
|
inline |
◆ badChisq()
| bool ZDCPulseAnalyzer::badChisq |
( |
| ) |
const |
|
inline |
◆ badT0()
| bool ZDCPulseAnalyzer::badT0 |
( |
| ) |
const |
|
inline |
◆ Calculate2ndDerivative()
| std::vector< float > ZDCPulseAnalyzer::Calculate2ndDerivative |
( |
const std::vector< float > & |
inputData, |
|
|
unsigned int |
step |
|
) |
| |
|
staticprivate |
◆ CalculateDerivative()
| std::vector< float > ZDCPulseAnalyzer::CalculateDerivative |
( |
const std::vector< float > & |
inputData, |
|
|
unsigned int |
step |
|
) |
| |
|
staticprivate |
◆ checkTF1Limits()
| void ZDCPulseAnalyzer::checkTF1Limits |
( |
TF1 * |
func | ) |
|
|
private |
Definition at line 2000 of file ZDCPulseAnalyzer.cxx.
2002 for (
int ipar = 0; ipar < func->GetNpar(); ipar++) {
2003 double parLimitLow, parLimitHigh;
2005 func->GetParLimits(ipar, parLimitLow, parLimitHigh);
2008 "ZDCPulseAnalyzer name=" + std::string(func->GetName())
2016 if (std::abs(parLimitHigh - parLimitLow) > (1
e-6)*std::abs(parLimitLow)) {
2017 double value = func->GetParameter(ipar);
2018 if (
value >= parLimitHigh) {
2019 value = parLimitHigh * 0.9;
2021 else if (
value <= parLimitLow) {
2022 value = parLimitLow + 0.1*std::abs(parLimitLow);
2024 func->SetParameter(ipar,
value);
◆ CombinedPulsesFCN()
| void ZDCPulseAnalyzer::CombinedPulsesFCN |
( |
int & |
numParam, |
|
|
double * |
, |
|
|
double & |
f, |
|
|
double * |
par, |
|
|
int |
flag |
|
) |
| |
|
staticprivate |
Definition at line 84 of file ZDCPulseAnalyzer.cxx.
97 float delayBaselineAdjust =
par[0];
101 for (
int isample = 0; isample <
nSamples; isample++) {
111 double pull = (histValue - funcVal) / histError;
119 for (
int isample = 0; isample <
nSamples; isample++) {
128 double pull = (histValue - funcVal) / histError;
◆ ConfigFromJSON()
| std::pair< bool, std::string > ZDCPulseAnalyzer::ConfigFromJSON |
( |
const JSON & |
config | ) |
|
|
private |
Definition at line 2459 of file ZDCPulseAnalyzer.cxx.
2462 std::string resultString =
"success";
2491 else if (
key ==
"T0CutsHG") {
2495 else if (
key ==
"T0CutsLG") {
2508 else if (
key ==
"fitAmpMinMaxHG") {
2512 else if (
key ==
"fitAmpMinMaxLG") {
2516 else if (
key ==
"quietFits") {
2519 else if (
key ==
"enablePreExclusion") {
2525 else if (
key ==
"enablePostExclusion") {
2531 else if (
key ==
"ampMinSignifHGLG") {
2536 else if (
key ==
"enableFADCCorrections") {
2537 auto fileNameJson =
value[
"filename"];
2538 auto doPerSampleCorrJson =
value[
"doPerSampleCorr"];
2540 if (fileNameJson.is_null() || doPerSampleCorrJson.is_null()) {
2542 std::string resultString =
"failure processing enableFADCCorrections object";
2552 std::string resultString =
"unprocessed parameter";
2557 return {
result, resultString};
◆ disableFADCCorrections()
| void ZDCPulseAnalyzer::disableFADCCorrections |
( |
| ) |
|
|
inline |
◆ DoAnalysis()
| bool ZDCPulseAnalyzer::DoAnalysis |
( |
bool |
repass | ) |
|
|
private |
◆ DoFit()
| void ZDCPulseAnalyzer::DoFit |
( |
bool |
refitLG = false | ) |
|
|
private |
Definition at line 1552 of file ZDCPulseAnalyzer.cxx.
1556 TH1* hist_p =
nullptr;
1561 float ampInitial, fitAmpMin, fitAmpMax, t0Initial;
1582 if (ampInitial < fitAmpMin) ampInitial = fitAmpMin * 1.5;
1604 fitWrapper->
Initialize(ampInitial, t0Initial, fitAmpMin, fitAmpMax);
1623 int fitStatus = result_ptr;
1629 if (fitStatus != 0 && result_ptr->Edm() > 0.001)
1639 if ((
int) constrFitResult_ptr != 0) {
1649 if ((
int) unconstrFitResult_ptr != 0) {
1656 if ((
int) constrFit2Result_ptr != 0) {
1663 result_ptr = constrFit2Result_ptr;
1667 result_ptr = unconstrFitResult_ptr;
1673 hist_p->GetListOfFunctions()->Clear();
1676 std::string
name = func->GetName();
1678 TF1* copyFunc =
static_cast<TF1*
>(func->Clone((
name +
"_copy").c_str()));
1679 hist_p->GetListOfFunctions()->Add(copyFunc);
◆ DoFitCombined()
| void ZDCPulseAnalyzer::DoFitCombined |
( |
bool |
refitLG = false | ) |
|
|
private |
Definition at line 1726 of file ZDCPulseAnalyzer.cxx.
1729 TH1* hist_p =
nullptr, *delayedHist_p =
nullptr;
1741 float fitAmpMin, fitAmpMax, t0Initial, ampInitial;
1757 if (ampInitial < fitAmpMin) ampInitial = fitAmpMin * 1.5;
1783 fitWrapper->
Initialize(ampInitial, t0Initial, fitAmpMin, fitAmpMax);
1788 TFitter* theFitter =
nullptr;
1812 size_t numFitPar = theFitter->GetNumberTotalParameters();
1814 theFitter->GetMinuit()->fISW[4] = -1;
1819 theFitter->GetMinuit()->fISW[4] = -1;
1822 theFitter->GetMinuit()->mnexcm(
"SET NOWarnings",
nullptr,0,ierr);
1824 else theFitter->GetMinuit()->fISW[4] = 0;
1829 theFitter->SetParameter(0,
"delayBaselineAdjust", 0, 0.01, -100, 100);
1830 theFitter->ReleaseParameter(0);
1833 theFitter->SetParameter(0,
"delayBaselineAdjust", 0, 0.01, -100, 100);
1834 theFitter->FixParameter(0);
1838 double arglist[100];
1841 int status = theFitter->ExecuteCommand(
"MIGRAD", arglist, 2);
1843 double fitAmp = theFitter->GetParameter(1);
1847 double chi2, edm, errdef;
1850 theFitter->GetStats(
chi2, edm, errdef, nvpar, nparx);
1855 if (
status || fitAmp < fitAmpMin * 1.01 || edm > 0.01){
1860 theFitter->SetParameter(0,
"delayBaselineAdjust", 0, 0.01, -100, 100);
1861 theFitter->FixParameter(0);
1865 if (fitAmp < fitAmpMin * 1.01) {
1871 fitWrapper->
Initialize(ampInitial, t0Initial, fitAmpMin, fitAmpMax);
1875 status = theFitter->ExecuteCommand(
"MIGRAD", arglist, 2);
1880 theFitter->ReleaseParameter(0);
1888 theFitter->ReleaseParameter(0);
1889 status = theFitter->ExecuteCommand(
"MIGRAD", arglist, 2);
1894 theFitter->SetParameter(0,
"delayBaselineAdjust", 0, 0.01, -100, 100);
1895 theFitter->FixParameter(0);
1896 status = theFitter->ExecuteCommand(
"MIGRAD", arglist, 2);
1904 fitAmp = theFitter->GetParameter(1);
1908 if (fitAmp < fitAmpMin * 1.01) {
1919 if (!
m_quietFits) theFitter->GetMinuit()->fISW[4] = -1;
1921 std::vector<double> funcParams(numFitPar - 1);
1922 std::vector<double> funcParamErrs(numFitPar - 1);
1930 for (
size_t ipar = 1; ipar < numFitPar; ipar++) {
1931 funcParams[ipar - 1] = theFitter->GetParameter(ipar);
1932 funcParamErrs[ipar - 1] = theFitter->GetParError(ipar);
1940 theFitter->GetStats(
chi2, edm, errdef, nvpar, nparx);
1960 theFitter->ExecuteCommand(
"Cal1fcn", arglist, 1);
◆ dump()
| void ZDCPulseAnalyzer::dump |
( |
| ) |
const |
Definition at line 2084 of file ZDCPulseAnalyzer.cxx.
2095 std::ostringstream message1;
2096 message1 <<
"samplesSub ";
2102 std::ostringstream message3;
2103 message3 <<
"samplesDeriv2nd ";
◆ dumpConfiguration()
| void ZDCPulseAnalyzer::dumpConfiguration |
( |
| ) |
const |
Definition at line 2131 of file ZDCPulseAnalyzer.cxx.
2133 std::ostringstream ostrStream;
2135 (*m_msgFunc_p)(
ZDCMsg::Info, (
"ZDCPulserAnalyzer:: settings for instance: " +
m_tag));
2137 ostrStream <<
"Nsample = " <<
m_Nsample <<
" at frequency " <<
m_freqMHz <<
" MHz, preSample index = "
2140 (*m_msgFunc_p)(
ZDCMsg::Info, ostrStream.str()); ostrStream.str(
""); ostrStream.clear();
2143 (*m_msgFunc_p)(
ZDCMsg::Info, ostrStream.str()); ostrStream.str(
""); ostrStream.clear();
2148 (*m_msgFunc_p)(
ZDCMsg::Info, ostrStream.str()); ostrStream.str(
""); ostrStream.clear();
2151 ostrStream <<
"using delayed samples with delta T = " <<
m_delayedDeltaT <<
", and default pedestalDiff == "
2153 (*m_msgFunc_p)(
ZDCMsg::Info, ostrStream.str()); ostrStream.str(
""); ostrStream.clear();
2159 (*m_msgFunc_p)(
ZDCMsg::Info, ostrStream.str()); ostrStream.str(
""); ostrStream.clear();
2163 (*m_msgFunc_p)(
ZDCMsg::Info, ostrStream.str()); ostrStream.str(
""); ostrStream.clear();
2168 (*m_msgFunc_p)(
ZDCMsg::Info, ostrStream.str()); ostrStream.str(
""); ostrStream.clear();
2172 (*m_msgFunc_p)(
ZDCMsg::Info, ostrStream.str()); ostrStream.str(
""); ostrStream.clear();
2176 ostrStream <<
"Pre-exclusion enabled for up to " <<
m_maxSamplesPreExcl <<
", samples with ADC threshold HG = "
2178 (*m_msgFunc_p)(
ZDCMsg::Info, ostrStream.str()); ostrStream.str(
""); ostrStream.clear();
2181 ostrStream <<
"Post-exclusion enabled for up to " <<
m_maxSamplesPostExcl <<
", samples with ADC threshold HG = "
2183 (*m_msgFunc_p)(
ZDCMsg::Info, ostrStream.str()); ostrStream.str(
""); ostrStream.clear();
◆ dumpTF1()
| void ZDCPulseAnalyzer::dumpTF1 |
( |
const TF1 * |
func | ) |
const |
Definition at line 2112 of file ZDCPulseAnalyzer.cxx.
2114 std::string
message =
"Dump of TF1: " + std::string(func->GetName());
2116 if (!continueDump)
return;
2118 unsigned int npar = func->GetNpar();
2119 for (
unsigned int ipar = 0; ipar < npar; ipar++) {
2120 std::ostringstream msgstr;
2122 double parMin = 0, parMax = 0;
2123 func->GetParLimits(ipar, parMin, parMax);
2125 msgstr <<
"Parameter " << ipar <<
", value = " << func->GetParameter(ipar) <<
", error = "
2126 << func->GetParError(ipar) <<
", min = " << parMin <<
", max = " << parMax;
◆ enableDelayed()
| void ZDCPulseAnalyzer::enableDelayed |
( |
float |
deltaT, |
|
|
float |
pedestalShift, |
|
|
bool |
fixedBaseline = false |
|
) |
| |
◆ enableFADCCorrections()
| void ZDCPulseAnalyzer::enableFADCCorrections |
( |
bool |
correctPerSample, |
|
|
std::unique_ptr< const TH1 > & |
correHistHG, |
|
|
std::unique_ptr< const TH1 > & |
correHistLG |
|
) |
| |
Definition at line 540 of file ZDCPulseAnalyzer.cxx.
547 auto getXmin=[](
const TH1 * pH){
548 return pH->GetXaxis()->GetXmin();
550 auto getXmax=[](
const TH1 * pH){
551 return pH->GetXaxis()->GetXmax();
553 auto xmin= getXmin(correHistHG.get());
554 auto xmax= getXmax(correHistHG.get());
555 if (std::abs(
xmin+0.5) > 1
e-3 || std::abs(
xmax - 4095.5) > 1
e-3) {
556 (*m_msgFunc_p)(
ZDCMsg::Error,
"ZDCPulseAnalyzer::enableFADCCorrections:: invalid high gain correction histogram range: xmin, xmax = " +
562 xmin= getXmin(correHistLG.get());
563 xmax= getXmax(correHistLG.get());
564 if (std::abs(
xmin+0.5) > 1
e-3 ||
565 std::abs(
xmax - 4095.5) > 1
e-3) {
566 (*m_msgFunc_p)(
ZDCMsg::Error,
"ZDCPulseAnalyzer::enableFADCCorrections:: invalid low gain correction histogram range: xmin, xmax = " +
◆ enablePostExclusion()
| void ZDCPulseAnalyzer::enablePostExclusion |
( |
unsigned int |
maxSamplesExcl, |
|
|
unsigned int |
HGADCThresh, |
|
|
unsigned int |
LGADCThresh |
|
) |
| |
|
inline |
◆ enablePreExclusion()
| void ZDCPulseAnalyzer::enablePreExclusion |
( |
unsigned int |
maxSamplesExcl, |
|
|
unsigned int |
HGADCThresh, |
|
|
unsigned int |
LGADCThresh |
|
) |
| |
|
inline |
◆ enableRepass()
| void ZDCPulseAnalyzer::enableRepass |
( |
float |
peak2ndDerivMinRepassHG, |
|
|
float |
peak2ndDerivMinRepassLG |
|
) |
| |
◆ enableTimeSigCut()
| void ZDCPulseAnalyzer::enableTimeSigCut |
( |
bool |
AND, |
|
|
float |
sigCut, |
|
|
const std::string & |
TF1String, |
|
|
const std::vector< double > & |
parsHG, |
|
|
const std::vector< double > & |
parsLG |
|
) |
| |
Definition at line 511 of file ZDCPulseAnalyzer.cxx.
520 std::string timeResHGName =
"TimeResFuncHG_" +
m_tag;
521 std::string timeResLGName =
"TimeResFuncLG_" +
m_tag;
523 TF1* funcHG_p =
new TF1(timeResHGName.c_str(), TF1String.c_str(), 0,
m_HGOverflowADC);
524 TF1* funcLG_p =
new TF1(timeResLGName.c_str(), TF1String.c_str(), 0,
m_LGOverflowADC);
526 if (parsHG.size() !=
static_cast<unsigned int>(funcHG_p->GetNpar()) ||
527 parsLG.size() !=
static_cast<unsigned int>(funcLG_p->GetNpar())) {
532 funcHG_p->SetParameters(&parsHG[0]);
533 funcLG_p->SetParameters(&parsLG[0]);
◆ excludeEarlyLG()
| bool ZDCPulseAnalyzer::excludeEarlyLG |
( |
| ) |
const |
|
inline |
◆ excludeLateLG()
| bool ZDCPulseAnalyzer::excludeLateLG |
( |
| ) |
const |
|
inline |
◆ failed()
| bool ZDCPulseAnalyzer::failed |
( |
| ) |
const |
|
inline |
◆ failSigCut()
| bool ZDCPulseAnalyzer::failSigCut |
( |
| ) |
const |
|
inline |
◆ FillHistogram()
| void ZDCPulseAnalyzer::FillHistogram |
( |
bool |
refitLG | ) |
|
|
inlineprivate |
◆ fitFailed()
| bool ZDCPulseAnalyzer::fitFailed |
( |
| ) |
const |
|
inline |
◆ fitMinimumAmplitude()
| bool ZDCPulseAnalyzer::fitMinimumAmplitude |
( |
| ) |
const |
|
inline |
◆ getADCPeakHG()
| float ZDCPulseAnalyzer::getADCPeakHG |
( |
| ) |
const |
|
inline |
◆ getADCPeakLG()
| float ZDCPulseAnalyzer::getADCPeakLG |
( |
| ) |
const |
|
inline |
◆ GetAmpError()
| float ZDCPulseAnalyzer::GetAmpError |
( |
| ) |
const |
|
inline |
◆ GetAmplitude()
| float ZDCPulseAnalyzer::GetAmplitude |
( |
| ) |
const |
|
inline |
◆ getAmplitudeCorrection()
| double ZDCPulseAnalyzer::getAmplitudeCorrection |
( |
bool |
highGain | ) |
|
|
private |
Definition at line 611 of file ZDCPulseAnalyzer.cxx.
613 double amplCorrFactor = 1;
619 amplCorrFactor *= fadcCorr;
631 float invNLCorr = 1.0;
645 amplCorrFactor /= invNLCorr;
648 return amplCorrFactor;
◆ GetAmpNoNonLin()
| float ZDCPulseAnalyzer::GetAmpNoNonLin |
( |
| ) |
const |
|
inline |
◆ GetBkgdMaxFraction()
| float ZDCPulseAnalyzer::GetBkgdMaxFraction |
( |
| ) |
const |
|
inline |
◆ GetChisq()
| float ZDCPulseAnalyzer::GetChisq |
( |
| ) |
const |
|
inline |
◆ GetCombinedGraph()
| std::shared_ptr< TGraphErrors > ZDCPulseAnalyzer::GetCombinedGraph |
( |
bool |
forceLG = false | ) |
|
Definition at line 2219 of file ZDCPulseAnalyzer.cxx.
2226 TH1* hist_p =
nullptr, *delayedHist_p =
nullptr;
2236 std::shared_ptr<TGraphErrors> theGraph = std::make_shared<TGraphErrors>(TGraphErrors(2 *
m_Nsample));
2239 for (
int ipt = 0; ipt < hist_p->GetNbinsX(); ipt++) {
2240 theGraph->SetPoint(npts, hist_p->GetBinCenter(ipt + 1), hist_p->GetBinContent(ipt + 1));
2241 theGraph->SetPointError(npts++, 0, hist_p->GetBinError(ipt + 1));
2244 for (
int iDelayPt = 0; iDelayPt < delayedHist_p->GetNbinsX(); iDelayPt++) {
2245 theGraph->SetPoint(npts, delayedHist_p->GetBinCenter(iDelayPt + 1), delayedHist_p->GetBinContent(iDelayPt + 1) -
m_delayedBaselineShift);
2246 theGraph->SetPointError(npts++, 0, delayedHist_p->GetBinError(iDelayPt + 1));
2249 TF1* func_p =
static_cast<TF1*
>(hist_p->GetListOfFunctions()->Last());
2251 theGraph->GetListOfFunctions()->Add(
new TF1(*func_p));
2252 hist_p->GetListOfFunctions()->SetOwner (
false);
2255 theGraph->SetName(( std::string(hist_p->GetName()) +
"combinaed").c_str());
2257 theGraph->SetMarkerStyle(20);
2258 theGraph->SetMarkerColor(1);
◆ GetdelayBS()
| float ZDCPulseAnalyzer::GetdelayBS |
( |
| ) |
const |
|
inline |
◆ GetDelayedBaselineCorr()
| float ZDCPulseAnalyzer::GetDelayedBaselineCorr |
( |
| ) |
const |
|
inline |
◆ GetDelayedBaselineShiftFit()
| float ZDCPulseAnalyzer::GetDelayedBaselineShiftFit |
( |
| ) |
const |
|
inline |
◆ GetFitAmplitude()
| float ZDCPulseAnalyzer::GetFitAmplitude |
( |
| ) |
const |
|
inline |
◆ GetFitExpAmp()
| float ZDCPulseAnalyzer::GetFitExpAmp |
( |
| ) |
const |
|
inline |
◆ GetFitPostAmp()
| float ZDCPulseAnalyzer::GetFitPostAmp |
( |
| ) |
const |
|
inline |
◆ GetFitPostT0()
| float ZDCPulseAnalyzer::GetFitPostT0 |
( |
| ) |
const |
|
inline |
◆ GetFitPreAmp()
| float ZDCPulseAnalyzer::GetFitPreAmp |
( |
| ) |
const |
|
inline |
◆ GetFitPreT0()
| float ZDCPulseAnalyzer::GetFitPreT0 |
( |
| ) |
const |
|
inline |
◆ GetFitPulls()
| std::vector< float > ZDCPulseAnalyzer::GetFitPulls |
( |
bool |
forceLG = false | ) |
const |
Definition at line 574 of file ZDCPulseAnalyzer.cxx.
593 std::vector<float> pulls(
m_Nsample, -100);
596 const TF1* fit_p =
static_cast<const TF1*
>(dataHist_p->GetListOfFunctions()->Last());
598 for (
size_t ibin = 0; ibin <
m_Nsample ; ibin++) {
599 float t = dataHist_p->GetBinCenter(ibin + 1);
600 float fitVal = fit_p->Eval(
t);
601 float histVal = dataHist_p->GetBinContent(ibin + 1);
602 float histErr = dataHist_p->GetBinError(ibin + 1);
603 float pull = (histVal - fitVal)/histErr;
◆ GetFitT0()
| float ZDCPulseAnalyzer::GetFitT0 |
( |
| ) |
const |
|
inline |
◆ GetFitTau1()
| float ZDCPulseAnalyzer::GetFitTau1 |
( |
| ) |
const |
|
inline |
◆ GetFitTau2()
| float ZDCPulseAnalyzer::GetFitTau2 |
( |
| ) |
const |
|
inline |
◆ GetFitTMax()
| float ZDCPulseAnalyzer::GetFitTMax |
( |
| ) |
const |
|
inline |
◆ GetFitTMin()
| float ZDCPulseAnalyzer::GetFitTMin |
( |
| ) |
const |
|
inline |
◆ GetGraph()
| std::shared_ptr< TGraphErrors > ZDCPulseAnalyzer::GetGraph |
( |
bool |
forceLG = false | ) |
|
Definition at line 2264 of file ZDCPulseAnalyzer.cxx.
2271 std::shared_ptr<TGraphErrors> theGraph = std::make_shared<TGraphErrors>(TGraphErrors(
m_Nsample));
2274 for (
int ipt = 0; ipt < hist_p->GetNbinsX(); ipt++) {
2275 theGraph->SetPoint(npts, hist_p->GetBinCenter(ipt + 1), hist_p->GetBinContent(ipt + 1));
2276 theGraph->SetPointError(npts++, 0, hist_p->GetBinError(ipt + 1));
2279 TF1* func_p =
static_cast<TF1*
>(hist_p->GetListOfFunctions()->Last());
2280 theGraph->GetListOfFunctions()->Add(func_p);
2281 theGraph->SetName(( std::string(hist_p->GetName()) +
"not_combinaed").c_str());
2283 theGraph->SetMarkerStyle(20);
2284 theGraph->SetMarkerColor(1);
◆ GetHistogramPtr()
| const TH1* ZDCPulseAnalyzer::GetHistogramPtr |
( |
bool |
refitLG = false | ) |
|
|
inline |
◆ getLGMode()
| unsigned int ZDCPulseAnalyzer::getLGMode |
( |
| ) |
const |
|
inline |
◆ getMaxADCHG()
| float ZDCPulseAnalyzer::getMaxADCHG |
( |
| ) |
const |
|
inline |
◆ getMaxADCLG()
| float ZDCPulseAnalyzer::getMaxADCLG |
( |
| ) |
const |
|
inline |
◆ getMaxADCSampleHG()
| int ZDCPulseAnalyzer::getMaxADCSampleHG |
( |
| ) |
const |
|
inline |
◆ getMaxADCSampleLG()
| int ZDCPulseAnalyzer::getMaxADCSampleLG |
( |
| ) |
const |
|
inline |
◆ getMaxADCSub()
| float ZDCPulseAnalyzer::getMaxADCSub |
( |
| ) |
const |
|
inline |
◆ GetMaxDelta()
| float ZDCPulseAnalyzer::GetMaxDelta |
( |
| ) |
const |
|
inline |
◆ getMinADCHG()
| float ZDCPulseAnalyzer::getMinADCHG |
( |
| ) |
const |
|
inline |
◆ getMinADCLG()
| float ZDCPulseAnalyzer::getMinADCLG |
( |
| ) |
const |
|
inline |
◆ getMinADCSampleHG()
| int ZDCPulseAnalyzer::getMinADCSampleHG |
( |
| ) |
const |
|
inline |
◆ getMinADCSampleLG()
| int ZDCPulseAnalyzer::getMinADCSampleLG |
( |
| ) |
const |
|
inline |
◆ getMinADCSub()
| float ZDCPulseAnalyzer::getMinADCSub |
( |
| ) |
const |
|
inline |
◆ GetMinDelta()
| float ZDCPulseAnalyzer::GetMinDelta |
( |
| ) |
const |
|
inline |
◆ GetMinDeriv2nd()
| float ZDCPulseAnalyzer::GetMinDeriv2nd |
( |
| ) |
const |
|
inline |
◆ GetMinDeriv2ndIndex()
| float ZDCPulseAnalyzer::GetMinDeriv2ndIndex |
( |
| ) |
const |
|
inline |
◆ GetPreExpAmp()
| float ZDCPulseAnalyzer::GetPreExpAmp |
( |
| ) |
const |
|
inline |
◆ getPresample()
| float ZDCPulseAnalyzer::getPresample |
( |
| ) |
const |
|
inline |
◆ GetPreSampleAmp()
| float ZDCPulseAnalyzer::GetPreSampleAmp |
( |
| ) |
const |
|
inline |
◆ getRefitLGAmp()
| float ZDCPulseAnalyzer::getRefitLGAmp |
( |
| ) |
const |
|
inline |
◆ getRefitLGAmpCorr()
| float ZDCPulseAnalyzer::getRefitLGAmpCorr |
( |
| ) |
const |
|
inline |
◆ getRefitLGChisq()
| float ZDCPulseAnalyzer::getRefitLGChisq |
( |
| ) |
const |
|
inline |
◆ getRefitLGFitAmp()
| float ZDCPulseAnalyzer::getRefitLGFitAmp |
( |
| ) |
const |
|
inline |
◆ getRefitLGTime()
| float ZDCPulseAnalyzer::getRefitLGTime |
( |
| ) |
const |
|
inline |
◆ getRefitLGTimeSub()
| float ZDCPulseAnalyzer::getRefitLGTimeSub |
( |
| ) |
const |
|
inline |
◆ GetSamplesDeriv2nd()
| const std::vector<float>& ZDCPulseAnalyzer::GetSamplesDeriv2nd |
( |
| ) |
const |
|
inline |
◆ GetSamplesSub()
| const std::vector<float>& ZDCPulseAnalyzer::GetSamplesSub |
( |
| ) |
const |
|
inline |
◆ GetStatusMask()
| unsigned int ZDCPulseAnalyzer::GetStatusMask |
( |
| ) |
const |
◆ GetT0Corr()
| float ZDCPulseAnalyzer::GetT0Corr |
( |
| ) |
const |
|
inline |
◆ GetT0Sub()
| float ZDCPulseAnalyzer::GetT0Sub |
( |
| ) |
const |
|
inline |
◆ getTimeSig()
| float ZDCPulseAnalyzer::getTimeSig |
( |
| ) |
const |
|
inline |
◆ HaveData()
| bool ZDCPulseAnalyzer::HaveData |
( |
| ) |
const |
|
inline |
◆ havePulse()
| bool ZDCPulseAnalyzer::havePulse |
( |
| ) |
const |
|
inline |
◆ HGOverflow()
| bool ZDCPulseAnalyzer::HGOverflow |
( |
| ) |
const |
|
inline |
◆ HGUnderflow()
| bool ZDCPulseAnalyzer::HGUnderflow |
( |
| ) |
const |
|
inline |
◆ LGOverflow()
| bool ZDCPulseAnalyzer::LGOverflow |
( |
| ) |
const |
|
inline |
◆ LGUnderflow()
| bool ZDCPulseAnalyzer::LGUnderflow |
( |
| ) |
const |
|
inline |
◆ LoadAndAnalyzeData() [1/2]
| bool ZDCPulseAnalyzer::LoadAndAnalyzeData |
( |
const std::vector< float > & |
ADCSamplesHG, |
|
|
const std::vector< float > & |
ADCSamplesLG |
|
) |
| |
Definition at line 744 of file ZDCPulseAnalyzer.cxx.
747 (*m_msgFunc_p)(
ZDCMsg::Fatal,
"ZDCPulseAnalyzer::LoadAndAnalyzeData:: Wrong LoadAndAnalyzeData called -- expecting both delayed and undelayed samples");
◆ LoadAndAnalyzeData() [2/2]
| bool ZDCPulseAnalyzer::LoadAndAnalyzeData |
( |
const std::vector< float > & |
ADCSamplesHG, |
|
|
const std::vector< float > & |
ADCSamplesLG, |
|
|
const std::vector< float > & |
ADCSamplesHGDelayed, |
|
|
const std::vector< float > & |
ADCSamplesLGDelayed |
|
) |
| |
Definition at line 769 of file ZDCPulseAnalyzer.cxx.
773 (*m_msgFunc_p)(
ZDCMsg::Fatal,
"ZDCPulseAnalyzer::LoadAndAnalyzeData:: Wrong LoadAndAnalyzeData called -- expecting only undelayed samples");
795 for (
size_t isample = 0; isample <
m_Nsample; isample++) {
796 float ADCHG = ADCSamplesHG[isample];
797 float ADCLG = ADCSamplesLG[isample];
◆ MakeCombinedFitter()
| std::unique_ptr< TFitter > ZDCPulseAnalyzer::MakeCombinedFitter |
( |
TF1 * |
func | ) |
|
|
staticprivate |
Definition at line 2029 of file ZDCPulseAnalyzer.cxx.
2031 TVirtualFitter::SetDefaultFitter(
"Minuit");
2033 size_t nFitParams = func->GetNpar() + 1;
2034 std::unique_ptr<TFitter>
fitter = std::make_unique<TFitter>(nFitParams);
2036 fitter->GetMinuit()->fISW[4] = -1;
2037 fitter->SetParameter(0,
"delayBaselineAdjust", 0, 0.01, -100, 100);
2039 for (
size_t ipar = 0; ipar < nFitParams - 1; ipar++) {
2040 double parLimitLow, parLimitHigh;
2042 func->GetParLimits(ipar, parLimitLow, parLimitHigh);
2043 if (std::abs(parLimitHigh / parLimitLow - 1) < 1
e-6) {
2044 double value = func->GetParameter(ipar);
2048 fitter->SetParameter(ipar + 1, func->GetParName(ipar), func->GetParameter(ipar), 0.01, lowLim, highLim);
2049 fitter->FixParameter(ipar + 1);
2052 double value = func->GetParameter(ipar);
2053 if (
value >= parLimitHigh)
value = parLimitHigh * 0.99;
2054 else if (
value <= parLimitLow)
value = parLimitLow * 1.01;
2056 double step =
std::min((parLimitHigh - parLimitLow)/100., (
value - parLimitLow)/100.);
2058 fitter->SetParameter(ipar + 1, func->GetParName(ipar),
value,
step, parLimitLow, parLimitHigh);
◆ obtainDelayedBaselineCorr()
| float ZDCPulseAnalyzer::obtainDelayedBaselineCorr |
( |
const std::vector< float > & |
samples | ) |
|
|
staticprivate |
Definition at line 2343 of file ZDCPulseAnalyzer.cxx.
2345 const unsigned int nsamples = samples.size();
2353 float minScore = 1.0e9;
2354 unsigned int minIndex = 0;
2357 float deriv = derivVec[
idx];
2358 float prevDeriv = derivVec[
idx - 1];
2360 float derivDiff = deriv - prevDeriv;
2362 float deriv2nd = deriv2ndVec[
idx];
2368 float score = (deriv*deriv + 2*derivDiff*derivDiff +
2369 0.5*deriv2nd*deriv2nd);
2371 if (
score < minScore) {
2382 if (minIndex<2 or (minIndex+1) >=
nsamples){
2383 throw std::out_of_range(
"minIndex out of range in ZDCPulseAnalyzer::obtainDelayedBaselineCorr");
2385 float sample0 = samples[minIndex - 2];
2386 float sample1 = samples[minIndex - 1];
2387 float sample2 = samples[minIndex];
2388 float sample3 = samples[minIndex + 1];
2392 float baselineCorr = (0.5 * (sample1 - sample0 + sample3 - sample2) -
2393 0.25 * (sample3 - sample1 + sample2 - sample0));
2395 if (minIndex % 2 != 0) baselineCorr =-baselineCorr;
2397 return baselineCorr;
◆ postPulse()
| bool ZDCPulseAnalyzer::postPulse |
( |
| ) |
const |
|
inline |
◆ preExpTail()
| bool ZDCPulseAnalyzer::preExpTail |
( |
| ) |
const |
|
inline |
◆ prepareLGRefit()
| void ZDCPulseAnalyzer::prepareLGRefit |
( |
const std::vector< float > & |
samplesLG, |
|
|
const std::vector< float > & |
samplesSig, |
|
|
const std::vector< bool > & |
useSamples |
|
) |
| |
|
private |
◆ prePulse()
| bool ZDCPulseAnalyzer::prePulse |
( |
| ) |
const |
|
inline |
◆ PSHGOverUnderflow()
| bool ZDCPulseAnalyzer::PSHGOverUnderflow |
( |
| ) |
const |
|
inline |
◆ quietFits()
| bool ZDCPulseAnalyzer::quietFits |
( |
| ) |
const |
|
inline |
◆ ReanalyzeData()
| bool ZDCPulseAnalyzer::ReanalyzeData |
( |
| ) |
|
◆ repassPulse()
| bool ZDCPulseAnalyzer::repassPulse |
( |
| ) |
const |
|
inline |
◆ Reset()
| void ZDCPulseAnalyzer::Reset |
( |
bool |
reanalyze = false | ) |
|
|
private |
◆ saveFitFunc()
| void ZDCPulseAnalyzer::saveFitFunc |
( |
| ) |
|
|
inline |
◆ ScanAndSubtractSamples()
| bool ZDCPulseAnalyzer::ScanAndSubtractSamples |
( |
| ) |
|
|
private |
Definition at line 833 of file ZDCPulseAnalyzer.cxx.
838 bool doDump = (*m_msgFunc_p)(
ZDCMsg::Verbose,
"Dumping all samples before subtraction: ");
856 for (
size_t isample = 0; isample <
m_NSamplesAna; isample++) {
879 std::ostringstream dumpString;
880 dumpString <<
"After FADC correction, sample " << isample <<
", HG ADC = " <<
m_ADCSamplesHGSub[isample]
997 if (m_lastHGOverFlowSample < 2 && m_lastHGOverFlowSample > -1) {
◆ set2ndDerivStep()
| void ZDCPulseAnalyzer::set2ndDerivStep |
( |
size_t |
step | ) |
|
|
inline |
◆ SetADCOverUnderflowValues()
| void ZDCPulseAnalyzer::SetADCOverUnderflowValues |
( |
int |
HGOverflowADC, |
|
|
int |
HGUnderflowADC, |
|
|
int |
LGOverflowADC |
|
) |
| |
◆ SetCutValues()
| void ZDCPulseAnalyzer::SetCutValues |
( |
float |
chisqDivAmpCutHG, |
|
|
float |
chisqDivAmpCutLG, |
|
|
float |
deltaT0MinHG, |
|
|
float |
deltaT0MaxHG, |
|
|
float |
deltaT0MinLG, |
|
|
float |
deltaT0MaxLG |
|
) |
| |
◆ SetDefaults()
| void ZDCPulseAnalyzer::SetDefaults |
( |
| ) |
|
|
private |
◆ SetFitMinMaxAmp()
| void ZDCPulseAnalyzer::SetFitMinMaxAmp |
( |
float |
minAmpHG, |
|
|
float |
minAmpLG, |
|
|
float |
maxAmpHG, |
|
|
float |
maxAmpLG |
|
) |
| |
◆ setFitOPtions()
| void ZDCPulseAnalyzer::setFitOPtions |
( |
const std::string & |
fitOptions | ) |
|
|
inline |
◆ SetFitTimeMax()
| void ZDCPulseAnalyzer::SetFitTimeMax |
( |
float |
tmax | ) |
|
◆ SetGainFactorsHGLG()
| void ZDCPulseAnalyzer::SetGainFactorsHGLG |
( |
float |
gainFactorHG, |
|
|
float |
gainFactorLG |
|
) |
| |
◆ setLGMode()
| void ZDCPulseAnalyzer::setLGMode |
( |
unsigned int |
mode | ) |
|
|
inline |
◆ setMinimumSignificance()
| void ZDCPulseAnalyzer::setMinimumSignificance |
( |
float |
sigMinHG, |
|
|
float |
sigMinLG |
|
) |
| |
◆ SetNoiseSigmas()
| void ZDCPulseAnalyzer::SetNoiseSigmas |
( |
float |
noiseSigHG, |
|
|
float |
noiseSigLG |
|
) |
| |
|
inline |
◆ SetNonlinCorrParams()
| void ZDCPulseAnalyzer::SetNonlinCorrParams |
( |
float |
refADC, |
|
|
float |
refScale, |
|
|
const std::vector< float > & |
paramsHG, |
|
|
const std::vector< float > & |
paramsLG |
|
) |
| |
|
inline |
Definition at line 547 of file ZDCPulseAnalyzer.h.
549 std::string HGParamsStr =
"HG coefficients = ", LGParamsStr =
"LG coefficients = ";
554 (*m_msgFunc_p)(
ZDCMsg::Info, (
"Setting non-linear parameters for module: " +
m_tag +
", reference ADC = " +
◆ SetPeak2ndDerivMinTolerance()
| void ZDCPulseAnalyzer::SetPeak2ndDerivMinTolerance |
( |
size_t |
tolerance | ) |
|
|
inline |
◆ setQuietFits()
| void ZDCPulseAnalyzer::setQuietFits |
( |
| ) |
|
|
inline |
◆ SetTauT0Values()
| void ZDCPulseAnalyzer::SetTauT0Values |
( |
bool |
fixTau1, |
|
|
bool |
fixTau2, |
|
|
float |
tau1, |
|
|
float |
tau2, |
|
|
float |
t0HG, |
|
|
float |
t0LG |
|
) |
| |
◆ SetTimingCorrParams()
| void ZDCPulseAnalyzer::SetTimingCorrParams |
( |
TimingCorrMode |
mode, |
|
|
float |
refADC, |
|
|
float |
refScale, |
|
|
const std::vector< float > & |
HGT0CorrParams, |
|
|
const std::vector< float > & |
LGT0CorrParams |
|
) |
| |
|
inline |
◆ setUnquietFits()
| void ZDCPulseAnalyzer::setUnquietFits |
( |
| ) |
|
|
inline |
◆ SetupFitFunctions()
| void ZDCPulseAnalyzer::SetupFitFunctions |
( |
| ) |
|
|
private |
◆ UpdateFitterTimeLimits()
| void ZDCPulseAnalyzer::UpdateFitterTimeLimits |
( |
TFitter * |
fitter, |
|
|
ZDCFitWrapper * |
wrapper, |
|
|
bool |
prePulse |
|
) |
| |
|
private |
Definition at line 2067 of file ZDCPulseAnalyzer.cxx.
2069 double parLimitLow, parLimitHigh;
2072 func_p->GetParLimits(1, parLimitLow, parLimitHigh);
2074 fitter->SetParameter(2, func_p->GetParName(1), func_p->GetParameter(1), 0.01, parLimitLow, parLimitHigh);
2079 func_p->GetParLimits(parIndex, parLimitLow, parLimitHigh);
2080 fitter->SetParameter(parIndex + 1, func_p->GetParName(parIndex), func_p->GetParameter(parIndex), 0.01, parLimitLow, parLimitHigh);
◆ useLowGain()
| bool ZDCPulseAnalyzer::useLowGain |
( |
| ) |
const |
|
inline |
◆ ValidateJSONConfig()
| std::pair< bool, std::string > ZDCPulseAnalyzer::ValidateJSONConfig |
( |
const JSON & |
config | ) |
|
|
private |
Definition at line 2400 of file ZDCPulseAnalyzer.cxx.
2403 std::string resultString =
"success";
2411 auto jsonType =
iter.value().type();
2412 auto paramType = std::get<0>(
descr);
2413 if (jsonType != paramType) {
2415 resultString =
"Bad type for parameter " +
key +
", type in JSON = " +
std::to_string((
unsigned int) jsonType) ;
2419 size_t paramSize = std::get<1>(
descr);
2420 size_t jsonSize =
iter.value().size();
2421 if (jsonSize != paramSize) {
2423 resultString =
"Bad length for parameter " +
key +
", length in JSON = " +
std::to_string(jsonSize) ;
2431 resultString =
"Missing required parameter " +
key;
2450 resultString =
"Unknown parameter, key = " +
key;
2456 return {
result, resultString};
◆ JSONConfigParams
◆ m_2ndDerivStep
| size_t ZDCPulseAnalyzer::m_2ndDerivStep {1} |
|
private |
◆ m_ADCPeakHG
| float ZDCPulseAnalyzer::m_ADCPeakHG {} |
|
private |
◆ m_ADCPeakLG
| float ZDCPulseAnalyzer::m_ADCPeakLG {} |
|
private |
◆ m_ADCSamplesHG
| std::vector<float> ZDCPulseAnalyzer::m_ADCSamplesHG |
|
private |
◆ m_ADCSamplesHGSub
| std::vector<float> ZDCPulseAnalyzer::m_ADCSamplesHGSub |
|
private |
◆ m_ADCSamplesLG
| std::vector<float> ZDCPulseAnalyzer::m_ADCSamplesLG |
|
private |
◆ m_ADCSamplesLGSub
| std::vector<float> ZDCPulseAnalyzer::m_ADCSamplesLGSub |
|
private |
◆ m_ADCSSampSigHG
| std::vector<float> ZDCPulseAnalyzer::m_ADCSSampSigHG |
|
private |
◆ m_ADCSSampSigLG
| std::vector<float> ZDCPulseAnalyzer::m_ADCSSampSigLG |
|
private |
◆ m_adjTimeRangeEvent
| bool ZDCPulseAnalyzer::m_adjTimeRangeEvent {false} |
|
private |
◆ m_ampError
| float ZDCPulseAnalyzer::m_ampError {} |
|
private |
◆ m_amplitude
| float ZDCPulseAnalyzer::m_amplitude {} |
|
private |
◆ m_ampNoNonLin
| float ZDCPulseAnalyzer::m_ampNoNonLin {} |
|
private |
◆ m_backToHG_pre
| bool ZDCPulseAnalyzer::m_backToHG_pre {} |
|
private |
◆ m_badChisq
| bool ZDCPulseAnalyzer::m_badChisq {} |
|
private |
◆ m_badT0
| bool ZDCPulseAnalyzer::m_badT0 {} |
|
private |
◆ m_baselineCorr
| float ZDCPulseAnalyzer::m_baselineCorr {} |
|
private |
◆ m_bkgdMaxFraction
| float ZDCPulseAnalyzer::m_bkgdMaxFraction {} |
|
private |
◆ m_chisqDivAmpCutHG
| float ZDCPulseAnalyzer::m_chisqDivAmpCutHG {} |
|
private |
◆ m_chisqDivAmpCutLG
| float ZDCPulseAnalyzer::m_chisqDivAmpCutLG {} |
|
private |
◆ m_defaultCombinedFitter
| std::unique_ptr<TFitter> ZDCPulseAnalyzer::m_defaultCombinedFitter {} |
|
private |
◆ m_defaultFitTMax
| float ZDCPulseAnalyzer::m_defaultFitTMax {} |
|
private |
◆ m_defaultFitTMin
| float ZDCPulseAnalyzer::m_defaultFitTMin {} |
|
private |
◆ m_defaultFitWrapper
| std::unique_ptr<ZDCFitWrapper> ZDCPulseAnalyzer::m_defaultFitWrapper {} |
|
private |
◆ m_defaultT0Max
| float ZDCPulseAnalyzer::m_defaultT0Max {} |
|
private |
◆ m_defaultT0Min
| float ZDCPulseAnalyzer::m_defaultT0Min {} |
|
private |
◆ m_delayedBaselineShift
| float ZDCPulseAnalyzer::m_delayedBaselineShift {} |
|
private |
◆ m_delayedDeltaT
| float ZDCPulseAnalyzer::m_delayedDeltaT {} |
|
private |
◆ m_delayedHist
| std::unique_ptr<TH1> ZDCPulseAnalyzer::m_delayedHist {} |
|
private |
◆ m_delayedHistLGRefit
| std::unique_ptr<TH1> ZDCPulseAnalyzer::m_delayedHistLGRefit {} |
|
private |
◆ m_delayedPedestalDiff
| float ZDCPulseAnalyzer::m_delayedPedestalDiff {} |
|
private |
◆ m_deltaTSample
| float ZDCPulseAnalyzer::m_deltaTSample {} |
|
private |
◆ m_enablePostExcl
| bool ZDCPulseAnalyzer::m_enablePostExcl {false} |
|
private |
◆ m_enablePreExcl
| bool ZDCPulseAnalyzer::m_enablePreExcl {false} |
|
private |
◆ m_enableRepass
| bool ZDCPulseAnalyzer::m_enableRepass {false} |
|
private |
◆ m_evtLGRefit
| bool ZDCPulseAnalyzer::m_evtLGRefit {false} |
|
private |
◆ m_ExcludeEarly
| bool ZDCPulseAnalyzer::m_ExcludeEarly {} |
|
private |
◆ m_ExcludeLate
| bool ZDCPulseAnalyzer::m_ExcludeLate {} |
|
private |
◆ m_expAmplitude
| float ZDCPulseAnalyzer::m_expAmplitude {} |
|
private |
◆ m_fadcCorrFileName
| std::string ZDCPulseAnalyzer::m_fadcCorrFileName |
|
private |
◆ m_FADCCorrHG
| std::unique_ptr<const TH1> ZDCPulseAnalyzer::m_FADCCorrHG {} |
|
private |
◆ m_FADCCorrLG
| std::unique_ptr<const TH1> ZDCPulseAnalyzer::m_FADCCorrLG {} |
|
private |
◆ m_FADCCorrPerSample
| bool ZDCPulseAnalyzer::m_FADCCorrPerSample {false} |
|
private |
◆ m_fail
| bool ZDCPulseAnalyzer::m_fail {} |
|
private |
◆ m_failSigCut
| bool ZDCPulseAnalyzer::m_failSigCut {} |
|
private |
◆ m_firstHGOverFlowSample
| int ZDCPulseAnalyzer::m_firstHGOverFlowSample {-1} |
|
private |
◆ m_fitAmpError
| float ZDCPulseAnalyzer::m_fitAmpError {} |
|
private |
◆ m_fitAmplitude
| float ZDCPulseAnalyzer::m_fitAmplitude {} |
|
private |
◆ m_fitAmpMaxHG
| float ZDCPulseAnalyzer::m_fitAmpMaxHG {} |
|
private |
◆ m_fitAmpMaxLG
| float ZDCPulseAnalyzer::m_fitAmpMaxLG {} |
|
private |
◆ m_fitAmpMinHG
| float ZDCPulseAnalyzer::m_fitAmpMinHG {} |
|
private |
◆ m_fitAmpMinLG
| float ZDCPulseAnalyzer::m_fitAmpMinLG {} |
|
private |
◆ m_fitChisq
| float ZDCPulseAnalyzer::m_fitChisq {} |
|
private |
◆ m_fitExpAmp
| float ZDCPulseAnalyzer::m_fitExpAmp {} |
|
private |
◆ m_fitFailed
| bool ZDCPulseAnalyzer::m_fitFailed {} |
|
private |
◆ m_fitFunction
| std::string ZDCPulseAnalyzer::m_fitFunction {} |
|
private |
◆ m_fitHist
| std::unique_ptr<TH1> ZDCPulseAnalyzer::m_fitHist {} |
|
private |
◆ m_fitHistLGRefit
| std::unique_ptr<TH1> ZDCPulseAnalyzer::m_fitHistLGRefit {} |
|
private |
◆ m_fitMinAmp
| bool ZDCPulseAnalyzer::m_fitMinAmp {} |
|
private |
◆ m_fitNDoF
| float ZDCPulseAnalyzer::m_fitNDoF {} |
|
private |
◆ m_fitOptions
| std::string ZDCPulseAnalyzer::m_fitOptions {} |
|
private |
◆ m_fitPostAmp
| float ZDCPulseAnalyzer::m_fitPostAmp {} |
|
private |
◆ m_fitPostT0
| float ZDCPulseAnalyzer::m_fitPostT0 {} |
|
private |
◆ m_fitPostT0lo
| float ZDCPulseAnalyzer::m_fitPostT0lo {} |
|
private |
◆ m_fitPreAmp
| float ZDCPulseAnalyzer::m_fitPreAmp {} |
|
private |
◆ m_fitPreT0
| float ZDCPulseAnalyzer::m_fitPreT0 {} |
|
private |
◆ m_fitPulls
| std::vector<float> ZDCPulseAnalyzer::m_fitPulls |
|
private |
◆ m_fitTau1
| float ZDCPulseAnalyzer::m_fitTau1 {} |
|
private |
◆ m_fitTau2
| float ZDCPulseAnalyzer::m_fitTau2 {} |
|
private |
◆ m_fitTCorr2nd
| float ZDCPulseAnalyzer::m_fitTCorr2nd {} |
|
private |
◆ m_fitTime
| float ZDCPulseAnalyzer::m_fitTime {} |
|
private |
◆ m_fitTimeCorr
| float ZDCPulseAnalyzer::m_fitTimeCorr {} |
|
private |
◆ m_fitTimeSub
| float ZDCPulseAnalyzer::m_fitTimeSub {} |
|
private |
◆ m_fitTMax
| float ZDCPulseAnalyzer::m_fitTMax {} |
|
private |
◆ m_fitTMin
| float ZDCPulseAnalyzer::m_fitTMin {} |
|
private |
◆ m_fixPrePulse
| bool ZDCPulseAnalyzer::m_fixPrePulse {} |
|
private |
◆ m_fixTau1
| bool ZDCPulseAnalyzer::m_fixTau1 {} |
|
private |
◆ m_fixTau2
| bool ZDCPulseAnalyzer::m_fixTau2 {} |
|
private |
◆ m_freqMHz
| float ZDCPulseAnalyzer::m_freqMHz {} |
|
private |
◆ m_gainFactorHG
| float ZDCPulseAnalyzer::m_gainFactorHG {} |
|
private |
◆ m_gainFactorLG
| float ZDCPulseAnalyzer::m_gainFactorLG {} |
|
private |
◆ m_haveData
| bool ZDCPulseAnalyzer::m_haveData {} |
|
private |
◆ m_haveFADCCorrections
| bool ZDCPulseAnalyzer::m_haveFADCCorrections {false} |
|
private |
◆ m_haveNonlinCorr
| bool ZDCPulseAnalyzer::m_haveNonlinCorr {false} |
|
private |
◆ m_havePulse
| bool ZDCPulseAnalyzer::m_havePulse {} |
|
private |
◆ m_haveSignifCuts
| bool ZDCPulseAnalyzer::m_haveSignifCuts {false} |
|
private |
◆ m_HGOverflow
| bool ZDCPulseAnalyzer::m_HGOverflow {} |
|
private |
◆ m_HGOverflowADC
| int ZDCPulseAnalyzer::m_HGOverflowADC {} |
|
private |
◆ m_HGT0CorrParams
| std::vector<float> ZDCPulseAnalyzer::m_HGT0CorrParams {} |
|
private |
◆ m_HGUnderflow
| bool ZDCPulseAnalyzer::m_HGUnderflow {} |
|
private |
◆ m_HGUnderflowADC
| int ZDCPulseAnalyzer::m_HGUnderflowADC {} |
|
private |
◆ m_initialExpAmp
| float ZDCPulseAnalyzer::m_initialExpAmp {} |
|
private |
◆ m_initializedFits
| bool ZDCPulseAnalyzer::m_initializedFits {false} |
|
private |
◆ m_initialPostPulseT0
| float ZDCPulseAnalyzer::m_initialPostPulseT0 {} |
|
private |
◆ m_initialPrePulseAmp
| float ZDCPulseAnalyzer::m_initialPrePulseAmp {} |
|
private |
◆ m_initialPrePulseT0
| float ZDCPulseAnalyzer::m_initialPrePulseT0 {} |
|
private |
◆ m_lastHGOverFlowSample
| int ZDCPulseAnalyzer::m_lastHGOverFlowSample {-1} |
|
private |
◆ m_LGMode
◆ m_LGOverflow
| bool ZDCPulseAnalyzer::m_LGOverflow {} |
|
private |
◆ m_LGOverflowADC
| int ZDCPulseAnalyzer::m_LGOverflowADC {} |
|
private |
◆ m_LGT0CorrParams
| std::vector<float> ZDCPulseAnalyzer::m_LGT0CorrParams {} |
|
private |
◆ m_LGUnderflow
| bool ZDCPulseAnalyzer::m_LGUnderflow {} |
|
private |
◆ m_maxADCHG
| float ZDCPulseAnalyzer::m_maxADCHG {} |
|
private |
◆ m_maxADCLG
| float ZDCPulseAnalyzer::m_maxADCLG {} |
|
private |
◆ m_maxADCSampleHG
| int ZDCPulseAnalyzer::m_maxADCSampleHG |
|
private |
◆ m_maxADCSampleLG
| int ZDCPulseAnalyzer::m_maxADCSampleLG |
|
private |
◆ m_maxDelta
| float ZDCPulseAnalyzer::m_maxDelta {} |
|
private |
◆ m_maxSampleEvt
| unsigned int ZDCPulseAnalyzer::m_maxSampleEvt {} |
|
private |
◆ m_maxSamplesPostExcl
| unsigned int ZDCPulseAnalyzer::m_maxSamplesPostExcl {0} |
|
private |
◆ m_maxSamplesPreExcl
| unsigned int ZDCPulseAnalyzer::m_maxSamplesPreExcl {0} |
|
private |
◆ m_minADCHG
| float ZDCPulseAnalyzer::m_minADCHG {} |
|
private |
◆ m_minADCLG
| float ZDCPulseAnalyzer::m_minADCLG {} |
|
private |
◆ m_minADCSampleHG
| int ZDCPulseAnalyzer::m_minADCSampleHG |
|
private |
◆ m_minADCSampleLG
| int ZDCPulseAnalyzer::m_minADCSampleLG |
|
private |
◆ m_minDelta
| float ZDCPulseAnalyzer::m_minDelta {} |
|
private |
◆ m_minDeriv2nd
| float ZDCPulseAnalyzer::m_minDeriv2nd {} |
|
private |
◆ m_minDeriv2ndIndex
| int ZDCPulseAnalyzer::m_minDeriv2ndIndex {} |
|
private |
◆ m_minDeriv2ndSig
| float ZDCPulseAnalyzer::m_minDeriv2ndSig |
|
private |
◆ m_minSampleEvt
| unsigned int ZDCPulseAnalyzer::m_minSampleEvt {} |
|
private |
◆ m_msgFunc_p
◆ m_noiseSigHG
| float ZDCPulseAnalyzer::m_noiseSigHG {} |
|
private |
◆ m_noiseSigLG
| float ZDCPulseAnalyzer::m_noiseSigLG {} |
|
private |
◆ m_nominalT0HG
| float ZDCPulseAnalyzer::m_nominalT0HG {} |
|
private |
◆ m_nominalT0LG
| float ZDCPulseAnalyzer::m_nominalT0LG {} |
|
private |
◆ m_nominalTau1
| float ZDCPulseAnalyzer::m_nominalTau1 {} |
|
private |
◆ m_nominalTau2
| float ZDCPulseAnalyzer::m_nominalTau2 {} |
|
private |
◆ m_nonLinCorrParamsHG
| std::vector<float> ZDCPulseAnalyzer::m_nonLinCorrParamsHG {} |
|
private |
◆ m_nonLinCorrParamsLG
| std::vector<float> ZDCPulseAnalyzer::m_nonLinCorrParamsLG {} |
|
private |
◆ m_nonLinCorrRefADC
| float ZDCPulseAnalyzer::m_nonLinCorrRefADC {500} |
|
private |
◆ m_nonLinCorrRefScale
| float ZDCPulseAnalyzer::m_nonLinCorrRefScale {100} |
|
private |
◆ m_Nsample
| unsigned int ZDCPulseAnalyzer::m_Nsample {} |
|
private |
◆ m_NSamplesAna
| unsigned int ZDCPulseAnalyzer::m_NSamplesAna {0} |
|
private |
◆ m_peak2ndDerivMinRepassHG
| float ZDCPulseAnalyzer::m_peak2ndDerivMinRepassHG {} |
|
private |
◆ m_peak2ndDerivMinRepassLG
| float ZDCPulseAnalyzer::m_peak2ndDerivMinRepassLG {} |
|
private |
◆ m_peak2ndDerivMinSample
| size_t ZDCPulseAnalyzer::m_peak2ndDerivMinSample {} |
|
private |
◆ m_peak2ndDerivMinThreshHG
| float ZDCPulseAnalyzer::m_peak2ndDerivMinThreshHG {} |
|
private |
◆ m_peak2ndDerivMinThreshLG
| float ZDCPulseAnalyzer::m_peak2ndDerivMinThreshLG {} |
|
private |
◆ m_peak2ndDerivMinTolerance
| size_t ZDCPulseAnalyzer::m_peak2ndDerivMinTolerance {1} |
|
private |
◆ m_pedestal
| int ZDCPulseAnalyzer::m_pedestal {} |
|
private |
◆ m_postAmplitude
| float ZDCPulseAnalyzer::m_postAmplitude {} |
|
private |
◆ m_postExclHGADCThresh
| unsigned int ZDCPulseAnalyzer::m_postExclHGADCThresh {0} |
|
private |
◆ m_postExclLGADCThresh
| unsigned int ZDCPulseAnalyzer::m_postExclLGADCThresh {0} |
|
private |
◆ m_postPulse
| bool ZDCPulseAnalyzer::m_postPulse {} |
|
private |
◆ m_preAmplitude
| float ZDCPulseAnalyzer::m_preAmplitude {} |
|
private |
◆ m_preExclHGADCThresh
| unsigned int ZDCPulseAnalyzer::m_preExclHGADCThresh {0} |
|
private |
◆ m_preExclLGADCThresh
| unsigned int ZDCPulseAnalyzer::m_preExclLGADCThresh {0} |
|
private |
◆ m_preExpFitWrapper
◆ m_preExpSig
| float ZDCPulseAnalyzer::m_preExpSig |
|
private |
◆ m_preExpTail
| bool ZDCPulseAnalyzer::m_preExpTail {} |
|
private |
◆ m_prePulse
| bool ZDCPulseAnalyzer::m_prePulse {} |
|
private |
◆ m_prePulseCombinedFitter
| std::unique_ptr<TFitter> ZDCPulseAnalyzer::m_prePulseCombinedFitter {} |
|
private |
◆ m_prePulseFitWrapper
◆ m_prePulseSig
| float ZDCPulseAnalyzer::m_prePulseSig |
|
private |
◆ m_preSample
| float ZDCPulseAnalyzer::m_preSample {} |
|
private |
◆ m_preSampleAmp
| float ZDCPulseAnalyzer::m_preSampleAmp {} |
|
private |
◆ m_preSampleIdx
| unsigned int ZDCPulseAnalyzer::m_preSampleIdx {} |
|
private |
◆ m_PSHGOverUnderflow
| bool ZDCPulseAnalyzer::m_PSHGOverUnderflow {} |
|
private |
◆ m_quietFits
| bool ZDCPulseAnalyzer::m_quietFits {} |
|
private |
◆ m_refitLGAmpError
| float ZDCPulseAnalyzer::m_refitLGAmpError {0} |
|
private |
◆ m_refitLGAmpl
| float ZDCPulseAnalyzer::m_refitLGAmpl {0} |
|
private |
◆ m_refitLGAmplCorr
| float ZDCPulseAnalyzer::m_refitLGAmplCorr {0} |
|
private |
◆ m_refitLGChisq
| float ZDCPulseAnalyzer::m_refitLGChisq {0} |
|
private |
◆ m_refitLGFitAmpl
| float ZDCPulseAnalyzer::m_refitLGFitAmpl {0} |
|
private |
◆ m_refitLGTime
| float ZDCPulseAnalyzer::m_refitLGTime {0} |
|
private |
◆ m_refitLGTimeSub
| float ZDCPulseAnalyzer::m_refitLGTimeSub {0} |
|
private |
◆ m_repassPulse
| bool ZDCPulseAnalyzer::m_repassPulse {} |
|
private |
◆ m_samplesDeriv2nd
| std::vector<float> ZDCPulseAnalyzer::m_samplesDeriv2nd |
|
private |
◆ m_samplesLGRefit
| std::vector<float> ZDCPulseAnalyzer::m_samplesLGRefit |
|
private |
◆ m_samplesSig
| std::vector<float> ZDCPulseAnalyzer::m_samplesSig |
|
private |
◆ m_samplesSigLGRefit
| std::vector<float> ZDCPulseAnalyzer::m_samplesSigLGRefit |
|
private |
◆ m_samplesSub
| std::vector<float> ZDCPulseAnalyzer::m_samplesSub |
|
private |
◆ m_saveFitFunc
| bool ZDCPulseAnalyzer::m_saveFitFunc {} |
|
private |
◆ m_sigMinHG
| float ZDCPulseAnalyzer::m_sigMinHG {} |
|
private |
◆ m_sigMinLG
| float ZDCPulseAnalyzer::m_sigMinLG {} |
|
private |
◆ m_T0CutHighHG
| float ZDCPulseAnalyzer::m_T0CutHighHG {} |
|
private |
◆ m_T0CutHighLG
| float ZDCPulseAnalyzer::m_T0CutHighLG {} |
|
private |
◆ m_T0CutLowHG
| float ZDCPulseAnalyzer::m_T0CutLowHG {} |
|
private |
◆ m_T0CutLowLG
| float ZDCPulseAnalyzer::m_T0CutLowLG {} |
|
private |
◆ m_t0CutSig
| float ZDCPulseAnalyzer::m_t0CutSig {} |
|
private |
◆ m_tag
| std::string ZDCPulseAnalyzer::m_tag {} |
|
private |
◆ m_timeCutMode
| unsigned int ZDCPulseAnalyzer::m_timeCutMode {0} |
|
private |
◆ m_timeResFuncHG_p
| std::unique_ptr<const TF1> ZDCPulseAnalyzer::m_timeResFuncHG_p {} |
|
private |
◆ m_timeResFuncLG_p
| std::unique_ptr<const TF1> ZDCPulseAnalyzer::m_timeResFuncLG_p {} |
|
private |
◆ m_timeSig
| float ZDCPulseAnalyzer::m_timeSig {} |
|
private |
◆ m_timingCorrMode
| unsigned int ZDCPulseAnalyzer::m_timingCorrMode {NoTimingCorr} |
|
private |
◆ m_timingCorrRefADC
| float ZDCPulseAnalyzer::m_timingCorrRefADC {500} |
|
private |
◆ m_timingCorrScale
| float ZDCPulseAnalyzer::m_timingCorrScale {100} |
|
private |
◆ m_tmax
| float ZDCPulseAnalyzer::m_tmax {} |
|
private |
◆ m_tmin
| float ZDCPulseAnalyzer::m_tmin {} |
|
private |
◆ m_useDelayed
| bool ZDCPulseAnalyzer::m_useDelayed {false} |
|
private |
◆ m_usedPresampIdx
| int ZDCPulseAnalyzer::m_usedPresampIdx {} |
|
private |
◆ m_useFixedBaseline
| bool ZDCPulseAnalyzer::m_useFixedBaseline {} |
|
private |
◆ m_useLowGain
| bool ZDCPulseAnalyzer::m_useLowGain {} |
|
private |
◆ m_useSampleHG
| std::vector<bool> ZDCPulseAnalyzer::m_useSampleHG |
|
private |
◆ m_useSampleLG
| std::vector<bool> ZDCPulseAnalyzer::m_useSampleLG |
|
private |
◆ s_combinedFitFunc
| TF1 * ZDCPulseAnalyzer::s_combinedFitFunc = nullptr |
|
staticprivate |
◆ s_combinedFitTMax
| float ZDCPulseAnalyzer::s_combinedFitTMax = 1000 |
|
staticprivate |
◆ s_combinedFitTMin
| float ZDCPulseAnalyzer::s_combinedFitTMin = -0.5 |
|
staticprivate |
◆ s_delayedFitHist
| TH1 * ZDCPulseAnalyzer::s_delayedFitHist = nullptr |
|
staticprivate |
◆ s_pullValues
| std::vector< float > ZDCPulseAnalyzer::s_pullValues |
|
staticprivate |
◆ s_undelayedFitHist
| TH1 * ZDCPulseAnalyzer::s_undelayedFitHist = nullptr |
|
staticprivate |
The documentation for this class was generated from the following files:
virtual float GetAmplitude() const =0
std::unique_ptr< ZDCFitWrapper > m_defaultFitWrapper
const ShapeFitter * fitter
std::unique_ptr< ZDCPrePulseFitWrapper > m_prePulseFitWrapper
std::vector< bool > m_useSampleHG
std::vector< float > m_ADCSamplesLG
std::vector< float > m_samplesSub
unsigned int m_NSamplesAna
ZDCMsg::MessageFunctionPtr m_msgFunc_p
std::vector< float > m_LGT0CorrParams
constexpr double tolerance
void FillHistogram(bool refitLG)
bool m_haveFADCCorrections
std::unique_ptr< const TH1 > m_FADCCorrHG
float m_peak2ndDerivMinThreshLG
float m_nonLinCorrRefScale
unsigned int m_timeCutMode
const TH1 * GetHistogramPtr(bool refitLG=false)
static std::unique_ptr< TFitter > MakeCombinedFitter(TF1 *func)
float m_delayedPedestalDiff
void DoFitCombined(bool refitLG=false)
virtual void ConstrainFit()=0
virtual float GetTime() const =0
std::unique_ptr< TFitter > m_defaultCombinedFitter
std::unique_ptr< TH1 > m_delayedHist
std::unique_ptr< TH1 > m_fitHistLGRefit
bool ScanAndSubtractSamples()
bool AnalyzeData(size_t nSamples, size_t preSample, const std::vector< float > &samples, const std::vector< bool > &useSamples, float peak2ndDerivMinThresh, float noiseSig, const std::vector< float > &toCorrParams, float maxChisqDivAmp, float minT0Corr, float maxT0Corr)
bool armSumInclude() const
virtual std::shared_ptr< TF1 > GetWrapperTF1()
std::string to_string(const SectorProjector proj)
float m_delayedBaselineShift
static TH1 * s_delayedFitHist
std::vector< float > m_samplesDeriv2nd
virtual float GetTau2() const =0
static TF1 * s_combinedFitFunc
static float s_combinedFitTMin
void dumpConfiguration() const
bool PSHGOverUnderflow() const
std::vector< bool > m_useSampleLG
std::string m_fitFunction
unsigned int m_preExclHGADCThresh
std::vector< float >::const_iterator SampleCIter
std::vector< float > m_fitPulls
virtual void UnconstrainFit()=0
unsigned int m_postExclHGADCThresh
virtual float GetAmpError() const =0
float m_peak2ndDerivMinRepassHG
float m_initialPrePulseAmp
float m_peak2ndDerivMinRepassLG
virtual TF1 * GetWrapperTF1RawPtr() const
static void CombinedPulsesFCN(int &numParam, double *, double &f, double *par, int flag)
bool excludeLateLG() const
std::vector< float > m_nonLinCorrParamsLG
unsigned int m_minSampleEvt
double chi2(TH1 *h0, TH1 *h1)
unsigned int m_maxSampleEvt
std::vector< float > m_ADCSamplesHG
virtual float GetBkgdMaxFraction() const =0
std::pair< bool, std::string > ConfigFromJSON(const JSON &config)
unsigned int m_preExclLGADCThresh
static const ZDCJSONConfig::JSONParamList JSONConfigParams
static float obtainDelayedBaselineCorr(const std::vector< float > &samples)
std::vector< float > m_ADCSamplesHGSub
void checkTF1Limits(TF1 *func)
std::vector< float > m_ADCSSampSigLG
static std::vector< float > Calculate2ndDerivative(const std::vector< float > &inputData, unsigned int step)
unsigned int m_preSampleIdx
void Initialize(float initialAmp, float initialT0, float ampMin, float ampMax)
virtual float GetTau1() const =0
std::unique_ptr< const TF1 > m_timeResFuncLG_p
std::unique_ptr< ZDCPreExpFitWrapper > m_preExpFitWrapper
size_t m_peak2ndDerivMinSample
std::unique_ptr< TH1 > m_delayedHistLGRefit
int m_lastHGOverFlowSample
std::vector< float > m_samplesLGRefit
size_t m_peak2ndDerivMinTolerance
void DoFit(bool refitLG=false)
void prepareLGRefit(const std::vector< float > &samplesLG, const std::vector< float > &samplesSig, const std::vector< bool > &useSamples)
std::vector< float > m_ADCSSampSigHG
bool DoAnalysis(bool repass)
void Reset(bool reanalyze=false)
std::vector< float > m_samplesSigLGRefit
float m_peak2ndDerivMinThreshHG
unsigned int m_maxSamplesPostExcl
bool excludeEarlyLG() const
std::vector< float > m_ADCSamplesLGSub
int m_firstHGOverFlowSample
static TH1 * s_undelayedFitHist
bool fitMinimumAmplitude() const
unsigned int m_timingCorrMode
unsigned int m_maxSamplesPreExcl
std::unique_ptr< const TH1 > m_FADCCorrLG
float m_initialPostPulseT0
std::unique_ptr< TFitter > m_prePulseCombinedFitter
std::unique_ptr< TH1 > m_fitHist
std::unique_ptr< const TF1 > m_timeResFuncHG_p
std::vector< float > m_nonLinCorrParamsHG
double getAmplitudeCorrection(bool highGain)
constexpr int pow(int base, int exp) noexcept
static float s_combinedFitTMax
unsigned int m_postExclLGADCThresh
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
std::vector< float > m_samplesSig
float m_initialPrePulseT0
std::string m_fadcCorrFileName
std::vector< float > m_HGT0CorrParams
static std::vector< float > s_pullValues
static std::vector< float > CalculateDerivative(const std::vector< float > &inputData, unsigned int step)