 |
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,
N_STATUS_BITS
} |
| |
| enum | LowGainMode { LGModeNormal = 0,
LGModeForceLG,
LGModeRefitLG
} |
| |
| enum | TimingCorrMode { NoTimingCorr = 0,
TimingCorrLin,
TimingCorrLog
} |
| |
|
| | ZDCPulseAnalyzer (ZDCMsg::MessageFunctionPtr msgFunc_p, const std::string &tag, int Nsample, float deltaTSample, size_t preSampleIdx, int pedestal, float gainHG, const std::string &fitFunction, int peak2ndDerivMinSample, float peak2DerivMinThreshHG, float peak2DerivMinThreshLG) |
| |
| | ~ZDCPulseAnalyzer () |
| |
| void | SetFitOPtions (const std::string &fitOptions) |
| |
| 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 | 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 |
| |
| 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 | dumpSetting () 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 () |
| |
| 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 | DoFit (bool refitLG=false) |
| |
| void | DoFitCombined (bool refitLG=false) |
| |
| void | UpdateFitterTimeLimits (TFitter *fitter, ZDCFitWrapper *wrapper, bool prePulse) |
| |
Definition at line 21 of file ZDCPulseAnalyzer.h.
◆ SampleCIter
◆ anonymous enum
| Enumerator |
|---|
| PulseBit | |
| LowGainBit | |
| FailBit | |
| HGOverflowBit | |
| HGUnderflowBit | |
| PSHGOverUnderflowBit | |
| LGOverflowBit | |
| LGUnderflowBit | |
| PrePulseBit | |
| PostPulseBit | |
| FitFailedBit | |
| BadChisqBit | |
| BadT0Bit | |
| ExcludeEarlyLGBit | |
| ExcludeLateLGBit | |
| preExpTailBit | |
| FitMinAmpBit | |
| RepassPulseBit | |
| ArmSumIncludeBit | |
| N_STATUS_BITS | |
Definition at line 24 of file ZDCPulseAnalyzer.h.
◆ LowGainMode
| Enumerator |
|---|
| LGModeNormal | |
| LGModeForceLG | |
| LGModeRefitLG | |
Definition at line 51 of file ZDCPulseAnalyzer.h.
◆ TimingCorrMode
| Enumerator |
|---|
| NoTimingCorr | |
| TimingCorrLin | |
| TimingCorrLog | |
Definition at line 57 of file ZDCPulseAnalyzer.h.
◆ ZDCPulseAnalyzer()
| ZDCPulseAnalyzer::ZDCPulseAnalyzer |
( |
ZDCMsg::MessageFunctionPtr |
msgFunc_p, |
|
|
const std::string & |
tag, |
|
|
int |
Nsample, |
|
|
float |
deltaTSample, |
|
|
size_t |
preSampleIdx, |
|
|
int |
pedestal, |
|
|
float |
gainHG, |
|
|
const std::string & |
fitFunction, |
|
|
int |
peak2ndDerivMinSample, |
|
|
float |
peak2DerivMinThreshHG, |
|
|
float |
peak2DerivMinThreshLG |
|
) |
| |
◆ ~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 1033 of file ZDCPulseAnalyzer.cxx.
1053 bool haveFirst =
false;
1054 unsigned int lastUsed = 0;
1092 std::ostringstream pedMessage;
1114 std::ostringstream baselineMsg;
1115 baselineMsg <<
"Delayed samples baseline correction = " <<
m_baselineCorr << std::endl;
1121 for (
size_t isample = 0; isample <
nSamples; isample++) {
1132 std::for_each(
m_samplesSub.begin(),
m_samplesSub.end(), [ = ] (
float & adcUnsub) {return adcUnsub -= m_preSample;} );
1207 if (derivPresampleSig < -5) {
1213 if (!useSample[isample])
continue;
1215 float sampleSig = -
m_samplesSub[isample]/(std::sqrt(2.0)*noiseSig);
1218 if ((sampleSig > 5 && sigRatio > 0.02) || sigRatio > 0.5) {
1229 float maxPrepulseSig = 0;
1230 unsigned int maxPrepulseSample = 0;
1232 for (
int isample = loopStart; isample <= loopLimit; isample++) {
1233 if (!useSample[isample])
continue;
1249 if (prePulseSig > maxPrepulseSig) {
1250 maxPrepulseSig = prePulseSig;
1251 maxPrepulseSample = isample;
1286 for (
int isample = postStartIdx; isample < (
int)
nSamples - 1; isample++) {
1287 if (!useSample.at(isample))
continue;
1318 float derivSig = deriv/(std::sqrt(2)*noiseSig);
1327 if (std::abs(deriv2ndTest) > 0.15) {
1340 if (deriv2ndSig > 5 && deriv2ndTest < -0.1) {
1351 std::ostringstream ostrm;
1352 ostrm <<
"Post pulse found, m_maxSampleEvt = " <<
m_maxSampleEvt;
1370 std::ostringstream ostrm;
1371 ostrm <<
"Pulse fit successful with chisquare = " <<
m_fitChisq;
1389 for (
unsigned int ipow = 0; ipow < t0CorrParams.size(); ipow++) {
1398 bool failFixedCut = m_fitTimeCorr < minT0Corr || m_fitTimeCorr > maxT0Corr;
1408 double timeResolution = 0;
1420 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 |
◆ CombinedPulsesFCN()
| void ZDCPulseAnalyzer::CombinedPulsesFCN |
( |
int & |
numParam, |
|
|
double * |
, |
|
|
double & |
f, |
|
|
double * |
par, |
|
|
int |
flag |
|
) |
| |
|
staticprivate |
Definition at line 30 of file ZDCPulseAnalyzer.cxx.
43 float delayBaselineAdjust =
par[0];
47 for (
int isample = 0; isample <
nSamples; isample++) {
57 double pull = (histValue - funcVal) / histError;
65 for (
int isample = 0; isample <
nSamples; isample++) {
74 double pull = (histValue - funcVal) / histError;
◆ disableFADCCorrections()
| void ZDCPulseAnalyzer::disableFADCCorrections |
( |
| ) |
|
|
inline |
◆ DoAnalysis()
| bool ZDCPulseAnalyzer::DoAnalysis |
( |
bool |
repass | ) |
|
|
private |
Definition at line 927 of file ZDCPulseAnalyzer.cxx.
929 float deriv2ndThreshHG = 0;
930 float deriv2ndThreshLG = 0;
◆ DoFit()
| void ZDCPulseAnalyzer::DoFit |
( |
bool |
refitLG = false | ) |
|
|
private |
Definition at line 1462 of file ZDCPulseAnalyzer.cxx.
1466 TH1* hist_p =
nullptr;
1471 float ampInitial, fitAmpMin, fitAmpMax, t0Initial;
1492 if (ampInitial < fitAmpMin) ampInitial = fitAmpMin * 1.5;
1514 fitWrapper->
Initialize(ampInitial, t0Initial, fitAmpMin, fitAmpMax);
1532 int fitStatus = result_ptr;
1538 if (fitStatus != 0 && result_ptr->Edm() > 0.001)
1548 if ((
int) constrFitResult_ptr != 0) {
1558 if ((
int) unconstrFitResult_ptr != 0) {
1565 if ((
int) constrFit2Result_ptr != 0) {
1572 result_ptr = constrFit2Result_ptr;
1576 result_ptr = unconstrFitResult_ptr;
1582 hist_p->GetListOfFunctions()->Clear();
1585 std::string
name = func->GetName();
1587 TF1* copyFunc =
static_cast<TF1*
>(func->Clone((
name +
"_copy").c_str()));
1588 hist_p->GetListOfFunctions()->Add(copyFunc);
◆ DoFitCombined()
| void ZDCPulseAnalyzer::DoFitCombined |
( |
bool |
refitLG = false | ) |
|
|
private |
Definition at line 1630 of file ZDCPulseAnalyzer.cxx.
1633 TH1* hist_p =
nullptr, *delayedHist_p =
nullptr;
1645 float fitAmpMin, fitAmpMax, t0Initial, ampInitial;
1661 if (ampInitial < fitAmpMin) ampInitial = fitAmpMin * 1.5;
1687 fitWrapper->
Initialize(ampInitial, t0Initial, fitAmpMin, fitAmpMax);
1692 TFitter* theFitter =
nullptr;
1716 size_t numFitPar = theFitter->GetNumberTotalParameters();
1718 theFitter->GetMinuit()->fISW[4] = -1;
1723 theFitter->GetMinuit()->fISW[4] = -1;
1726 theFitter->GetMinuit()->mnexcm(
"SET NOWarnings",
nullptr,0,ierr);
1728 else theFitter->GetMinuit()->fISW[4] = 0;
1733 theFitter->SetParameter(0,
"delayBaselineAdjust", 0, 0.01, -100, 100);
1734 theFitter->ReleaseParameter(0);
1737 theFitter->SetParameter(0,
"delayBaselineAdjust", 0, 0.01, -100, 100);
1738 theFitter->FixParameter(0);
1742 double arglist[100];
1745 int status = theFitter->ExecuteCommand(
"MIGRAD", arglist, 2);
1747 double fitAmp = theFitter->GetParameter(1);
1751 double chi2, edm, errdef;
1754 theFitter->GetStats(
chi2, edm, errdef, nvpar, nparx);
1759 if (
status || fitAmp < fitAmpMin * 1.01 || edm > 0.01){
1764 theFitter->SetParameter(0,
"delayBaselineAdjust", 0, 0.01, -100, 100);
1765 theFitter->FixParameter(0);
1769 if (fitAmp < fitAmpMin * 1.01) {
1775 fitWrapper->
Initialize(ampInitial, t0Initial, fitAmpMin, fitAmpMax);
1779 status = theFitter->ExecuteCommand(
"MIGRAD", arglist, 2);
1784 theFitter->ReleaseParameter(0);
1792 theFitter->ReleaseParameter(0);
1793 status = theFitter->ExecuteCommand(
"MIGRAD", arglist, 2);
1798 theFitter->SetParameter(0,
"delayBaselineAdjust", 0, 0.01, -100, 100);
1799 theFitter->FixParameter(0);
1800 status = theFitter->ExecuteCommand(
"MIGRAD", arglist, 2);
1808 fitAmp = theFitter->GetParameter(1);
1812 if (fitAmp < fitAmpMin * 1.01) {
1816 if (!
s_quietFits) theFitter->GetMinuit()->fISW[4] = -1;
1818 std::vector<double> funcParams(numFitPar - 1);
1819 std::vector<double> funcParamErrs(numFitPar - 1);
1827 for (
size_t ipar = 1; ipar < numFitPar; ipar++) {
1828 funcParams[ipar - 1] = theFitter->GetParameter(ipar);
1829 funcParamErrs[ipar - 1] = theFitter->GetParError(ipar);
1837 theFitter->GetStats(
chi2, edm, errdef, nvpar, nparx);
1857 theFitter->ExecuteCommand(
"Cal1fcn", arglist, 1);
◆ dump()
| void ZDCPulseAnalyzer::dump |
( |
| ) |
const |
Definition at line 1953 of file ZDCPulseAnalyzer.cxx.
1964 std::ostringstream message1;
1965 message1 <<
"samplesSub ";
1971 std::ostringstream message3;
1972 message3 <<
"samplesDeriv2nd ";
◆ dumpSetting()
| void ZDCPulseAnalyzer::dumpSetting |
( |
| ) |
const |
◆ dumpTF1()
| void ZDCPulseAnalyzer::dumpTF1 |
( |
const TF1 * |
func | ) |
const |
Definition at line 1981 of file ZDCPulseAnalyzer.cxx.
1983 std::string
message =
"Dump of TF1: " + std::string(func->GetName());
1985 if (!continueDump)
return;
1987 unsigned int npar = func->GetNpar();
1988 for (
unsigned int ipar = 0; ipar < npar; ipar++) {
1989 std::ostringstream msgstr;
1991 double parMin = 0, parMax = 0;
1992 func->GetParLimits(ipar, parMin, parMax);
1994 msgstr <<
"Parameter " << ipar <<
", value = " << func->GetParameter(ipar) <<
", error = "
1995 << 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 449 of file ZDCPulseAnalyzer.cxx.
456 auto getXmin=[](
const TH1 * pH){
457 return pH->GetXaxis()->GetXmin();
459 auto getXmax=[](
const TH1 * pH){
460 return pH->GetXaxis()->GetXmax();
462 auto xmin= getXmin(correHistHG.get());
463 auto xmax= getXmax(correHistHG.get());
464 if (std::abs(
xmin+0.5) > 1
e-3 || std::abs(
xmax - 4095.5) > 1
e-3) {
465 (*m_msgFunc_p)(
ZDCMsg::Error,
"ZDCPulseAnalyzer::enableFADCCorrections:: invalid high gain correction histogram range: xmin, xmax = " +
471 xmin= getXmin(correHistLG.get());
472 xmax= getXmax(correHistLG.get());
473 if (std::abs(
xmin+0.5) > 1
e-3 ||
474 std::abs(
xmax - 4095.5) > 1
e-3) {
475 (*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 420 of file ZDCPulseAnalyzer.cxx.
429 std::string timeResHGName =
"TimeResFuncHG_" +
m_tag;
430 std::string timeResLGName =
"TimeResFuncLG_" +
m_tag;
432 TF1* funcHG_p =
new TF1(timeResHGName.c_str(), TF1String.c_str(), 0,
m_HGOverflowADC);
433 TF1* funcLG_p =
new TF1(timeResLGName.c_str(), TF1String.c_str(), 0,
m_LGOverflowADC);
435 if (parsHG.size() !=
static_cast<unsigned int>(funcHG_p->GetNpar()) ||
436 parsLG.size() !=
static_cast<unsigned int>(funcLG_p->GetNpar())) {
441 funcHG_p->SetParameters(&parsHG[0]);
442 funcLG_p->SetParameters(&parsLG[0]);
◆ ExcludeEarlyLG()
| bool ZDCPulseAnalyzer::ExcludeEarlyLG |
( |
| ) |
const |
|
inline |
◆ ExcludeLateLG()
| bool ZDCPulseAnalyzer::ExcludeLateLG |
( |
| ) |
const |
|
inline |
◆ Failed()
| bool ZDCPulseAnalyzer::Failed |
( |
| ) |
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 520 of file ZDCPulseAnalyzer.cxx.
522 double amplCorrFactor = 1;
528 amplCorrFactor *= fadcCorr;
540 float invNLCorr = 1.0;
554 amplCorrFactor /= invNLCorr;
557 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 2046 of file ZDCPulseAnalyzer.cxx.
2053 TH1* hist_p =
nullptr, *delayedHist_p =
nullptr;
2063 std::shared_ptr<TGraphErrors> theGraph = std::make_shared<TGraphErrors>(TGraphErrors(2 *
m_Nsample));
2066 for (
int ipt = 0; ipt < hist_p->GetNbinsX(); ipt++) {
2067 theGraph->SetPoint(npts, hist_p->GetBinCenter(ipt + 1), hist_p->GetBinContent(ipt + 1));
2068 theGraph->SetPointError(npts++, 0, hist_p->GetBinError(ipt + 1));
2071 for (
int iDelayPt = 0; iDelayPt < delayedHist_p->GetNbinsX(); iDelayPt++) {
2072 theGraph->SetPoint(npts, delayedHist_p->GetBinCenter(iDelayPt + 1), delayedHist_p->GetBinContent(iDelayPt + 1) -
m_delayedBaselineShift);
2073 theGraph->SetPointError(npts++, 0, delayedHist_p->GetBinError(iDelayPt + 1));
2076 TF1* func_p =
static_cast<TF1*
>(hist_p->GetListOfFunctions()->Last());
2078 theGraph->GetListOfFunctions()->Add(
new TF1(*func_p));
2079 hist_p->GetListOfFunctions()->SetOwner (
false);
2082 theGraph->SetName(( std::string(hist_p->GetName()) +
"combinaed").c_str());
2084 theGraph->SetMarkerStyle(20);
2085 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 483 of file ZDCPulseAnalyzer.cxx.
502 std::vector<float> pulls(
m_Nsample, -100);
505 const TF1* fit_p =
static_cast<const TF1*
>(dataHist_p->GetListOfFunctions()->Last());
507 for (
size_t ibin = 0; ibin <
m_Nsample ; ibin++) {
508 float t = dataHist_p->GetBinCenter(ibin + 1);
509 float fitVal = fit_p->Eval(
t);
510 float histVal = dataHist_p->GetBinContent(ibin + 1);
511 float histErr = dataHist_p->GetBinError(ibin + 1);
512 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 2091 of file ZDCPulseAnalyzer.cxx.
2098 std::shared_ptr<TGraphErrors> theGraph = std::make_shared<TGraphErrors>(TGraphErrors(
m_Nsample));
2101 for (
int ipt = 0; ipt < hist_p->GetNbinsX(); ipt++) {
2102 theGraph->SetPoint(npts, hist_p->GetBinCenter(ipt + 1), hist_p->GetBinContent(ipt + 1));
2103 theGraph->SetPointError(npts++, 0, hist_p->GetBinError(ipt + 1));
2106 TF1* func_p =
static_cast<TF1*
>(hist_p->GetListOfFunctions()->Last());
2107 theGraph->GetListOfFunctions()->Add(func_p);
2108 theGraph->SetName(( std::string(hist_p->GetName()) +
"not_combinaed").c_str());
2110 theGraph->SetMarkerStyle(20);
2111 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 653 of file ZDCPulseAnalyzer.cxx.
656 (*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 678 of file ZDCPulseAnalyzer.cxx.
682 (*m_msgFunc_p)(
ZDCMsg::Fatal,
"ZDCPulseAnalyzer::LoadAndAnalyzeData:: Wrong LoadAndAnalyzeData called -- expecting only undelayed samples");
704 for (
size_t isample = 0; isample <
m_Nsample; isample++) {
705 float ADCHG = ADCSamplesHG[isample];
706 float ADCLG = ADCSamplesLG[isample];
◆ MakeCombinedFitter()
| std::unique_ptr< TFitter > ZDCPulseAnalyzer::MakeCombinedFitter |
( |
TF1 * |
func | ) |
|
|
staticprivate |
Definition at line 1898 of file ZDCPulseAnalyzer.cxx.
1900 TVirtualFitter::SetDefaultFitter(
"Minuit");
1902 size_t nFitParams = func->GetNpar() + 1;
1903 std::unique_ptr<TFitter>
fitter = std::make_unique<TFitter>(nFitParams);
1905 fitter->GetMinuit()->fISW[4] = -1;
1906 fitter->SetParameter(0,
"delayBaselineAdjust", 0, 0.01, -100, 100);
1908 for (
size_t ipar = 0; ipar < nFitParams - 1; ipar++) {
1909 double parLimitLow, parLimitHigh;
1911 func->GetParLimits(ipar, parLimitLow, parLimitHigh);
1912 if (std::abs(parLimitHigh / parLimitLow - 1) < 1
e-6) {
1913 double value = func->GetParameter(ipar);
1917 fitter->SetParameter(ipar + 1, func->GetParName(ipar), func->GetParameter(ipar), 0.01, lowLim, highLim);
1918 fitter->FixParameter(ipar + 1);
1921 double value = func->GetParameter(ipar);
1922 if (
value >= parLimitHigh)
value = parLimitHigh * 0.99;
1923 else if (
value <= parLimitLow)
value = parLimitLow * 1.01;
1925 double step =
std::min((parLimitHigh - parLimitLow)/100., (
value - parLimitLow)/100.);
1927 fitter->SetParameter(ipar + 1, func->GetParName(ipar),
value,
step, parLimitLow, parLimitHigh);
◆ obtainDelayedBaselineCorr()
| float ZDCPulseAnalyzer::obtainDelayedBaselineCorr |
( |
const std::vector< float > & |
samples | ) |
|
|
staticprivate |
Definition at line 2170 of file ZDCPulseAnalyzer.cxx.
2172 const unsigned int nsamples = samples.size();
2180 float minScore = 1.0e9;
2181 unsigned int minIndex = 0;
2184 float deriv = derivVec[
idx];
2185 float prevDeriv = derivVec[
idx - 1];
2187 float derivDiff = deriv - prevDeriv;
2189 float deriv2nd = deriv2ndVec[
idx];
2195 float score = (deriv*deriv + 2*derivDiff*derivDiff +
2196 0.5*deriv2nd*deriv2nd);
2198 if (
score < minScore) {
2209 if (minIndex<2 or (minIndex+1) >=
nsamples){
2210 throw std::out_of_range(
"minIndex out of range in ZDCPulseAnalyzer::obtainDelayedBaselineCorr");
2212 float sample0 = samples[minIndex - 2];
2213 float sample1 = samples[minIndex - 1];
2214 float sample2 = samples[minIndex];
2215 float sample3 = samples[minIndex + 1];
2219 float baselineCorr = (0.5 * (sample1 - sample0 + sample3 - sample2) -
2220 0.25 * (sample3 - sample1 + sample2 - sample0));
2222 if (minIndex % 2 != 0) baselineCorr =-baselineCorr;
2224 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()
| static bool ZDCPulseAnalyzer::QuietFits |
( |
| ) |
|
|
inlinestatic |
◆ ReanalyzeData()
| bool ZDCPulseAnalyzer::ReanalyzeData |
( |
| ) |
|
◆ repassPulse()
| bool ZDCPulseAnalyzer::repassPulse |
( |
| ) |
const |
|
inline |
◆ Reset()
| void ZDCPulseAnalyzer::Reset |
( |
bool |
reanalyze = false | ) |
|
|
private |
◆ ScanAndSubtractSamples()
| bool ZDCPulseAnalyzer::ScanAndSubtractSamples |
( |
| ) |
|
|
private |
Definition at line 742 of file ZDCPulseAnalyzer.cxx.
747 bool doDump = (*m_msgFunc_p)(
ZDCMsg::Verbose,
"Dumping all samples before subtraction: ");
749 std::ostringstream dumpStringHG;
750 dumpStringHG <<
"HG: ";
752 dumpStringHG << std::setw(4) <<
val <<
" ";
760 std::ostringstream dumpStringLG;
761 dumpStringLG <<
"LG: " << std::setw(4) << std::setfill(
' ');
763 dumpStringLG << std::setw(4) <<
val <<
" ";
785 for (
size_t isample = 0; isample <
m_NSamplesAna; isample++) {
885 std::ostringstream dumpStringUseHG;
886 dumpStringUseHG <<
"HG: ";
888 dumpStringUseHG <<
val <<
" ";
892 std::ostringstream dumpStringUseLG;
893 dumpStringUseLG <<
"LG: ";
895 dumpStringUseLG <<
val <<
" ";
907 if (m_lastHGOverFlowSample < 2 && m_lastHGOverFlowSample > -1) {
922 (*m_msgFunc_p)(
ZDCMsg::Verbose,
"ZDCPulseAnalyzer:: " +
m_tag +
": ScanAndSubtractSamples done");
◆ 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 |
◆ 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 514 of file ZDCPulseAnalyzer.h.
516 std::string HGParamsStr =
"HG coefficients = ", LGParamsStr =
"LG coefficients = ";
521 (*m_msgFunc_p)(
ZDCMsg::Info, (
"Setting non-linear parameters for module: " +
m_tag +
", reference ADC = " +
◆ SetPeak2ndDerivMinTolerance()
| void ZDCPulseAnalyzer::SetPeak2ndDerivMinTolerance |
( |
size_t |
tolerance | ) |
|
|
inline |
◆ SetQuietFits()
| static void ZDCPulseAnalyzer::SetQuietFits |
( |
bool |
quiet | ) |
|
|
inlinestatic |
◆ SetSaveFitFunc()
| static void ZDCPulseAnalyzer::SetSaveFitFunc |
( |
bool |
save | ) |
|
|
inlinestatic |
◆ 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 |
◆ SetupFitFunctions()
| void ZDCPulseAnalyzer::SetupFitFunctions |
( |
| ) |
|
|
private |
◆ UpdateFitterTimeLimits()
| void ZDCPulseAnalyzer::UpdateFitterTimeLimits |
( |
TFitter * |
fitter, |
|
|
ZDCFitWrapper * |
wrapper, |
|
|
bool |
prePulse |
|
) |
| |
|
private |
Definition at line 1936 of file ZDCPulseAnalyzer.cxx.
1938 double parLimitLow, parLimitHigh;
1941 func_p->GetParLimits(1, parLimitLow, parLimitHigh);
1943 fitter->SetParameter(2, func_p->GetParName(1), func_p->GetParameter(1), 0.01, parLimitLow, parLimitHigh);
1948 func_p->GetParLimits(parIndex, parLimitLow, parLimitHigh);
1949 fitter->SetParameter(parIndex + 1, func_p->GetParName(parIndex), func_p->GetParameter(parIndex), 0.01, parLimitLow, parLimitHigh);
◆ UseLowGain()
| bool ZDCPulseAnalyzer::UseLowGain |
( |
| ) |
const |
|
inline |
◆ 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 {} |
|
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_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_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_gainFactorHG
| float ZDCPulseAnalyzer::m_gainFactorHG {} |
|
private |
◆ m_gainFactorLG
| float ZDCPulseAnalyzer::m_gainFactorLG {} |
|
private |
◆ m_gainHG
| float ZDCPulseAnalyzer::m_gainHG {} |
|
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_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_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_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_quietFits
| bool ZDCPulseAnalyzer::s_quietFits = true |
|
staticprivate |
◆ s_saveFitFunc
| bool ZDCPulseAnalyzer::s_saveFitFunc = false |
|
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 ExcludeLateLG() const
virtual std::shared_ptr< TF1 > GetWrapperTF1()
float m_delayedBaselineShift
static TH1 * s_delayedFitHist
std::vector< float > m_samplesDeriv2nd
virtual float GetTau2() const =0
static bool s_saveFitFunc
static TF1 * s_combinedFitFunc
static float s_combinedFitTMin
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
def save(self, fileName="./columbo.out")
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)
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
unsigned int m_preExclLGADCThresh
static float obtainDelayedBaselineCorr(const std::vector< float > &samples)
std::vector< float > m_ADCSamplesHGSub
std::vector< float > m_ADCSSampSigLG
static std::vector< float > Calculate2ndDerivative(const std::vector< float > &inputData, unsigned int step)
unsigned int m_preSampleIdx
std::string to_string(const DetectorType &type)
bool ExcludeEarlyLG() const
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
void dumpTF1(const TF1 *) 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::vector< float > m_HGT0CorrParams
static std::vector< float > s_pullValues
static std::vector< float > CalculateDerivative(const std::vector< float > &inputData, unsigned int step)